media/webrtc/signaling/include/CC_Device.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.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #pragma once
michael@0 6
michael@0 7 #include "CC_Common.h"
michael@0 8
michael@0 9 extern "C"
michael@0 10 {
michael@0 11 #include "ccapi_types.h"
michael@0 12 }
michael@0 13
michael@0 14 namespace CSF
michael@0 15 {
michael@0 16
michael@0 17 class ECC_API CC_Device
michael@0 18 {
michael@0 19 public:
michael@0 20 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(CC_Device)
michael@0 21 protected:
michael@0 22 CC_Device() {}
michael@0 23
michael@0 24 public:
michael@0 25 virtual ~CC_Device() {}
michael@0 26
michael@0 27 virtual std::string toString() = 0;
michael@0 28
michael@0 29 virtual CC_DeviceInfoPtr getDeviceInfo () = 0;
michael@0 30
michael@0 31 /**
michael@0 32 Create a call on the device. Line selection is on the first available line.
michael@0 33 Lines that have their MNC reached will be skipped. If you have a specific line
michael@0 34 you want to make a call on (assuming the device has more than available) then
michael@0 35 you should use CC_Line::createCall() to do that.
michael@0 36
michael@0 37 @return CC_CallPtr - the created call object wrapped in a smart_ptr.
michael@0 38 */
michael@0 39 virtual CC_CallPtr createCall() = 0;
michael@0 40
michael@0 41 virtual void enableVideo(bool enable) = 0;
michael@0 42 virtual void enableCamera(bool enable) = 0;
michael@0 43 virtual void setDigestNamePasswd (char *name, char *pw) = 0;
michael@0 44
michael@0 45 private:
michael@0 46 // Cannot copy - clients should be passing the pointer not the object.
michael@0 47 CC_Device& operator=(const CC_Device& rhs);
michael@0 48 CC_Device(const CC_Device&);
michael@0 49 };
michael@0 50 }

mercurial