buffet: Hook up XMPP to deliver push notifications to buffet

Now using XMPP not only for the device presence but for delivering
push notifications, specifically COMMAND_CREATED notification and
extracting the command instance from the notification message.
Add the commands received over XMPP to the command execution queue.

The remaining tasks for XMPP (making polling optional, provide
notification channel configuration options for buffet, update the
channel changes on GCD server, etc) are coming in follow-up CLs.

BUG=brillo:458
TEST=`FEATURES=test emerge-link buffet`
     Tested this on the device.

Change-Id: I6ba42e3687563133734aaf36d3802d6f4888f348
Reviewed-on: https://chromium-review.googlesource.com/272782
Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
diff --git a/buffet/notification/notification_parser.h b/buffet/notification/notification_parser.h
new file mode 100644
index 0000000..eb50dc1
--- /dev/null
+++ b/buffet/notification/notification_parser.h
@@ -0,0 +1,24 @@
+// Copyright 2015 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BUFFET_NOTIFICATION_NOTIFICATION_PARSER_H_
+#define BUFFET_NOTIFICATION_NOTIFICATION_PARSER_H_
+
+#include <string>
+
+#include <base/values.h>
+
+#include "buffet/notification/notification_delegate.h"
+
+namespace buffet {
+
+// Parses the notification JSON object received from GCD server and invokes
+// the appropriate method from the |delegate|.
+// Returns false if unexpected or malformed notification is received.
+bool ParseNotificationJson(const base::DictionaryValue& notification,
+                           NotificationDelegate* delegate);
+
+}  // namespace buffet
+
+#endif  // BUFFET_NOTIFICATION_NOTIFICATION_PARSER_H_