Home | History | Annotate | Download | only in gcm
      1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_BROWSER_SERVICES_GCM_GCM_EVENT_ROUTER_H_
      6 #define CHROME_BROWSER_SERVICES_GCM_GCM_EVENT_ROUTER_H_
      7 
      8 #include "base/basictypes.h"
      9 #include "google_apis/gcm/gcm_client.h"
     10 
     11 namespace gcm {
     12 
     13 // Interface that encapsulates how various GCM events are routed.
     14 class GCMEventRouter {
     15  public:
     16   virtual ~GCMEventRouter() {}
     17 
     18   virtual void OnMessage(const std::string& app_id,
     19                          const GCMClient::IncomingMessage& message) = 0;
     20   virtual void OnMessagesDeleted(const std::string& app_id) = 0;
     21   virtual void OnSendError(const std::string& app_id,
     22                            const std::string& message_id,
     23                            GCMClient::Result result) = 0;
     24 };
     25 
     26 }  // namespace gcm
     27 
     28 #endif  // CHROME_BROWSER_SERVICES_GCM_GCM_EVENT_ROUTER_H_
     29