Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / jingle / notifier / base / notification_method.h
blob63addabc3106c97101a7617f358f3b909c7e4b67
1 // Copyright (c) 2012 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 JINGLE_NOTIFIER_BASE_NOTIFICATION_METHOD_H_
6 #define JINGLE_NOTIFIER_BASE_NOTIFICATION_METHOD_H_
8 #include <string>
10 namespace notifier {
12 enum NotificationMethod {
13 // Old peer-to-peer notification method. Currently only used for
14 // testing.
15 NOTIFICATION_P2P,
16 // Server-issued notifications. The default.
17 NOTIFICATION_SERVER,
20 extern const NotificationMethod kDefaultNotificationMethod;
22 std::string NotificationMethodToString(
23 NotificationMethod notification_method);
25 // If the given string is not one of "p2p" or "server", returns
26 // kDefaultNotificationMethod.
27 NotificationMethod StringToNotificationMethod(const std::string& str);
29 } // namespace notifier
31 #endif // JINGLE_NOTIFIER_BASE_NOTIFICATION_METHOD_H_