Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: include/service.h

Issue 5167004: Enhance portal check code to return connectivity_state (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/flimflam.git@master
Patch Set: Maintain a little backward compatibility Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « doc/service-api.txt ('k') | plugins/portal_check.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/service.h
diff --git a/include/service.h b/include/service.h
index 06ec3b02ab89db7940299a0f75dd6944e6d9822d..2fcc9bc4257b34383cb6d194bee94acd451d2ef7 100644
--- a/include/service.h
+++ b/include/service.h
@@ -78,6 +78,31 @@ enum connman_service_state {
CONNMAN_SERVICE_STATE_MAX
};
+enum connman_service_connectivity_state {
+
+ /*
+ * The connectivity state is unknown. This state is set for a
+ * ready service that is not the default service. It is also
+ * the state from after the service becomes ready until a
+ * more exact state can be established.
+ */
+ CONNMAN_SERVICE_CONNECTIVITY_STATE_UNKNOWN = 0,
+
+ /* No known issues making DNS and HTTP requests */
+ CONNMAN_SERVICE_CONNECTIVITY_STATE_UNRESTRICTED = 1,
+
+ /* Can only access a captive portal website */
+ CONNMAN_SERVICE_CONNECTIVITY_STATE_RESTRICTED = 2,
+
+ /*
+ * Inside a captive portal with an IP address assigned but DNS
+ * and HTTP requests fail.
+ */
+ CONNMAN_SERVICE_CONNECTIVITY_STATE_NONE = 3,
+
+ CONNMAN_SERVICE_CONNECTIVITY_STATE_MAX
+};
+
enum connman_service_error {
CONNMAN_SERVICE_ERROR_UNKNOWN = 0,
CONNMAN_SERVICE_ERROR_OUT_OF_RANGE = 1,
@@ -113,8 +138,9 @@ connman_bool_t connman_service_get_favorite(const struct connman_service *
service);
int connman_service_set_favorite(struct connman_service *service,
connman_bool_t favorite);
-void connman_service_set_restricted_pool(struct connman_service *service,
- connman_bool_t restricted);
+
+void connman_service_set_connectivity_state(struct connman_service *service,
+ enum connman_service_connectivity_state connectivity);
struct connman_device;
struct connman_device *connman_service_get_device(struct connman_service
« no previous file with comments | « doc/service-api.txt ('k') | plugins/portal_check.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698