1
0
Fork 0
mbuni/mbuni/mmsbox/mmsbox_cfg.h

73 lines
2.3 KiB
C

/*
* Mbuni - Open Source MMS Gateway
*
* MMSBOX 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 __MMSBOX_CFG_INCLUDED__
#define __MMSBOX_CFG_INCLUDED__
#include "mms_util.h"
typedef struct MmscGrp {
Octstr *id; /* MMSC id (for logging). */
Octstr *mmsc_url; /* URL at which MMSC can be reached. */
struct {
Octstr *user, *pass;
long port;
} incoming; /* user, pass, port (and whether SSL) that MMSC uses to connect to us. */
enum {UNKNOWN_MMSC, SOAP_MMSC, EAIF_MMSC} type; /* type of connection. */
long throughput; /* Max send rate. */
long threadid; /* handler thread. */
} MmscGrp;
typedef struct MmsServiceUrlParam {
Octstr *name;
enum {NO_PART, IMAGE_PART, VIDEO_PART,
TEXT_PART, SMIL_PART , OTHER_PART,
ANY_PART } type;
Octstr *value; /* for generic value (type == NO_PART),
* or for value that follows spec (e.g. %Tisatest is allowed) */
} MmsServiceUrlParam;
typedef struct MmsService {
Octstr *name; /* name of service. */
int isdefault;
int omitempty;
int accept_x_headers;
int assume_plain_text;
List *keywords; /* List of keywords matched. */
enum {TRANS_TYPE_GET_URL, TRANS_TYPE_POST_URL, TRANS_TYPE_FILE, TRANS_TYPE_EXEC,
TRANS_TYPE_TEXT} type;
Octstr *url;
List *params; /* of MmsServiceUrlParam */
Octstr *faked_sender;
List *allowed_mmscs; /* List of MMSCs allowed to access this service (by ID). */
} MmsService;
typedef struct SendMmsUser {
Octstr *user, *pass;
Octstr *faked_sender;
} SendMmsUser;
/* Basic settings for the mmsbox. */
extern List *sendmms_users; /* list of SendMmsUser structs */
extern List *mms_services; /* list of MMS Services */
extern List *mmscs;
extern Octstr *incoming_qdir, *outgoing_qdir;
extern struct SendMmsPortInfo {
long port; /* Might be ssl-ed. */
Octstr *allow_ip;
Octstr *deny_ip;
} sendmms_port;
extern int mms_load_mmsbox_settings(Cfg *cfg, gwthread_func_t *mmsc_handler_func);
#endif