Skip to content

Commit 59bd074

Browse files
author
chengxin
committed
【ENH】解决sdk工程文件依赖问题
1 parent e8822b0 commit 59bd074

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

include/tigerapi/client_config.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ namespace TIGER_API {
4747
utility::string_t lang;
4848
utility::string_t device_id = Utils::get_device_id();
4949
utility::string_t secret_key;
50+
bool user_full_tick = false;
51+
utility::string_t socket_url;
52+
utility::string_t socket_port;
53+
utility::string_t socket_ca_certs;
54+
unsigned int send_interval = 10 * 1000;
55+
unsigned int receive_interval = 10 * 1000;
5056

5157
void check() {
5258
if (this->tiger_id.empty()) {
@@ -70,14 +76,13 @@ namespace TIGER_API {
7076
this->server_url = url;
7177
}
7278

73-
utility::string_t get_server_url() {
79+
const utility::string_t& get_server_url() {
7480
return this->server_url;
7581
}
7682

77-
utility::string_t get_server_pub_key() {
83+
const utility::string_t& get_server_pub_key() {
7884
return this->server_public_key;
7985
}
80-
8186
private:
8287
bool sandbox_debug = false;
8388
utility::string_t server_url = TIGER_SERVER_URL;

include/tigerapi/constants.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
#ifndef CPPSDK_CONSTANTS_H
33
#define CPPSDK_CONSTANTS_H
4+
#include "cpprest/details/basic_types.h"
45

56
static utility::string_t GET = U("GET");
67
static utility::string_t POST = U("POST");

include/tigerapi/price_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace TIGER_API {
1818

1919
class PriceUtil {
2020
public:
21-
static const std::string INF;
21+
static const utility::string_t INF;
2222
static const double RELATIVE_TOLERANCE;
2323
static const utility::string_t TICK_SIZE;
2424

include/tigerapi/version.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@
66
#define TIGERAPI_VERSION_H
77

88
#define PROJECT_VERSION "0.1.6"
9-
#include "easylogging++.h"
10-
INITIALIZE_EASYLOGGINGPP
9+
1110
#endif //TIGERAPI_VERSION_H

src/tiger_client.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include "../include/tigerapi/contract_util.h"
44
#include "../include/tigerapi/easylogging++.h"
55

6+
INITIALIZE_EASYLOGGINGPP
7+
68
namespace TIGER_API {
79

810
void TigerClient::set_config(const ClientConfig &cf) {

0 commit comments

Comments
 (0)