summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMyungKi Lee <mk5004.lee@samsung.com>2019-04-05 03:02:59 +0000
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>2019-04-05 03:02:59 +0000
commit17d329aa9aa43866833efd46523cb3cf1e8fa778 (patch)
tree20ab930cdba1b622dc74571b46cf1cbadd33fbd9
parent9612d8e9939bb56002a550f496bfc665beec6810 (diff)
parent42ec005738c79be881bdcc8cf74ce7fdc1dcf726 (diff)
downloadnotification-17d329aa9aa43866833efd46523cb3cf1e8fa778.tar.gz
notification-17d329aa9aa43866833efd46523cb3cf1e8fa778.tar.bz2
notification-17d329aa9aa43866833efd46523cb3cf1e8fa778.zip
Merge "Add description for notification ex api" into tizen
-rw-r--r--notification-ex/abstract_action.h67
-rw-r--r--notification-ex/abstract_item.h373
-rw-r--r--notification-ex/action_inflator.h9
-rw-r--r--notification-ex/app_control_action.h69
-rw-r--r--notification-ex/button_item.h56
-rw-r--r--notification-ex/chat_message_item.h81
-rw-r--r--notification-ex/checkbox_item.h54
-rw-r--r--notification-ex/default_action_factory.h15
-rw-r--r--notification-ex/default_item_factory.h15
-rw-r--r--notification-ex/entry_item.h64
-rw-r--r--notification-ex/factory_manager.h40
-rw-r--r--notification-ex/group_item.h89
-rw-r--r--notification-ex/iaction_factory.h14
-rw-r--r--notification-ex/icon_item.h30
-rw-r--r--notification-ex/icon_text_item.h52
-rw-r--r--notification-ex/iitem_factory.h14
-rw-r--r--notification-ex/iitem_info.h38
-rw-r--r--notification-ex/image_item.h54
-rw-r--r--notification-ex/input_selector_item.h57
-rw-r--r--notification-ex/item_inflator.h10
-rw-r--r--notification-ex/null_item.h47
-rw-r--r--notification-ex/progress_item.h75
-rw-r--r--notification-ex/text_item.h62
-rw-r--r--notification-ex/time_item.h60
-rw-r--r--notification-ex/visibility_action.h61
25 files changed, 1506 insertions, 0 deletions
diff --git a/notification-ex/abstract_action.h b/notification-ex/abstract_action.h
index 0e001b8..71d9f1a 100644
--- a/notification-ex/abstract_action.h
+++ b/notification-ex/abstract_action.h
@@ -30,6 +30,14 @@ namespace notification {
namespace item {
class AbstractItem;
+
+/**
+ * @brief The base class for the notification action classes.
+ * @details The AbstractAction is abstract class.
+ * The AbstractAction has basic APIs for notification actions.
+ * The notification action class have to be a derived class of this class.
+ * @since_tizen 5.5
+ */
class EXPORT_API AbstractAction {
public:
enum Type {
@@ -40,16 +48,75 @@ class EXPORT_API AbstractAction {
};
public:
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] isLoacal
+ */
AbstractAction(bool isLocal);
+
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] isLocal
+ * @param[in] extra
+ */
AbstractAction(bool isLocal, std::string extra);
+
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~AbstractAction();
+ /**
+ * @brief Gets the type of action
+ * @since_tizen 5.5
+ * @return The type of action
+ */
virtual int GetType() const = 0;
+
+ /**
+ * @brief Gets the type of action from Bundle data
+ * @since_tizen 5.5
+ * @param[in] b Bundle type data
+ * @return The type of action
+ */
static int GetType(Bundle b);
+
+ /**
+ * @brief Serialize the data of AbstractAction.
+ * @since_tizen 5.5
+ * @return Bundle type data
+ */
virtual Bundle Serialize() const = 0;
+
+ /**
+ * @brief Deserialize the serialized data.
+ * @since_tizen 5.5
+ * @param[in] b The serialized Bundle data
+ */
virtual void Deserialize(Bundle b) = 0;
+
+ /**
+ * @brief Gets whether local or not.
+ * @since_tizen 5.5
+ * @return true if local, or false
+ */
virtual bool IsLocal() const = 0;
+
+ /**
+ * @brief Execute the action
+ * @since_tizen 5.5
+ * @param[in] item The AbstractItem
+ */
virtual void Execute(std::shared_ptr<AbstractItem> item) = 0;
+
+ /**
+ * @brief Gets the extra data
+ * @since_tizen 5.5
+ * @return The extra data
+ */
virtual std::string GetExtra() const = 0;
private:
diff --git a/notification-ex/abstract_item.h b/notification-ex/abstract_item.h
index 81451ca..e9961a7 100644
--- a/notification-ex/abstract_item.h
+++ b/notification-ex/abstract_item.h
@@ -34,6 +34,11 @@
namespace notification {
namespace item {
+/**
+ * @brief The class for ReceiverGroup.
+ * @details The class to define receiver group of notification.
+ * @since_tizen 5.5
+ */
class EXPORT_API ReceiverGroup {
public:
static const std::string Panel;
@@ -43,6 +48,11 @@ class EXPORT_API ReceiverGroup {
static const std::string Popup;
};
+/**
+ * @brief The class for color data.
+ * @details The color consists A,R,G,B values.
+ * @since_tizen 5.5
+ */
class EXPORT_API Color {
public:
Color() {
@@ -56,15 +66,38 @@ class EXPORT_API Color {
}
virtual ~Color() = default;
+ /**
+ * @brief Gets alpha value of color.
+ * @since_tizen 5.5
+ * @return The alpha value of color
+ */
unsigned char GetAVal() const {
return a_;
}
+
+ /**
+ * @brief Gets red value of color.
+ * @since_tizen 5.5
+ * @return The red value of color
+ */
unsigned char GetRVal() const {
return r_;
}
+
+ /**
+ * @brief Gets green value of color.
+ * @since_tizen 5.5
+ * @return The green value of color
+ */
unsigned char GetGVal() const {
return g_;
}
+
+ /**
+ * @brief Gets blue value of color.
+ * @since_tizen 5.5
+ * @return The blue value of color
+ */
unsigned char GetBVal() const {
return b_;
}
@@ -76,6 +109,11 @@ class EXPORT_API Color {
unsigned char b_;
}; // class Color
+/**
+ * @brief The class for padding data.
+ * @details There are left, top, right, bottom padding value.
+ * @since_tizen 5.5
+ */
class EXPORT_API Padding {
public:
Padding() {
@@ -89,15 +127,38 @@ class EXPORT_API Padding {
}
virtual ~Padding() = default;
+ /**
+ * @brief Gets left value of padding.
+ * @since_tizen 5.5
+ * @return The left value of padding
+ */
int GetLeft() const {
return left_;
}
+
+ /**
+ * @brief Gets top value of padding.
+ * @since_tizen 5.5
+ * @return The top value of padding
+ */
int GetTop() const {
return top_;
}
+
+ /**
+ * @brief Gets right value of padding.
+ * @since_tizen 5.5
+ * @return the right value of padding
+ */
int GetRight() const {
return right_;
}
+
+ /**
+ * @brief Gets bottom value of padding.
+ * @since_tizen 5.5
+ * @return The bottom value of padding.
+ */
int GetBottom() const {
return bottom_;
}
@@ -109,6 +170,11 @@ class EXPORT_API Padding {
int bottom_;
}; // class Padding
+/**
+ * @brief The class for geometry data.
+ * @details There are x, y, width, height value.
+ * @since_tizen 5.5
+ */
class EXPORT_API Geometry {
public:
Geometry() {
@@ -121,15 +187,38 @@ class EXPORT_API Geometry {
}
virtual ~Geometry() = default;
+ /**
+ * @brief Gets x value of geometry.
+ * @since_tizen 5.5
+ * @return The x value of geometry.
+ */
int GetX() const {
return x_;
}
+
+ /**
+ * @brief Gets y value of geometry.
+ * @since_tizen 5.5
+ * @return The y value of geometry.
+ */
int GetY() const {
return y_;
}
+
+ /**
+ * @brief Gets width value of geometry.
+ * @since_tizen 5.5
+ * @return The width value of geometry.
+ */
int GetWidth() const {
return w_;
}
+
+ /**
+ * @brief Gets height value of geometry.
+ * @since_tizen 5.5
+ * @return The height value of geometry.
+ */
int GetHeight() const {
return h_;
}
@@ -141,6 +230,11 @@ class EXPORT_API Geometry {
int h_;
}; // class Geometry
+/**
+ * @brief The class for style data
+ * @details The style data consists color, padding, geometry data.
+ * @since_tizen 5.5
+ */
class EXPORT_API Style {
public:
Style() {
@@ -150,12 +244,29 @@ class EXPORT_API Style {
}
virtual ~Style() = default;
+ /**
+ * @brief Gets padding data
+ * @since_tizen 5.5
+ * @return The padding data
+ */
Padding GetPadding() const {
return padding_;
}
+
+ /**
+ * @brief Gets color data
+ * @since_tizen 5.5
+ * @return The color data
+ */
Color GetColor() const {
return color_;
}
+
+ /**
+ * @brief Gets geometry data
+ * @since_tizen 5.5
+ * @return The geometry data
+ */
Geometry GetGeometry() const {
return geometry_;
}
@@ -166,6 +277,11 @@ class EXPORT_API Style {
Geometry geometry_;
}; // class Style
+/**
+ * @brief The class for LED data.
+ * @details The LED data consists color data and period time.
+ * @since_tizen 5.5
+ */
class EXPORT_API LEDInfo {
public:
LEDInfo() {
@@ -176,19 +292,47 @@ class EXPORT_API LEDInfo {
}
virtual ~LEDInfo() = default;
+ /**
+ * @brief Sets the time period for turning on the LED
+ * @since_tizen 5.5
+ * @param[in] ms period time
+ */
void SetOnPeriod(int ms) {
on_period_ = ms;
}
+
+ /**
+ * @brief Gets the time period for turning on the LED
+ * @since_tizen 5.5
+ * @return The time for turning on the LED
+ */
int GetOnPeriod() const {
return on_period_;
}
+
+ /**
+ * @brief Sets the time period for turning off the LED
+ * @since_tizen 5.5
+ * @param[in] ms period time
+ */
void SetOffPeriod(int ms) {
off_period_ = ms;
}
+
+ /**
+ * @brief Gets the time period for turning off the LED
+ * @since_tizen 5.5
+ * @return The time for turning off the LED
+ */
int GetOffPeriod() const {
return off_period_;
}
+ /**
+ * @brief Gets the color of LED
+ * @since_tizen 5.5
+ * @return color data
+ */
Color GetColor() const {
return color_;
}
@@ -199,6 +343,13 @@ class EXPORT_API LEDInfo {
int off_period_ = 0;
}; // clss LEDInfo
+/**
+ * @brief The base class for the notification item classes.
+ * @details The AbstractItem is abstract class.
+ * The AbstractItem has basic APIs for notification items.
+ * The notification item class have to be a derived class of this class.
+ * @since_tizen 5.5
+ */
class EXPORT_API AbstractItem {
public:
enum Type {
@@ -225,44 +376,266 @@ class EXPORT_API AbstractItem {
};
public:
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] action The AbstractAction for notification item
+ */
AbstractItem(
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] id The notification id
+ * @param[in] action The AbstractAction for notification item
+ */
AbstractItem(std::string id,
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~AbstractItem() = 0;
+
+ /**
+ * @brief Serialize the data of AbstractItem.
+ * @since_tizen 5.5
+ * @return Bundle type data
+ */
virtual Bundle Serialize() const = 0;
+
+ /**
+ * @brief Deserialize the serialized data.
+ * @since_tizen 5.5
+ * @param[in] b The serialized Bundle data
+ */
virtual void Deserialize(Bundle b) = 0;
+
+ /**
+ * @brief Finds the AbstractItem using by notification item id.
+ * @since_tizen 5.5
+ * @param[in] id notification item id
+ * @return AbstractItem object
+ */
virtual AbstractItem& FindByID(std::string id) = 0;
+
+ /**
+ * @brief Gets the type of notification item.
+ * @since_tizen 5.5
+ * @return The type of notification item
+ */
virtual int GetType() const = 0;
+
+ /**
+ * @brief Gets the type of notification item from Bundle data.
+ * @since_tizen 5.5
+ * @return The type of notification item
+ */
static int GetType(Bundle b);
+
+ /**
+ * @brief Gets the path of shared file location.
+ * @since_tizen 5.5
+ * @return The list of shared path.
+ */
virtual std::list<std::string> GetSharedPath() const;
+
+ /**
+ * @brief Gets the notification item id.
+ * @since_tizen 5.5
+ * @return The notification item id.
+ */
std::string GetId() const;
+
+ /**
+ * @brief Sets the notification item id.
+ * @since_tizen 5.5
+ * @param[in] id notification item id
+ */
void SetId(std::string id);
+
+ /**
+ * @brief Gets AbstractAction for notification item.
+ * @since_tizen 5.5
+ * @return AbstractAction instance
+ */
std::shared_ptr<AbstractAction> GetAction() const;
+
+ /**
+ * @brief Sets AbstractAction for notification item.
+ * @since_tizen 5.5
+ * @param[in] action AbstractAction instance
+ */
void SetAction(std::shared_ptr<AbstractAction> action);
+
+ /**
+ * @brief Sets the style data for notification item.
+ * @since_tizen 5.5
+ * @return Style instance
+ */
std::shared_ptr<Style> GetStyle() const;
+
+ /**
+ * @brief Sets the style data for notification item.
+ * @since_tizen 5.5
+ * @param[in] style Style instance
+ */
void SetStyle(std::shared_ptr<Style> style);
+
+ /**
+ * @brief Sets the visibile state of notification item.
+ * @since_tizen 5.5
+ * @param[in] visibile The visible state
+ */
void SetVisible(bool visible);
+
+ /**
+ * @brief Gets the visibile state of notification item.
+ * @since_tizen 5.5
+ * @return true if visible, false if not visible.
+ */
bool GetVisible() const;
+
+ /**
+ * @brief Sets the enable state of notification item.
+ * @since_tizen 5.5
+ * @param[in] enable The enable state
+ */
void SetEnable(bool enable);
+
+ /**
+ * @brief Gets the enable state of notification item.
+ * @since_tizen 5.5
+ * @return true if enabled, false if not enabled.
+ */
bool GetEnable() const;
+
+ /**
+ * @brief Adds the receiver group for notification item.
+ * @since_tizen 5.5
+ * @param[in] receiver_group The receiver group for notification item
+ */
void AddReceiver(std::string receiver_group);
+
+ /**
+ * @brief Removes the receiver group from the receiver group list.
+ * @since_tizen 5.5
+ * @param[in] receiver_group The receiver group
+ */
void RemoveReceiver(std::string receiver_group);
+
+ /**
+ * @brief Gets the receiver group list.
+ * @since_tizen 5.5
+ * @return The list of receiver group.
+ */
std::list<std::string> GetReceiverList();
+
+ /**
+ * @brief Sets the policy for notification item.
+ * @since_tizen 5.5
+ * @param[in] policy The policy option
+ */
void SetPolicy(int policy);
+
+ /**
+ * @brief Gets the policy for notification item.
+ * @since_tizen 5.5
+ * @return The policy for notification item.
+ */
int GetPolicy() const;
+
+ /**
+ * @brief Gets the channel option for notification item.
+ * @since_tizen 5.5
+ * @return The channel option for notification item.
+ */
std::string GetChannel() const;
+
+ /**
+ * @brief Sets the channel option for notification item.
+ * @since_tizen 5.5
+ * @param[in] channel The channel option for notification item.
+ */
void SetChannel(std::string channel);
+
+ /**
+ * @brief Sets LED option for notification item.
+ * @since_tizen 5.5
+ * @param[in] led The LEDInfo instance
+ */
void SetLEDInfo(std::shared_ptr<LEDInfo> led);
+
+ /**
+ * @brief Gets LED option for notification item.
+ * @since_tizen 5.5
+ * @return The LEDInfo instance
+ */
std::shared_ptr<LEDInfo> GetLEDInfo() const;
+
+ /**
+ * @brief Sets the sound path for notification item.
+ * @since_tizen 5.5
+ * @param[in] path The sound path
+ */
void SetSoundPath(std::string path);
+
+ /**
+ * @brief Sets the vibration path for notification item.
+ * @since_tizen 5.5
+ * @param[in] path The vibration path
+ */
void SetVibrationPath(std::string path);
+
+ /**
+ * @brief Gets the sound path for notification item.
+ * @since_tizen 5.5
+ * @return The sound path
+ */
std::string GetSoundPath() const;
+
+ /**
+ * @brief Gets the vibration path for notification item.
+ * @since_tizen 5.5
+ * @return The vibration path
+ */
std::string GetVibrationPath() const;
+
+ /**
+ * @brief Gets IItemInfo instance to get some information of notification item.
+ * @since_tizen 5.5
+ * @return The IItemInfo instance
+ */
std::shared_ptr<IItemInfo> GetInfo() const;
+
+ /**
+ * @brief Gets the sender app id of notification item.
+ * @since_tizen 5.5
+ * @return The sender app id.
+ */
std::string GetSenderAppId() const;
+
+ /**
+ * @brief Sets the sender app id of notification item.
+ * @since_tizen 5.5
+ * @param[in] sender_appid The sender app id
+ */
void SetSenderAppId(std::string sender_appid);
+
+ /**
+ * @brief Sets the tag of notification item.
+ * @since_tizen 5.5
+ * @return The tag of notification item
+ */
std::string GetTag() const;
+
+ /**
+ * @brief Sets the tag of notification item.
+ * @since_tizen 5.5
+ * @param[in] tag The tag of notification item
+ */
void SetTag(std::string tag);
private:
diff --git a/notification-ex/action_inflator.h b/notification-ex/action_inflator.h
index 65329b9..243db27 100644
--- a/notification-ex/action_inflator.h
+++ b/notification-ex/action_inflator.h
@@ -26,8 +26,17 @@
namespace notification {
namespace item {
+/**
+ * @brief The class to create action
+ * @since_tizen 5.5
+ */
class EXPORT_API ActionInflator {
public:
+ /**
+ * @brief Creates AbstractAction from Bundle data
+ * @since_tizen 5.5
+ * @param[in] b Bundle type data
+ */
static std::shared_ptr<AbstractAction> Create(Bundle b);
};
diff --git a/notification-ex/app_control_action.h b/notification-ex/app_control_action.h
index 875e27f..564b4be 100644
--- a/notification-ex/app_control_action.h
+++ b/notification-ex/app_control_action.h
@@ -24,19 +24,88 @@
namespace notification {
namespace item {
+/**
+ * @brief The class for AppControlAction type action.
+ * @details The action with app control.
+ * @since_tizen 5.5
+ */
class EXPORT_API AppControlAction : public AbstractAction {
public:
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] app_control The app control handle
+ */
AppControlAction(app_control_h app_control);
+
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] app_control The app control handle
+ * @param[in] extra
+ */
AppControlAction(app_control_h app_control, std::string extra);
+
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~AppControlAction();
+ /**
+ * @brief Gets the type of action
+ * @since_tizen 5.5
+ * @return The type of action
+ */
int GetType() const override;
+
+ /**
+ * @brief Serialize the data of AbstractAction.
+ * @since_tizen 5.5
+ * @return Bundle type data
+ */
Bundle Serialize() const override;
+
+ /**
+ * @brief Deserialize the serialized data.
+ * @since_tizen 5.5
+ * @param[in] b The serialized Bundle data
+ */
void Deserialize(Bundle b) override;
+
+ /**
+ * @brief Gets whether local or not.
+ * @since_tizen 5.5
+ * @return true if local, or false
+ */
bool IsLocal() const override;
+
+ /**
+ * @brief Execute the action
+ * @since_tizen 5.5
+ * @param[in] item The AbstractItem
+ */
void Execute(std::shared_ptr<AbstractItem> item) override;
+
+ /**
+ * @brief Gets the extra data
+ * @since_tizen 5.5
+ * @return The extra data
+ */
std::string GetExtra() const override;
+
+ /**
+ * @brief Gets the extra data
+ * @since_tizen 5.5
+ * @return The extra data
+ */
void SetAppControl(app_control_h app_control);
+
+ /**
+ * @brief Gets the app control handle
+ * @since_tizen 5.5
+ * @return the app control handle
+ */
app_control_h GetAppControl() const;
private:
diff --git a/notification-ex/button_item.h b/notification-ex/button_item.h
index 6cfd30d..4e11722 100644
--- a/notification-ex/button_item.h
+++ b/notification-ex/button_item.h
@@ -26,18 +26,74 @@
namespace notification {
namespace item {
+/**
+ * @brief The class for ButtonItem type notification.
+ * @details The class to make the notification with button.
+ * @since_tizen 5.5
+ */
class EXPORT_API ButtonItem : public AbstractItem {
public:
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] id The ButtonItem id
+ * @param[in] title The title of ButtonItem
+ * @param[in] action The action for ButtonItem
+ */
+
ButtonItem(std::string id, std::string title,
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] title The title of ButtonItem
+ * @param[in] action The action for ButtonItem
+ */
+
ButtonItem(std::string title,
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~ButtonItem();
+ /**
+ * @brief Serialize the data of ButtonItem.
+ * @since_tizen 5.5
+ * @return Bundle type data
+ */
Bundle Serialize() const override;
+
+ /**
+ * @brief Deserialize the serialized data.
+ * @since_tizen 5.5
+ * @param[in] b The serialized Bundle data
+ */
void Deserialize(Bundle b) override;
+
+ /**
+ * @brief Finds the AbstractItem using by notification item id.
+ * @since_tizen 5.5
+ * @param[in] id notification item id
+ * @return AbstractItem object
+ */
AbstractItem& FindByID(std::string id) override;
+
+ /**
+ * @brief Gets the type of ButtonItem.
+ * @since_tizen 5.5
+ * @return AbstractItem::Type::Button
+ */
int GetType() const override;
+
+ /**
+ * @brief Gets the title of ButtonItem.
+ * @since_tizen 5.5
+ * @return The title of ButtonItem
+ */
std::string GetTitle() const;
private:
diff --git a/notification-ex/chat_message_item.h b/notification-ex/chat_message_item.h
index ca4a2aa..bae99b7 100644
--- a/notification-ex/chat_message_item.h
+++ b/notification-ex/chat_message_item.h
@@ -31,6 +31,11 @@
namespace notification {
namespace item {
+/**
+ * @brief The class for ChatMessageItem type notification.
+ * @details The class to make the chat message type notification.
+ * @since_tizen 5.5
+ */
class EXPORT_API ChatMessageItem : public AbstractItem {
public:
enum Type {
@@ -39,21 +44,97 @@ class EXPORT_API ChatMessageItem : public AbstractItem {
};
public:
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] id The ChatMessageItem id
+ * @param[in] name The name of chat message
+ * @param[in] text The text of chat message
+ * @param[in] image The image of chat message
+ * @param[in] time The time of chat message
+ * @param[in] type The type of chat message
+ * @param[in] action The action for ChatMessageItem
+ */
ChatMessageItem(std::string id, std::shared_ptr<TextItem> name,
std::shared_ptr<TextItem> text, std::shared_ptr<ImageItem> image,
std::shared_ptr<TimeItem> time, Type type,
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~ChatMessageItem();
+
+ /**
+ * @brief Gets the type of ChatMessageItem.
+ * @since_tizen 5.5
+ * @return AbstractItem::Type::ChatMessage
+ */
int GetType() const override;
+ /**
+ * @brief Serialize the data of ChatMessageItem.
+ * @since_tizen 5.5
+ * @return Bundle type data
+ */
Bundle Serialize() const override;
+
+ /**
+ * @brief Deserialize the serialized data.
+ * @since_tizen 5.5
+ * @param[in] b The serialized Bundle data
+ */
void Deserialize(Bundle b) override;
+
+ /**
+ * @brief Finds the AbstractItem using by notification item id.
+ * @since_tizen 5.5
+ * @param[in] id notification item id
+ * @return AbstractItem object
+ */
AbstractItem& FindByID(std::string id) override;
+
+ /**
+ * @brief Gets the path of shared file location.
+ * @since_tizen 5.5
+ * @return The list of shared path.
+ */
std::list<std::string> GetSharedPath() const override;
+
+ /**
+ * @brief Gets the name data of ChatMessageItem.
+ * @since_tizen 5.5
+ * @return The TextItem type name data
+ */
TextItem& GetNameItem() const;
+
+ /**
+ * @brief Gets the text data of ChatMessageItem.
+ * @since_tizen 5.5
+ * @return The TextItem type text data
+ */
TextItem& GetTextItem() const;
+
+ /**
+ * @brief Gets the image data of ChatMessageItem.
+ * @since_tizen 5.5
+ * @return The ImageItem type image data
+ */
ImageItem& GetImageItem() const;
+
+ /**
+ * @brief Gets the time data of ChantMessageItem.
+ * @since_tizen 5.5
+ * @return The TimeItem type time data
+ */
TimeItem& GetTimeItem() const;
+
+ /**
+ * @brief Gets the type of message.
+ * @since_tizen 5.5
+ * @return ChatMessageItem::Type::sender or ChatMessageItem::Type::user
+ */
Type GetMessageType() const;
private:
diff --git a/notification-ex/checkbox_item.h b/notification-ex/checkbox_item.h
index c71fdf5..fa1d20a 100644
--- a/notification-ex/checkbox_item.h
+++ b/notification-ex/checkbox_item.h
@@ -26,17 +26,71 @@
namespace notification {
namespace item {
+/**
+ * @brief The class for CheckBoxItem type notification.
+ * @details The class to make the notification with checkbox.
+ * @since_tizen 5.5
+ */
class EXPORT_API CheckBoxItem : public AbstractItem {
public:
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] id The CheckBoxItem id
+ * @param[in] title The title of CheckBoxItem
+ * @param[in] checked The check state of CheckBoxItem
+ * @param[in] action The action for ChatMessageItem
+ */
CheckBoxItem(std::string id, std::string title, bool checked = false,
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Deserialize
+ * @since_tizen 5.5
+ */
virtual ~CheckBoxItem();
+ /**
+ * @brief Serialize the data of CheckBoxItem.
+ * @since_tizen 5.5
+ * @return Bundle type data
+ */
Bundle Serialize() const override;
+
+ /**
+ * @brief Deserialize the serialized data.
+ * @since_tizen 5.5
+ * @param[in] b The serialized Bundle data
+ */
void Deserialize(Bundle b) override;
+
+ /**
+ * @brief Finds the AbstractItem using by notification item id.
+ * @since_tizen 5.5
+ * @param[in] id notification item id
+ * @return AbstractItem object
+ */
AbstractItem& FindByID(std::string id) override;
+
+ /**
+ * @brief Gets the type of CheckBoxItem.
+ * @since_tizen 5.5
+ * @return AbstractItem::Type::CheckBox
+ */
int GetType() const override;
+
+ /**
+ * @brief Gets the title of CheckBoxItem.
+ * @since_tizen 5.5
+ * @return The title of CheckBoxItem
+ */
std::string GetTitle() const;
+
+ /**
+ * @brief Gets the check state of CheckBoxItem.
+ * @since_tizen 5.5
+ * @return true if checked, or false
+ */
bool IsChecked() const;
private:
diff --git a/notification-ex/default_action_factory.h b/notification-ex/default_action_factory.h
index a1ecde5..6b64d65 100644
--- a/notification-ex/default_action_factory.h
+++ b/notification-ex/default_action_factory.h
@@ -24,9 +24,24 @@
namespace notification {
namespace item {
+/**
+ * @brief The class for predefined action.
+ * @details The DefaultActionFactory is registered in factory manager default.
+ * @since_tizen 5.5
+ */
class EXPORT_API DefaultActionFactory : public IActionFactory {
public:
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~DefaultActionFactory() = default;
+
+ /**
+ * @brief Creates AbstractAction
+ * @since_tizen 5.5
+ * @param[in] type The type of notification action
+ */
std::unique_ptr<AbstractAction> CreateAction(int type) override;
};
diff --git a/notification-ex/default_item_factory.h b/notification-ex/default_item_factory.h
index a9b0786..346593a 100644
--- a/notification-ex/default_item_factory.h
+++ b/notification-ex/default_item_factory.h
@@ -24,9 +24,24 @@
namespace notification {
namespace item {
+/**
+ * @brief The class for predefined item.
+ * @details The DefaultItemFactory is registered in factory manager default.
+ * @since_tizen 5.5
+ */
class EXPORT_API DefaultItemFactory : public IItemFactory {
public:
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~DefaultItemFactory() = default;
+
+ /**
+ * @brief Creates AbstractItem
+ * @since_tizen 5.5
+ * @param[in] type The type of notification item.
+ */
std::unique_ptr<AbstractItem> CreateItem(int type) override;
};
diff --git a/notification-ex/entry_item.h b/notification-ex/entry_item.h
index e22af08..6bc04a3 100644
--- a/notification-ex/entry_item.h
+++ b/notification-ex/entry_item.h
@@ -29,19 +29,83 @@
namespace notification {
namespace item {
+/**
+ * @brief The class for EntryItem type notification.
+ * @details The class to make the notification with text input.
+ * @since_tizen 5.5
+ */
class EXPORT_API EntryItem : public AbstractItem {
public:
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] action The action for EntryItem
+ */
EntryItem(std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] id The EntryItem id
+ * @param[in] action The action for EntryItem
+ */
EntryItem(std::string id,
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~EntryItem();
+ /**
+ * @brief Serialize the data of EntryItem.
+ * @since_tizen 5.5
+ * @return Bundle type data
+ */
Bundle Serialize() const override;
+
+ /**
+ * @brief Deserialize the serialized data.
+ * @since_tizen 5.5
+ * @param[in] b The serialized Bundle data
+ */
void Deserialize(Bundle b) override;
+
+ /**
+ * @brief Finds the AbstractItem using by notification item id.
+ * @since_tizen 5.5
+ * @param[in] id notification item id
+ * @return AbstractItem object
+ */
AbstractItem& FindByID(std::string id) override;
+
+ /**
+ * @brief Gets the type of EntryItem.
+ * @since_tizen 5.5
+ * @return AbstractItem::Type::Entry
+ */
int GetType() const override;
+
+ /**
+ * @brief Gets the text data of EntryItem.
+ * @since_tizen 5.5
+ * @return The text data
+ */;
std::string GetText() const;
+
+ /**
+ * @brief Sets the text data of EntryItem.
+ * @since_tizen 5.5
+ * @param[in] The text data
+ */
void SetText(std::string text);
+
+ /**
+ * @brief Gets the limit of text size.
+ * @since_tizen 5.5
+ * @return The limit of text size
+ */
int GetTextLimit() const;
private:
diff --git a/notification-ex/factory_manager.h b/notification-ex/factory_manager.h
index 66a356e..9831828 100644
--- a/notification-ex/factory_manager.h
+++ b/notification-ex/factory_manager.h
@@ -27,13 +27,53 @@
namespace notification {
namespace item {
+/**
+ * @brief The class for FactoryManager.
+ * @details The class to manage creation of action and item.
+ * @since_tizen 5.5
+ */
class EXPORT_API FactoryManager {
public:
+ /**
+ * @brief Gets the instance of FactoryManager
+ * @since_tizen 5.5
+ * @return The FactoryManager instance
+ */
static FactoryManager& GetInst();
+
+ /**
+ * @brief Resgisters the IItemFactory
+ * @since_tizen 5.5
+ * @param[in] factory The IItemFactory for noitfication item
+ */
void RegisterFactory(std::unique_ptr<IItemFactory> factory);
+
+ /**
+ * @brief Registers the IActionFactory
+ * @since_tizen 5.5
+ * @param[in] factory The IActionFactory for noitfication action
+ */
void RegisterFactory(std::unique_ptr<IActionFactory> factory);
+
+ /**
+ * @brief Creates the notification item from type.
+ * @since_tizen 5.5
+ * @return AbstractItem object
+ */
std::unique_ptr<AbstractItem> CreateItem(int type);
+
+ /**
+ * @brief Creates the notification action from type.
+ * @since_tizen 5.5
+ * @return AbstractAction object
+ */
std::unique_ptr<AbstractAction> CreateAction(int type);
+
+ /**
+ * @brief Gets NullItem
+ * @since_tizen 5.5
+ * @return NullItem object
+ */
AbstractItem& GetNullItem();
private:
diff --git a/notification-ex/group_item.h b/notification-ex/group_item.h
index 5702376..a4e7003 100644
--- a/notification-ex/group_item.h
+++ b/notification-ex/group_item.h
@@ -26,25 +26,114 @@
namespace notification {
namespace item {
+/**
+ * @brief The class for GroupItem type notification.
+ * @details The class to make the group of notifications.
+ * @since_tizen 5.5
+ */
class EXPORT_API GroupItem : public AbstractItem {
public:
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] action The action for GroupItem
+ */
GroupItem(std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] id The GroupItem id
+ * @param[in] action The action for GroupItem
+ */
GroupItem(std::string id,
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Deserialize
+ * @since_tizen 5.5
+ */
virtual ~GroupItem();
public:
+ /**
+ * @brief Serialize the data of GroupItem.
+ * @since_tizen 5.5
+ * @return Bundle type data
+ */
Bundle Serialize() const override;
+
+ /**
+ * @brief Deserialize the serialized data.
+ * @since_tizen 5.5
+ * @param[in] b The serialized Bundle data
+ */
void Deserialize(Bundle b) override;
+
+ /**
+ * @brief Finds the AbstractItem using by notification item id.
+ * @since_tizen 5.5
+ * @param[in] id notification item id
+ * @return AbstractItem object
+ */
AbstractItem& FindByID(std::string id) override;
+
+ /**
+ * @brief Gets the type of GroupItem.
+ * @since_tizen 5.5
+ * @return AbstractItem::Type::Group
+ */
int GetType() const override;
+
+ /**
+ * @brief Gets the path of shared file location.
+ * @since_tizen 5.5
+ * @return The list of shared path.
+ */
std::list<std::string> GetSharedPath() const override;
+ /**
+ * @brief Sets the vertical state.
+ * @details The vertical state is true, the children of GroupItem are associated vertically.
+ * And if it is false, the children are associated horizontally.
+ * @since_tizen 5.5
+ * @param[in] The vertical state
+ */
void SetDirection(bool vertical);
+
+ /**
+ * @brief Gets whether the vertical state is true or not.
+ * @since_tizen 5.5
+ * @return true if vertical is true, or false
+ */
bool IsVertical();
+
+ /**
+ * @brief Gets app label data of GroupItem.
+ * @since_tizen 5.5
+ * @return The app label data
+ */
std::string GetAppLabel();
+
+ /**
+ * @brief Adds child notification item.
+ * @since_tizen 5.5
+ * @param[in] AbstractItem object
+ */
void AddChild(std::shared_ptr<AbstractItem> child);
+
+ /**
+ * @brief Removes child notification item.
+ * @since_tizen 5.5
+ * @param[in] The notification id
+ */
void RemoveChild(std::string itemId);
+
+ /**
+ * @brief Gets the list of children item of GroupItem.
+ * @since_tizen 5.5
+ * @return The list of AbstractItem
+ */
std::list<std::shared_ptr<AbstractItem>> GetChildren();
private:
diff --git a/notification-ex/iaction_factory.h b/notification-ex/iaction_factory.h
index fd03ab8..d0d1c3e 100644
--- a/notification-ex/iaction_factory.h
+++ b/notification-ex/iaction_factory.h
@@ -26,9 +26,23 @@
namespace notification {
namespace item {
+/**
+ * @brief The interface class for ActionFactory.
+ * @since_tizen 5.5
+ */
class EXPORT_API IActionFactory {
public:
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~IActionFactory() = default;
+
+ /**
+ * @brief Creates the AbstractAction from type
+ * @since_tizen 5.5
+ * @param[in] type The type of notification action
+ */
virtual std::unique_ptr<AbstractAction> CreateAction(int type) = 0;
};
diff --git a/notification-ex/icon_item.h b/notification-ex/icon_item.h
index 35e9c56..6ae63a4 100644
--- a/notification-ex/icon_item.h
+++ b/notification-ex/icon_item.h
@@ -23,16 +23,46 @@
#include "notification-ex/image_item.h"
+/**
+ * @brief The class for IconItem type notification.
+ * @details The class to make the notification with icon.
+ * @since_tizen 5.5
+ */
namespace notification {
namespace item {
class EXPORT_API IconItem : public ImageItem {
public:
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] iconpath The icon path of IconItem
+ * @param[in] action The action for IconItem
+ */
IconItem(std::string iconPath,
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] id The IconItem id
+ * @param[in] iconpath The icon path of IconItem
+ * @param[in] action The action for IconItem
+ */
IconItem(std::string id, std::string iconPath,
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~IconItem();
+
+ /**
+ * @brief Gets the type of IconItem.
+ * @since_tizen 5.5
+ * @return AbstractItem::Type::Icon
+ */
int GetType() const override;
private:
diff --git a/notification-ex/icon_text_item.h b/notification-ex/icon_text_item.h
index 9a3330e..9225ad9 100644
--- a/notification-ex/icon_text_item.h
+++ b/notification-ex/icon_text_item.h
@@ -28,20 +28,72 @@
namespace notification {
namespace item {
+/**
+ * @brief The class for IconTextItem type notification.
+ * @details The class to make the notification with icon and text.
+ * @since_tizen 5.5
+ */
class EXPORT_API IconTextItem : public AbstractItem {
public:
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] id The IconTextItem id
+ * @param[in] icon The icon of IconTextItem
+ * @param[in] text The text of IconTextItem
+ * @param[in] action The action for IconTextItem
+ */
IconTextItem(std::string id, std::shared_ptr<IconItem> icon,
std::shared_ptr<TextItem> text,
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~IconTextItem();
+ /**
+ * @brief Serialize the data of IconTextItem.
+ * @since_tizen 5.5
+ * @return Bundle type data
+ */
Bundle Serialize() const override;
+
+ /**
+ * @brief Deserialize the serialized data.
+ * @since_tizen 5.5
+ * @param[in] b The serialized Bundle data
+ */
void Deserialize(Bundle b) override;
+
+ /**
+ * @brief Finds the AbstractItem using by notification item id.
+ * @since_tizen 5.5
+ * @param[in] id notification item id
+ * @return AbstractItem object
+ */
AbstractItem& FindByID(std::string id) override;
+
+ /**
+ * @brief Gets the type of IconTextItem.
+ * @since_tizen 5.5
+ * @return AbstractItem::Type::IconText
+ */
int GetType() const override;
+ /**
+ * @brief Gets the IconItem of IconTextItem.
+ * @since_tizen 5.5
+ * @return The IconItem object
+ */
IconItem& GetIconItem() const;
+
+ /**
+ * @brief Gets the TextItem of IconTextItem.
+ * @since_tizen 5.5
+ * @return The TextItem object
+ */
TextItem& GetTextItem() const;
private:
diff --git a/notification-ex/iitem_factory.h b/notification-ex/iitem_factory.h
index 0511184..8f12d69 100644
--- a/notification-ex/iitem_factory.h
+++ b/notification-ex/iitem_factory.h
@@ -26,9 +26,23 @@
namespace notification {
namespace item {
+/**
+ * @brief The interface class for ItemFactory.
+ * @since_tizen 5.5
+ */
class EXPORT_API IItemFactory {
public:
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~IItemFactory() = default;
+
+ /**
+ * @brief Creates the AbstractItem from type
+ * @since_tizen 5.5
+ * @param[in] type The type of notification item
+ */
virtual std::unique_ptr<AbstractItem> CreateItem(int type) = 0;
};
diff --git a/notification-ex/iitem_info.h b/notification-ex/iitem_info.h
index e1e40ff..bbe605e 100644
--- a/notification-ex/iitem_info.h
+++ b/notification-ex/iitem_info.h
@@ -22,13 +22,51 @@
namespace notification {
namespace item {
+/**
+ * @brief The interface class for ItemInfo
+ * @since_tizen 5.5
+ */
class EXPORT_API IItemInfo {
public:
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~IItemInfo() = default;
+
+ /**
+ * @brief Gets hide time of notification
+ * @since_tizen 5.5
+ * @return The hide time value
+ */
virtual int GetHideTime() const = 0;
+
+ /**
+ * @brief Sets hide time of notification
+ * @since_tizen 5.5
+ * @param[in] hide_time The hide time
+ */
virtual void SetHideTime(int hide_time) = 0;
+
+ /**
+ * @brief Gets delete time of notification
+ * @since_tizen 5.5
+ * @return The delete time value
+ */
virtual int GetDeleteTime() const = 0;
+
+ /**
+ * @brief Sets delete time of notification
+ * @since_tizen 5.5
+ * @param[in] delete_time The delete time
+ */
virtual void SetDeleteTime(int delete_time) = 0;
+
+ /**
+ * @brief Gets time information
+ * @since_tizen 5.5
+ * @return The time information
+ */
virtual time_t GetTime() const = 0;
};
diff --git a/notification-ex/image_item.h b/notification-ex/image_item.h
index a17516d..83b27a2 100644
--- a/notification-ex/image_item.h
+++ b/notification-ex/image_item.h
@@ -26,18 +26,72 @@
namespace notification {
namespace item {
+/**
+ * @brief The class for ImageItem type notification.
+ * @details The class to make the notification with image.
+ * @since_tizen 5.5
+ */
class EXPORT_API ImageItem : public AbstractItem {
public:
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] imagePath The image path of ImageItem
+ * @param[in] action The action for ImageItem
+ */
ImageItem(std::string imagePath,
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] id The ImageItem id
+ * @param[in] imagePath The image path of ImageItem
+ * @param[in] action The action for ImageItem
+ */
ImageItem(std::string id, std::string imagePath,
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~ImageItem();
+
+ /**
+ * @brief Gets the type of ImageItem.
+ * @since_tizen 5.5
+ * @return AbstractItem::Type::Image
+ */
int GetType() const override;
+ /**
+ * @brief Serialize the data of ImageItem.
+ * @since_tizen 5.5
+ * @return Bundle type data
+ */
Bundle Serialize() const override;
+
+ /**
+ * @brief Deserialize the serialized data.
+ * @since_tizen 5.5
+ * @param[in] b The serialized Bundle data
+ */
void Deserialize(Bundle b) override;
+
+ /**
+ * @brief Finds the AbstractItem using by notification item id.
+ * @since_tizen 5.5
+ * @param[in] id notification item id
+ * @return AbstractItem object
+ */
AbstractItem& FindByID(std::string id) override;
+
+ /**
+ * @brief Gets the path of image.
+ * @since_tizen 5.5
+ * @return The path of image
+ */
std::string GetImagePath() const;
private:
diff --git a/notification-ex/input_selector_item.h b/notification-ex/input_selector_item.h
index f9a873a..f769be9 100644
--- a/notification-ex/input_selector_item.h
+++ b/notification-ex/input_selector_item.h
@@ -26,20 +26,77 @@
namespace notification {
namespace item {
+/**
+ * @brief The class for InputSelectorItem type notification.
+ * @details The class to make the notification with selector.
+ * @since_tizen 5.5
+ */
class EXPORT_API InputSelectorItem : public AbstractItem {
public:
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] action The action for InputSelectorItem
+ */
InputSelectorItem(std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] id The InputSelectorItem id
+ * @param[in] action The action for InputSelectorItem
+ */
InputSelectorItem(std::string id,
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~InputSelectorItem();
public:
+ /**
+ * @brief Serialize the data of InputSelectorItem.
+ * @since_tizen 5.5
+ * @return Bundle type data
+ */
virtual Bundle Serialize() const override;
+
+ /**
+ * @brief Deserialize the serialized data.
+ * @since_tizen 5.5
+ * @param[in] b The serialized Bundle data
+ */
virtual void Deserialize(Bundle b) override;
+
+ /**
+ * @brief Finds the AbstractItem using by notification item id.
+ * @since_tizen 5.5
+ * @param[in] id notification item id
+ * @return AbstractItem object
+ */
virtual AbstractItem& FindByID(std::string id) override;
+
+ /**
+ * @brief Gets the type of InputSelectorItem.
+ * @since_tizen 5.5
+ * @return AbstractItem::Type::InputSelector
+ */
int GetType() const override;
+ /**
+ * @brief Gets the contents of InputSelectorItem.
+ * @since_tizen 5.5
+ * @return The list of string
+ */
std::list<std::string> GetContents() const;
+
+ /**
+ * @brief Sets the contents of InputSelectorItem.
+ * @since_tizen 5.5
+ * @param[in] contents The list of string
+ */
void SetContents(std::list<std::string> contents);
private:
diff --git a/notification-ex/item_inflator.h b/notification-ex/item_inflator.h
index 0f2e9df..e556b5d 100644
--- a/notification-ex/item_inflator.h
+++ b/notification-ex/item_inflator.h
@@ -26,8 +26,18 @@
namespace notification {
namespace item {
+/**
+ * @brief The class to create item
+ * @since_tizen 5.5
+ */
class EXPORT_API ItemInflator {
public:
+
+ /**
+ * @brief Creates AbstractItem from Bundle data
+ * @since_tizen 5.5
+ * @param[in] b Bundle type data
+ */
static std::shared_ptr<AbstractItem> Create(Bundle b);
};
diff --git a/notification-ex/null_item.h b/notification-ex/null_item.h
index 6864c1a..fe5927b 100644
--- a/notification-ex/null_item.h
+++ b/notification-ex/null_item.h
@@ -26,15 +26,62 @@
namespace notification {
namespace item {
+/**
+ * @brief The class for IconTextItem type notification.
+ * @details The NullItem is used to notify the item is null object.
+ * @since_tizen 5.5
+ */
class EXPORT_API NullItem : public AbstractItem {
public:
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] action The action for ImageItem
+ */
NullItem(std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] id The NullItem id
+ * @param[in] action The action for ImageItem
+ */
NullItem(std::string id,
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~NullItem();
+
+ /**
+ * @brief Gets the type of NullItem.
+ * @since_tizen 5.5
+ * @return AbstractItem::Type::NullObject
+ */
int GetType() const override;
+
+ /**
+ * @brief Serialize the data of NullItem.
+ * @since_tizen 5.5
+ * @return Bundle type data
+ */
Bundle Serialize() const override;
+
+ /**
+ * @brief Deserialize the serialized data.
+ * @since_tizen 5.5
+ * @param[in] b The serialized Bundle data
+ */
void Deserialize(Bundle b) override;
+
+ /**
+ * @brief Finds the AbstractItem using by notification item id.
+ * @since_tizen 5.5
+ * @param[in] id notification item id
+ * @return AbstractItem object
+ */
AbstractItem& FindByID(std::string id) override;
};
diff --git a/notification-ex/progress_item.h b/notification-ex/progress_item.h
index 04fa3a7..533b322 100644
--- a/notification-ex/progress_item.h
+++ b/notification-ex/progress_item.h
@@ -26,23 +26,98 @@
namespace notification {
namespace item {
+/**
+ * @brief The class for ProgressItem type notification.
+ * @details
+ * @since_tizen 5.5
+ */
class EXPORT_API ProgressItem : public AbstractItem {
public:
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] min The minimum value of ProgressItem
+ * @param[in] current The current value ProgressItem
+ * @param[in] max The maximum value of ProgressItem
+ * @param[in] action The action for ProgressItem
+ */
ProgressItem(float min, float current, float max,
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] id The ProgressItem id
+ * @param[in] min The minimum value of ProgressItem
+ * @param[in] current The current value ProgressItem
+ * @param[in] max The maximum value of ProgressItem
+ * @param[in] action The action for ProgressItem
+ */
ProgressItem(std::string id, float min, float current, float max,
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~ProgressItem();
public:
+ /**
+ * @brief Serialize the data of ProgressItem.
+ * @since_tizen 5.5
+ * @return Bundle type data
+ */
virtual Bundle Serialize() const override;
+
+ /**
+ * @brief Deserialize the serialized data.
+ * @since_tizen 5.5
+ * @param[in] b The serialized Bundle data
+ */
virtual void Deserialize(Bundle b) override;
+
+ /**
+ * @brief Finds the AbstractItem using by notification item id.
+ * @since_tizen 5.5
+ * @param[in] id notification item id
+ * @return AbstractItem object
+ */
virtual AbstractItem& FindByID(std::string id) override;
+
+ /**
+ * @brief Gets the type of ProgressItem.
+ * @since_tizen 5.5
+ * @return AbstractItem::Type::Progress
+ */
int GetType() const override;
+ /**
+ * @brief Gets the current value of progress.
+ * @since_tizen 5.5
+ * @return The current value of progress
+ */
float GetCurrent() const;
+
+ /**
+ * @brief Sets the current value of progress.
+ * @since_tizen 5.5
+ * @param[in] current The current value of progress
+ */
void SetCurrent(float current);
+
+ /**
+ * @brief Gets the minimum value of progress.
+ * @since_tizen 5.5
+ * @return The minimum value of progress
+ */
float GetMin() const;
+
+ /**
+ * @brief Gets the maximum value of progress.
+ * @since_tizen 5.5
+ * @return The maximum value of progress
+ */
float GetMax() const;
private:
diff --git a/notification-ex/text_item.h b/notification-ex/text_item.h
index 178d7c4..4ac8731 100644
--- a/notification-ex/text_item.h
+++ b/notification-ex/text_item.h
@@ -29,18 +29,80 @@
namespace notification {
namespace item {
+
+/**
+ * @brief The class for TextItem type notification.
+ * @details The class to make the notification with text.
+ * @since_tizen 5.5
+ */
class EXPORT_API TextItem : public AbstractItem {
public:
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] id The TextItem id
+ * @param[in] text The text of TextItem
+ * @param[in] hyperlink The hyperlink of TextItem
+ * @param[in] action The action for TextItem
+ */
TextItem(std::string id ,std::string text,
std::string hyperlink = std::string(),
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~TextItem();
+
+ /**
+ * @brief Gets the type of TextItem.
+ * @since_tizen 5.5
+ * @return AbstractItem::Type::Text
+ */
int GetType() const override;
+
+ /**
+ * @brief Serialize the data of TextItem.
+ * @since_tizen 5.5
+ * @return Bundle type data
+ */
Bundle Serialize() const override;
+
+ /**
+ * @brief Deserialize the serialized data.
+ * @since_tizen 5.5
+ * @param[in] b The serialized Bundle data
+ */
void Deserialize(Bundle b) override;
+
+ /**
+ * @brief Finds the AbstractItem using by notification item id.
+ * @since_tizen 5.5
+ * @param[in] id notification item id
+ * @return AbstractItem object
+ */
AbstractItem& FindByID(std::string id) override;
+
+ /**
+ * @brief Sets the contents of TextItem.
+ * @since_tizen 5.5
+ * @return The text contents
+ */
void SetContents(std::string contents);
+
+ /**
+ * @brief Gets the contents of TextItem.
+ * @since_tizen 5.5
+ * @return The text contents
+ */
std::string GetContents() const;
+
+ /**
+ * @brief Gets the hyperlink data of TextItem.
+ * @since_tizen 5.5
+ * @return The hyperlink data of TextItem
+ */
std::string GetHyperLink() const;
private:
diff --git a/notification-ex/time_item.h b/notification-ex/time_item.h
index 5322eb3..4291344 100644
--- a/notification-ex/time_item.h
+++ b/notification-ex/time_item.h
@@ -28,20 +28,80 @@
namespace notification {
namespace item {
+/**
+ * @brief The class for TimeItem type notification.
+ * @details The class to make the notification with time.
+ * @since_tizen 5.5
+ */
class EXPORT_API TimeItem : public AbstractItem {
public:
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] action The action for TimeItem
+ */
TimeItem(
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] time The time data of TimeItem
+ * @param[in] action The action for TimeItem
+ */
TimeItem(time_t time,
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] id The TimeItem id
+ * @param[in] time The time data of TimeItem
+ * @param[in] action The action for TimeItem
+ */
TimeItem(std::string id, time_t time,
std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~TimeItem();
+
+ /**
+ * @brief Gets the type of TimeItem.
+ * @since_tizen 5.5
+ * @return AbstractItem::Type::Time
+ */
int GetType() const override;
+
+ /**
+ * @brief Serialize the data of TimeItem.
+ * @since_tizen 5.5
+ * @return Bundle type data
+ */
Bundle Serialize() const override;
+
+ /**
+ * @brief Deserialize the serialized data.
+ * @since_tizen 5.5
+ * @param[in] b The serialized Bundle data
+ */
void Deserialize(Bundle b) override;
+
+ /**
+ * @brief Finds the AbstractItem using by notification item id.
+ * @since_tizen 5.5
+ * @param[in] id notification item id
+ * @return AbstractItem object
+ */
AbstractItem& FindByID(std::string id) override;
+
+ /**
+ * @brief Gets the time state of TimeItem.
+ * @since_tizen 5.5
+ * @return The time state of TimeItem.
+ */
time_t GetTime() const;
private:
diff --git a/notification-ex/visibility_action.h b/notification-ex/visibility_action.h
index ebc543a..20c1757 100644
--- a/notification-ex/visibility_action.h
+++ b/notification-ex/visibility_action.h
@@ -22,18 +22,79 @@
namespace notification {
namespace item {
+/**
+ * @brief The class for VisibilityAction type action.
+ * @details The action for visibility of notification.
+ * @since_tizen 5.5
+ */
class EXPORT_API VisibilityAction : public AbstractAction {
public:
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ */
VisibilityAction();
+
+ /**
+ * @brief Constructor
+ * @since_tizen 5.5
+ * @param[in] extra
+ */
VisibilityAction(std::string extra);
+
+ /**
+ * @brief Destructor
+ * @since_tizen 5.5
+ */
virtual ~VisibilityAction();
+ /**
+ * @brief Gets the type of action
+ * @since_tizen 5.5
+ * @return The type of action
+ */
int GetType() const override;
+
+ /**
+ * @brief Serialize the data of AbstractAction.
+ * @since_tizen 5.5
+ * @return Bundle type data
+ */
Bundle Serialize() const override;
+
+ /**
+ * @brief Deserialize the serialized data.
+ * @since_tizen 5.5
+ * @param[in] b The serialized Bundle data
+ */
void Deserialize(Bundle b) override;
+
+ /**
+ * @brief Gets whether local or not.
+ * @since_tizen 5.5
+ * @return true if local, or false
+ */
bool IsLocal() const override;
+
+ /**
+ * @brief Execute the action
+ * @since_tizen 5.5
+ * @param[in] item The AbstractItem
+ */
void Execute(std::shared_ptr<AbstractItem> item) override;
+
+ /**
+ * @brief Gets the extra data
+ * @since_tizen 5.5
+ * @return The extra data
+ */
std::string GetExtra() const override;
+
+ /**
+ * @brief Sets the visibility
+ * @since_tizen 5.5
+ * @param[in] id
+ */
void SetVisibility(std::string id, bool visible);
private: