Home | History | Annotate | Download | only in notification
      1 // Copyright 2015 The Weave 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 LIBWEAVE_SRC_NOTIFICATION_NOTIFICATION_PARSER_H_
      6 #define LIBWEAVE_SRC_NOTIFICATION_NOTIFICATION_PARSER_H_
      7 
      8 #include <string>
      9 
     10 #include <base/values.h>
     11 
     12 #include "src/notification/notification_delegate.h"
     13 
     14 namespace weave {
     15 
     16 // Parses the notification JSON object received from GCD server and invokes
     17 // the appropriate method from the |delegate|.
     18 // Returns false if unexpected or malformed notification is received.
     19 bool ParseNotificationJson(const base::DictionaryValue& notification,
     20                            NotificationDelegate* delegate,
     21                            const std::string& channel_name);
     22 
     23 }  // namespace weave
     24 
     25 #endif  // LIBWEAVE_SRC_NOTIFICATION_NOTIFICATION_PARSER_H_
     26