Tizen 2.1 base
[apps/home/libslp-alarm.git] / kies_alarm / include / kies_define.h
1 /*
2 *
3 * Copyright 2012  Samsung Electronics Co., Ltd
4 *
5 * Licensed under the Flora License, Version 1.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 *    http://floralicense.org/license/
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 */
18 #ifndef __KIES_DEFINE_H__
19 #define __KIES_DEFINE_H__
20
21 #include "kies_dlog.h"
22
23 //tag
24 #ifdef  LOG_TAG
25 #undef  LOG_TAG
26 #endif
27 #define LOG_TAG "KIES_ALARM"
28 //value
29 #define MAX_FILE_LENGTH 256
30 //equal
31 #define IS_EQUAL(a, b) ((a)  ==  (b))
32 #define IS_STR_EQUAL(a, b) (!strcmp(a, b))
33 #define FCLOSE_IF(p) if (p) {fclose(p); p = NULL; }
34 #define FREE_ADLIST(p) if (p) {alarmdb_free_data_list(p); p = NULL; }
35 //
36 #ifndef SUCCESS
37 #define SUCCESS 0
38 #endif
39 #ifndef FAILED
40 #define FAILED -1
41 #endif
42 //
43 #define SET_TIME_DATA_T(pTime_data, YEAR, MONTH, DAY, HOUR, MIN, SEC) \
44 do {\
45     (pTime_data)->year = (YEAR);\
46     (pTime_data)->month = (MONTH);\
47     (pTime_data)->day = (DAY);\
48     (pTime_data)->hour = (HOUR);\
49     (pTime_data)->min = (MIN);\
50     (pTime_data)->sec = (SEC);\
51 } while (0);
52
53 //#define PKGNAME "kies_alarm"
54 //#define ALARMRING_PKGNAME "org.tizen.alarmring"
55 #endif                          //__KIES_DEFINE_H__