Index: chrome/common/extensions/api/dial.idl |
diff --git a/chrome/common/extensions/api/dial.idl b/chrome/common/extensions/api/dial.idl |
index d16fdfd6919ea8af27f36f817f86f8c4d509e738..1ae9ab60c3dab12410da937e31a404c98faa9392 100644 |
--- a/chrome/common/extensions/api/dial.idl |
+++ b/chrome/common/extensions/api/dial.idl |
@@ -34,15 +34,50 @@ namespace dial { |
DialErrorCode code; |
}; |
+ // The NetworkService interface is used to provide a set of connection |
+ // information for an HTTP service endpoint and if available, service events |
+ // running on a networked device. |
+ // |
+ // TODO(justinlin): Add event interfaces? |
+ dictionary NetworkService { |
+ // A unique identifier for the given user-selected service instance. |
+ DOMString id; |
+ |
+ // The name of the user-selected service. |
+ DOMString name; |
+ |
+ // The valid service type token value of the user-selected service |
+ // (i.e. upnp:..., zeroconf:..., dial:...). |
+ DOMString type; |
+ |
+ // The control URL endpoint (including any required port information) of the |
+ // user-selected control service that has been added to the entry script |
+ // origin's URL whitelist. |
mark a. foltz
2013/08/19 18:25:26
The URL whitelist comment doesn't make as much sen
|
+ DOMString url; |
+ |
+ // The configuration information associated with the service depending on |
+ // the requested service type. |
+ DOMString config; |
+ |
+ // Current date + deviice expiry in UTC time. |
+ long expiryTimestamp; |
+ |
+ // Whether the service is online. |
mark a. foltz
2013/08/19 18:25:26
I am not sure this is directly available from the
|
+ boolean online; |
+ }; |
+ |
callback BooleanCallback = void (boolean result); |
- interface Functions { |
+ callback GetNetworkServicesCallback = void (NetworkService[] deviceInfo); |
+ interface Functions { |
// Requests that DIAL discovery happen immediately. The request may not be |
// honored as discovery may already be happening in the background. The |
// callback is invoked with |true| if discovery was initiated or |false| |
// otherwise. |
static void discoverNow(BooleanCallback callback); |
+ |
+ static void getNetworkServices(GetNetworkServicesCallback callback); |
}; |
interface Events { |
@@ -60,5 +95,11 @@ namespace dial { |
// Event fired to inform clients on errors during device discovery. |
static void onError(DialError error); |
+ |
+ // TODO(justinlin): Merge these two events? |
+ // Event fired when a network service becomes newly available. |
+ static void onNetworkServiceAvailable(); |
+ // Event fired when a network service becomes newly unavailable. |
+ static void onNetworkServiceUnavailable(); |
}; |
}; |