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

Unified Diff: chrome/common/extensions/api/dial.idl

Issue 2583853004: [chrome.dial] Adds chrome.dial.fetchDeviceDecription API. (Closed)
Patch Set: Fix initialization Created 4 years 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
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..927663b8fd00a9bb0a10c5fbce861fd8ecd9faff 100644
--- a/chrome/common/extensions/api/dial.idl
+++ b/chrome/common/extensions/api/dial.idl
@@ -21,6 +21,21 @@ namespace dial {
long? configId;
};
+ // Represents a device description resource successfully fetched from a
+ // DIAL device.
+ dictionary DialDeviceDescription {
+
+ // The label of the device that the description was fetched for.
+ DOMString deviceLabel;
+
+ // The contents of the Application-URL header in the response.
+ DOMString appUrl;
+
+ // The content of the response body. This will be an XML document
+ // (hopefully) conforming to section 2.3 of the UPnP spec.
+ DOMString deviceDescription;
+ };
+
enum DialErrorCode {
no_listeners,
no_valid_network_interfaces,
@@ -35,6 +50,7 @@ namespace dial {
};
callback BooleanCallback = void (boolean result);
+ callback DeviceDescriptionCallback = void (DialDeviceDescription result);
interface Functions {
@@ -43,6 +59,16 @@ namespace dial {
// callback is invoked with |true| if discovery was initiated or |false|
// otherwise.
static void discoverNow(BooleanCallback callback);
+
+ // Fetches the device description for the DIAL device identified by
+ // |deviceLabel|. If successful, the callback is invoked with a
+ // DialDeviceDescription containing the content of the device description.
+ //
+ // If unsuccessful, callback is invoked with |null| and lastError is set
+ // to an error message. If the error occurred during the HTTP fetch itself,
+ // the message will begin "HTTP XXX:" where XXX is the HTTP result code.
imcheng 2016/12/28 05:36:45 ... begin with
mark a. foltz 2017/01/04 00:20:16 Done.
+ static void fetchDeviceDescription(DOMString deviceLabel,
+ DeviceDescriptionCallback callback);
};
interface Events {

Powered by Google App Engine
This is Rietveld 408576698