RSA initial upload from private git
[framework/pim/libaccounts-svc.git] / include / account-types.h
1 /*
2  *  account
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Wonyoung Lee <wy1115.lee@samsung.com>, Tarun Kumar <tarun.kr@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22 #ifndef __ACCOUNT_TYPES_H__
23 #define __ACCOUNT_TYPES_H__
24
25 #include <db-util.h>
26
27
28 #ifdef __cplusplus
29 extern "C"
30 {
31 #endif
32
33
34 /**
35  * @addtogroup CAPI_ACCOUNT_MODULE
36  * @{
37  */
38
39 /**
40  * @file                account-types.h
41  * @ingroup     CAPI_ACCOUNT
42  * @brief               This file defines common types and enums of ACCOUNT.
43  */
44
45 /**
46  * @brief       Enumerations for the result types of capability.
47  */
48 typedef enum
49 {
50         ACCOUNT_CAPABILITY_CONTACT = 1,
51         ACCOUNT_CAPABILITY_CALENDAR,
52         ACCOUNT_CAPABILITY_PHOTO,
53         ACCOUNT_CAPABILITY_VIDEO,
54         ACCOUNT_CAPABILITY_EMAIL,
55         ACCOUNT_CAPABILITY_STATUS_POST,
56         ACCOUNT_CAPABILITY_VOIP,
57         ACCOUNT_CAPABILITY_SAMSUNG_APPS,
58         ACCOUNT_CAPABILITY_TASK,
59         ACCOUNT_CAPABILITY_MOBILE_TRACKER
60 } account_capability_type_e;
61
62 /**
63  * @brief       Enumerations for the state of capability.
64  */
65 typedef enum
66 {
67         ACCOUNT_CAPABILITY_DISABLED = 0x00,
68         ACCOUNT_CAPABILITY_ENABLED
69 }
70 account_capability_state_e;
71
72 /**
73  * @brief       Enumerations for the state of account secrecy.
74  */
75 typedef enum
76 {
77         ACCOUNT_SECRECY_INVISIBLE = 0x00,
78         ACCOUNT_SECRECY_VISIBLE
79 }
80 account_secrecy_state_e;
81
82 /**
83  * @brief       Enumerations for the account supported sync or not.
84  * ACCOUNT_NOT_SUPPORTS_SYNC: sync not support
85  * ACCOUNT_SUPPORTS_SYNC_IDLE: sync support and sync status is idle
86  * ACCOUNT_SUPPORTS_SYNC_ACTIVE: sync support and sync status id active
87  * ACCOUNT_SUPPORTS_SYNC: NOT USED, WILL BE REMOVED. TO PREVENT BUILD ERROR.
88  */
89 typedef enum
90 {
91         ACCOUNT_NOT_SUPPORTS_SYNC = 0x00,
92         ACCOUNT_SUPPORTS_SYNC_IDLE,
93         ACCOUNT_SUPPORTS_SYNC_ACTIVE,
94         ACCOUNT_SUPPORTS_SYNC
95 }
96 account_sync_state_e;
97
98 typedef enum
99 {
100         ACCOUNT_AUTH_TYPE_XAUTH,
101         ACCOUNT_AUTH_TYPE_OAUTH,
102         ACCOUNT_AUTH_TYPE_CLIENT_LOGIN
103 }account_auth_type_e;
104
105 /**
106  * @brief Account handle.
107  */
108 typedef struct account_s* account_h;
109
110 /**
111  * @brief Account capability handle.
112  */
113 typedef struct account_capability_s* account_capability_h;
114
115 #define ACCOUNT_DATA_USERNAME   "http://tizen.org/account/data/username"
116 #define ACCOUNT_OPERATION_SIGNIN        "http://tizen.org/account/operation/signin"
117 #define ACCOUNT_OPERATION_VIEW          "http://tizen.org/account/operation/view"
118 #define ACCOUNT_SUPPORTS_CAPABILITY_CONTACT             "http://tizen.org/account/capability/contact"
119 #define ACCOUNT_SUPPORTS_CAPABILITY_CALENDER            "http://tizen.org/account/capability/calender"
120 #define ACCOUNT_SUPPORTS_CAPABILITY_PHOTO               "http://tizen.org/account/capability/photo"
121 #define ACCOUNT_SUPPORTS_CAPABILITY_VIDEO               "http://tizen.org/account/capability/video"
122 #define ACCOUNT_SUPPORTS_CAPABILITY_EMAIL               "http://tizen.org/account/capability/email"
123 #define ACCOUNT_SUPPORTS_CAPABILITY_POST                "http://tizen.org/account/capability/post"
124 #define ACCOUNT_SUPPORTS_CAPABILITY_VOIP                "http://tizen.org/account/capability/voip"
125 #define ACCOUNT_SUPPORTS_CAPABILITY_SAMSUNG_APPS                "http://tizen.org/account/capability/samsungapps"
126 #define ACCOUNT_SUPPORTS_CAPABILITY_TASK                "http://tizen.org/account/capability/task"
127 #define ACCOUNT_SUPPORTS_CAPABILITY_MOBILE_TRACKER              "http://tizen.org/account/capability/mobiletracker"
128
129 #define USER_TXT_CNT 5
130 #define USER_INT_CNT 5
131
132 #define ACCOUNT_DBUS_SIGNAL_INTERFACE           "account.signal.Type"
133 #define ACCOUNT_DBUS_NOTI_NAME_INSERT           "insert"
134 #define ACCOUNT_DBUS_NOTI_NAME_UPDATE           "update"
135 #define ACCOUNT_DBUS_NOTI_NAME_DELETE           "delete"
136 /**
137  * @}
138  */
139
140 #ifdef __cplusplus
141 }
142 #endif
143
144 #endif /* __ACCOUNT_TYPES_H__*/
145