2005-03-23 05:55:16 +00:00
|
|
|
/*
|
|
|
|
* Mbuni - Open Source MMS Gateway
|
|
|
|
*
|
|
|
|
* Mbuni MSISDN mapper sample
|
|
|
|
*
|
2008-07-10 09:46:58 +00:00
|
|
|
* Copyright (C) 2003 - 2008, Digital Solutions Ltd. - http://www.dsmagic.com
|
2005-03-23 05:55:16 +00:00
|
|
|
*
|
|
|
|
* Paul Bagyenda <bagyenda@dsmagic.com>
|
|
|
|
*
|
|
|
|
* This program is free software, distributed under the terms of
|
|
|
|
* the GNU General Public License, with a few exceptions granted (see LICENSE)
|
|
|
|
*/
|
2005-03-11 20:29:10 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include "mms_detokenize.h"
|
|
|
|
#include "mms_util.h"
|
|
|
|
|
|
|
|
static int mms_detokenizer_init(char *settings)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int mms_detokenizer_fini(void)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2005-09-27 16:46:09 +00:00
|
|
|
static Octstr *mms_detokenize(Octstr * token, Octstr *request_ip)
|
2005-03-11 20:29:10 +00:00
|
|
|
{
|
|
|
|
/* Return the MSISDN matching the token as a new Octstr */
|
|
|
|
return octstr_create("+45xxxxxx");
|
|
|
|
}
|
|
|
|
|
2005-04-04 13:47:03 +00:00
|
|
|
static Octstr *mms_gettoken(Octstr *msisdn)
|
|
|
|
{
|
|
|
|
/* Return the MSISDN matching the token as a new Octstr */
|
|
|
|
return octstr_create("yy");
|
|
|
|
}
|
|
|
|
|
2005-03-11 20:29:10 +00:00
|
|
|
/* The function itself. */
|
2005-09-01 10:26:36 +00:00
|
|
|
MmsDetokenizerFuncStruct mms_detokenizefuncs = {
|
2005-03-11 20:29:10 +00:00
|
|
|
mms_detokenizer_init,
|
|
|
|
mms_detokenize,
|
2005-04-04 13:47:03 +00:00
|
|
|
mms_gettoken,
|
2005-09-01 10:26:36 +00:00
|
|
|
mms_detokenizer_fini
|
2005-03-11 20:29:10 +00:00
|
|
|
};
|