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

Unified Diff: src/service_manager.h

Issue 3528016: Cashew: implement backend usage API (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cashew.git
Patch Set: Fix code review nits and remove hardcoded usage URLs Created 10 years, 2 months 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 4eae79e54e1282366d440cbb9f9732d96c6be416..0e432d6278430fc651c05ab7ab1deb522de06d3a 100644
--- a/src/service_manager.h
+++ b/src/service_manager.h
@@ -13,10 +13,11 @@
#include <dbus-c++/dbus.h> // NOLINT
#include "src/flimflam_manager_client_glue.h"
+#include "src/service.h"
namespace cashew {
-class Service;
+class CashewServer;
// map of service path names to Service objects
typedef std::map<std::string, Service*> ServiceMap;
@@ -36,6 +37,13 @@ class ServiceManager : public org::chromium::flimflam::Manager_proxy,
// returns NULL if service is not found
virtual const Service* GetService(const std::string& service_path) const;
+ // set Cashew server
+ // we'll talk to it when we want to emit updates to the world on behalf of
+ // our child Services.
+ // it's ok to clear this by setting it to NULL, in which case our updates
+ // will go into a black hole.
+ virtual void SetCashewServer(CashewServer *cashew_server);
+
// Flimflam Manager D-Bus Proxy methods
// receive incoming PropertyChanged D-Bus signal from Flimflam
@@ -45,6 +53,11 @@ class ServiceManager : public org::chromium::flimflam::Manager_proxy,
// receive incoming StateChanged D-Bus signal from Flimflam
virtual void StateChanged(const std::string& new_state);
+ // Service methods
+
+ // a child Service wants us to emit an update about its data plans
+ virtual void EmitDataPlansUpdate(const Service& service);
+
private:
// D-Bus connection owned by our creator
// shared with Service objs that we create
@@ -53,6 +66,9 @@ class ServiceManager : public org::chromium::flimflam::Manager_proxy,
// collection of Service objs representing cellular services
ServiceMap services_;
+ // Cashew server implementing our front-end interface
+ CashewServer *cashew_server_;
+
// delete a collection of services
void DeleteServices(ServiceMap *service_map);
« 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