Add private_sharing codes for sound and vibration
[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  private:
698   std::shared_ptr<Color> color_;
699   int on_period_ = 0;
700   int off_period_ = 0;
701 };  // clss LEDInfo
702
703 /**
704  * @brief The base class for the notification item classes.
705  * @details The AbstractItem is abstract class.
706  *          The AbstractItem has basic APIs for notification items.
707  *          The notification item class have to be a derived class of this class.
708  * @since_tizen 5.5
709  */
710 class EXPORT_API AbstractItem {
711  public:
712   enum Type {
713     NullObject,
714     Text,
715     Image,
716     Icon,
717     Button,
718     ChatMessage,
719     CheckBox,
720     IconText,
721     InputSelector,
722     Group,
723     Entry,
724     Progress,
725     Time,
726     Custom = 100
727   };
728
729   enum Policy {
730     None = 0,
731     OnBootClear = 1 << 0,
732     SimMode = 1 << 1,
733   };
734
735   enum MainType {
736     MainNone = 0,
737     MainTitle,
738     MainContents,
739     MainIcon,
740     MainButton
741   };
742
743  public:
744   /**
745    * @brief Constructor
746    * @since_tizen 5.5
747    * @param[in] action The AbstractAction for notification item
748    */
749   AbstractItem(
750       std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
751
752   /**
753    * @brief Constructor
754    * @since_tizen 5.5
755    * @param[in] id The notification id
756    * @param[in] action The AbstractAction for notification item
757    */
758   AbstractItem(std::string id,
759       std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
760
761   /**
762    * @brief Destructor
763    * @since_tizen 5.5
764    */
765   virtual ~AbstractItem() = 0;
766
767   /**
768    * @brief Serialize the data of AbstractItem.
769    * @since_tizen 5.5
770    * @return Bundle type data
771    */
772   virtual tizen_base::Bundle Serialize() const = 0;
773
774   /**
775    * @brief Deserialize the serialized data.
776    * @since_tizen 5.5
777    * @param[in] b The serialized Bundle data
778    */
779   virtual void Deserialize(tizen_base::Bundle b) = 0;
780
781   /**
782    * @brief Finds the AbstractItem using by notification item id.
783    * @since_tizen 5.5
784    * @param[in] id notification item id
785    * @return AbstractItem object
786    */
787   virtual AbstractItem& FindByID(std::string id);
788
789   /**
790    * @brief Finds the AbstractItem using by main type.
791    * @since_tizen 5.5
792    * @param[in] type The main type
793    * @return AbstractItem object
794    */
795   virtual AbstractItem& FindByMainType(MainType type);
796
797   /**
798    * @brief Checks the item type exist in this notification.
799    * @since_tizen 5.5
800    * @param[in] type notification item type
801    * @return true if the item type exists
802    */
803   virtual bool IsItemTypeExist(int type) = 0;
804
805   /**
806    * @brief Gets the type of notification item.
807    * @since_tizen 5.5
808    * @return The type of notification item
809    */
810   virtual int GetType() const = 0;
811
812   /**
813    * @brief Gets the type of notification item from Bundle data.
814    * @since_tizen 5.5
815    * @return The type of notification item
816    */
817   static int GetType(tizen_base::Bundle b);
818
819   /**
820    * @brief Gets the path of shared file location.
821    * @since_tizen 5.5
822    * @return The list of shared path.
823    */
824   virtual std::list<std::string> GetSharedPath() const;
825
826   /**
827    * @brief Sets the shared file path to original file path.
828    */
829   virtual void SetSharedPath();
830
831   /**
832    * @brief
833    * @since_tizen 5.5
834    * @return
835    */
836   virtual std::list<std::map<std::string, std::string>> GetPathMapList() const;
837
838   /**
839    * @brief Gets the notification item id.
840    * @since_tizen 5.5
841    * @return The notification item id.
842    */
843   std::string GetId() const;
844
845   /**
846    * @brief Sets the notification item id.
847    * @since_tizen 5.5
848    * @param[in] id notification item id
849    */
850   void SetId(std::string id);
851
852   std::vector<std::shared_ptr<MultiLanguage>> GetMultiLanguageArr() const;
853   std::shared_ptr<MultiLanguage> GetMultiLanguage() const;
854   void SetMultiLanguage(std::shared_ptr<MultiLanguage> multi);
855   void SetMultiLanguage(std::vector<std::shared_ptr<MultiLanguage>> multi_arr);
856
857   /**
858    * @brief Gets AbstractAction for notification item.
859    * @since_tizen 5.5
860    * @return AbstractAction instance
861    */
862   std::shared_ptr<AbstractAction> GetAction() const;
863
864   /**
865    * @brief Sets AbstractAction for notification item.
866    * @since_tizen 5.5
867    * @param[in] action AbstractAction instance
868    */
869   void SetAction(std::shared_ptr<AbstractAction> action);
870
871   /**
872    * @brief Sets the style data for notification item.
873    * @since_tizen 5.5
874    * @return Style instance
875    */
876   std::shared_ptr<Style> GetStyle() const;
877
878   /**
879    * @brief Sets the style data for notification item.
880    * @since_tizen 5.5
881    * @param[in] style Style instance
882    */
883   void SetStyle(std::shared_ptr<Style> style);
884
885   /**
886    * @brief Sets the visibile state of notification item.
887    * @since_tizen 5.5
888    * @param[in] visibile The visible state
889    */
890   void SetVisible(bool visible);
891
892   /**
893    * @brief Gets the visibile state of notification item.
894    * @since_tizen 5.5
895    * @return true if visible, false if not visible.
896    */
897   bool GetVisible() const;
898
899   /**
900    * @brief Sets the enable state of notification item.
901    * @since_tizen 5.5
902    * @param[in] enable The enable state
903    */
904   void SetEnable(bool enable);
905
906   /**
907    * @brief Gets the enable state of notification item.
908    * @since_tizen 5.5
909    * @return true if enabled, false if not enabled.
910    */
911   bool GetEnable() const;
912
913   /**
914    * @brief Adds the receiver group for notification item.
915    * @since_tizen 5.5
916    * @param[in] receiver_group The receiver group for notification item
917    */
918   void AddReceiver(std::string receiver_group);
919
920   /**
921    * @brief Removes the receiver group from the receiver group list.
922    * @since_tizen 5.5
923    * @param[in] receiver_group The receiver group
924    */
925   void RemoveReceiver(std::string receiver_group);
926
927   /**
928    * @brief Gets the receiver group list.
929    * @since_tizen 5.5
930    * @return The list of receiver group.
931    */
932   std::list<std::string> GetReceiverList();
933
934   /**
935    * @brief Sets the policy for notification item.
936    * @since_tizen 5.5
937    * @param[in] policy The policy option
938    */
939   void SetPolicy(int policy);
940
941   /**
942    * @brief Gets the policy for notification item.
943    * @since_tizen 5.5
944    * @return The policy for notification item.
945    */
946   int GetPolicy() const;
947
948   /**
949    * @brief Gets the channel option for notification item.
950    * @since_tizen 5.5
951    * @return The channel option for notification item.
952    */
953   std::string GetChannel() const;
954
955   /**
956    * @brief Sets the channel option for notification item.
957    * @since_tizen 5.5
958    * @param[in] channel The channel option for notification item.
959    */
960   void SetChannel(std::string channel);
961
962   /**
963    * @brief Sets LED option for notification item.
964    * @since_tizen 5.5
965    * @param[in] led The LEDInfo instance
966    */
967   void SetLEDInfo(std::shared_ptr<LEDInfo> led);
968
969   /**
970    * @brief Gets LED option for notification item.
971    * @since_tizen 5.5
972    * @return The LEDInfo instance
973    */
974   std::shared_ptr<LEDInfo> GetLEDInfo() const;
975
976   /**
977    * @brief Sets the sound path for notification item.
978    * @since_tizen 5.5
979    * @param[in] path The sound path
980    */
981   void SetSoundPath(std::string path);
982
983   /**
984    * @brief Sets the vibration path for notification item.
985    * @since_tizen 5.5
986    * @param[in] path The vibration path
987    */
988   void SetVibrationPath(std::string path);
989
990   /**
991    * @brief Gets the sound path for notification item.
992    * @since_tizen 5.5
993    * @return The sound path
994    */
995   std::string GetSoundPath() const;
996
997   /**
998    * @brief Gets the vibration path for notification item.
999    * @since_tizen 5.5
1000    * @return The vibration path
1001    */
1002   std::string GetVibrationPath() const;
1003
1004   /**
1005    * @brief Gets IItemInfo instance to get some information of notification item.
1006    * @since_tizen 5.5
1007    * @return The IItemInfo instance
1008    */
1009   std::shared_ptr<IItemInfo> GetInfo() const;
1010
1011   /**
1012    * @brief Gets the sender app id of notification item.
1013    * @since_tizen 5.5
1014    * @return The sender app id.
1015    */
1016   std::string GetSenderAppId() const;
1017
1018   /**
1019    * @brief Sets the sender app id of notification item.
1020    * @since_tizen 5.5
1021    * @param[in] sender_appid The sender app id
1022    */
1023   void SetSenderAppId(std::string sender_appid);
1024
1025   /**
1026    * @brief Sets the tag of notification item.
1027    * @since_tizen 5.5
1028    * @return The tag of notification item
1029    */
1030   std::string GetTag() const;
1031
1032   /**
1033    * @brief Sets the tag of notification item.
1034    * @since_tizen 5.5
1035    * @param[in] tag The tag of notification item
1036    */
1037   void SetTag(std::string tag);
1038
1039   /**
1040    * @brief Sets the ongoing state of notification item.
1041    * @since_tizen 5.5
1042    * @param[in] ongoing The ongoing state of notification item
1043    */
1044   void SetOnGoingState(bool ongoing);
1045
1046   /**
1047    * @brief Gets the ongoing state of notification item.
1048    * @since_tizen 5.5
1049    * @return The ongoing state of notification item
1050    */
1051   bool GetOnGoingState() const;
1052
1053   /**
1054    * @brief Sets the main type of notification item.
1055    * @since_tizen 5.5
1056    * @param[in] target_id The ID of notification item to set
1057    * @param[in] type The main type
1058    * @return true if target_id is valid to set
1059    */
1060   bool SetMainType(std::string target_id, MainType type);
1061
1062   /**
1063    * @brief Gets the main type of notification item.
1064    * @since_tizen 5.5
1065    * @return The main type
1066    */
1067   MainType GetMainType() const;
1068
1069  private:
1070   class Impl;
1071   std::unique_ptr<Impl> impl_;
1072   void UpdateSoundPrivatePath();
1073   void UpdateVibrationPrivatePath();
1074 };  // class AbstractItem
1075
1076 }  // namespace item
1077 }  // namespace notification
1078
1079 #endif  // NOTIFICATION_EX_ABSTRACT_ITEM_H_