#ifndef _LLX_APT_CACHE_ #define _LLX_APT_CACHE_ #include #include #include #include namespace net { namespace lliurex { namespace apt { class Cache { protected: std::function cb_progress; std::function cb_ready; Glib::RefPtr connection; Glib::RefPtr transaction_proxy; int progress; bool cancel_request; Glib::RefPtr loop; void OnSignal(const Glib::ustring& sender_name, const Glib::ustring& signal_name, const Glib::VariantContainerBase& parameters); void OnPropertiesChanged(const Gio::DBus::Proxy::MapChangedProperties& changed_properties, const std::vector& invalidated_properties); void UpdateThread(); public: Cache(); Cache(std::function progress,std::function ready); virtual ~Cache(); void Update(); void Cancel(); }; } } } #endif