media/webrtc/signaling/include/CC_DeviceInfo.h

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     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/. */
     5 #pragma once
     7 #include "CC_Common.h"
     9 #include <vector>
    11 extern "C"
    12 {
    13 #include "ccapi_types.h"
    14 }
    16 namespace CSF
    17 {
    18     class ECC_API CC_DeviceInfo
    19     {
    20     public:
    21         NS_INLINE_DECL_THREADSAFE_REFCOUNTING(CC_DeviceInfo)
    22     protected:
    23         CC_DeviceInfo() { }
    25     public:
    26         //Base class needs dtor to be declared as virtual
    27         virtual ~CC_DeviceInfo() {};
    29         /**
    30            gets the device name
    31            @returns - the device name as an std::string
    32          */
    33         virtual std::string getDeviceName() = 0;
    35         /**
    36            gets the service state
    37            @param [in] handle - reference to device info
    38            @returns cc_service_state_t - INS/OOS
    39          */
    40         virtual cc_service_state_t getServiceState() = 0;
    42         /**
    43            gets the service cause
    44            @param [in] handle - reference to device info
    45            @returns cc_service_cause_t - reason for service state
    46          */
    47         virtual cc_service_cause_t getServiceCause() = 0;
    49         /**
    50            gets vector of CC_CallPtr from this CC_DeviceInfo
    52            @returns vector<CC_CallPtr> containing the CC_CallPtrs
    53          */
    54         virtual std::vector<CC_CallPtr> getCalls () = 0;
    56         /**
    57            gets list of handles to calls on the device by state
    58            @param [in] handle - reference to device info
    59            @param [in] state - call state for which the calls are requested
    60            @param [out] handles - array of call handle to be returned
    61            @param [in,out] count number allocated in array/elements returned
    62            @returns
    63          */
    64 //        void getCallsByState (cc_call_state_t state,
    65 //                              cc_call_handle_t handles[], cc_uint16_t *count);
    67         /**
    68            gets vector of CC_LinePtr from this CC_DeviceInfo
    70            @returns vector<CC_LinePtr> containing the CC_LinePtrs
    71          */
    72         virtual std::vector<CC_LinePtr> getLines () = 0;
    74         /**
    75            gets vector of features on the device
    77            @returns
    78          */
    79         virtual std::vector<CC_FeatureInfoPtr> getFeatures () = 0;
    81         /**
    82            gets handles of call agent servers
    84            @returns
    85          */
    86         virtual std::vector<CC_CallServerInfoPtr> getCallServers () = 0;
    88         /**
    89            gets call server name
    90            @param [in] handle - handle of call server
    91            @returns name of the call server
    92            NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
    93          */
    94 //        cc_string_t getCallServerName (cc_callserver_ref_t handle);
    96         /**
    97            gets call server mode
    98            @param [in] handle - handle of call server
    99            @returns - mode of the call server
   100          */
   101 //        cc_cucm_mode_t getCallServerMode (cc_callserver_ref_t handle);
   103         /**
   104            gets calls erver name
   105            @param [in] handle - handle of call server
   106            @returns status of the call server
   107          */
   108 //        cc_ccm_status_t getCallServerStatus (cc_callserver_ref_t handle);
   110         /**
   111            get the NOTIFICATION PROMPT
   112            @param [in] handle - reference to device info
   113            @returns
   114          */
   115 //        cc_string_t getNotifyPrompt ();
   117         /**
   118            get the NOTIFICATION PROMPT PRIORITY
   119            @param [in] handle - reference to device info
   120            @returns
   121          */
   122 //        cc_uint32_t getNotifyPromptPriority ();
   124         /**
   125            get the NOTIFICATION PROMPT Progress
   126            @param [in] handle - reference to device info
   127            @returns
   128          */
   129 //        cc_uint32_t getNotifyPromptProgress ();
   131     private:
   132 		// Cannot copy - clients should be passing the pointer not the object.
   133 		CC_DeviceInfo& operator=(const CC_DeviceInfo& rhs);
   134 		CC_DeviceInfo(const CC_DeviceInfo&);
   135     };
   136 };

mercurial