[Tizen.Applications.ComponentBased][TCSACR-265][Add] Add ComponentBased application...
[platform/core/csapi/tizenfx.git] / src / Tizen.Applications.ComponentBased / Tizen.Applications.ComponentBased.Common / ServiceComponent.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4
5 namespace Tizen.Applications.ComponentBased.Common
6 {
7     /// <summary>
8     /// The class for showing service module
9     /// </summary>
10     /// <since_tizen> 6 </since_tizen>
11     public abstract class ServiceComponent : BaseComponent
12     {
13         /// <summary>
14         /// Overrides this method to handle behavior when the component is created.
15         /// </summary>
16         /// <returns>True if a service component is successfully created</returns>
17         public abstract bool OnCreate();
18
19         /// <summary>
20         /// Overrides this method if want to handle behavior when the component receives the start command message.
21         /// </summary>
22         /// <param name="appControl">appcontrol object</param>
23         /// <param name="restarted">True if it was restarted</param>
24         /// <since_tizen> 6 </since_tizen>
25         public virtual void OnStartCommand(AppControl appControl, bool restarted)
26         {
27         }
28
29         /// <summary>
30         /// Overrides this method if want to handle behavior when the component is destroyed.
31         /// </summary>
32         /// <since_tizen> 6 </since_tizen>
33         public virtual void OnDestroy()
34         {
35         }
36     }
37 }