Merge "Update doxygen" into tizen_2.1
[platform/framework/native/appfw.git] / inc / FAppServiceApp.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file        FAppServiceApp.h
20  * @brief       This is the header file for the %ServiceApp class.
21  *
22  * This header file contains the declarations of the %ServiceApp class.
23  */
24
25 #ifndef _FAPP_SERVICE_APP_H_
26 #define _FAPP_SERVICE_APP_H_
27
28 #include <FAppApp.h>
29
30 namespace Tizen { namespace Base { namespace Collection { class IList; } } }
31
32 namespace Tizen { namespace App
33 {
34
35 class ServiceApp;
36
37 typedef ServiceApp* (*ServiceAppInstanceFactory)(void);
38
39 /**
40  * @class       ServiceApp
41  * @brief       This class is the base class of a %Tizen native service application.
42  *
43  * @since       2.0
44  *
45  * The %ServiceApp class is the base class of a %Tizen native service application which has no UI.
46  * A %Tizen native service application must inherit from the %ServiceApp class. This class provides the basic features necessary to define the
47  * %Tizen native service application.
48  * @n
49  * 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>.
50  *
51  */
52 class _OSP_EXPORT_ ServiceApp
53         : public Tizen::App::App
54 {
55 public:
56         /**
57          * This destructor overrides Tizen::Base::Object::~Object().
58          *
59          * @since       2.0
60          */
61         virtual ~ServiceApp(void);
62
63         /**
64         * Gets the %ServiceApp instance's pointer.
65         *
66         * @since        2.0
67         *
68         * @return       A pointer to the %ServiceApp instance, @n
69         *                       else @c null if it fails
70         */
71         static ServiceApp* GetInstance(void);
72
73         /**
74          * Executes an application implemented by inheriting this class. @n
75          * The %Execute() method must be called from the entry method - OspMain(), which is generated by IDE.
76          *
77          * @since       2.0
78          *
79          * @return              An error code
80          * @param[in]   pServiceAppFactory         The factory method that creates this %ServiceApp's instance
81          * @param[in]   pArguments           The launch arguments for %App
82          * @exception   E_SUCCESS           The method is successful.
83          * @exception   E_INVALID_ARG       A specified input parameter is invalid.
84          * @exception   E_OUT_OF_MEMORY     The memory is insufficient.
85          * @exception   E_INIT_FAILED       The initialization failure during OnAppInitializing().
86          * @exception   E_SYSTEM            A system error has occurred.
87          */
88         static result Execute(ServiceAppInstanceFactory pServiceAppFactory, const Tizen::Base::Collection::IList* pArguments);
89
90 protected:
91         /**
92          * This is the default constructor for this class.
93          *
94          * @since       2.0
95          */
96         ServiceApp(void);
97
98         //
99         // This method is for internal use only.
100         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
101         //
102         // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
103         //
104         // @since       2.0
105         //
106         virtual void ServiceApp_Reserved1(void) {}
107
108         //
109         // This method is for internal use only.
110         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
111         //
112         // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
113         //
114         // @since       2.0
115         //
116         virtual void ServiceApp_Reserved2(void) {}
117
118         //
119         // This method is for internal use only.
120         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
121         //
122         // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
123         //
124         // @since       2.0
125         //
126         virtual void ServiceApp_Reserved3(void) {}
127
128 private:
129         /**
130          * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
131          *
132          * @since       2.0
133          */
134         ServiceApp(const ServiceApp& rhs);
135
136         /**
137          * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
138          *
139          * @since       2.0
140          */
141         ServiceApp& operator =(const ServiceApp& rhs);
142
143 private:
144         class _ServiceAppImpl* __pServiceAppImpl;
145 }; // ServiceApp
146
147 typedef ServiceApp Service;
148
149 } } // Tizen::App
150
151 #endif // _FAPP_SERVICE_APP_H_