1
0
Fork 0
mbuni/mbuni/mmsc/mmsc_cfg.h

111 lines
2.9 KiB
C

/*
* Mbuni - Open Source MMS Gateway
*
* MMSC CFG: MMC configuration and misc. functions
*
* 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)
*/
#ifndef __MMSC_CFG__
#define __MMSC_CFG__
#include "mms_util.h"
#include "mms_resolve.h"
#include "mms_billing.h"
#include "mms_detokenize.h"
typedef struct MmsProxyRelay {
Octstr *host;
Octstr *name;
Octstr *allowed_prefix;
Octstr *denied_prefix;
} MmsProxyRelay;
typedef struct MmsVasp {
Octstr *id;
long short_code;
enum {SOAP_VASP, EAIF_VASP, NONE_VASP} type;
Octstr *vasp_username, *vasp_password;
Octstr *vasp_url;
Octstr *mmsc_username, *mmsc_password;
} MmsVasp;
typedef struct MmscSettings {
Octstr *system_user;
Octstr *name, *hostname, *host_alias;
List *local_domains;
Octstr *unified_prefix, *local_prefix;
Octstr *sendmail;
Octstr *global_queuedir, *mm1_queuedir, *mm4_queuedir;
Octstr *mmbox_rootdir;
Octstr *ua_profile_cache_dir;
long maxthreads;
long maxsendattempts;
long default_msgexpiry;
double queue_interval;
long send_back_off;
long port, mm7port;
Octstr *allow_ip;
Octstr *deny_ip;
Octstr *email2mmsrelay_prefixes;
Octstr *sendsms_url;
#if 0
Octstr *sendsms_user, *sendsms_pass, *sendsms_globalsender;
#endif
Octstr *billing_params;
MmsBillingFuncStruct *mms_billfuncs; /* Link to billing funcs. */
void *mms_bill_module_data;
Octstr *resolver_params;
MmsResolverFuncStruct *mms_resolvefuncs; /* Link to resolver funcs. */
void *mms_resolver_module_data;
Octstr *detokenizer_params;
MmsDetokenizerFuncStruct *mms_detokenizefuncs; /* Link to detokenizer funcs. */
void *mms_detokenizer_module_data;
int allow_ip_type;
int optimize_notification_size;
int content_adaptation;
Octstr *prov_notify;
Octstr *prov_getstatus;
int notify_unprovisioned;
Octstr *mms_notify_txt;
Octstr *mms_notify_unprov_txt;
Octstr *mms_toolarge;
Octstr *mms_email_txt;
Octstr *mms_email_html;
Octstr *wap_gw_msisdn_header;
Octstr *wap_gw_ip_header;
List *vasp_list; /* of MmsVasp * */
} MmscSettings;
/* Returns mmsc settings. */
MmscSettings *mms_load_mmsc_settings(Cfg *cfg, List **proxyrelays);
/* Returns list of MmsProxyRelay */
extern List *mms_proxy_relays(Cfg *cfg);
extern Octstr *mms_makefetchurl(char *qf, Octstr *token, int loc,
Octstr *to,
MmscSettings *settings);
Octstr *mms_find_sender_msisdn(Octstr *send_url, List *request_hdrs,
Octstr *msisdn_header,
MmsDetokenizerFuncStruct *detokenizerfuncs);
#endif