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)
99 m_notiUpdated = value;
102 bool getUpdatedFlag()
104 return m_notiUpdated;
108 virtual int getID() = 0;
109 virtual time_t getPostedTime() = 0;
111 virtual std::string getTitle() = 0;
112 virtual void setTitle(std::string title) = 0;
113 virtual std::string getContent() = 0;
114 virtual void setContent(std::string content) = 0;
116 virtual std::string getIconPath() = 0;
117 virtual void setIconPath(const std::string& iconPath) = 0;
119 virtual std::string getSoundPath() = 0;
120 virtual void setSoundPath(const std::string& sound) = 0;
122 virtual bool getDefaultVibration() = 0;
123 virtual void setDefaultVibration(const bool& vibration) = 0;
125 virtual double getProgressValue() = 0;
126 virtual void setProgressValue(const double & progressValue) = 0;
128 virtual std::string getSubIconPath() = 0;
129 virtual void setSubIconPath(const std::string& subIconPath) = 0;
131 virtual std::vector<std::string> getInformations() = 0;
132 virtual std::string getInformation(int index) = 0;
133 virtual void setInformations(std::vector<std::string>& infos) = 0;
134 virtual void setInformation( const std::string& info, int index) = 0;
136 virtual std::vector<std::string> getSubInformations() = 0;
137 virtual std::string getSubInformation(int index) = 0;
138 virtual void setSubInformations(std::vector<std::string>& infos) = 0;
139 virtual void setSubInformation( const std::string& info, int index) = 0;
141 //virtual std::vector<std::string> getThumbnails() = 0;
142 virtual std::string getThumbnail(int index) = 0;
143 virtual void setThumbnails(std::vector<std::string>& thumbs) = 0;
144 virtual void setThumbnail( const std::string& info, int index) = 0;
146 virtual void setThumbnails(const StringArrayPtr &value) = 0;
147 virtual StringArrayPtr getThumbnails() = 0;
149 virtual std::string getBackground() = 0;
150 virtual void setBackground(const std::string imagePath) = 0;
152 virtual unsigned int getNumber() = 0;
153 virtual void setNumber(const unsigned int number) = 0;
155 virtual DeviceAPI::Application::ApplicationControlPtr getApplicationControl() = 0;
156 virtual void setApplicationControl(DeviceAPI::Application::ApplicationControlPtr control) = 0;
157 virtual void setApplicationId(const std::string& appId) = 0;
158 virtual std::string getApplicationId() = 0;
160 virtual void* getNotificationHandle() = 0;
161 virtual void setNotificationHandle(void *handle) = 0;
163 virtual service_h getService() = 0;
165 virtual NotificationLineArrayPtr getLines() const = 0;
166 virtual int getLinesNum() const = 0;
167 virtual void setLines(const NotificationLineArrayPtr &value) = 0;
168 virtual void addLine(const NotificationLinePtr &value) = 0;
169 virtual void clearLines() = 0;
173 NotificationType m_notiType;
174 NotificationStateType m_notiState;
175 NotificationProgressType m_progressType;
181 typedef DPL::SharedPtr<INotification> INotificationPtr;