1
0
Fork 0
mbuni/mbuni/mmlib/mms_mm7soap.h

46 lines
1.4 KiB
C
Raw Normal View History

#ifndef __MMS_MM7SOAP_INCLUDED__
#define __MMS_MM7SOAP_INCLUDED__
#include "mms_util.h"
#define MM7_SOAP_OK 1000
#define MM7_SOAP_FORMAT_CORRUPT 2007
#define MM7_SOAP_STATUS_OK(e) ((e) / 1000 == 1)
#define MM7_DEFAULT_VERSION "5.3.0"
2005-04-08 10:29:08 +00:00
typedef struct MSoapMsg_t MSoapMsg_t;
/* Parse SOAP message given http headers and body. */
2005-04-08 10:29:08 +00:00
extern MSoapMsg_t *mm7_parse_soap(List *headers, Octstr *body);
/* Convert SOAP message to http headers and body. */
2005-04-08 10:29:08 +00:00
extern int mm7_soapmsg_to_httpmsg(MSoapMsg_t *m, List **hdrs, Octstr **body);
/* Convert SOAP message to an MMS message. */
extern MmsMsg *mm7_soap_to_mmsmsg(MSoapMsg_t *m, Octstr *from);
/* Return the message type. */
extern int mm7_msgtype(MSoapMsg_t *m);
/* Collect and return envelope data:
* - to -- list of recipients to send to
* - subject -- subject
* - msgid -- message id
* - vasid/vaspid -- vasid and vaspid
*/
extern int mm7_get_envelope(MSoapMsg_t *m, Octstr **sender,
List **to, Octstr **subject,
Octstr **vasid,
time_t *expiry_t,
time_t *delivery_t);
/* Delete the thingie... */
extern void mm7_soap_destroy(MSoapMsg_t *m);
/* Convert a message to a SOAP message. */
MSoapMsg_t *mm7_mmsmsg_to_soap(MmsMsg *msg, Octstr *from, List *xto,
Octstr *transid, Octstr *serverID);
MSoapMsg_t *mm7_make_resp(MSoapMsg_t *mreq, int status, Octstr *msgid);
/* Return the header value for some header. */
Octstr *mm7_soap_header_value(MSoapMsg_t *m, Octstr *header);
#endif