2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 * @file FAppServiceApp.h
20 * @brief This is the header file for the %ServiceApp class.
22 * This header file contains the declarations of the %ServiceApp class.
25 #ifndef _FAPP_SERVICE_APP_H_
26 #define _FAPP_SERVICE_APP_H_
30 namespace Tizen { namespace Base { namespace Collection { class IList; } } }
32 namespace Tizen { namespace App
37 typedef ServiceApp* (*ServiceAppInstanceFactory)(void);
41 * @brief This class is the base class of a %Tizen native service application.
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.
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>.
52 class _OSP_EXPORT_ ServiceApp
53 : public Tizen::App::App
57 * This destructor overrides Tizen::Base::Object::~Object().
61 virtual ~ServiceApp(void);
64 * Gets the %ServiceApp instance's pointer.
68 * @return A pointer to the %ServiceApp instance, @n
69 * else @c null if it fails
71 static ServiceApp* GetInstance(void);
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.
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.
88 static result Execute(ServiceAppInstanceFactory pServiceAppFactory, const Tizen::Base::Collection::IList* pArguments);
92 * This is the default constructor for this class.
99 // This method is for internal use only.
100 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
102 // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
106 virtual void ServiceApp_Reserved1(void) {}
109 // This method is for internal use only.
110 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
112 // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
116 virtual void ServiceApp_Reserved2(void) {}
119 // This method is for internal use only.
120 // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
122 // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
126 virtual void ServiceApp_Reserved3(void) {}
130 * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
134 ServiceApp(const ServiceApp& rhs);
137 * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
141 ServiceApp& operator =(const ServiceApp& rhs);
144 class _ServiceAppImpl* __pServiceAppImpl;
147 typedef ServiceApp Service;
151 #endif // _FAPP_SERVICE_APP_H_