Agora Java API Reference for Android
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 
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 
28 public:
29  virtual ~ConnInfosIterator();
30  virtual bool HasMoreConnInfo() const = 0;
31  virtual int NextConnInfo() = 0;
32  virtual TConnectionInfo CurrentConnInfo() const = 0;
33 };
34 
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) = 0;
58  /*
59  * If auto_upload is set to false when call StartAudioFrameDump(), the file path of dump file will be
60  * stored into files, or the dump file will be uploaded to the dump server automatically.
61  */
62  virtual int StopAudioFrameDump(const char* channel_id, user_id_t user_id, const std::string& location) = 0;
63 
64  /*
65  * Start tracing
66  */
67  virtual int StartTrace(int count, int mask, int scale, bool truncate_group) = 0;
68 
69  /*
70  * Stop tracing
71  */
72  virtual int StopTrace(const std::string& file_path) = 0;
73 
74 };
75 
76 } // namespace rtc
77 } // namespace agora
agora::rtc::ConnInfosIterator
Definition: diagnostic_service_i.h:27
agora::rtc::TConnectionInfo
Definition: NGIAgoraRtcConnection.h:24
agora::rtc::IDiagnosticService
Definition: diagnostic_service_i.h:35
agora::rtc::IDumpStateObserver
Definition: diagnostic_service_i.h:20
agora::rtc::IRtcConnectionEx
Definition: rtc_connection_i.h:167