merge with master
[platform/framework/web/wrt-plugins-tizen.git] / src / Notification / StatusNotification.h
1 //
2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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
19 #ifndef TIZENAPIS_PLATFORM_NOTIFICATION_H_
20 #define TIZENAPIS_PLATFORM_NOTIFICATION_H_
21
22 #include "NotificationFactory.h"
23 #include "INotification.h"
24 #include <app.h>
25 #include <notification.h>
26
27 namespace DeviceAPI {
28 namespace Notification {
29
30 class StatusNotification : INotification
31 {
32 public:
33         friend class NotificationFactory;
34
35         ~StatusNotification();
36         // notification
37
38         int getID();
39         time_t getPostedTime();
40         std::string getTitle();
41         void setTitle(std::string title);
42         std::string getContent();
43         void setContent(std::string content);
44                 
45         std::string getIconPath() ;     
46         void setIconPath(const std::string& iconPath) ;
47
48         std::string getSoundPath() ;
49         void setSoundPath(const std::string& sound) ;
50         
51         bool getDefaultVibration() ;    
52         void setDefaultVibration(const bool& vibration) ;
53         
54         double getProgressValue() ;
55         void setProgressValue(const double & progressValue) ;
56         
57         std::string getSubIconPath() ;
58         void setSubIconPath(const std::string& subIconPath) ;
59         
60         std::vector<std::string> getInformations() ;
61         std::string getInformation(int index)  ;
62         void setInformations(std::vector<std::string>& infos) ;
63         void setInformation( const std::string& info, int index) ;
64         
65         std::vector<std::string> getSubInformations() ;
66         std::string getSubInformation(int index)  ;
67         void setSubInformations(std::vector<std::string>& infos) ;
68         void setSubInformation( const std::string& info, int index) ;
69
70         //std::vector<std::string> getThumbnails() ;
71         std::string getThumbnail(int index) ;
72         void setThumbnails(std::vector<std::string>& thumbs) ;
73         void setThumbnail( const std::string& info, int index) ;
74
75         void setThumbnails(const StringArrayPtr &value);
76         StringArrayPtr getThumbnails();
77                 
78         std::string getBackground() ;
79         void setBackground(const std::string imagePath) ;
80         
81         unsigned int getNumber() ;
82         void setNumber(const unsigned int number) ;
83
84         
85         //void setStatusType(NotificationType type);
86         DeviceAPI::Application::ApplicationControlPtr getApplicationControl();
87         void setApplicationControl(DeviceAPI::Application::ApplicationControlPtr control);
88         void setApplicationId(const std::string& appId);
89         std::string getApplicationId();
90
91         void* getNotificationHandle();
92         void setNotificationHandle(void *handle);
93         void setNotificationLines();
94
95         service_h getService();
96
97         //Line
98         NotificationLineArrayPtr getLines() const;
99         int getLinesNum() const;
100         void setLines(const NotificationLineArrayPtr &value);
101         void addLine(const NotificationLinePtr &value);
102         void clearLines();
103
104 protected:
105         StatusNotification(NotificationType type);
106         StatusNotification(void* noti);
107         StatusNotification(int privID); 
108                 
109         service_h m_service;
110         notification_h m_notiHandle;
111         StringArrayPtr m_thumbs;
112         
113         NotificationType m_notiType;
114         NotificationLineArrayPtr m_lines;
115         
116 private:
117         
118 };
119
120
121 }
122 }
123
124 #endif 
125
126