9f5e070f5978754e7f5634d9067ba05a7646502b
[profile/ivi/org.tizen.browser.git] / src / database / browser-notification-db.h
1 /*\r
2   * Copyright 2012  Samsung Electronics Co., Ltd\r
3   *\r
4   * Licensed under the Flora License, Version 1.0 (the "License");\r
5   * you may not use this file except in compliance with the License.\r
6   * You may obtain a copy of the License at\r
7   *\r
8   *    http://www.tizenopensource.org/license\r
9   *\r
10   * Unless required by applicable law or agreed to in writing, software\r
11   * distributed under the License is distributed on an "AS IS" BASIS,\r
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13   * See the License for the specific language governing permissions and\r
14   * limitations under the License.\r
15   */\r
16 \r
17 #ifndef BROWSER_NOTIFICATION_DB_H\r
18 #define BROWSER_NOTIFICATION_DB_H\r
19 \r
20 #include "browser-config.h"\r
21 \r
22 extern "C" {\r
23 #include "db-util.h"\r
24 }\r
25 \r
26 #include <iostream>\r
27 #include <string>\r
28 #include <vector>\r
29 \r
30 class Browser_Notification_DB {\r
31 public:\r
32         Browser_Notification_DB(void);\r
33         ~Browser_Notification_DB(void);\r
34 \r
35         Eina_Bool save_domain(const char *domain);\r
36         Eina_Bool has_domain(const char *domain);\r
37         Eina_Bool save_notification(Ewk_Notification *ewk_notification, int &noti_id);\r
38         Eina_Bool get_title_by_id(int id, std::string &title);\r
39         Eina_Bool get_body_by_id(int id, std::string &body);\r
40         Eina_Bool update_icon_validity(int noti_id);\r
41         Eina_Bool delete_notifications(void);\r
42 private:\r
43         Eina_Bool _open_db(void);\r
44         Eina_Bool _close_db(void);\r
45
46         static sqlite3* m_db_descriptor;\r
47 };\r
48 \r
49 #endif  /* BROWSER_NOTIFICATION_DB_H */\r
50 \r