2005-03-23 05:55:16 +00:00
|
|
|
/*
|
|
|
|
* Mbuni - Open Source MMS Gateway
|
|
|
|
*
|
|
|
|
* Mbuni MSISDN mapper sample
|
|
|
|
*
|
|
|
|
* Copyright (C) 2003 - 2005, Digital Solutions Ltd. - http://www.dsmagic.com
|
|
|
|
*
|
|
|
|
* 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;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Octstr *mms_detokenize(Octstr * token)
|
|
|
|
{
|
|
|
|
/* 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. */
|
|
|
|
MmsTokenize mms_detokenizefuncs = {
|
|
|
|
mms_detokenizer_init,
|
|
|
|
mms_detokenize,
|
2005-04-04 13:47:03 +00:00
|
|
|
mms_gettoken,
|
2005-03-11 20:29:10 +00:00
|
|
|
mms_detokenize_fini
|
|
|
|
};
|