Agora C++ API Reference for All Platforms

Loading...
Searching...
No Matches
content_inspect_i.h
1//
2// Agora RTC/MEDIA SDK
3//
4// Created by Ning Huang in 2022-06.
5// Copyright (c) 2022 Agora.io. All rights reserved.
6//
7#pragma once
8
9#include <string>
10#include <vector>
11
12#include "AgoraMediaBase.h"
13
14 namespace agora {
15 namespace media {
16 enum CONTENT_INSPECT_VENDOR { CONTENT_INSPECT_VENDOR_AGORA = 1, CONTENT_INSPECT_VENDOR_TUPU = 2, CONTENT_INSPECT_VENDOR_HIVE = 3 };
17 enum CONTENT_INSPECT_DEVICE_TYPE{
18 CONTENT_INSPECT_DEVICE_INVALID = 0,
19 CONTENT_INSPECT_DEVICE_AGORA = 1
20};
21 enum CONTENT_INSPECT_WORK_TYPE {
25 CONTENT_INSPECT_WORK_DEVICE = 0,
29 CONTENT_INSPECT_WORK_CLOUD = 1,
33 CONTENT_INSPECT_WORK_DEVICE_CLOUD = 2
34};
35 enum CONTENT_INSPECT_CLOUD_TYPE{
36 CONTENT_INSPECT_CLOUD_INVALID = 0,
37 CONTENT_INSPECT_CLOUD_AGORA = 1,
38 CONTENT_INSPECT_CLOUD_MARKET_PLACE = 2,
39};
40
41 struct ContentInspectModuleEx : ContentInspectModule {
45 CONTENT_INSPECT_TYPE type;
46 CONTENT_INSPECT_VENDOR vendor;
47 std::string callbackUrl;
48 std::string token;
52 unsigned int interval;
53 ContentInspectModuleEx() {
54 type = CONTENT_INSPECT_INVALID;
55 interval = 0;
56 vendor = CONTENT_INSPECT_VENDOR_AGORA;
57 }
58};
59
62 struct ContentInspectConfigEx {
63 bool enable;
65 CONTENT_INSPECT_WORK_TYPE ContentWorkType;
66
68 CONTENT_INSPECT_DEVICE_TYPE DeviceWorkType;
69
71 CONTENT_INSPECT_CLOUD_TYPE CloudWorkType;
72 std::string extraInfo;
76 std::string serverConfig;
77
78 rtc::IFileUploaderService* fileUploader;
82 ContentInspectModuleEx modules[MAX_CONTENT_INSPECT_MODULE_COUNT];
85 int moduleCount;
86
87 ContentInspectConfigEx& operator=(const ContentInspectConfigEx& rth)
88 {
89 enable = rth.enable;
90 extraInfo = rth.extraInfo;
91 serverConfig = rth.serverConfig;
92 moduleCount = rth.moduleCount;
93 fileUploader = rth.fileUploader;
94 DeviceWorkType = rth.DeviceWorkType;
95 ContentWorkType = rth.ContentWorkType;
96 CloudWorkType = rth.CloudWorkType;
97 for(int i = 0; i < MAX_CONTENT_INSPECT_MODULE_COUNT; i++) {
98 modules[i].type = rth.modules[i].type;
99 modules[i].interval = rth.modules[i].interval;
100 }
101 return *this;
102 }
103
104 ContentInspectConfigEx(const ContentInspectConfigEx& rth){
105 enable = rth.enable;
106 extraInfo = rth.extraInfo;
107 serverConfig = rth.serverConfig;
108 moduleCount = rth.moduleCount;
109 fileUploader = rth.fileUploader;
110 DeviceWorkType = rth.DeviceWorkType;
111 ContentWorkType = rth.ContentWorkType;
112 CloudWorkType = rth.CloudWorkType;
113 for(int i = 0; i < MAX_CONTENT_INSPECT_MODULE_COUNT; i++) {
114 modules[i].type = rth.modules[i].type;
115 modules[i].interval = rth.modules[i].interval;
116 }
117 }
118
119 ContentInspectConfigEx(bool enable, const ContentInspectConfig& config, rtc::IFileUploaderService* uploader, CONTENT_INSPECT_CLOUD_TYPE cloudWorkType) : enable(enable), ContentWorkType(CONTENT_INSPECT_WORK_CLOUD),fileUploader(uploader),DeviceWorkType(CONTENT_INSPECT_DEVICE_INVALID),CloudWorkType(cloudWorkType), moduleCount(0){
120 if(config.extraInfo != NULL) {
121 extraInfo = config.extraInfo;
122 }
123 if(config.serverConfig != NULL) {
124 serverConfig = config.serverConfig;
125 }
126 moduleCount = config.moduleCount;
127 for(int i = 0; i < MAX_CONTENT_INSPECT_MODULE_COUNT; i++) {
128 modules[i].type = config.modules[i].type;
129 modules[i].interval = config.modules[i].interval;
130 }
131 }
132 ContentInspectConfigEx() : enable(false), ContentWorkType(CONTENT_INSPECT_WORK_CLOUD),fileUploader(nullptr),DeviceWorkType(CONTENT_INSPECT_DEVICE_INVALID),CloudWorkType(CONTENT_INSPECT_CLOUD_AGORA), moduleCount(0){
133 }
134};
135
136} // namespace rtc
137} // namespace agora
agora::rtc::IFileUploaderService
Definition IAgoraFileUploader.h:38
agora::media
Definition content_inspect_i.h:15
agora::media::CONTENT_INSPECT_TYPE
CONTENT_INSPECT_TYPE
The type of video content moderation module.
Definition AgoraMediaBase.h:1283
agora::media::CONTENT_INSPECT_INVALID
@ CONTENT_INSPECT_INVALID
Definition AgoraMediaBase.h:1287
agora::media::CONTENT_INSPECT_CLOUD_TYPE
CONTENT_INSPECT_CLOUD_TYPE
Definition content_inspect_i.h:35
agora::media::CONTENT_INSPECT_CLOUD_MARKET_PLACE
@ CONTENT_INSPECT_CLOUD_MARKET_PLACE
Definition content_inspect_i.h:38
agora::media::CONTENT_INSPECT_CLOUD_INVALID
@ CONTENT_INSPECT_CLOUD_INVALID
Definition content_inspect_i.h:36
agora::media::CONTENT_INSPECT_CLOUD_AGORA
@ CONTENT_INSPECT_CLOUD_AGORA
Definition content_inspect_i.h:37
agora::media::CONTENT_INSPECT_WORK_TYPE
CONTENT_INSPECT_WORK_TYPE
Definition content_inspect_i.h:21
agora::media::CONTENT_INSPECT_WORK_DEVICE_CLOUD
@ CONTENT_INSPECT_WORK_DEVICE_CLOUD
Definition content_inspect_i.h:33
agora::media::CONTENT_INSPECT_WORK_DEVICE
@ CONTENT_INSPECT_WORK_DEVICE
Definition content_inspect_i.h:25
agora::media::CONTENT_INSPECT_WORK_CLOUD
@ CONTENT_INSPECT_WORK_CLOUD
Definition content_inspect_i.h:29
agora::media::CONTENT_INSPECT_VENDOR
CONTENT_INSPECT_VENDOR
Definition content_inspect_i.h:16
agora::media::CONTENT_INSPECT_VENDOR_TUPU
@ CONTENT_INSPECT_VENDOR_TUPU
Definition content_inspect_i.h:16
agora::media::CONTENT_INSPECT_VENDOR_HIVE
@ CONTENT_INSPECT_VENDOR_HIVE
Definition content_inspect_i.h:16
agora::media::CONTENT_INSPECT_VENDOR_AGORA
@ CONTENT_INSPECT_VENDOR_AGORA
Definition content_inspect_i.h:16
agora::media::CONTENT_INSPECT_DEVICE_TYPE
CONTENT_INSPECT_DEVICE_TYPE
Definition content_inspect_i.h:17
agora::media::CONTENT_INSPECT_DEVICE_INVALID
@ CONTENT_INSPECT_DEVICE_INVALID
Definition content_inspect_i.h:18
agora::media::CONTENT_INSPECT_DEVICE_AGORA
@ CONTENT_INSPECT_DEVICE_AGORA
Definition content_inspect_i.h:19
agora
Definition AgoraAtomicOps.h:21
agora::media::ContentInspectConfigEx::extraInfo
std::string extraInfo
Definition content_inspect_i.h:72
agora::media::ContentInspectConfigEx::ContentInspectConfigEx
ContentInspectConfigEx(const ContentInspectConfigEx &rth)
Definition content_inspect_i.h:104
agora::media::ContentInspectConfigEx::ContentInspectConfigEx
ContentInspectConfigEx()
Definition content_inspect_i.h:132
agora::media::ContentInspectConfigEx::serverConfig
std::string serverConfig
Definition content_inspect_i.h:76
agora::media::ContentInspectConfigEx::fileUploader
rtc::IFileUploaderService * fileUploader
Definition content_inspect_i.h:78
agora::media::ContentInspectConfigEx::enable
bool enable
Definition content_inspect_i.h:63
agora::media::ContentInspectConfigEx::ContentWorkType
CONTENT_INSPECT_WORK_TYPE ContentWorkType
Definition content_inspect_i.h:65
agora::media::ContentInspectConfigEx::operator=
ContentInspectConfigEx & operator=(const ContentInspectConfigEx &rth)
Definition content_inspect_i.h:87
agora::media::ContentInspectConfigEx::moduleCount
int moduleCount
Definition content_inspect_i.h:85
agora::media::ContentInspectConfigEx::CloudWorkType
CONTENT_INSPECT_CLOUD_TYPE CloudWorkType
Definition content_inspect_i.h:71
agora::media::ContentInspectConfigEx::ContentInspectConfigEx
ContentInspectConfigEx(bool enable, const ContentInspectConfig &config, rtc::IFileUploaderService *uploader, CONTENT_INSPECT_CLOUD_TYPE cloudWorkType)
Definition content_inspect_i.h:119
agora::media::ContentInspectConfigEx::modules
ContentInspectModuleEx modules[MAX_CONTENT_INSPECT_MODULE_COUNT]
Definition content_inspect_i.h:82
agora::media::ContentInspectConfigEx::DeviceWorkType
CONTENT_INSPECT_DEVICE_TYPE DeviceWorkType
Definition content_inspect_i.h:68
agora::media::ContentInspectConfig
Screenshot and upload configuration.
Definition AgoraMediaBase.h:1334
agora::media::ContentInspectConfig::serverConfig
const char * serverConfig
Definition AgoraMediaBase.h:1347
agora::media::ContentInspectConfig::extraInfo
const char * extraInfo
Definition AgoraMediaBase.h:1341
agora::media::ContentInspectConfig::moduleCount
int moduleCount
Definition AgoraMediaBase.h:1361
agora::media::ContentInspectModuleEx
Definition content_inspect_i.h:41
agora::media::ContentInspectModuleEx::type
CONTENT_INSPECT_TYPE type
Definition content_inspect_i.h:45
agora::media::ContentInspectModuleEx::token
std::string token
Definition content_inspect_i.h:48
agora::media::ContentInspectModuleEx::callbackUrl
std::string callbackUrl
Definition content_inspect_i.h:47
agora::media::ContentInspectModuleEx::vendor
CONTENT_INSPECT_VENDOR vendor
Definition content_inspect_i.h:46
agora::media::ContentInspectModuleEx::ContentInspectModuleEx
ContentInspectModuleEx()
Definition content_inspect_i.h:53
agora::media::ContentInspectModuleEx::interval
unsigned int interval
Definition content_inspect_i.h:52
agora::media::ContentInspectModule::ContentInspectModule
ContentInspectModule()
Definition AgoraMediaBase.h:1325