Update change log and spec for wrt-plugins-tizen_0.4.44
[platform/framework/web/wrt-plugins-tizen.git] / src / Notification / StatusNotification.h
index 6fcafa4..408330f 100755 (executable)
 // limitations under the License.
 //
 
+#ifndef __TIZEN_STATUS_NOTIFICATION_H__
+#define __TIZEN_STATUS_NOTIFICATION_H__
 
-#ifndef TIZENAPIS_PLATFORM_NOTIFICATION_H_
-#define TIZENAPIS_PLATFORM_NOTIFICATION_H_
+#include <MultiCallbackUserData.h>
 
-#include "NotificationFactory.h"
-#include "INotification.h"
 #include <app.h>
 #include <notification.h>
 
+#include <JSApplicationControl.h>
+#include "NotificationTypes.h"
+#include "NotificationDetailInfo.h"
+
+using namespace DeviceAPI::Common;
+
 namespace DeviceAPI {
 namespace Notification {
 
-class StatusNotification : INotification
+class StatusNotification
 {
-public:
-       friend class NotificationFactory;
 
+public:
+       explicit StatusNotification(NotificationType type);             //type.
+       explicit StatusNotification(void* noti);                        // notification
+       explicit StatusNotification(int privID);     //private ID of Notification.
+       
        ~StatusNotification();
-       // notification
 
+#if 0  
+        NotificationProgressType getProgressType()
+        {
+               return m_progressType;
+        }
+        void setProgressType( NotificationProgressType type)
+        {
+               m_progressType = type;
+        }
+#endif
+
+       std::string getEnumProgressType();
+        
+
+        void setUpdatedFlag(bool value)
+        {
+             if (value)
+               LoggerD("set True");
+             m_notiUpdated = value;
+        }
+        
+        bool getUpdatedFlag()
+        {
+             return m_notiUpdated;
+        }
+
+       bool getLaunchFlag()
+       {
+           return m_launchFlag;
+       }
+
+       void setLaunchFlag(bool value)
+       {
+           m_launchFlag = value;
+       }
+
+       NotificationType getNotiType()
+       {
+               return m_notiType;
+       }
+
+       void setNotiType(NotificationType type)
+       {
+               m_notiType = type;
+       }
+       
        int getID();
+       std::string getStatusType();
+       void setStatusType(std::string type);
+       
        time_t getPostedTime();
        std::string getTitle();
        void setTitle(std::string title);
+       
        std::string getContent();
+       char* getStrContent();
        void setContent(std::string content);
                
        std::string getIconPath() ;     
@@ -50,13 +108,17 @@ public:
        
        bool getDefaultVibration() ;    
        void setDefaultVibration(const bool& vibration) ;
-       
-       double getProgressValue() ;
-       void setProgressValue(const double & progressValue) ;
+
+       NotificationProgressType getProgressType();
+       void setProgressType(NotificationProgressType type);
+
+        double getProgressValue() ;
+        void setProgressValue(const double & progressValue);
        
        std::string getSubIconPath() ;
        void setSubIconPath(const std::string& subIconPath) ;
-       
+
+#if 0  
        std::vector<std::string> getInformations() ;
        std::string getInformation(int index)  ;
        void setInformations(std::vector<std::string>& infos) ;
@@ -66,21 +128,17 @@ public:
        std::string getSubInformation(int index)  ;
        void setSubInformations(std::vector<std::string>& infos) ;
        void setSubInformation( const std::string& info, int index) ;
+#endif
 
-       //std::vector<std::string> getThumbnails() ;
-       std::string getThumbnail(int index) ;
-       void setThumbnails(std::vector<std::string>& thumbs) ;
-       void setThumbnail( const std::string& info, int index) ;
-
-       void setThumbnails(const StringArrayPtr &value);
-       StringArrayPtr getThumbnails();
-               
+       std::vector<std::string> getThumbnails();
+       void setThumbnails(std::vector<std::string> thumbs);
+       
        std::string getBackground() ;
        void setBackground(const std::string imagePath) ;
        
-       unsigned int getNumber() ;
-       void setNumber(const unsigned int number) ;
-
+       long getNumber() ;
+       const char* getStrNumber() ;
+       void setNumber(const long number) ;
        
        //void setStatusType(NotificationType type);
        DeviceAPI::Application::ApplicationControlPtr getApplicationControl();
@@ -88,39 +146,56 @@ public:
        void setApplicationId(const std::string& appId);
        std::string getApplicationId();
 
+       std::string getLight();
+       void setLight(std::string color);
+       
+       unsigned long getLightOnTime();
+       void setLightOnTime(unsigned long onTime);
+       
+       unsigned long getLightOffTime();
+       void setLightOffTime(unsigned long offTime);
+
        void* getNotificationHandle();
        void setNotificationHandle(void *handle);
-       void setNotificationLines();
 
        service_h getService();
 
-       //Line
-       NotificationLineArrayPtr getLines() const;
-       int getLinesNum() const;
-       void setLines(const NotificationLineArrayPtr &value);
-       void addLine(const NotificationLinePtr &value);
-       void clearLines();
+       //Detail Info
+       std::vector<NotificationDetailInfo*> getDetailInfos() const;
+       void setDetailInfos(const std::vector<NotificationDetailInfo*> value);
+       int getDetailInfosNum() const;
+       void addDetailInfo(NotificationDetailInfo* value);
+       void clearDetailInfos();
 
-protected:
-       StatusNotification(NotificationType type);
-       StatusNotification(void* noti);
-       StatusNotification(int privID); 
+private:
                
-       service_h m_service;
-       notification_h m_notiHandle;
-       StringArrayPtr m_thumbs;
+       void loadThumbnails();
+       void setThumbnail( const std::string& info, int index);
+       std::string getThumbnail(int index);
+
+       std::string getInformation(int index)  ;
+       void setInformation( const std::string& info, int index) ;
+
+       std::string getSubInformation(int index)  ;
+       void setSubInformation( const std::string& info, int index) ;   
        
+       void loadDetailInfos();
+               
+protected:
+
        NotificationType m_notiType;
-       NotificationLineArrayPtr m_lines;
+       service_h m_service;
+       notification_h m_notiHandle;
+       NotificationProgressType m_progressType;
+       bool m_notiUpdated;
+       bool m_launchFlag;
        
-private:
+       std::vector<std::string> m_thumbs;                              //thumbnail images path
+       std::vector<NotificationDetailInfo*> m_detailInfos;   // detail Info
        
 };
 
+} // Notification
+} // DeviceAPI
 
-}
-}
-
-#endif 
-
-
+#endif // __TIZEN_STATUS_NOTIFICATION_H__