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 file, 3 * You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 #ifndef _WEBRTC_GLOBAL_INFORMATION_H_ 6 #define _WEBRTC_GLOBAL_INFORMATION_H_ 7 8 #include "nsString.h" 9 #include "mozilla/dom/BindingDeclarations.h" // for Optional 10 11 namespace mozilla { 12 class PeerConnectionImpl; 13 class ErrorResult; 14 15 namespace dom { 16 17 class GlobalObject; 18 class WebrtcGlobalStatisticsCallback; 19 class WebrtcGlobalLoggingCallback; 20 21 class WebrtcGlobalInformation { 22 public: 23 MOZ_CAN_RUN_SCRIPT 24 static void GetAllStats(const GlobalObject& aGlobal, 25 WebrtcGlobalStatisticsCallback& aStatsCallback, 26 const Optional<nsAString>& pcIdFilter, 27 ErrorResult& aRv); 28 29 static void ClearAllStats(const GlobalObject& aGlobal); 30 31 MOZ_CAN_RUN_SCRIPT 32 static void GetLogging(const GlobalObject& aGlobal, const nsAString& aPattern, 33 WebrtcGlobalLoggingCallback& aLoggingCallback, 34 ErrorResult& aRv); 35 36 static void ClearLogging(const GlobalObject& aGlobal); 37 38 static void SetDebugLevel(const GlobalObject& aGlobal, int32_t aLevel); 39 static int32_t DebugLevel(const GlobalObject& aGlobal); 40 41 static void SetAecDebug(const GlobalObject& aGlobal, bool aEnable); 42 static bool AecDebug(const GlobalObject& aGlobal); 43 static void GetAecDebugLogDir(const GlobalObject& aGlobal, nsAString& aDir); 44 45 static void StoreLongTermICEStatistics(PeerConnectionImpl& aPc); 46 47 private: 48 WebrtcGlobalInformation() = delete; 49 WebrtcGlobalInformation(const WebrtcGlobalInformation& aOrig) = delete; 50 WebrtcGlobalInformation& operator=(const WebrtcGlobalInformation& aRhs) = 51 delete; 52 }; 53 54 } // namespace dom 55 } // namespace mozilla 56 57 #endif // _WEBRTC_GLOBAL_INFORMATION_H_ 58