2 * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
4 * Licensed under the Apache License, Version 2.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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef __NOTIFICATION_DB_H__
18 #define __NOTIFICATION_DB_H__
22 #include <tzplatform_config.h>
24 #define DBPATH tzplatform_mkpath(TZ_SYS_DB, ".notification.db")
25 #define NOTIFICATION_QUERY_MAX 4096
26 #define NOTIFICATION_EMPTY_STR ""
27 #define NOTIFICATION_CHECK_STR(p) ((p) ? (p) : NOTIFICATION_EMPTY_STR)
29 sqlite3 *notification_db_open();
30 int notification_db_close(sqlite3 **db);
31 int notification_db_exec(sqlite3 *db, const char *query, int *num_changes);
32 char *notification_db_column_text(sqlite3_stmt *stmt, int col);
33 bundle *notification_db_column_bundle(sqlite3_stmt *stmt, int col);
34 int notification_db_init();
36 #endif /* __NOTIFICATION_DB_H__ */