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/EventManageApplication.h>
27 #include <API/Application/EventInstalledApplicationChanged.h>
28 #include <API/Application/EventLaunchService.h>
30 #include <app_manager.h>
31 #include <app_service.h>
32 using namespace TizenApis::Api::Application;
36 namespace Application {
38 class Application: public IApplication {
39 friend class ApplicationFactory;
43 virtual ~Application();
44 virtual void launch(const EventManageApplicationPtr& event);
45 virtual void kill(const EventManageApplicationPtr& event);
47 virtual void hide(const EventManageApplicationPtr& event);
48 virtual void listApplications(const EventListInstalledApplicationsPtr& event);
49 virtual void getApplication(const EventGetApplicationPtr& event);
50 virtual long addApplicationInformationEventListener(const EventInstalledApplicationChangedEmitterPtr& emitter);
51 virtual void removeApplicationInformationEventListener(const EventInstalledApplicationChangedEmitter::IdType id);
52 virtual void launchService(const EventLaunchServicePtr& event);
53 virtual void getApplicationService(const EventLaunchServicePtr& event);
54 void launchServiceManualAnswer(service_h request, service_h reply, service_result_e result);
55 void InstalledApplicationChanged(app_manger_event_type_e event_type,const char *package);
58 virtual void OnRequestReceived(const EventListInstalledApplicationsPtr& event);
59 virtual void OnRequestReceived(const EventManageApplicationPtr& event);
60 virtual void OnRequestReceived(const EventGetApplicationPtr& event);
61 virtual void OnRequestReceived(const EventLaunchServicePtr& event);
66 DPL::Mutex m_initializationMutex;
68 Api::Application::EventLaunchServicePtr m_eventLaunchServicePtr;
69 EventInstalledApplicationChangedEmitterPtr m_installedApplicationsEmitterPtr;