@@ -25,6 +25,8 @@ class CosConfig {
2525 m_secret_key(" " ),
2626 m_region(" " ),
2727 m_tmp_token(" " ),
28+ m_is_use_intranet(false ),
29+ m_intranet_addr(" " ),
2830 m_config_parsed(false ) {}
2931
3032 // / \brief CosConfig构造函数
@@ -40,6 +42,8 @@ class CosConfig {
4042 m_secret_key(secret_key),
4143 m_region(region),
4244 m_tmp_token(" " ),
45+ m_is_use_intranet(false ),
46+ m_intranet_addr(" " ),
4347 m_config_parsed(false ) {}
4448
4549 // / \brief CosConfig构造函数
@@ -56,6 +60,8 @@ class CosConfig {
5660 m_secret_key(secret_key),
5761 m_region(region),
5862 m_tmp_token(tmp_token),
63+ m_is_use_intranet(false ),
64+ m_intranet_addr(" " ),
5965 m_config_parsed(false ) {}
6066
6167 // / \brief CosConfig复制构造函数
@@ -67,6 +73,8 @@ class CosConfig {
6773 m_secret_key = config.m_secret_key ;
6874 m_region = config.m_region ;
6975 m_tmp_token = config.m_tmp_token ;
76+ m_is_use_intranet = config.m_is_use_intranet ;
77+ m_intranet_addr = config.m_intranet_addr ;
7078 m_config_parsed = config.m_config_parsed ;
7179 }
7280
@@ -79,6 +87,8 @@ class CosConfig {
7987 m_secret_key = config.m_secret_key ;
8088 m_region = config.m_region ;
8189 m_tmp_token = config.m_tmp_token ;
90+ m_is_use_intranet = config.m_is_use_intranet ;
91+ m_intranet_addr = config.m_intranet_addr ;
8292 m_config_parsed = config.m_config_parsed ;
8393 return *this ;
8494 }
@@ -142,9 +152,13 @@ class CosConfig {
142152 // / \brief 设置是否使用自定义ip和端口号
143153 void SetIsUseIntranetAddr (bool is_use_intranet);
144154
155+ bool IsUseIntranet ();
156+
145157 // / \berief 设置自定义ip和端口号
146158 void SetIntranetAddr (const std::string& intranet_addr);
147159
160+ std::string GetIntranetAddr ();
161+
148162 // / \brief 设置日志回调
149163 void SetLogCallback (const LogCallback log_callback);
150164
@@ -164,6 +178,9 @@ class CosConfig {
164178 std::string m_secret_key;
165179 std::string m_region;
166180 std::string m_tmp_token;
181+
182+ bool m_is_use_intranet;
183+ std::string m_intranet_addr;
167184 bool m_config_parsed;
168185};
169186
0 commit comments