1 // Copyright (c) 2013 Intel Corporation. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef XWALK_APPLICATION_BROWSER_LINUX_INSTALLED_APPLICATION_OBJECT_H_
6 #define XWALK_APPLICATION_BROWSER_LINUX_INSTALLED_APPLICATION_OBJECT_H_
9 #include "base/memory/ref_counted.h"
10 #include "xwalk/dbus/object_manager_adaptor.h"
13 namespace application {
15 class ApplicationData;
17 extern const char kInstalledApplicationDBusInterface[];
18 extern const char kInstalledApplicationDBusError[];
20 // Holds the D-Bus representation of an installed application. These objects are
21 // owned by InstalledApplicationsManager and the corresponding objects in D-Bus
22 // are child of '/installed/' object path.
23 class InstalledApplicationObject : public dbus::ManagedObject {
25 InstalledApplicationObject(
26 scoped_refptr<dbus::Bus> bus, const dbus::ObjectPath& path,
27 const ApplicationData* app);
29 void OnApplicationNameChanged(const std::string& app_name);
30 // Set the callback used when the Uninstall() method is called in an
32 void ExportUninstallMethod(
33 dbus::ExportedObject::MethodCallCallback method_call_callback,
34 dbus::ExportedObject::OnExportedCallback on_exported_callback);
36 std::string app_id() const { return app_id_; }
42 } // namespace application
45 #endif // XWALK_APPLICATION_BROWSER_LINUX_INSTALLED_APPLICATION_OBJECT_H_