media/webrtc/signaling/include/CC_LineInfo.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 #include <bitset>
michael@0 9 #include <set>
michael@0 10 #include <vector>
michael@0 11
michael@0 12 extern "C"
michael@0 13 {
michael@0 14 #include "ccapi_types.h"
michael@0 15 }
michael@0 16
michael@0 17 namespace CSF
michael@0 18 {
michael@0 19 class ECC_API CC_LineInfo
michael@0 20 {
michael@0 21 public:
michael@0 22 NS_INLINE_DECL_THREADSAFE_REFCOUNTING(CC_LineInfo)
michael@0 23 protected:
michael@0 24 CC_LineInfo() { }
michael@0 25
michael@0 26 public:
michael@0 27 //Base class needs dtor to be declared as virtual
michael@0 28 virtual ~CC_LineInfo() {};
michael@0 29
michael@0 30 /**
michael@0 31 Get the line Name
michael@0 32
michael@0 33 @return string - line Name
michael@0 34 */
michael@0 35 virtual std::string getName() = 0;
michael@0 36
michael@0 37 /**
michael@0 38 Get the line DN Number
michael@0 39 @return string - line DN
michael@0 40 */
michael@0 41 virtual std::string getNumber() = 0;
michael@0 42
michael@0 43 /**
michael@0 44 Get the physical button number on which this line is configured
michael@0 45
michael@0 46 @return cc_uint32_t - button number
michael@0 47 */
michael@0 48 virtual cc_uint32_t getButton() = 0;
michael@0 49
michael@0 50 /**
michael@0 51 Get the Line Type
michael@0 52
michael@0 53 @return cc_line_feature_t - line featureID ( Line )
michael@0 54 */
michael@0 55 virtual cc_line_feature_t getLineType() = 0;
michael@0 56
michael@0 57 /**
michael@0 58
michael@0 59 @return bool - true if phone is currently registered with CM.
michael@0 60 */
michael@0 61 virtual bool getRegState() = 0;
michael@0 62
michael@0 63 /**
michael@0 64 Get the CFWDAll status for the line
michael@0 65
michael@0 66 @return bool - isForwarded
michael@0 67 */
michael@0 68 virtual bool isCFWDActive() = 0;
michael@0 69
michael@0 70 /**
michael@0 71 Get the CFWDAll destination
michael@0 72
michael@0 73 @return string - cfwd target
michael@0 74 */
michael@0 75 virtual std::string getCFWDName() = 0;
michael@0 76
michael@0 77 /**
michael@0 78 Get calls on line
michael@0 79
michael@0 80 @param [in] line - line
michael@0 81 @return vector<CC_CallPtr>
michael@0 82 */
michael@0 83 virtual std::vector<CC_CallPtr> getCalls (CC_LinePtr linePtr) = 0;
michael@0 84
michael@0 85 /**
michael@0 86 Get calls on line by state
michael@0 87
michael@0 88 @param [in] line - line
michael@0 89 @param [in] state - state
michael@0 90
michael@0 91 @return vector<CC_CallPtr>
michael@0 92 */
michael@0 93 virtual std::vector<CC_CallPtr> getCallsByState (CC_LinePtr linePtr, cc_call_state_t state) = 0;
michael@0 94
michael@0 95 /**
michael@0 96 Get the MWI Status
michael@0 97
michael@0 98 @return cc_uint32_t - MWI status (boolean 0 => no MWI)
michael@0 99 */
michael@0 100 virtual bool getMWIStatus() = 0;
michael@0 101
michael@0 102 /**
michael@0 103 Get the MWI Type
michael@0 104
michael@0 105 @return cc_uint32_t - MWI Type
michael@0 106 */
michael@0 107 virtual cc_uint32_t getMWIType() = 0;
michael@0 108
michael@0 109 /**
michael@0 110 Get the MWI new msg count
michael@0 111
michael@0 112 @return cc_uint32_t - MWI new msg count
michael@0 113 */
michael@0 114 virtual cc_uint32_t getMWINewMsgCount() = 0;
michael@0 115
michael@0 116 /**
michael@0 117 Get the MWI old msg count
michael@0 118
michael@0 119 @return cc_uint32_t - MWI old msg count
michael@0 120 */
michael@0 121 virtual cc_uint32_t getMWIOldMsgCount() = 0;
michael@0 122
michael@0 123 /**
michael@0 124 Get the MWI high priority new msg count
michael@0 125
michael@0 126 @return cc_uint32_t - MWI new msg count
michael@0 127 */
michael@0 128 virtual cc_uint32_t getMWIPrioNewMsgCount() = 0;
michael@0 129
michael@0 130 /**
michael@0 131 Get the MWI high priority old msg count
michael@0 132
michael@0 133 @return cc_uint32_t - MWI old msg count
michael@0 134 */
michael@0 135 virtual cc_uint32_t getMWIPrioOldMsgCount() = 0;
michael@0 136
michael@0 137 /**
michael@0 138 has capability - is the feature allowed
michael@0 139
michael@0 140 @param [in] capability - capability being queried to see if it's available
michael@0 141 @return bool - is Allowed
michael@0 142 */
michael@0 143 virtual bool hasCapability(ccapi_call_capability_e capability) = 0;
michael@0 144
michael@0 145 /**
michael@0 146 get Allowed Feature set
michael@0 147
michael@0 148 @return cc_return_t - bitset of Line Capabilities.
michael@0 149 */
michael@0 150 virtual std::bitset<CCAPI_CALL_CAP_MAX> getCapabilitySet() = 0;
michael@0 151 };
michael@0 152 };

mercurial