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_API_INOTIFICATION_H_
20 #define TIZENAPIS_API_INOTIFICATION_H_
22 #include <dpl/shared_ptr.h>
25 #include <ApplicationControl.h>
26 #include "NotificationLine.h"
29 namespace Notification {
31 typedef std::vector<std::string> StringArray;
32 typedef DPL::SharedPtr<StringArray> StringArrayPtr;
47 NOTI_PROGRESS_TYPE_NONE = 0,
48 NOTI_PROGRESS_TYPE_SIZE,
49 NOTI_PROGRESS_TYPE_PERCENTAGE,
50 NOTI_PROGRESS_TYPE_MAX
51 } NotificationProgressType;
60 }NotificationStateType;
65 virtual ~INotification();
67 NotificationType getNotiType()
72 void setNotiType(NotificationType type)
77 NotificationStateType getNotificationState()
82 void setNotificationState(NotificationStateType notiState)
84 m_notiState = notiState;
87 NotificationProgressType getProgressType()
89 return m_progressType;
92 void setProgressType( NotificationProgressType type)
94 m_progressType = type;
97 void setUpdatedFlag(bool value)
100 LogDebug("set True");
101 m_notiUpdated = value;
104 bool getUpdatedFlag()
106 return m_notiUpdated;
110 virtual int getID() = 0;
111 virtual time_t getPostedTime() = 0;
113 virtual std::string getTitle() = 0;
114 virtual void setTitle(std::string title) = 0;
115 virtual std::string getContent() = 0;
116 virtual void setContent(std::string content) = 0;
118 virtual std::string getIconPath() = 0;
119 virtual void setIconPath(const std::string& iconPath) = 0;
121 virtual std::string getSoundPath() = 0;
122 virtual void setSoundPath(const std::string& sound) = 0;
124 virtual bool getDefaultVibration() = 0;
125 virtual void setDefaultVibration(const bool& vibration) = 0;
127 virtual double getProgressValue() = 0;
128 virtual void setProgressValue(const double & progressValue) = 0;
130 virtual std::string getSubIconPath() = 0;
131 virtual void setSubIconPath(const std::string& subIconPath) = 0;
133 virtual std::vector<std::string> getInformations() = 0;
134 virtual std::string getInformation(int index) = 0;
135 virtual void setInformations(std::vector<std::string>& infos) = 0;
136 virtual void setInformation( const std::string& info, int index) = 0;
138 virtual std::vector<std::string> getSubInformations() = 0;
139 virtual std::string getSubInformation(int index) = 0;
140 virtual void setSubInformations(std::vector<std::string>& infos) = 0;
141 virtual void setSubInformation( const std::string& info, int index) = 0;
143 //virtual std::vector<std::string> getThumbnails() = 0;
144 virtual std::string getThumbnail(int index) = 0;
145 virtual void setThumbnails(std::vector<std::string>& thumbs) = 0;
146 virtual void setThumbnail( const std::string& info, int index) = 0;
148 virtual void setThumbnails(const StringArrayPtr &value) = 0;
149 virtual StringArrayPtr getThumbnails() = 0;
151 virtual std::string getBackground() = 0;
152 virtual void setBackground(const std::string imagePath) = 0;
154 virtual unsigned int getNumber() = 0;
155 virtual void setNumber(const unsigned int number) = 0;
157 virtual DeviceAPI::Application::ApplicationControlPtr getApplicationControl() = 0;
158 virtual void setApplicationControl(DeviceAPI::Application::ApplicationControlPtr control) = 0;
159 virtual void setApplicationId(const std::string& appId) = 0;
160 virtual std::string getApplicationId() = 0;
162 virtual void* getNotificationHandle() = 0;
163 virtual void setNotificationHandle(void *handle) = 0;
165 virtual service_h getService() = 0;
167 virtual NotificationLineArrayPtr getLines() const = 0;
168 virtual int getLinesNum() const = 0;
169 virtual void setLines(const NotificationLineArrayPtr &value) = 0;
170 virtual void addLine(const NotificationLinePtr &value) = 0;
171 virtual void clearLines() = 0;
175 NotificationType m_notiType;
176 NotificationStateType m_notiState;
177 NotificationProgressType m_progressType;
183 typedef DPL::SharedPtr<INotification> INotificationPtr;