Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.Applications.Notification / Tizen.Applications.Notifications / NotificationAccessorySet.cs
1 /*
2  * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
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 namespace Tizen.Applications.Notifications
18 {
19     using Tizen.Common;
20
21     /// <summary>
22     /// Class containing common properties and methods of Notifications
23     /// </summary>
24     /// <remarks>
25     /// A notification is a message that is displayed on the notification area.
26     /// It is created to notify information to the user through the application.
27     /// This class helps you to provide method and property for creating notification object.
28     /// </remarks>
29     public sealed partial class Notification
30     {
31         /// <summary>
32         ///  Class for Notification AccessorySet which is included vibration, led, sound option
33         /// </summary>
34         public sealed class AccessorySet : MakerBase
35         {
36             /// <summary>
37             /// Gets or sets the sound option. Default to AccessoryOption.Off.
38             /// </summary>
39             /// <remarks>
40             /// If you set AccessoryOption.Custom and not set SoundPath, then turn on the default sound.
41             /// </remarks>
42             public AccessoryOption SoundOption { get; set; } = AccessoryOption.Off;
43
44             /// <summary>
45             /// Gets or sets the sound path, It will play on the sound file you set.
46             /// </summary>
47             public string SoundPath { get; set; }
48
49             /// <summary>
50             /// Gets or sets a value indicating whether vibration is operated. Default to false.
51             /// </summary>
52             public bool CanVibrate { get; set; } = false;
53
54             /// <summary>
55             /// Gets or sets the led option. Default to AccessoryOption.Off.
56             /// </summary>
57             /// <remarks>
58             /// If you set AccessoryOption.Custom and not set LedColor, then turn on the LED with default color.
59             /// </remarks>
60             public AccessoryOption LedOption { get; set; } = AccessoryOption.Off;
61
62             /// <summary>
63             /// Gets or sets the led on time period that you would like the LED on the device to blink. as well as the rate
64             /// </summary>
65             /// <remarks>
66             /// Default value of LedOnMillisecond is 0.
67             /// The rate is specified in terms of the number of Milliseconds to be on.
68             /// You should always set LedOnMillisecond with LedOffMillisecond. Otherwise, it may not operate normally.
69             /// </remarks>
70             public int LedOnMillisecond { get; set; }
71
72             /// <summary>
73             /// Gets or sets the led on time period that you would like the LED on the device to blink. as well as the rate.
74             /// </summary>
75             /// <remarks>
76             /// The rate is specified in terms of the number of Milliseconds to be off.
77             /// You should always set LedOffMillisecond with LedOnMillisecond. Otherwise, it may not operate normally.
78             /// </remarks>
79             public int LedOffMillisecond { get; set; }
80
81             /// <summary>
82             /// Gets or sets the led color that you would like the LED on the device to blink.
83             /// </summary>
84             /// <remarks>
85             /// If you want to set LedColor, you should always set LedOption is AccessoryOption.Custom. Otherwise, it may operate default led color.
86             /// </remarks>
87             public Color LedColor { get; set; }
88
89             internal override void Make(Notification notification)
90             {
91                 AccessorySetBinder.BindObject(notification);
92             }
93         }
94     }
95 }