RSA sync with private
[platform/core/messaging/msg-service.git] / include / utils / MsgGconfWrapper.h
1 /*
2 * Copyright 2012  Samsung Electronics Co., Ltd
3 *
4 * Licensed under the Flora License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *    http://www.tizenopensource.org/license
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #ifndef MSG_GCONF_WRAPPER_H
18 #define MSG_GCONF_WRAPPER_H
19
20 //#define USE_GCONF
21 /*==================================================================================================
22                                          INCLUDE FILES
23 ==================================================================================================*/
24 #include "MsgInternalTypes.h"
25
26 #ifdef USE_GCONF
27 #include <gconf/gconf-client.h>
28 #include <glib.h>
29 #else
30 #include <vconf.h>
31 #endif
32
33 /*==================================================================================================
34                                          STRUCTURES
35 ==================================================================================================*/
36 #ifdef USE_GCONF
37 typedef struct _MSG_GOBJECT_CLIENT_S
38 {
39         GObject* object;
40 }MSG_GOBJECT_CLIENT_S;
41 #endif
42
43
44 typedef void (*_vconf_change_cb)(keynode_t *key, void* data);
45
46 /*==================================================================================================
47                                      FUNCTION PROTOTYPES
48 ==================================================================================================*/
49 msg_error_t     MsgSettingSetString(const char *pKey, const char *pSetValue);
50 msg_error_t     MsgSettingSetInt(const char *pKey, int nSetValue);
51 msg_error_t     MsgSettingSetBool(const char *pKey, bool bSetValue);
52
53 char*                   MsgSettingGetString(const char *pKey);
54 int                             MsgSettingGetInt(const char *pKey);
55 int                             MsgSettingGetBool(const char *pKey, bool *pVal);
56
57 void    MsgChangePmState();
58 msg_error_t     MsgSettingHandleNewMsg(int SmsCnt, int MmsCnt);
59 msg_error_t     MsgSettingSetIndicator(int SmsCnt, int MmsCnt);
60
61 bool    MsgSettingGetAutoReject();
62 bool    MsgSettingGetUnknownAutoReject();
63
64 void    MsgSettingRegVconfCB();
65 void    MsgSettingRemoveVconfCB();
66
67 void MsgSettingRegVconfCBCommon(const char *pKey, _vconf_change_cb pCb);
68 void MsgSettingRemoveVconfCBCommon(const char *pKey, _vconf_change_cb pCb);
69
70 #endif // MSG_GCONF_WRAPPER_H