apply FSL(Flora Software License)
[apps/home/libslp-alarm.git] / kies_alarm / include / kies_alarm.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 __KIES_ALARM_H__
18 #define __KIES_ALARM_H__
19
20 #define KIES_ALM_SUCCESS 0
21 #define KIES_ALM_FAILED -1
22
23 /*return value*/
24 enum {
25         RESULT_FAILED = KIES_ALM_FAILED,
26         RESULT_SUCCESS = KIES_ALM_SUCCESS,
27         RESULT_ERR_NULL_ALARM,  /*don't alarm in phone, not save */
28 };
29 /**
30  * @def A_DBAPI
31  * prefix
32  */
33 #ifndef A_DBAPI
34 #define A_DBAPI __attribute__ ((visibility("default")))
35 #endif
36 /**
37  * @def VCONFKEY_ALARM_RESTORE
38  * when restore alarm, send the message to notify the alarm data changed.
39  * It could be get by  use vconf_ignore_key_changed
40  */
41 #define VCONFKEY_ALARM_RESTORE "memory/alarm/restore"
42
43 /**
44  * This function backup alarm data, the data will be saved to @param
45  * If the file path is NULL, return FAILED
46  *
47  * @brief       backup alarm data
48  *
49  * @param       [in]   file_path    the path of user want to save data
50  *
51  * @return     On success, SUCCESS is returned. On error, FAILED is returned
52  *             if phone don't save any alarm,  RESULT_ERR_NULL_ALARM is returned.
53  *
54  * @remarks
55  *
56  * @exception
57  *
58  * @see alarm_restore
59  *
60  */
61 A_DBAPI int alarm_backup(const char *file_path);
62
63 /**
64  * This function restore alarm data, the data is from @param
65  * If the file path is NULL, return FAILED
66  *
67  * @brief       backup alarm data
68  *
69  * @param       [in]   file_path    the path of user want to get data
70  *
71  * @return     On success, SUCCESS is returned. On error, FAILED is returned
72  *
73  * @remarks
74  *
75  * @exception
76  *
77  * @see alarm_backup
78  *
79  */
80 A_DBAPI int alarm_restore(const char *file_path);
81
82 #endif/*__KIES_ALARM_H__*/