X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=notification-ex%2Fbutton_item.h;h=95880f3dd493298f7d439c1b59145a4e0f007939;hb=refs%2Fheads%2Ftizen;hp=246ffc7f817a1a8ac0cbd35f731532793c10b28d;hpb=924d54f0e5919264cf5a17c73724ae69fe2c1073;p=platform%2Fcore%2Fapi%2Fnotification.git diff --git a/notification-ex/button_item.h b/notification-ex/button_item.h index 246ffc7..95880f3 100644 --- a/notification-ex/button_item.h +++ b/notification-ex/button_item.h @@ -26,19 +26,104 @@ 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 action = std::shared_ptr({})); + + /** + * @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 action = std::shared_ptr({})); + + /** + * @brief Destructor + * @since_tizen 5.5 + */ virtual ~ButtonItem(); - Bundle Serialize() override; - void Deserialize(Bundle b) override; - AbstractItem& FindByID(std::string id) override; + /** + * @brief Serialize the data of ButtonItem. + * @since_tizen 5.5 + * @return Bundle type data + */ + tizen_base::Bundle Serialize() const override; + + /** + * @brief Deserialize the serialized data. + * @since_tizen 5.5 + * @param[in] b The serialized Bundle data + */ + void Deserialize(tizen_base::Bundle b) override; + + /** + * @brief Checks the item type exist in this notification. + * @since_tizen 5.5 + * @param[in] type notification item type + * @return true if the item type exists + */ + bool IsItemTypeExist(int type) 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; + /** + * @brief Gets the image path of ButtonItem. + * @since_tizen 5.5 + * @return The path of image + */ + std::string GetImgPath() const; + + /** + * @brief Sets the image path of ButtonItem. + * @since_tizen 5.5 + * @param[in] path Image path + */ + void SetImgPath(std::string path); + + /** + * @brief Gets the contents of ButtonItem. + * @since_tizen 5.5 + * @return The contents string + */ + std::string GetContents() const; + + /** + * @brief Sets the contents of ButtonItem. + * @since_tizen 5.5 + * @param[in] contents The contents string + */ + void SetContents(std::string contents); + private: class Impl; std::unique_ptr impl_;