summaryrefslogtreecommitdiff
path: root/include/private/plugin_protocol.h
blob: 2f8e7519ad4a104823c5ab52448270107ca8cad6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef _PLUGIN_PROTOCOL_H
#define _PLUGIN_PROTOCOL_H

#include "plugin.h"
#include "plugin_proc.h"

#ifdef __cplusplus
extern "C" {
#endif



//�����㺯����������洢�����ڸý�������ÿ��ҵ��㺯�����
//˫�������洢
typedef struct _plugin_protocol_fun_info
{
	int plugid;
	int aliveflag;										//ҵ������Ƿ�ж�ر�ǣ���ж�صĺ������ٸ��»Ự����s
	int callnum;										//��ں������Ự���ô�����ֻ�е�û�б�����ʱ������ж�ظò��
	int entry_id; 			/* ȫ��Ψһ��id, ����ÿ�������ں�����ִ��ʱ��ͳ�� */
	long long protocol_flag;							//��Ҫ����������ֶ�flag��־
	AppEntry appentry;								//��ں���
	char biz_plug_name[PLUGIN_FILENAME_MAXLEN];		//ҵ���������
	struct _plugin_protocol_fun_info* pre;
	struct _plugin_protocol_fun_info* next;
	
}stProtocolFunInfo;


//����������Ϣ��˫�������洢��
typedef struct _plugin_protocol_plug_info
{
	unsigned short plugid;
	char* plugname;									//������������Ψһ��ʾ
	void* filepoint;									//.so�ļ�ָ�룬ж��ʱclose
	void  (*fun_destroy)();								//ע��������ж��ʱ����
	void (*fun_flagstate)(long long protflag);				//ҵ������ҪЭ��flagֵ�������
	long long (*fun_flagchange)(char* flagstr);			//��ҵ���ע����ַ�����flagת����long long���͵ĺ���
	stProtocolFunInfo* fun_list; /* ���ص���ǰ����������ҵ������б� */
	struct _plugin_protocol_plug_info* pre;				
	struct _plugin_protocol_plug_info* next;

}stProtocolPlugInfo;


int plugin_load_protocol(void);
int process_confelem_protocol(char* confelem_filename);

#ifdef __cplusplus
}
#endif


#endif