apply FSL(Flora Software License)
[apps/core/preloaded/libslp-alarm.git] / kies_alarm / include / kies_define.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_DEFINE_H__
18 #define __KIES_DEFINE_H__
19
20 #include "kies_dlog.h"
21
22 //tag
23 #ifdef  LOG_TAG
24 #undef  LOG_TAG
25 #endif
26 #define LOG_TAG "KIES_ALARM"
27 //value
28 #define MAX_FILE_LENGTH 256
29 //equal
30 #define IS_EQUAL(a, b) ((a)  ==  (b))
31 #define IS_STR_EQUAL(a, b) (!strcmp(a, b))
32 #define FCLOSE_IF(p) if (p) {fclose(p); p = NULL; }
33 #define FREE_ADLIST(p) if (p) {alarmdb_free_data_list(p); p = NULL; }
34 //
35 #ifndef SUCCESS
36 #define SUCCESS 0
37 #endif
38 #ifndef FAILED
39 #define FAILED -1
40 #endif
41 //
42 #define SET_TIME_DATA_T(pTime_data, YEAR, MONTH, DAY, HOUR, MIN, SEC) \
43 do {\
44     (pTime_data)->year = (YEAR);\
45     (pTime_data)->month = (MONTH);\
46     (pTime_data)->day = (DAY);\
47     (pTime_data)->hour = (HOUR);\
48     (pTime_data)->min = (MIN);\
49     (pTime_data)->sec = (SEC);\
50 } while (0);
51
52 //#define PKGNAME "kies_alarm"
53 //#define ALARMRING_PKGNAME "org.tizen.alarmring"
54 #endif                          //__KIES_DEFINE_H__