Agora C++ API Reference for All Platforms

Loading...
Searching...
No Matches
diagnostic_service_i.h
1//
2// Agora RTC/MEDIA SDK
3//
4// Created by Pengfei Han in 2020-09.
5// Copyright (c) 2020 Agora.io. All rights reserved.
6//
7#pragma once
8
9#include <string>
10#include <vector>
11
12#include "AgoraBase.h"
13
14 namespace agora {
15 namespace rtc {
16
17 class IRtcConnectionEx;
18 struct TConnectionInfo;
19
20 class IDumpStateObserver {
21 public:
22 virtual ~IDumpStateObserver();
23 virtual void OnAudioFrameDumpCompleted(const char* channel_id, const user_id_t user_id, const std::string& location,
24 const std::string& uuid, const std::vector<std::string>& files) = 0;
25};
26
27 class ConnInfosIterator {
28 public:
29 virtual ~ConnInfosIterator();
30 virtual bool HasMoreConnInfo() const = 0;
31 virtual int NextConnInfo() = 0;
32 virtual TConnectionInfo CurrentConnInfo() const = 0;
33};
34
35 class IDiagnosticService {
36 public:
37 IDiagnosticService() = default;
38 virtual ~IDiagnosticService() = default;
39
40 virtual void Uninitialize() = 0;
41
42 virtual int RegisterDumpStateObserver(IDumpStateObserver* observer) = 0;
43 virtual int UnregisterDumpStateObserver(IDumpStateObserver* observer) = 0;
44
45 virtual int RegisterRtcConnection(IRtcConnectionEx* conn) = 0;
46 virtual int UnregisterRtcConnection(IRtcConnectionEx* conn) = 0;
47
48 /*
49 * User should release the ConnInfosIterator got from this function with operator delete self.
50 */
51 virtual ConnInfosIterator* GetConnInfosIterator() const = 0;
52
53 /*
54 * If auto_upload is true, the dump file will be uploaded automatically when dump completed or stopped.
55 */
56 virtual int StartAudioFrameDump(const char* channel_id, user_id_t user_id, const std::string& location,
57 const std::string& uuid, const std::string& passwd, int64_t duration_ms, bool auto_upload,
58 aosl_ref_t ares = AOSL_REF_INVALID) = 0;
59 /*
60 * If auto_upload is set to false when call StartAudioFrameDump(), the file path of dump file will be
61 * stored into files, or the dump file will be uploaded to the dump server automatically.
62 */
63 virtual int StopAudioFrameDump(const char* channel_id, user_id_t user_id, const std::string& location) = 0;
64
65 /*
66 * Start tracing
67 */
68 virtual int StartTrace(uint32_t count, uint64_t mask, int scale, bool truncate_group) = 0;
69
70 /*
71 * Stop tracing
72 */
73 virtual int StopTrace(const std::string& file_path) = 0;
74
75};
76
77} // namespace rtc
78} // namespace agora
agora::rtc::ConnInfosIterator
Definition diagnostic_service_i.h:27
agora::rtc::ConnInfosIterator::HasMoreConnInfo
virtual bool HasMoreConnInfo() const =0
agora::rtc::ConnInfosIterator::NextConnInfo
virtual int NextConnInfo()=0
agora::rtc::ConnInfosIterator::CurrentConnInfo
virtual TConnectionInfo CurrentConnInfo() const =0
agora::rtc::ConnInfosIterator::~ConnInfosIterator
virtual ~ConnInfosIterator()
agora::rtc::IDiagnosticService::UnregisterRtcConnection
virtual int UnregisterRtcConnection(IRtcConnectionEx *conn)=0
agora::rtc::IDiagnosticService::IDiagnosticService
IDiagnosticService()=default
agora::rtc::IDiagnosticService::UnregisterDumpStateObserver
virtual int UnregisterDumpStateObserver(IDumpStateObserver *observer)=0
agora::rtc::IDiagnosticService::StartTrace
virtual int StartTrace(uint32_t count, uint64_t mask, int scale, bool truncate_group)=0
agora::rtc::IDiagnosticService::StopTrace
virtual int StopTrace(const std::string &file_path)=0
agora::rtc::IDiagnosticService::RegisterRtcConnection
virtual int RegisterRtcConnection(IRtcConnectionEx *conn)=0
agora::rtc::IDiagnosticService::Uninitialize
virtual void Uninitialize()=0
agora::rtc::IDiagnosticService::~IDiagnosticService
virtual ~IDiagnosticService()=default
agora::rtc::IDiagnosticService::StopAudioFrameDump
virtual int StopAudioFrameDump(const char *channel_id, user_id_t user_id, const std::string &location)=0
agora::rtc::IDiagnosticService::StartAudioFrameDump
virtual int StartAudioFrameDump(const char *channel_id, user_id_t user_id, const std::string &location, const std::string &uuid, const std::string &passwd, int64_t duration_ms, bool auto_upload, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IDiagnosticService::GetConnInfosIterator
virtual ConnInfosIterator * GetConnInfosIterator() const =0
agora::rtc::IDiagnosticService::RegisterDumpStateObserver
virtual int RegisterDumpStateObserver(IDumpStateObserver *observer)=0
agora::rtc::IDumpStateObserver
Definition diagnostic_service_i.h:20
agora::rtc::IDumpStateObserver::~IDumpStateObserver
virtual ~IDumpStateObserver()
agora::rtc::IDumpStateObserver::OnAudioFrameDumpCompleted
virtual void OnAudioFrameDumpCompleted(const char *channel_id, const user_id_t user_id, const std::string &location, const std::string &uuid, const std::vector< std::string > &files)=0
agora::rtc::IRtcConnectionEx
Definition rtc_connection_i.h:184
agora::rtc
Definition AgoraExtensions.h:5
agora
Definition AgoraAtomicOps.h:21
agora::user_id_t
const char * user_id_t
Definition AgoraBase.h:849
agora::rtc::TConnectionInfo
Definition NGIAgoraRtcConnection.h:26