Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Unified Diff: src/service_manager.h

Issue 4304002: cashew: don't invoke D-Bus methods from within a D-Bus handler (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cashew.git@master
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/service.cc ('k') | src/service_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/service_manager.h
diff --git a/src/service_manager.h b/src/service_manager.h
index 36a7e7a14380f08120d7d5e7d11811d2e3f086d4..e12fd91503cfb92119166f6cad63103a599b79f4 100644
--- a/src/service_manager.h
+++ b/src/service_manager.h
@@ -78,6 +78,20 @@ class ServiceManager : public org::chromium::flimflam::Manager_proxy,
// a child Service wants us to emit an update about its data plans
virtual void EmitDataPlansUpdate(const Service& service);
+ // glib integration interface
+
+ // get idle/timer source id
+ virtual guint GetGetPropertiesSourceId() const;
+
+ // set idle/timer source id
+ virtual void SetGetPropertiesSourceId(guint source_id);
+
+ // are we in the process of retrying our GetProperties call?
+ virtual bool RetryingGetProperties() const;
+
+ // set the retrying flag
+ virtual void OnRetryingGetProperties(bool retrying);
+
private:
// D-Bus connection owned by our creator
// shared with Service objs that we create
@@ -100,12 +114,26 @@ class ServiceManager : public org::chromium::flimflam::Manager_proxy,
// global connectivity state most recently reported by Flimflam
ConnectivityState connectivity_state_;
+ // GetProperties timer glib source id
+ // 0 means no source
+ guint get_properties_source_id_;
+
+ // are we in the process of retrying our GetProperties call?
+ // this flag exists to distinguish between our initial g_idle_add call
+ // and our subsequent timer calls
+ bool retrying_get_properties_;
+
// delete a collection of services
void DeleteServices(ServiceMap *service_map);
+ // glib integration: static wrapper for GetFlimflamProperties
+ // takes object ptr as data and invokes object->GetFlimflamProperties()
+ static gboolean StaticGetFlimflamPropertiesCallback(gpointer data);
+
// get interesting properties from Flimflam such as Services and
// DefaultTechnology
- void GetFlimflamProperties();
+ // returns true on success and false on failure
+ bool GetFlimflamProperties();
// we've received updated DefaultTechnology info from Flimflam
void OnDefaultTechnologyUpdate(const std::string& default_technology);
« no previous file with comments | « src/service.cc ('k') | src/service_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698