Home | History | Annotate | Download | only in base
      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.
      4 
      5 #ifndef JINGLE_NOTIFIER_BASE_NOTIFICATION_METHOD_H_
      6 #define JINGLE_NOTIFIER_BASE_NOTIFICATION_METHOD_H_
      7 
      8 #include <string>
      9 
     10 namespace notifier {
     11 
     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,
     18 };
     19 
     20 extern const NotificationMethod kDefaultNotificationMethod;
     21 
     22 std::string NotificationMethodToString(
     23     NotificationMethod notification_method);
     24 
     25 // If the given string is not one of "p2p" or "server", returns
     26 // kDefaultNotificationMethod.
     27 NotificationMethod StringToNotificationMethod(const std::string& str);
     28 
     29 }  // namespace notifier
     30 
     31 #endif  // JINGLE_NOTIFIER_BASE_NOTIFICATION_METHOD_H_
     32 
     33