upload tizen1.0 source
[framework/system/sync-agent.git] / framework / include / Event / Event_Config.h
1 /*
2  * sync-agent-framework
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: JuHak Park <juhaki.park@samsung.com>,
7  *          JuneHyuk Lee <junhyuk7.lee@samsung.com>,
8  *          SunBong Ha <sunbong.ha@samsung.com>
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */
23
24
25
26
27 /*
28  * For any sort of issue you concern as to this software,
29  * you may use following point of contact.
30  * All resources contributed on this software
31  * are orinigally written by S-Core Inc., a member of Samsung Group.
32  *
33  * JungWook Ryu <jungwook.ryu@samsung.com>
34  */
35
36 #ifndef EVENT_INIT_H_
37 #define EVENT_INIT_H_
38
39 #include "Event_Error.h"
40 #include "Event_Handler.h"
41 #include "Event/Event_UI_API.h"
42 #include "Event/Event_Spec.h"
43
44 #define EVENT_COMMUNICATION_PATH "/tmp/agent_fw_event_"
45 #define EVENT_REPLY_COMMUNICATION_PATH "/tmp/agent_fw_event_reply_"
46 #define NOTI_COMMUNICATION_PATH "/tmp/agent_fw_noti_"
47 #define NOTI_REPLY_COMMUNICATION_PATH "/tmp/agent_fw_noti_reply_"
48
49 #define MAX_STREAM_SIZE 102400
50
51 const char *get_Noti_Path(const char *noti_key);
52
53 const char *get_Noti_Reply_Path(const char *noti_key);
54
55 const char *get_Event_Path();
56
57 const char *get_Event_Reply_Path();
58
59 EVENT_ERROR set_EventSpec_from_ConfigFile(const char *event_key, const char *configfile);
60
61 EVENT_ERROR clean_EventSpec();
62
63 EVENT_ERROR set_NotiSpec_from_ConfigFile(const char *noti_key, const char *configfile);
64
65 EVENT_ERROR clean_NotiSpec();
66
67 EVENT_ERROR register_EventCallback(int eventNum, EVENT_CALLBACK callback);
68
69 EVENT_ERROR register_NotiCallback(int notiNum, NOTI_CALLBACK callback, void *data);     /* only UI */
70
71 EVENT_CALLBACK get_EventCallback(int eventNum);
72
73 NOTI_CALLBACK get_NotiCallback(int notiNum);    /* only UI */
74
75 void *get_NotiCallback_AdditinalParam(int notiNum);     /* only UI */
76
77 EVENT_TYPE get_EventType(int eventNum);
78
79 NOTI_TYPE get_NotiType(const char *noti_key, int notiNum);      /* UI and Agent */
80
81 #endif /* EVENT_INIT_H_ */