2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 #ifndef TIZENAPIS_PLATFORM_NOTIFICATION_H_
20 #define TIZENAPIS_PLATFORM_NOTIFICATION_H_
22 #include "NotificationFactory.h"
23 #include "INotification.h"
25 #include <notification.h>
28 namespace Notification {
30 class StatusNotification : INotification
33 friend class NotificationFactory;
35 ~StatusNotification();
39 time_t getPostedTime();
40 std::string getTitle();
41 void setTitle(std::string title);
42 std::string getContent();
43 void setContent(std::string content);
45 std::string getIconPath() ;
46 void setIconPath(const std::string& iconPath) ;
48 std::string getSoundPath() ;
49 void setSoundPath(const std::string& sound) ;
51 bool getDefaultVibration() ;
52 void setDefaultVibration(const bool& vibration) ;
54 double getProgressValue() ;
55 void setProgressValue(const double & progressValue) ;
57 std::string getSubIconPath() ;
58 void setSubIconPath(const std::string& subIconPath) ;
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) ;
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) ;
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) ;
75 void setThumbnails(const StringArrayPtr &value);
76 StringArrayPtr getThumbnails();
78 std::string getBackground() ;
79 void setBackground(const std::string imagePath) ;
81 unsigned int getNumber() ;
82 void setNumber(const unsigned int number) ;
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();
91 void* getNotificationHandle();
92 void setNotificationHandle(void *handle);
93 void setNotificationLines();
95 service_h getService();
98 NotificationLineArrayPtr getLines() const;
99 int getLinesNum() const;
100 void setLines(const NotificationLineArrayPtr &value);
101 void addLine(const NotificationLinePtr &value);
105 StatusNotification(NotificationType type);
106 StatusNotification(void* noti);
107 StatusNotification(int privID);
110 notification_h m_notiHandle;
111 StringArrayPtr m_thumbs;
113 NotificationType m_notiType;
114 NotificationLineArrayPtr m_lines;