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