Add new func for extentsion data
[platform/core/api/notification.git] / notification-ex / abstract_item.h
1 /*
2  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef NOTIFICATION_EX_ABSTRACT_ITEM_H_
18 #define NOTIFICATION_EX_ABSTRACT_ITEM_H_
19
20 #include <time.h>
21 #include <bundle_cpp.h>
22
23 #include <memory>
24 #include <string>
25 #include <list>
26 #include <vector>
27 #include <map>
28
29 #include "notification-ex/abstract_action.h"
30 #include "notification-ex/multi_language.h"
31 #include "notification-ex/iitem_info.h"
32
33 #ifndef EXPORT_API
34 #define EXPORT_API __attribute__((visibility("default")))
35 #endif
36
37 namespace notification {
38 namespace item {
39
40 /**
41  * @brief The class for ReceiverGroup.
42  * @details The class to define receiver group of notification.
43  * @since_tizen 5.5
44  */
45 class EXPORT_API ReceiverGroup {
46  public:
47   static const std::string Panel;
48   static const std::string Ticker;
49   static const std::string LockScreen;
50   static const std::string Indicator;
51   static const std::string Popup;
52 };
53
54 /**
55  * @brief The class for color data.
56  * @details The color consists A,R,G,B values.
57  * @since_tizen 5.5
58  */
59 class EXPORT_API Color {
60  public:
61   Color() {
62     a_ = 0;
63     r_ = 0;
64     g_ = 0;
65     b_ = 0;
66   }
67   Color(unsigned char a, unsigned char r, unsigned char g, unsigned char b)
68     : a_(a), r_(r), g_(g), b_(b) {
69   }
70   virtual ~Color() = default;
71
72   /**
73    * @brief Copy-constructor.
74    * @since_tizen 5.5
75    * @param[in] c The object to copy
76    */
77   Color(const Color& c) {
78     a_ = c.a_;
79     r_ = c.r_;
80     g_ = c.g_;
81     b_ = c.b_;
82   }
83
84   /**
85    * @brief Assignment.
86    * @since_tizen 5.5
87    * @param[in] c The object to copy
88    */
89   Color& operator = (const Color& c) {
90     if (this != &c) {
91       a_ = c.a_;
92       r_ = c.r_;
93       g_ = c.g_;
94       b_ = c.b_;
95     }
96     return *this;
97   }
98
99   /**
100    * @brief Move-constructor.
101    * @since_tizen 5.5
102    * @param[in] c The object to move
103    */
104   Color(Color&& c) noexcept {
105     a_ = c.a_;
106     c.a_ = 0;
107
108     r_ = c.r_;
109     c.r_ = 0;
110
111     g_ = c.g_;
112     c.g_ = 0;
113
114     b_ = c.b_;
115     c.b_ = 0;
116   }
117
118   /**
119    * @brief Assignment.
120    * @since_tizen 5.5
121    * @param[in] c The object to move
122    */
123   Color& operator = (Color&& c) noexcept {
124     if (this != &c) {
125       a_ = c.a_;
126       c.a_ = 0;
127
128       r_ = c.r_;
129       c.r_ = 0;
130
131       g_ = c.g_;
132       c.g_ = 0;
133
134       b_ = c.b_;
135       c.b_ = 0;
136     }
137     return *this;
138   }
139
140   /**
141    * @brief Gets alpha value of color.
142    * @since_tizen 5.5
143    * @return The alpha value of color
144    */
145   unsigned char GetAVal() const {
146     return a_;
147   }
148
149   /**
150    * @brief Gets red value of color.
151    * @since_tizen 5.5
152    * @return The red value of color
153    */
154   unsigned char GetRVal() const {
155     return r_;
156   }
157
158   /**
159    * @brief Gets green value of color.
160    * @since_tizen 5.5
161    * @return The green value of color
162    */
163   unsigned char GetGVal() const {
164     return g_;
165   }
166
167   /**
168    * @brief Gets blue value of color.
169    * @since_tizen 5.5
170    * @return The blue value of color
171    */
172   unsigned char GetBVal() const {
173     return b_;
174   }
175
176  private:
177   unsigned char a_;
178   unsigned char r_;
179   unsigned char g_;
180   unsigned char b_;
181 };  // class Color
182
183 /**
184  * @brief The class for padding data.
185  * @details There are left, top, right, bottom padding value.
186  * @since_tizen 5.5
187  */
188 class EXPORT_API Padding {
189  public:
190   Padding() {
191     left_ = 0;
192     top_ = 0;
193     right_ = 0;
194     bottom_ = 0;
195   }
196   Padding(int left, int top, int right, int bottom)
197     : left_(left), top_(top), right_(right), bottom_(bottom) {
198   }
199   virtual ~Padding() = default;
200
201   /**
202    * @brief Copy-constructor.
203    * @since_tizen 5.5
204    * @param[in] c The object to copy
205    */
206   Padding(const Padding& c) {
207     left_ = c.left_;
208     top_ = c.top_;
209     right_ = c.right_;
210     bottom_ = c.bottom_;
211   }
212
213   /**
214    * @brief Assignment.
215    * @since_tizen 5.5
216    * @param[in] c The object to copy
217    */
218   Padding& operator = (const Padding& c) {
219     if (this != &c) {
220       left_ = c.left_;
221       top_ = c.top_;
222       right_ = c.right_;
223       bottom_ = c.bottom_;
224     }
225     return *this;
226   }
227
228   /**
229    * @brief Move-constructor.
230    * @since_tizen 5.5
231    * @param[in] c The object to move
232    */
233   Padding(Padding&& c) noexcept {
234     left_ = c.left_;
235     c.left_ = 0;
236
237     top_ = c.top_;
238     c.top_ = 0;
239
240     right_ = c.right_;
241     c.right_ = 0;
242
243     bottom_ = c.bottom_;
244     c.bottom_ = 0;
245   }
246
247   /**
248    * @brief Assignment.
249    * @since_tizen 5.5
250    * @param[in] c The object to move
251    */
252   Padding& operator = (Padding&& c) noexcept {
253     if (this != &c) {
254       left_ = c.left_;
255       c.left_ = 0;
256
257       top_ = c.top_;
258       c.top_ = 0;
259
260       right_ = c.right_;
261       c.right_ = 0;
262
263       bottom_ = c.bottom_;
264       c.bottom_ = 0;
265     }
266     return *this;
267   }
268
269   /**
270    * @brief Gets left value of padding.
271    * @since_tizen 5.5
272    * @return The left value of padding
273    */
274   int GetLeft() const {
275     return left_;
276   }
277
278   /**
279    * @brief Gets top value of padding.
280    * @since_tizen 5.5
281    * @return The top value of padding
282    */
283   int GetTop() const {
284     return top_;
285   }
286
287   /**
288    * @brief Gets right value of padding.
289    * @since_tizen 5.5
290    * @return the right value of padding
291    */
292   int GetRight() const {
293     return right_;
294   }
295
296   /**
297    * @brief Gets bottom value of padding.
298    * @since_tizen 5.5
299    * @return The bottom value of padding.
300    */
301   int GetBottom() const {
302     return bottom_;
303   }
304
305  private:
306   int left_;
307   int top_;
308   int right_;
309   int bottom_;
310 };  // class  Padding
311
312 /**
313  * @brief The class for geometry data.
314  * @details There are x, y, width, height value.
315  * @since_tizen 5.5
316  */
317 class EXPORT_API Geometry {
318  public:
319   Geometry() {
320     x_ = 0;
321     y_ = 0;
322     w_ = 0;
323     h_ = 0;
324   }
325   Geometry(int x, int y, int w, int h) : x_(x), y_(y), w_(w), h_(h) {
326   }
327   virtual ~Geometry() = default;
328
329   /**
330    * @brief Copy-constructor.
331    * @since_tizen 5.5
332    * @param[in] c The object to copy
333    */
334   Geometry(const Geometry& c) {
335     x_ = c.x_;
336     y_ = c.y_;
337     w_ = c.w_;
338     h_ = c.h_;
339   }
340
341   /**
342    * @brief Assignment.
343    * @since_tizen 5.5
344    * @param[in] c The object to copy
345    */
346   Geometry& operator = (const Geometry& c) {
347     if (this != &c) {
348       x_ = c.x_;
349       y_ = c.y_;
350       w_ = c.w_;
351       h_ = c.h_;
352     }
353     return *this;
354   }
355
356   /**
357    * @brief Move-constructor.
358    * @since_tizen 5.5
359    * @param[in] c The object to move
360    */
361   Geometry(Geometry&& c) noexcept {
362     x_ = c.x_;
363     c.x_ = 0;
364
365     y_ = c.y_;
366     c.y_ = 0;
367
368     w_ = c.w_;
369     c.w_ = 0;
370
371     h_ = c.h_;
372     c.h_ = 0;
373   }
374
375   /**
376    * @brief Assignment.
377    * @since_tizen 5.5
378    * @param[in] c The object to move
379    */
380   Geometry& operator = (Geometry&& c) noexcept {
381     if (this != &c) {
382       x_ = c.x_;
383       c.x_ = 0;
384
385       y_ = c.y_;
386       c.y_ = 0;
387
388       w_ = c.w_;
389       c.w_ = 0;
390
391       h_ = c.h_;
392       c.h_ = 0;
393     }
394     return *this;
395   }
396
397   /**
398    * @brief Gets x value of geometry.
399    * @since_tizen 5.5
400    * @return The x value of geometry.
401    */
402   int GetX() const {
403     return x_;
404   }
405
406   /**
407    * @brief Gets y value of geometry.
408    * @since_tizen 5.5
409    * @return The y value of geometry.
410    */
411   int GetY() const {
412     return y_;
413   }
414
415   /**
416    * @brief Gets width value of geometry.
417    * @since_tizen 5.5
418    * @return The width value of geometry.
419    */
420   int GetWidth() const {
421     return w_;
422   }
423
424   /**
425    * @brief Gets height value of geometry.
426    * @since_tizen 5.5
427    * @return The height value of geometry.
428    */
429   int GetHeight() const {
430     return h_;
431   }
432
433  private:
434   int x_;
435   int y_;
436   int w_;
437   int h_;
438 };  // class Geometry
439
440 /**
441  * @brief The class for style data
442  * @details The style data consists color, padding, geometry data.
443  * @since_tizen 5.5
444  */
445 class EXPORT_API Style {
446  public:
447   Style() {
448   }
449
450   Style(std::shared_ptr<Color> color, std::shared_ptr<Padding> padding,
451       std::shared_ptr<Geometry> geometry)
452     : color_(color), padding_(padding), geometry_(geometry) {
453   }
454
455   Style(std::shared_ptr<Color> color, std::shared_ptr<Padding> padding,
456       std::shared_ptr<Geometry> geometry,
457       std::shared_ptr<Color> background_color, std::string background_image)
458     : color_(color), padding_(padding), geometry_(geometry),
459       background_color_(background_color),
460       background_image_path_(background_image) {
461   }
462
463   virtual ~Style() = default;
464
465   /**
466    * @brief Copy-constructor.
467    * @since_tizen 5.5
468    * @param[in] c The object to copy
469    */
470   Style(const Style& c) {
471     color_ = c.color_;
472     padding_ = c.padding_;
473     geometry_ = c.geometry_;
474     background_color_ = c.background_color_;
475     background_image_path_ = c.background_image_path_;
476   }
477
478   /**
479    * @brief Assignment.
480    * @since_tizen 5.5
481    * @param[in] c The object to copy
482    */
483   Style& operator = (const Style& c) {
484     if (this != &c) {
485       color_ = c.color_;
486       padding_ = c.padding_;
487       geometry_ = c.geometry_;
488       background_color_ = c.background_color_;
489       background_image_path_ = c.background_image_path_;
490     }
491     return *this;
492   }
493
494   /**
495    * @brief Move-constructor.
496    * @since_tizen 5.5
497    * @param[in] c The object to move
498    */
499   Style(Style&& c) noexcept {
500     color_ = c.color_;
501     c.color_ = nullptr;
502
503     padding_ = c.padding_;
504     c.padding_ = nullptr;
505
506     geometry_ = c.geometry_;
507     c.geometry_ = nullptr;
508
509     background_color_ = c.background_color_;
510     c.background_color_ = nullptr;
511
512     background_image_path_ = c.background_image_path_;
513     c.background_image_path_ = "";
514   }
515
516   /**
517    * @brief Assignment.
518    * @since_tizen 5.5
519    * @param[in] c The object to move
520    */
521   Style& operator = (Style&& c) noexcept {
522     if (this != &c) {
523       color_ = c.color_;
524       c.color_ = nullptr;
525
526       padding_ = c.padding_;
527       c.padding_ = nullptr;
528
529       geometry_ = c.geometry_;
530       c.geometry_ = nullptr;
531
532       background_color_ = c.background_color_;
533       c.background_color_ = nullptr;
534
535       background_image_path_ = c.background_image_path_;
536       c.background_image_path_ = "";
537     }
538     return *this;
539   }
540
541   /**
542    * @brief Gets padding data
543    * @since_tizen 5.5
544    * @return The padding data
545    */
546   std::shared_ptr<Padding> GetPadding() const {
547     return padding_;
548   }
549
550   /**
551    * @brief Sets padding data
552    * @since_tizen 5.5
553    * @param[in] padding The padding data
554    */
555   void SetPadding(std::shared_ptr<Padding> padding) {
556     padding_ = std::move(padding);
557   }
558
559   /**
560    * @brief Gets color data
561    * @since_tizen 5.5
562    * @return The color data
563    */
564   std::shared_ptr<Color> GetColor() const {
565     return color_;
566   }
567
568   /**
569    * @brief Sets color data
570    * @since_tizen 5.5
571    * @param[in] color The color data
572    */
573   void SetColor(std::shared_ptr<Color> color) {
574     color_ = std::move(color);
575   }
576
577   /**
578    * @brief Gets geometry data
579    * @since_tizen 5.5
580    * @return The geometry data
581    */
582   std::shared_ptr<Geometry> GetGeometry() const {
583     return geometry_;
584   }
585
586   /**
587    * @brief Sets geometry data
588    * @since_tizen 5.5
589    * @param[in] geometry The geometry data
590    */
591   void SetGeometry(std::shared_ptr<Geometry> geometry) {
592     geometry_ = std::move(geometry);
593   }
594
595   /**
596    * @brief Gets background image path
597    * @since_tizen 5.5
598    * @param[in] image_path The background image path
599    */
600   void SetBackgroundImage(std::string image_path) {
601     background_image_path_ = std::move(image_path);
602   }
603
604   /**
605    * @brief Gets background image path
606    * @since_tizen 5.5
607    * @return The background image path
608    */
609   std::string GetBackgroundImage() const {
610     return background_image_path_;
611   }
612
613   /**
614    * @brief Sets background color
615    * @since_tizen 5.5
616    */
617   void SetBackgroundColor(std::shared_ptr<Color> color) {
618     background_color_ = std::move(color);
619   }
620
621   /**
622    * @brief Gets background color
623    * @since_tizen 5.5
624    * @return The background color
625    */
626   std::shared_ptr<Color> GetBackgroundColor() const {
627     return background_color_;
628   }
629
630  private:
631   std::shared_ptr<Color> color_;
632   std::shared_ptr<Padding> padding_;
633   std::shared_ptr<Geometry> geometry_;
634   std::shared_ptr<Color> background_color_;
635   std::string background_image_path_;
636 };  // class Style
637
638 /**
639  * @brief The class for LED data.
640  * @details The LED data consists color data and period time.
641  * @since_tizen 5.5
642  */
643 class EXPORT_API LEDInfo {
644  public:
645   LEDInfo() {
646   }
647   explicit LEDInfo(std::shared_ptr<Color> color)
648     : color_(color) {
649   }
650   virtual ~LEDInfo() = default;
651
652   /**
653    * @brief Sets the time period for turning on the LED
654    * @since_tizen 5.5
655    * @param[in] ms period time
656    */
657   void SetOnPeriod(int ms) {
658     on_period_ = ms;
659   }
660
661   /**
662    * @brief Gets the time period for turning on the LED
663    * @since_tizen 5.5
664    * @return The time for turning on the LED
665    */
666   int GetOnPeriod() const {
667     return on_period_;
668   }
669
670   /**
671    * @brief Sets the time period for turning off the LED
672    * @since_tizen 5.5
673    * @param[in] ms period time
674    */
675   void SetOffPeriod(int ms) {
676     off_period_ = ms;
677   }
678
679   /**
680    * @brief Gets the time period for turning off the LED
681    * @since_tizen 5.5
682    * @return The time for turning off the LED
683    */
684   int GetOffPeriod() const {
685     return off_period_;
686   }
687
688   /**
689    * @brief Gets the color of LED
690    * @since_tizen 5.5
691    * @return color data
692    */
693   std::shared_ptr<Color> GetColor() const {
694     return color_;
695   }
696
697   void SetColor(std::shared_ptr<Color> color) {
698     color_ = std::move(color);
699   }
700
701  private:
702   std::shared_ptr<Color> color_;
703   int on_period_ = 0;
704   int off_period_ = 0;
705 };  // clss LEDInfo
706
707 /**
708  * @brief The base class for the notification item classes.
709  * @details The AbstractItem is abstract class.
710  *          The AbstractItem has basic APIs for notification items.
711  *          The notification item class have to be a derived class of this class.
712  * @since_tizen 5.5
713  */
714 class EXPORT_API AbstractItem {
715  public:
716   enum Type {
717     NullObject,
718     Text,
719     Image,
720     Icon,
721     Button,
722     ChatMessage,
723     CheckBox,
724     IconText,
725     InputSelector,
726     Group,
727     Entry,
728     Progress,
729     Time,
730     Custom = 100
731   };
732
733   enum Policy {
734     None = 0,
735     OnBootClear = 1 << 0,
736     SimMode = 1 << 1,
737   };
738
739   enum MainType {
740     MainNone = 0,
741     MainTitle,
742     MainContents,
743     MainIcon,
744     MainButton
745   };
746
747  public:
748   /**
749    * @brief Constructor
750    * @since_tizen 5.5
751    * @param[in] action The AbstractAction for notification item
752    */
753   AbstractItem(
754       std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
755
756   /**
757    * @brief Constructor
758    * @since_tizen 5.5
759    * @param[in] id The notification id
760    * @param[in] action The AbstractAction for notification item
761    */
762   AbstractItem(std::string id,
763       std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
764
765   /**
766    * @brief Destructor
767    * @since_tizen 5.5
768    */
769   virtual ~AbstractItem() = 0;
770
771   /**
772    * @brief Serialize the data of AbstractItem.
773    * @since_tizen 5.5
774    * @return Bundle type data
775    */
776   virtual tizen_base::Bundle Serialize() const = 0;
777
778   /**
779    * @brief Deserialize the serialized data.
780    * @since_tizen 5.5
781    * @param[in] b The serialized Bundle data
782    */
783   virtual void Deserialize(tizen_base::Bundle b) = 0;
784
785   /**
786    * @brief Finds the AbstractItem using by notification item id.
787    * @since_tizen 5.5
788    * @param[in] id notification item id
789    * @return AbstractItem object
790    */
791   virtual AbstractItem& FindByID(std::string id);
792
793   /**
794    * @brief Finds the AbstractItem using by main type.
795    * @since_tizen 5.5
796    * @param[in] type The main type
797    * @return AbstractItem object
798    */
799   virtual AbstractItem& FindByMainType(MainType type);
800
801   /**
802    * @brief Checks the item type exist in this notification.
803    * @since_tizen 5.5
804    * @param[in] type notification item type
805    * @return true if the item type exists
806    */
807   virtual bool IsItemTypeExist(int type) = 0;
808
809   /**
810    * @brief Gets the type of notification item.
811    * @since_tizen 5.5
812    * @return The type of notification item
813    */
814   virtual int GetType() const = 0;
815
816   /**
817    * @brief Gets the type of notification item from Bundle data.
818    * @since_tizen 5.5
819    * @return The type of notification item
820    */
821   static int GetType(tizen_base::Bundle b);
822
823   /**
824    * @brief Gets the path of shared file location.
825    * @since_tizen 5.5
826    * @return The list of shared path.
827    */
828   virtual std::list<std::string> GetSharedPath() const;
829
830   /**
831    * @brief Sets the shared file path to original file path.
832    */
833   virtual void SetSharedPath();
834
835   /**
836    * @brief
837    * @since_tizen 5.5
838    * @return
839    */
840   virtual std::list<std::map<std::string, std::string>> GetPathMapList() const;
841
842   /**
843    * @brief Gets the notification item id.
844    * @since_tizen 5.5
845    * @return The notification item id.
846    */
847   std::string GetId() const;
848
849   /**
850    * @brief Sets the notification item id.
851    * @since_tizen 5.5
852    * @param[in] id notification item id
853    */
854   void SetId(std::string id);
855
856   std::vector<std::shared_ptr<MultiLanguage>> GetMultiLanguageArr() const;
857   std::shared_ptr<MultiLanguage> GetMultiLanguage() const;
858   void SetMultiLanguage(std::shared_ptr<MultiLanguage> multi);
859   void SetMultiLanguage(std::vector<std::shared_ptr<MultiLanguage>> multi_arr);
860
861   /**
862    * @brief Gets AbstractAction for notification item.
863    * @since_tizen 5.5
864    * @return AbstractAction instance
865    */
866   std::shared_ptr<AbstractAction> GetAction() const;
867
868   /**
869    * @brief Sets AbstractAction for notification item.
870    * @since_tizen 5.5
871    * @param[in] action AbstractAction instance
872    */
873   void SetAction(std::shared_ptr<AbstractAction> action);
874
875   /**
876    * @brief Sets the style data for notification item.
877    * @since_tizen 5.5
878    * @return Style instance
879    */
880   std::shared_ptr<Style> GetStyle() const;
881
882   /**
883    * @brief Sets the style data for notification item.
884    * @since_tizen 5.5
885    * @param[in] style Style instance
886    */
887   void SetStyle(std::shared_ptr<Style> style);
888
889   /**
890    * @brief Sets the visibile state of notification item.
891    * @since_tizen 5.5
892    * @param[in] visibile The visible state
893    */
894   void SetVisible(bool visible);
895
896   /**
897    * @brief Gets the visibile state of notification item.
898    * @since_tizen 5.5
899    * @return true if visible, false if not visible.
900    */
901   bool GetVisible() const;
902
903   /**
904    * @brief Sets the enable state of notification item.
905    * @since_tizen 5.5
906    * @param[in] enable The enable state
907    */
908   void SetEnable(bool enable);
909
910   /**
911    * @brief Gets the enable state of notification item.
912    * @since_tizen 5.5
913    * @return true if enabled, false if not enabled.
914    */
915   bool GetEnable() const;
916
917   /**
918    * @brief Adds the receiver group for notification item.
919    * @since_tizen 5.5
920    * @param[in] receiver_group The receiver group for notification item
921    */
922   void AddReceiver(std::string receiver_group);
923
924   /**
925    * @brief Removes the receiver group from the receiver group list.
926    * @since_tizen 5.5
927    * @param[in] receiver_group The receiver group
928    */
929   void RemoveReceiver(std::string receiver_group);
930
931   /**
932    * @brief Gets the receiver group list.
933    * @since_tizen 5.5
934    * @return The list of receiver group.
935    */
936   std::list<std::string> GetReceiverList();
937
938   /**
939    * @brief Sets the policy for notification item.
940    * @since_tizen 5.5
941    * @param[in] policy The policy option
942    */
943   void SetPolicy(int policy);
944
945   /**
946    * @brief Gets the policy for notification item.
947    * @since_tizen 5.5
948    * @return The policy for notification item.
949    */
950   int GetPolicy() const;
951
952   /**
953    * @brief Gets the channel option for notification item.
954    * @since_tizen 5.5
955    * @return The channel option for notification item.
956    */
957   std::string GetChannel() const;
958
959   /**
960    * @brief Sets the channel option for notification item.
961    * @since_tizen 5.5
962    * @param[in] channel The channel option for notification item.
963    */
964   void SetChannel(std::string channel);
965
966   /**
967    * @brief Sets LED option for notification item.
968    * @since_tizen 5.5
969    * @param[in] led The LEDInfo instance
970    */
971   void SetLEDInfo(std::shared_ptr<LEDInfo> led);
972
973   /**
974    * @brief Gets LED option for notification item.
975    * @since_tizen 5.5
976    * @return The LEDInfo instance
977    */
978   std::shared_ptr<LEDInfo> GetLEDInfo() const;
979
980   /**
981    * @brief Sets the sound path for notification item.
982    * @since_tizen 5.5
983    * @param[in] path The sound path
984    */
985   void SetSoundPath(std::string path);
986
987   /**
988    * @brief Sets the vibration path for notification item.
989    * @since_tizen 5.5
990    * @param[in] path The vibration path
991    */
992   void SetVibrationPath(std::string path);
993
994   /**
995    * @brief Gets the sound path for notification item.
996    * @since_tizen 5.5
997    * @return The sound path
998    */
999   std::string GetSoundPath() const;
1000
1001   /**
1002    * @brief Gets the vibration path for notification item.
1003    * @since_tizen 5.5
1004    * @return The vibration path
1005    */
1006   std::string GetVibrationPath() const;
1007
1008   /**
1009    * @brief Gets IItemInfo instance to get some information of notification item.
1010    * @since_tizen 5.5
1011    * @return The IItemInfo instance
1012    */
1013   std::shared_ptr<IItemInfo> GetInfo() const;
1014
1015   /**
1016    * @brief Gets the sender app id of notification item.
1017    * @since_tizen 5.5
1018    * @return The sender app id.
1019    */
1020   std::string GetSenderAppId() const;
1021
1022   /**
1023    * @brief Sets the sender app id of notification item.
1024    * @since_tizen 5.5
1025    * @param[in] sender_appid The sender app id
1026    */
1027   void SetSenderAppId(std::string sender_appid);
1028
1029   /**
1030    * @brief Sets the tag of notification item.
1031    * @since_tizen 5.5
1032    * @return The tag of notification item
1033    */
1034   std::string GetTag() const;
1035
1036   /**
1037    * @brief Sets the tag of notification item.
1038    * @since_tizen 5.5
1039    * @param[in] tag The tag of notification item
1040    */
1041   void SetTag(std::string tag);
1042
1043   /**
1044    * @brief Sets the ongoing state of notification item.
1045    * @since_tizen 5.5
1046    * @param[in] ongoing The ongoing state of notification item
1047    */
1048   void SetOnGoingState(bool ongoing);
1049
1050   /**
1051    * @brief Gets the ongoing state of notification item.
1052    * @since_tizen 5.5
1053    * @return The ongoing state of notification item
1054    */
1055   bool GetOnGoingState() const;
1056
1057   /**
1058    * @brief Sets the main type of notification item.
1059    * @since_tizen 5.5
1060    * @param[in] target_id The ID of notification item to set
1061    * @param[in] type The main type
1062    * @return true if target_id is valid to set
1063    */
1064   bool SetMainType(std::string target_id, MainType type);
1065
1066   /**
1067    * @brief Gets the main type of notification item.
1068    * @since_tizen 5.5
1069    * @return The main type
1070    */
1071   MainType GetMainType() const;
1072
1073   /**
1074    * @brief Gets the extension data.
1075    * @since_tizen 5.5
1076    * @param[in] key
1077    * @return Bundle
1078    */
1079   tizen_base::Bundle GetExtensionData(std::string key);
1080
1081   /**
1082    * @brief Sets the extension data.
1083    * @since_tizen 5.5
1084    * @param[in] key key string
1085    * @param[in] value Bundle
1086    */
1087   void SetExtensionData(std::string key, tizen_base::Bundle value);
1088
1089  private:
1090   class Impl;
1091   std::unique_ptr<Impl> impl_;
1092   void UpdateSoundPrivatePath();
1093   void UpdateVibrationPrivatePath();
1094 };  // class AbstractItem
1095
1096 }  // namespace item
1097 }  // namespace notification
1098
1099 #endif  // NOTIFICATION_EX_ABSTRACT_ITEM_H_