From 6026cd7a0a1cf23b0ce76db696b46b6656e3ecd6 Mon Sep 17 00:00:00 2001 From: Nero-Hu Date: Tue, 19 Sep 2023 10:15:02 +0000 Subject: [PATCH] Sync cn prototype to en prototype --- .../API/class_contentinspectconfig.dita | 33 +++++++++++++++---- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/en-US/dita/RTC-NG/API/class_contentinspectconfig.dita b/en-US/dita/RTC-NG/API/class_contentinspectconfig.dita index 4ab52e56e18..6f6011c7d65 100644 --- a/en-US/dita/RTC-NG/API/class_contentinspectconfig.dita +++ b/en-US/dita/RTC-NG/API/class_contentinspectconfig.dita @@ -9,8 +9,10 @@ public class ContentInspectConfig { public final static int CONTENT_INSPECT_TYPE_INVALID = 0; public final static int CONTENT_INSPECT_TYPE_SUPERVISE = 2; + public final static int CONTENT_INSPECT_TYPE_IMAGE_MODERATION = 3; public static final int MAX_CONTENT_INSPECT_MODULE_COUNT = 32; public String extraInfo; + public String serverConfig; public ContentInspectModule[] modules; public int moduleCount; @@ -22,29 +24,41 @@ type = CONTENT_INSPECT_TYPE_INVALID; interval = 0; } - }> + } + + public ContentInspectConfig() { + modules = new ContentInspectModule[MAX_CONTENT_INSPECT_MODULE_COUNT]; + for (int i = 0; i < MAX_CONTENT_INSPECT_MODULE_COUNT; i++) { + modules[i] = new ContentInspectModule(); + } + moduleCount = 0; + } +} __attribute__((visibility("default"))) @interface AgoraContentInspectConfig: NSObject @property (nonatomic, copy) NSString* _Nullable extraInfo; +@property (nonatomic, copy) NSString* _Nullable serverConfig; @property(copy, nonatomic) NSArray<AgoraContentInspectModule*>* _Nullable modules; @end struct ContentInspectConfig { const char* extraInfo; - + const char* serverConfig; + ContentInspectModule modules[MAX_CONTENT_INSPECT_MODULE_COUNT]; int moduleCount; ContentInspectConfig& operator=(const ContentInspectConfig& rth) { extraInfo = rth.extraInfo; + serverConfig = rth.serverConfig; moduleCount = rth.moduleCount; memcpy(&modules, &rth.modules, MAX_CONTENT_INSPECT_MODULE_COUNT * sizeof(ContentInspectModule)); return *this; } - ContentInspectConfig() :extraInfo(NULL), moduleCount(0){} + ContentInspectConfig() :extraInfo(NULL), serverConfig(NULL), moduleCount(0){} }; export class ContentInspectConfig { extraInfo?: string; - + modules?: ContentInspectModule[]; moduleCount?: number; @@ -65,16 +79,23 @@ extraInfo?: string; + serverConfig?: string; + modules?: ContentInspectModule[]; moduleCount?: number; } - class ContentInspectConfig { + @JsonSerializable(explicitToJson: true, includeIfNull: false) +class ContentInspectConfig { + const ContentInspectConfig( + {this.extraInfo, this.serverConfig, this.modules, this.moduleCount}); - const ContentInspectConfig({this.extraInfo, this.modules, this.moduleCount}); @JsonKey(name: 'extraInfo') final String? extraInfo; + @JsonKey(name: 'serverConfig') + final String? serverConfig; + @JsonKey(name: 'modules') final List<ContentInspectModule>? modules;