Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / components / gcm_driver / gcm_driver.h
index f75a8e3..c10d9f1 100644 (file)
@@ -18,6 +18,8 @@
 namespace gcm {
 
 class GCMAppHandler;
+class GCMConnectionObserver;
+struct AccountMapping;
 
 // Bridge between GCM users in Chrome and the platform-specific implementation.
 class GCMDriver {
@@ -87,6 +89,12 @@ class GCMDriver {
   // Returns the handler for the given app.
   GCMAppHandler* GetAppHandler(const std::string& app_id);
 
+  // Adds a connection state observer.
+  virtual void AddConnectionObserver(GCMConnectionObserver* observer) = 0;
+
+  // Removes a connection state observer.
+  virtual void RemoveConnectionObserver(GCMConnectionObserver* observer) = 0;
+
   // Enables/disables GCM service.
   virtual void Enable() = 0;
   virtual void Disable() = 0;
@@ -110,6 +118,13 @@ class GCMDriver {
   virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback,
                                bool recording) = 0;
 
+  // Updates the |account_mapping| information in persistent store.
+  virtual void UpdateAccountMapping(const AccountMapping& account_mapping) = 0;
+
+  // Removes the account mapping information reated to |account_id| from
+  // persistent store.
+  virtual void RemoveAccountMapping(const std::string& account_id) = 0;
+
  protected:
   // Ensures that the GCM service starts (if necessary conditions are met).
   virtual GCMClient::Result EnsureStarted() = 0;