#include <stdlib.h>
#include "sms_xml.h"
#include "smslib.h"

#define FALSE 0
#define TRUE !FALSE

struct sms_xml {
	int err;
};

struct xml_message {
	int placeholder;
};

/* should NOT return NULL as struct is needed in order to find out what errcode means */
SmsXml *sms_xml_init(Sms *sms, XmlInit *init, int *errcode) {
	SmsXml *xml = calloc(1,sizeof(SmsXml));
	return xml;
}
void sms_xml_free(SmsXml **xml) {
	if (xml && *xml) {
		/* free struct stuff here */

		/* */
		free(*xml);
		*xml = NULL;
	}
}
XmlMessage *sms_xml_wait(SmsXml *xml, long timeout_msec, int *errcode) {
	return NULL;
}
int sms_xml_send(SmsXml *xml, void *data, char *from, char *to, char *message) {
	return SMS_NO_ERROR;
}
int sms_xml_recv(SmsXml *xml, XmlMessage *msg) {
	return SMS_NO_ERROR;
}
int sms_xml_accept(SmsXml *xml, XmlMessage *msg, int code, char *reason) {
	return SMS_NO_ERROR;
}
int sms_xml_reject(SmsXml *xml, XmlMessage *msg, int code, char *reason) {
	return SMS_NO_ERROR;
}
char *sms_xml_error(SmsXml *xml, int errcode, char *bf, int bfsz) {
	return bf;
}
char *sms_xml_fromip(SmsXml *xml, XmlMessage *msg) {
	return "";
}
char *sms_xml_from(SmsXml *xml, XmlMessage *msg) {
	return "";
}
char *sms_xml_to(SmsXml *xml, XmlMessage *msg) {
	return "";
}
char *sms_xml_body(SmsXml *xml, XmlMessage *msg) {
	return "";
}
void sms_xml_msgfree(SmsXml *xml, XmlMessage **msg) {
	if (xml && msg && *msg) {
	}
}
void sms_xml_lock(void (*lockfn)(int)) {
}
void sms_xml_unlock(void (*unlockfn)(int)) {
}
