Tizen 2.1 base
[apps/home/libslp-alarm.git] / include / db-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 __DB_DEFINE_H__
19 #define __DB_DEFINE_H__
20
21 #include "db-dlog.h"
22 #include <stdlib.h>
23 #include <string.h>
24 #include <libintl.h>
25 #include <glib.h>
26 //tag
27 #ifdef  LOG_TAG
28 #undef  LOG_TAG
29 #endif
30 #define LOG_TAG "DB_ALARM"
31 //
32 #define DBROOT      "/opt/dbspace/"
33 #define DBNAME      ".alarm.db"
34 //
35 #define DBHandle sqlite3
36 //equal
37 #define IS_EQUAL(a, b) ((a) == (b))
38 #define IS_STR_EQUAL(a, b) (!strcmp(a, b))
39 //******************define:free *************************************
40 #define FREEIF(p) if (p) {free(p); p = NULL; }
41 #define GFREEIF(p) if (p) {g_free(p); p = NULL; }
42
43 #endif                          //__DB_DEFINE_H__