@@ -2784,6 +2784,11 @@ class Conf {
27842784 m_mask = m_mask | 0x00000200u ;
27852785 m_freeze = freeze;
27862786 }
2787+
2788+ void SetTimeout (const int timeout) {
2789+ m_mask = m_mask | 0x00000400u ;
2790+ m_timeout = timeout;
2791+ }
27872792
27882793 std::string GetBizType () const { return m_biz_type;}
27892794
@@ -2803,6 +2808,8 @@ class Conf {
28032808
28042809 Freeze GetFreeze () const { return m_freeze; }
28052810
2811+ int GetTimeout () const { return m_timeout; }
2812+
28062813 bool HasBizType () const { return (m_mask & 0x00000001u ) != 0 ; }
28072814
28082815 bool HasDetectType () const { return (m_mask & 0x00000002u ) != 0 ;}
@@ -2819,7 +2826,9 @@ class Conf {
28192826
28202827 bool HasAsync () const { return (m_mask & 0x00000080u ) != 0 ; }
28212828
2822- bool HasFreeze () const { return (m_mask & 0x00000020u ) != 0 ; }
2829+ bool HasFreeze () const { return (m_mask & 0x00000200u ) != 0 ; }
2830+
2831+ bool HasTimeout () const { return (m_mask & 0x00000400u ) != 0 ; }
28232832
28242833 std::string to_string () const {
28252834 std::stringstream ss;
@@ -2831,7 +2840,8 @@ class Conf {
28312840 << " , detect_content: " << m_detect_content
28322841 << " , return_highlight_html: " << m_return_highlight_html
28332842 << " , async: " << m_async
2834- << " , freeze: " << m_freeze.to_string ();
2843+ << " , freeze: " << m_freeze.to_string ()
2844+ << " , timeout: " << m_timeout;
28352845 return ss.str ();
28362846 }
28372847
@@ -2846,6 +2856,7 @@ class Conf {
28462856 bool m_return_highlight_html; // 网页审核时,是否需要高亮网页耶的违规文本
28472857 int m_async; // 是否异步进行审核,0:同步返回结果,1:异步进行审核。默认值为 0。
28482858 Freeze m_freeze; // 可通过该字段,设置根据审核结果给出的不同分值,对图片进行自动冻结,仅当input中审核的图片为object时有效
2859+ int m_timeout; // 通过该参数可设置请求的超时时间。参数有效值为大于等于0的整数,单位为毫秒,0表示不限制时间,默认值为0
28492860};
28502861
28512862class GetImageAuditingReq : public ObjectReq {
0 commit comments