2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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 #ifndef TIZENAPIS_PLATFORM_APPLICATION_H_
19 #define TIZENAPIS_PLATFORM_APPLICATION_H_
22 #include <API/Application/IApplication.h>
23 #include <API/Application/ApplicationFactory.h>
24 #include <API/Application/EventListInstalledApplications.h>
25 #include <API/Application/EventGetApplication.h>
26 #include <API/Application/EventInstalledApplicationChanged.h>
27 #include <API/Application/EventLaunchService.h>
29 #include <app_manager.h>
30 #include <app_service.h>
31 using namespace TizenApis::Api::Application;
35 namespace Application {
37 class Application: public IApplication {
38 friend class ApplicationFactory;
42 virtual ~Application();
43 virtual void listApplications(const EventListInstalledApplicationsPtr& event);
44 virtual void getApplicationInformation(const EventGetApplicationPtr& event);
45 virtual long addApplicationListChangeListener(const EventInstalledApplicationChangedEmitterPtr& emitter);
46 virtual void removeApplicationListChangeListener(const EventInstalledApplicationChangedEmitter::IdType id);
47 virtual void launchService(const EventLaunchServicePtr& event);
48 void launchServiceManualAnswer(service_h request, service_h reply, service_result_e result);
49 void InstalledApplicationChanged(app_manger_event_type_e event_type,const char *package);
52 virtual void OnRequestReceived(const EventListInstalledApplicationsPtr& event);
53 virtual void OnRequestReceived(const EventGetApplicationPtr& event);
54 virtual void OnRequestReceived(const EventLaunchServicePtr& event);
59 DPL::Mutex m_initializationMutex;
61 Api::Application::EventLaunchServicePtr m_eventLaunchServicePtr;
62 EventInstalledApplicationChangedEmitterPtr m_installedApplicationsEmitterPtr;