Index: google_apis/gcm/engine/mcs_client.h |
diff --git a/google_apis/gcm/engine/mcs_client.h b/google_apis/gcm/engine/mcs_client.h |
index 036acb8b159f2079b2f3818e3cef2296ebae274e..52eaa0cf46d4125734a78cb200bbf1c3d4fb2c38 100644 |
--- a/google_apis/gcm/engine/mcs_client.h |
+++ b/google_apis/gcm/engine/mcs_client.h |
@@ -35,6 +35,7 @@ class LoginRequest; |
namespace gcm { |
+class CollapseKey; |
class ConnectionFactory; |
struct ReliablePacketInfo; |
@@ -190,6 +191,10 @@ class GCM_EXPORT MCSClient { |
void NotifyMessageSendStatus(const google::protobuf::MessageLite& protobuf, |
MessageSendStatus status); |
+ // Pops the next message from the front of the send queue (cleaning up |
+ // any associated state). |
+ MCSPacketInternal PopMessageForSend(); |
+ |
// Clock for enforcing TTL. Passed in for testing. |
base::Clock* const clock_; |
@@ -220,6 +225,9 @@ class GCM_EXPORT MCSClient { |
std::deque<MCSPacketInternal> to_send_; |
std::deque<MCSPacketInternal> to_resend_; |
+ // Map of collapse keys to their pending messages. |
+ std::map<CollapseKey, ReliablePacketInfo*> collapse_key_map_; |
+ |
// Last device_to_server stream id acknowledged by the server. |
StreamId last_device_to_server_stream_id_received_; |
// Last server_to_device stream id acknowledged by this device. |