22 #ifndef __ApplicationManager_h__
23 #define __ApplicationManager_h__
33 #include "lunaservice.h"
49 namespace LaunchPointUpdatedReason
61 namespace LaunchPointAddedReason
72 namespace LaunchPointRemovedReason
86 typedef std::set<const LaunchPoint*,cmptitle>
SearchSet;
88 namespace DimensionsSystemInterface
112 void postInstallScan(json_object * pPackageInfoJson,
const std::string& packageFolder);
128 bool getAppsByPackageId(
const std::string& packageId, std::vector<ApplicationDescription *>& r_apps);
139 const std::string& title,
140 const std::string& menuName,
141 const std::string& icon,
142 const std::string& params,
143 const bool removable=
true);
144 bool removeLaunchPoint(
const std::string& launchPointId,std::string& extendedReturnCause);
158 std::vector<ApplicationDescription*>
allApps();
159 std::map<std::string, PackageDescription*>
allPackages();
164 void relayStatus(
const std::string& jsonPayload,
const unsigned long ticketId);
182 DownloadRequest (
unsigned long ticket,
const std::string& ovrHandlerAppId,
const std::string& strMime,
bool isSubscribed)
243 void scanForApplications();
244 void scanForPackages();
245 void createPackageDescriptionForOldApps();
246 void scanForServices();
247 void scanForSystemApplications();
248 void scanForPendingApplications();
249 void scanForLaunchPoints(std::string launchPointFolder);
250 void scanApplicationsFolders(
const std::string& appFolders);
251 void scanApplicationsFolders(
const std::string& appFoldersPath,std::map<std::string,ApplicationDescription *>& foundApps);
258 bool removeApp(
const std::string&
id,
int cause);
259 bool removeSysApp(
const std::string&
id);
262 void discoverAppChanges(std::vector<ApplicationDescription *>& added,std::vector<ApplicationDescription *>& removed,std::vector<ApplicationDescription *>& changed);
266 void scanFolderResursively(
const std::string& path );
269 std::string findUniqueFileName(
const std::string& folder);
270 bool isNumber(
const std::string& str)
const;
271 static bool isValidMimeType(
const std::string& mime );
272 static bool isGenericMimeType(
const std::string& mime );
273 static std::string getContentType(
const std::string& mime);
274 static bool urlSchemeIsFile(
const std::string& url );
275 static std::string deriveMimeTypeFromFileMagic(
const std::string& localFilePath );
279 static void serviceInstallerInstallApp(
const std::string&
id,
const std::string& type,
const std::string& root);
280 static void serviceInstallerUninstallApp(
const std::string&
id,
const std::string& type,
const std::string& root);
282 void runAppInstallScripts();
283 void loadHiddenApps();
284 void hideApp(
const std::string& appId);
285 bool isAppHidden(
const std::string& appId)
const;
286 bool isSysappAllowed(
const std::string& sysappId,
const std::string& sourcePath);
289 static std::set<std::string> s_appExeclockSet;
290 static Mutex s_mutexExecLockFunctions;
292 std::set<std::string> m_hiddenApps;
293 std::vector<ApplicationDescription*> m_registeredApps;
294 std::vector<ApplicationDescription*> m_systemApps;
295 std::vector<ApplicationDescription*> m_pendingApps;
297 std::set<const LaunchPoint*> m_dockModeLaunchPoints;
299 std::map<std::string, PackageDescription*> m_registeredPackages;
300 std::map<std::string, ServiceDescription*> m_registeredServices;
306 void postLaunchPointChange(
const LaunchPoint* lp,
const std::string& change);
307 LSPalmService* m_service;
308 LSHandle* m_serviceHandlePublic;
309 LSHandle* m_serviceHandlePrivate;
310 static long s_ticketId;
321 #endif // __ApplicationManager_h__