media/webrtc/signaling/include/PhoneDetails.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 <string>
     9 #include "CC_Common.h"
    10 #include "ECC_Types.h"
    12 namespace CSF
    13 {
    14 	DECLARE_NS_PTR_VECTOR(PhoneDetails);
    15 	class ECC_API PhoneDetails
    16 	{
    17 	public:
    18                 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(PhoneDetails)
    19 		virtual ~PhoneDetails() {}
    20 		/**
    21 		 * Get the device name (the CUCM device name) and the free text description.
    22 		 */
    23 		virtual std::string getName() const = 0;
    24 		virtual std::string getDescription() const = 0;
    26 		/**
    27 		 * Get the model number (the internal CUCM number, not the number printed on the phone)
    28 		 * and the corresponding description (which normally does include the number printed on the phone).
    29 		 * Returns -1, "" if unknown
    30 		 */
    31 		virtual int getModel() const = 0;
    32 		virtual std::string getModelDescription() const = 0;
    34 		virtual bool isSoftPhone() = 0;
    36 		/**
    37 		 * List the known directory numbers of lines associated with the device.
    38 		 * Empty list if unknown.
    39 		 */
    40 		virtual std::vector<std::string> getLineDNs() const = 0;
    42 		/**
    43 		 * Current status of the device, if known.
    44 		 */
    45 		virtual ServiceStateType::ServiceState getServiceState() const = 0;
    47 		/**
    48 		 * TFTP config of device, and freshness of the config.
    49 		 */
    50 		virtual std::string getConfig() const = 0;
    52 	protected:
    53 		PhoneDetails() {}
    55 	private:
    56 		PhoneDetails(const PhoneDetails&);
    57 		PhoneDetails& operator=(const PhoneDetails&);
    58 	};
    59 };

mercurial