~townsend/ubuntu-app-launch/remove-xmir-helpers

« back to all changes in this revision

Viewing changes to libubuntu-app-launch/registry-impl.h

  • Committer: Chris Townsend
  • Date: 2017-03-24 13:06:32 UTC
  • mfrom: (269.1.38 ubuntu-app-launch)
  • Revision ID: christopher.townsend@canonical.com-20170324130632-n52ashmczuy0vy4y
MergeĀ lp:ubuntu-app-launch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *     Ted Gould <ted.gould@canonical.com>
18
18
 */
19
19
 
 
20
#include "app-store-base.h"
20
21
#include "glib-thread.h"
21
22
#include "info-watcher-zg.h"
22
23
#include "jobs-base.h"
23
24
#include "registry.h"
24
25
#include "snapd-info.h"
25
 
#include <click.h>
26
26
#include <gio/gio.h>
27
27
#include <json-glib/json-glib.h>
28
28
#include <map>
45
45
class Registry::Impl
46
46
{
47
47
public:
48
 
    Impl(Registry* registry);
 
48
    Impl(Registry& registry);
 
49
    Impl(Registry& registry, std::list<std::shared_ptr<app_store::Base>> appStores);
 
50
 
49
51
    virtual ~Impl()
50
52
    {
51
53
        thread.quit();
52
54
    }
53
55
 
54
 
    std::shared_ptr<JsonObject> getClickManifest(const std::string& package);
55
 
    std::list<AppID::Package> getClickPackages();
56
 
    std::string getClickDir(const std::string& package);
57
 
 
58
56
    static void setManager(const std::shared_ptr<Registry::Manager>& manager,
59
57
                           const std::shared_ptr<Registry>& registry);
60
58
    void clearManager();
65
63
    /** DBus shared connection for the session bus */
66
64
    std::shared_ptr<GDBusConnection> _dbus;
67
65
 
68
 
#ifdef ENABLE_SNAPPY
69
66
    /** Snapd information object */
70
67
    snapd::Info snapdInfo;
71
 
#endif
72
68
 
73
69
    std::shared_ptr<jobs::manager::Base> jobs;
74
70
 
99
95
 
100
96
    core::Signal<const std::shared_ptr<Application>&>& appInfoUpdated(const std::shared_ptr<Registry>& reg);
101
97
 
 
98
    std::list<std::shared_ptr<app_store::Base>> appStores()
 
99
    {
 
100
        return _appStores;
 
101
    }
 
102
 
 
103
    void setAppStores(std::list<std::shared_ptr<app_store::Base>>& newlist)
 
104
    {
 
105
        _appStores = newlist;
 
106
    }
 
107
 
102
108
private:
103
 
    Registry* _registry; /**< The Registry that we're spawned from */
104
 
 
105
 
    std::shared_ptr<ClickDB> _clickDB;     /**< Shared instance of the Click Database */
106
 
    std::shared_ptr<ClickUser> _clickUser; /**< Click database filtered by the current user */
107
 
 
108
 
    void initClick();
 
109
    Registry& _registry; /**< The Registry that we're spawned from */
109
110
 
110
111
    /** Shared instance of the Zeitgeist Log */
111
112
    std::shared_ptr<ZeitgeistLog> zgLog_;
117
118
    /** Path to the OOM Helper */
118
119
    std::string oomHelper_;
119
120
 
 
121
    /** Application stores */
 
122
    std::list<std::shared_ptr<app_store::Base>> _appStores;
 
123
 
120
124
    /** Signal for application info changing */
121
125
    core::Signal<const std::shared_ptr<Application>&> sig_appInfoUpdated;
122
126
    /** Flag to see if we've initialized the info watcher list */