Skip to content

Commit 0dd93c1

Browse files
committed
chore: replace the connectivity check type
used libcurl to check the connectivity Log:replace the connectivity check type Influence: 任务栏图标显示的状态是否正常 PMS: BUG-331389
1 parent e455774 commit 0dd93c1

File tree

13 files changed

+558
-187
lines changed

13 files changed

+558
-187
lines changed

config/org.deepin.dde.network.json

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
"visibility": "private"
139139
},
140140
"ConnectivityCheckInterval": {
141-
"value": 30,
141+
"value": 150,
142142
"serial": 0,
143143
"flags": [],
144144
"name": "ConnectivityCheckInterval",
@@ -307,6 +307,39 @@
307307
"description": "if network connect failure: true:do not notify message, false:notify message",
308308
"permissions": "readwrite",
309309
"visibility": "private"
310-
}
310+
},
311+
"httpRequestTimeout":{
312+
"value": 15,
313+
"serial": 0,
314+
"flags":["global"],
315+
"name":"httpRequestTimeout",
316+
"name[zh_CN]":"HTTP请求超时时间",
317+
"description[zh_CN]":"HTTP请求超时时间(单位:秒),默认15秒",
318+
"description":"HTTP request timeout in seconds, default 15 seconds",
319+
"permissions":"readwrite",
320+
"visibility":"private"
321+
},
322+
"httpConnectTimeout":{
323+
"value": 10,
324+
"serial": 0,
325+
"flags":["global"],
326+
"name":"httpConnectTimeout",
327+
"name[zh_CN]":"HTTP连接超时时间",
328+
"description[zh_CN]":"HTTP连接超时时间(单位:秒),默认10秒",
329+
"description":"HTTP connection timeout in seconds, default 10 seconds",
330+
"permissions":"readwrite",
331+
"visibility":"private"
332+
},
333+
"ConnectivityIntervalWhenLimit":{
334+
"value":30,
335+
"serial":0,
336+
"flags":["global"],
337+
"name":"ConnectivityIntervalWhenLimit",
338+
"name[zh_CN]":"网络不通的时候检测网络联通性的时间间隔(单位:秒)",
339+
"description[zh_CN]":"网络不通的时候检测网络联通性的时间间隔(单位:秒)",
340+
"description":"the span to check connectivity(unit:second) when limit",
341+
"permissions":"readwrite",
342+
"visibility":"private"
343+
}
311344
}
312345
}

debian/control

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ Build-Depends: debhelper-compat (= 12),
1717
libdtk6core-dev,
1818
libdtk6widget-dev,
1919
libgsettings-qt6-dev,
20-
libkf6networkmanagerqt-dev
20+
libkf6networkmanagerqt-dev,
21+
libcurl4-openssl-dev
2122
Rules-Requires-Root: no
2223
Standards-Version: 4.5.0
2324
Homepage: https://gerrit.uniontech.com/admin/repos/dde-network-core

network-service-plugin/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ set(CMAKE_PREFER_PTHREAD_FLAG ON)
2929
find_package(Qt${QT_NS} COMPONENTS Core Widgets DBus Network LinguistTools REQUIRED)
3030
find_package(KF${QT_NS}NetworkManagerQt REQUIRED)
3131
find_package(${DTK_NS} COMPONENTS Core REQUIRED)
32+
find_package(CURL REQUIRED)
3233

3334
pkg_check_modules(LibNM REQUIRED IMPORTED_TARGET libnm)
3435
pkg_check_modules(QGSettings REQUIRED gsettings-qt6)
@@ -44,6 +45,7 @@ target_include_directories(${BIN_NAME} PUBLIC
4445
KF${QT_NS}::NetworkManagerQt
4546
${DTK_NS}::Core
4647
${QGSettings_INCLUDE_DIRS}
48+
${CURL_INCLUDE_DIRS}
4749
src
4850
src/system
4951
src/session
@@ -61,6 +63,7 @@ target_link_libraries(${BIN_NAME} PRIVATE
6163
KF${QT_NS}::NetworkManagerQt
6264
${DTK_NS}::Core
6365
${QGSettings_LIBRARIES}
66+
${CURL_LIBRARIES}
6467
)
6568

6669
if (CMAKE_BUILD_TYPE STREQUAL "Debug")

0 commit comments

Comments
 (0)