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.
17 * @file IEventGetInstalledApplications.h
18 * @author Lukasz Marek (l.marek@samsung.com)
23 #ifndef _ABSTRACT_LAYER_EVENT_GET_INSTALLED_APPLICATIONS_H_
24 #define _ABSTRACT_LAYER_EVENT_GET_INSTALLED_APPLICATIONS_H_
29 #include <dpl/shared_ptr.h>
30 #include <commons/IEvent.h>
31 #include <commons/EventReceiver.h>
32 #include "ApplicationTypes.h"
34 namespace WrtPlugins {
36 namespace AppLauncher {
37 /* This event is sent when list of installed applications is get */
38 class EventGetInstalledApplications : public WrtPlugins::Platform::IEvent<
39 EventGetInstalledApplications>
41 std::vector<std::string> m_applicationFullPaths;
42 std::vector<std::string> m_applicationNames;
43 std::map<ApplicationType, std::string> m_applicationTypesPath;
44 std::map<ApplicationType, std::string> m_applicationTypesName;
46 void addApplicationTypeByName(const std::pair<ApplicationType,
49 m_applicationTypesName.insert(value);
51 const std::map<ApplicationType,
52 std::string> &getApplicationTypesByName() const
54 return m_applicationTypesName;
56 void addApplicationTypeByPath(const std::pair<ApplicationType,
59 m_applicationTypesPath.insert(value);
61 const std::map<ApplicationType,
62 std::string> &getApplicationTypesByPath() const
64 return m_applicationTypesPath;
66 void addApplicationFullPath(const std::string &value)
68 m_applicationFullPaths.push_back(value);
70 const std::vector<std::string> &getApplicationFullPaths() const
72 return m_applicationFullPaths;
74 void addApplicationName(const std::string &value)
76 m_applicationNames.push_back(value);
78 const std::vector<std::string> &getApplicationNames() const
80 return m_applicationNames;
82 virtual void clearOnCancel()
85 EventGetInstalledApplications()
90 typedef DPL::SharedPtr<EventGetInstalledApplications>
91 EventGetInstalledApplicationsPtr;
96 #endif /* _ABSTRACT_LAYER_IEVENT_GET_INSTALLED_APPLICATIONS_H_ */