Update FApp documents from LB
[platform/framework/native/appfw.git] / inc / FAppServiceApp.h
1 //
2 // Copyright (c) 2012 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 /**
18  * @file        FAppServiceApp.h
19  * @brief       This is the header file for the %ServiceApp class.
20  *
21  * This header file contains the declarations of the %ServiceApp class.
22  */
23
24 #ifndef _FAPP_SERVICE_APP_H_
25 #define _FAPP_SERVICE_APP_H_
26
27 #include <FAppApp.h>
28
29 namespace Tizen { namespace Base { namespace Collection { class IList; } } }
30
31 namespace Tizen { namespace App
32 {
33
34 class ServiceApp;
35
36 typedef ServiceApp* (*ServiceAppInstanceFactory)(void);
37
38 /**
39  * @class       ServiceApp
40  * @brief       This class is the base class of the %Tizen native service application.
41  *
42  * @since       2.0
43  *
44  * The %ServiceApp class is the base class of the %Tizen native service application which has no UI.
45  * A %Tizen native service application must inherit from the %ServiceApp class. This class provides the basic features necessary to define the
46  * %Tizen native service application.
47  *
48  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/app/app_namespace.htm">App Guide</a> and <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/tizen_app_model/application_model.htm">Native Application Model</a>.
49  *
50  */
51 class _OSP_EXPORT_ ServiceApp
52         : public Tizen::App::App
53 {
54 public:
55         /**
56          * This destructor overrides Tizen::Base::Object::~Object().
57          *
58          * @since       2.0
59          */
60         virtual ~ServiceApp(void);
61
62         /**
63         * Gets a pointer to the %ServiceApp instance.
64         *
65         * @since        2.0
66         *
67         * @return       A pointer to the %ServiceApp instance, @n
68         *                       else @c null if it fails
69         */
70         static ServiceApp* GetInstance(void);
71
72         /**
73          * Executes an application implemented by inheriting this class. @n
74          * The %Execute() method must be called from the entry method, that is, OspMain(), which is generated by IDE.
75          *
76          * @since       2.0
77          *
78          * @return              An error code
79          * @param[in]   pServiceAppFactory  The factory method that creates this %ServiceApp instance
80          * @param[in]   pArguments          The launch arguments for the application
81          * @exception   E_SUCCESS           The method is successful.
82          * @exception   E_INVALID_ARG       A specified input parameter is invalid.
83          * @exception   E_OUT_OF_MEMORY     The memory is insufficient.
84          * @exception   E_INIT_FAILED       The initialization using the OnAppInitializing() method has failed.
85          * @exception   E_SYSTEM            A system error has occurred.
86          */
87         static result Execute(ServiceAppInstanceFactory pServiceAppFactory, const Tizen::Base::Collection::IList* pArguments);
88
89 protected:
90         /**
91          * This is the default constructor for this class.
92          *
93          * @since       2.0
94          */
95         ServiceApp(void);
96
97         //
98         // This method is for internal use only.
99         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
100         //
101         // This method is reserved and may change its name at any time without prior notice.
102         //
103         // @since       2.0
104         //
105         virtual void ServiceApp_Reserved1(void) {}
106
107         //
108         // This method is for internal use only.
109         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
110         //
111         // This method is reserved and may change its name at any time without prior notice.
112         //
113         // @since       2.0
114         //
115         virtual void ServiceApp_Reserved2(void) {}
116
117         //
118         // This method is for internal use only.
119         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
120         //
121         // This method is reserved and may change its name at any time without prior notice.
122         //
123         // @since       2.0
124         //
125         virtual void ServiceApp_Reserved3(void) {}
126
127 private:
128         /**
129          * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
130          *
131          * @since       2.0
132          */
133         ServiceApp(const ServiceApp& rhs);
134
135         /**
136          * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
137          *
138          * @since       2.0
139          */
140         ServiceApp& operator =(const ServiceApp& rhs);
141
142 private:
143         class _ServiceAppImpl* __pServiceAppImpl;
144 }; // ServiceApp
145
146 typedef ServiceApp Service;
147
148 } } // Tizen::App
149
150 #endif // _FAPP_SERVICE_APP_H_