tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

CommonTypes.h (1906B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 #pragma once
      6 
      7 #include <string>
      8 
      9 namespace csf {
     10 
     11 namespace ProviderStateEnum {
     12 enum ProviderState {
     13  Ready,
     14  Registering,
     15  AwaitingIpAddress,
     16  FetchingDeviceConfig,
     17  Idle,
     18  RecoveryPending,
     19  Connected
     20 };
     21 const std::string toString(ProviderState);
     22 }  // namespace ProviderStateEnum
     23 namespace LoginErrorStatusEnum {
     24 enum LoginErrorStatus {
     25  Ok,                             // No Error
     26  Unknown,                        // Unknown Error
     27  NoCallManagerConfigured,        // No Primary or Backup Call Manager
     28  NoDevicesFound,                 // No devices
     29  NoCsfDevicesFound,              // Devices but none of type CSF
     30  PhoneConfigGenError,            // Could not generate phone config
     31  SipProfileGenError,             // Could not build SIP profile
     32  ConfigNotSet,                   // Config not set before calling login()
     33  CreateConfigProviderFailed,     // Could not create ConfigProvider
     34  CreateSoftPhoneProviderFailed,  // Could not create SoftPhoneProvider
     35  MissingUsername,                // Username argument missing,
     36  ManualLogout,                   // logout() has been called
     37  LoggedInElseWhere,  // Another process has the mutex indicating it is logged
     38                      // in
     39  AuthenticationFailure,  // Authentication failure (probably bad password, but
     40                          // best not to say for sure)
     41  CtiCouldNotConnect,     // Could not connect to CTI service
     42  InvalidServerSearchList
     43 };
     44 const std::string toString(LoginErrorStatus);
     45 }  // namespace LoginErrorStatusEnum
     46 
     47 namespace ErrorCodeEnum {
     48 enum ErrorCode { Ok, Unknown, InvalidState, InvalidArgument };
     49 const std::string toString(ErrorCode);
     50 }  // namespace ErrorCodeEnum
     51 
     52 }  // namespace csf