File:  [ELWIX - Embedded LightWeight unIX -] / mqtt / inc / rtlm.h
Revision 1.2.2.7: download - view: text, annotated - select for diffs - revision graph
Tue Jun 26 08:05:58 2012 UTC (12 years, 4 months ago) by misho
Branches: mqtt1_1
change db pub model

#ifndef __RTLM_H
#define __RTLM_H


void mqttLog(const char *, ...);

void *mqttLoadRTLM(cfg_root_t*, int);
void mqttUnloadRTLM(void*);

inline int mqttMkDir(cfg_root_t *);


struct tagCallbacks {
	/* mqtt_acc.so */
	void *(*OpenACC)(cfg_root_t *);
	void (*CloseACC)(void *);
	int (*LoginACC)(cfg_root_t *, void *, const char*, const char*);

	/* mqtt_pub.so */
	void *(*OpenPUB)(cfg_root_t *);
	void (*ClosePUB)(void *);
	int (*InitSessPUB)(cfg_root_t *, void *, const char*, const char*, const char*, char, ...);
	int (*FiniSessPUB)(cfg_root_t *, void *, const char*, const char*, const char*);
	int (*ChkSessPUB)(cfg_root_t *, void *, const char*, const char*, const char*);

	int (*WritePUB_topic)(cfg_root_t *, void *, const char*, u_short, const char*, void *, int,  
			const char*, const char*, char);
	mqtt_subscr_t *(*ReadPUB_topic)(cfg_root_t *, void *, const char*, u_short, const char*, char);
	int (*DeletePUB_topic)(cfg_root_t *, void *, const char*, u_short, const char*, const char*, const char*, char);
	int (*WipePUB_topic)(cfg_root_t *, void *, const char*, const char*, char);

	int (*WritePUB_subscribe)(cfg_root_t *, void *, const char*, u_short, const char*, const char*, const char*, char);
	mqtt_subscr_t *(*ReadPUB_subscribe)(cfg_root_t *, void *, const char*, const char*);
	int (*DeletePUB_subscribe)(cfg_root_t *, void *, const char*, const char*, const char*, const char*);

	/* mqtt_log.so */
	void *(*OpenLOG)(cfg_root_t *);
	void (*CloseLOG)(void *);
	int (*LOG)(void *, const char *, ...);
};


#endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>