1 // Copyright 2014 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.
5 #ifndef GOOGLE_APIS_GCM_GCM_ACTIVITY_H_
6 #define GOOGLE_APIS_GCM_GCM_ACTIVITY_H_
11 #include "base/time/time.h"
12 #include "google_apis/gcm/base/gcm_export.h"
16 // Contains data that are common to all activity kinds below.
17 struct GCM_EXPORT Activity
{
22 std::string event
; // A short description of the event.
23 std::string details
; // Any additional detail about the event.
26 // Contains relevant data of a connection activity.
27 struct GCM_EXPORT ConnectionActivity
: Activity
{
29 virtual ~ConnectionActivity();
32 // Contains relevant data of a check-in activity.
33 struct GCM_EXPORT CheckinActivity
: Activity
{
35 virtual ~CheckinActivity();
38 // Contains relevant data of a registration/unregistration step.
39 struct GCM_EXPORT RegistrationActivity
: Activity
{
40 RegistrationActivity();
41 virtual ~RegistrationActivity();
44 std::string sender_ids
; // Comma separated sender ids.
47 // Contains relevant data of a message receiving event.
48 struct GCM_EXPORT ReceivingActivity
: Activity
{
50 virtual ~ReceivingActivity();
54 int message_byte_size
;
57 // Contains relevant data of a send-message step.
58 struct GCM_EXPORT SendingActivity
: Activity
{
60 virtual ~SendingActivity();
63 std::string receiver_id
;
64 std::string message_id
;
67 struct GCM_EXPORT RecordedActivities
{
69 virtual ~RecordedActivities();
71 std::vector
<CheckinActivity
> checkin_activities
;
72 std::vector
<ConnectionActivity
> connection_activities
;
73 std::vector
<RegistrationActivity
> registration_activities
;
74 std::vector
<ReceivingActivity
> receiving_activities
;
75 std::vector
<SendingActivity
> sending_activities
;
80 #endif // GOOGLE_APIS_GCM_GCM_ACTIVITY_H_