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.
18 #ifndef __TIZEN_STATUS_NOTIFICATION_H__
19 #define __TIZEN_STATUS_NOTIFICATION_H__
21 #include <MultiCallbackUserData.h>
24 #include <notification.h>
26 #include <JSApplicationControl.h>
27 #include "NotificationTypes.h"
28 #include "NotificationDetailInfo.h"
30 using namespace DeviceAPI::Common;
33 namespace Notification {
35 class StatusNotification
39 StatusNotification(NotificationType type); //type.
40 StatusNotification(void* noti); // notification
41 StatusNotification(int privID); //private ID of Notification.
43 ~StatusNotification();
45 NotificationProgressType getProgressType()
47 return m_progressType;
50 std::string getEnumProgressType();
52 void setProgressType( NotificationProgressType type)
54 m_progressType = type;
56 void setUpdatedFlag(bool value)
60 m_notiUpdated = value;
73 void setLaunchFlag(bool value)
78 NotificationType getNotiType()
83 void setNotiType(NotificationType type)
89 std::string getStatusType();
90 void setStatusType(std::string type);
92 time_t getPostedTime();
93 std::string getTitle();
94 void setTitle(std::string title);
96 std::string getContent();
97 char* getStrContent();
98 void setContent(std::string content);
100 std::string getIconPath() ;
101 void setIconPath(const std::string& iconPath) ;
103 std::string getSoundPath() ;
104 void setSoundPath(const std::string& sound) ;
106 bool getDefaultVibration() ;
107 void setDefaultVibration(const bool& vibration) ;
109 double getProgressValue() ;
110 void setProgressValue(const double & progressValue) ;
112 std::string getSubIconPath() ;
113 void setSubIconPath(const std::string& subIconPath) ;
116 std::vector<std::string> getInformations() ;
117 std::string getInformation(int index) ;
118 void setInformations(std::vector<std::string>& infos) ;
119 void setInformation( const std::string& info, int index) ;
121 std::vector<std::string> getSubInformations() ;
122 std::string getSubInformation(int index) ;
123 void setSubInformations(std::vector<std::string>& infos) ;
124 void setSubInformation( const std::string& info, int index) ;
127 std::vector<std::string> getThumbnails();
128 void setThumbnails(std::vector<std::string> thumbs);
130 std::string getBackground() ;
131 void setBackground(const std::string imagePath) ;
134 const char* getStrNumber() ;
135 void setNumber(const long number) ;
137 //void setStatusType(NotificationType type);
138 DeviceAPI::Application::ApplicationControlPtr getApplicationControl();
139 void setApplicationControl(DeviceAPI::Application::ApplicationControlPtr control);
140 void setApplicationId(const std::string& appId);
141 std::string getApplicationId();
143 void* getNotificationHandle();
144 void setNotificationHandle(void *handle);
146 service_h getService();
149 std::vector<NotificationDetailInfo*> getDetailInfos() const;
150 void setDetailInfos(const std::vector<NotificationDetailInfo*> value);
151 int getDetailInfosNum() const;
152 void addDetailInfo(NotificationDetailInfo* value);
153 void clearDetailInfos();
157 void loadThumbnails();
158 void setThumbnail( const std::string& info, int index);
159 std::string getThumbnail(int index);
161 std::string getInformation(int index) ;
162 void setInformation( const std::string& info, int index) ;
164 std::string getSubInformation(int index) ;
165 void setSubInformation( const std::string& info, int index) ;
167 void loadDetailInfos();
171 //NotificationType m_notiType;
172 NotificationType m_notiType;
174 notification_h m_notiHandle;
175 NotificationProgressType m_progressType;
179 std::vector<std::string> m_thumbs; //thumbnail images path
180 std::vector<NotificationDetailInfo*> m_detailInfos; // detail Info
187 #endif // __TIZEN_STATUS_NOTIFICATION_H__