2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @file FAppServiceApp.h
19 * @brief This is the header file for the %ServiceApp class.
21 * This header file contains the declarations of the %ServiceApp class.
24 #ifndef _FAPP_SERVICE_APP_H_
25 #define _FAPP_SERVICE_APP_H_
29 namespace Tizen { namespace Base { namespace Collection { class IList; } } }
31 namespace Tizen { namespace App
36 typedef ServiceApp* (*ServiceAppInstanceFactory)(void);
40 * @brief This class is the base class of a %Tizen native service application.
44 * The %ServiceApp class is the base class of a %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.
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>.
51 class _OSP_EXPORT_ ServiceApp
52 : public Tizen::App::App
56 * This destructor overrides Tizen::Base::Object::~Object().
60 virtual ~ServiceApp(void);
63 * Gets the %ServiceApp instance's pointer.
67 * @return A pointer to the %ServiceApp instance, @n
68 * else @c null if it fails
70 static ServiceApp* GetInstance(void);
73 * Executes an application implemented by inheriting this class. @n
74 * The %Execute() method must be called from the entry method - OspMain(), which is generated by IDE.
78 * @return An error code
79 * @param[in] pServiceAppFactory The factory method that creates this %ServiceApp's instance
80 * @param[in] pArguments The launch arguments for %App
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 failure during OnAppInitializing().
85 * @exception E_SYSTEM A system error has occurred.
87 static result Execute(ServiceAppInstanceFactory pServiceAppFactory, const Tizen::Base::Collection::IList* pArguments);
91 * This is the default constructor for this class.
98 // This method is for internal use only.
99 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
101 // This method is reserved and may change its name at any time without prior notice.
105 virtual void ServiceApp_Reserved1(void) {}
108 // This method is for internal use only.
109 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
111 // This method is reserved and may change its name at any time without prior notice.
115 virtual void ServiceApp_Reserved2(void) {}
118 // This method is for internal use only.
119 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
121 // This method is reserved and may change its name at any time without prior notice.
125 virtual void ServiceApp_Reserved3(void) {}
129 * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
133 ServiceApp(const ServiceApp& rhs);
136 * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
140 ServiceApp& operator =(const ServiceApp& rhs);
143 class _ServiceAppImpl* __pServiceAppImpl;
146 typedef ServiceApp Service;
150 #endif // _FAPP_SERVICE_APP_H_