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

Side by Side Diff: chrome/common/extensions/api/gcd_private.idl

Issue 1106183006: Added gcdPrivate.getDeviceInfo function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no_establish
Patch Set: Created 5 years, 7 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Use the <code>chrome.gcdPrivate</code> API to discover GCD APIs and register 5 // Use the <code>chrome.gcdPrivate</code> API to discover GCD APIs and register
6 // them. 6 // them.
7 namespace gcdPrivate { 7 namespace gcdPrivate {
8 8
9 enum SetupType { mdns, wifi, cloud }; 9 enum SetupType { mdns, wifi, cloud };
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 callback CommandCallback = void(object command); 79 callback CommandCallback = void(object command);
80 80
81 // |commands| : Array of commands described at 81 // |commands| : Array of commands described at
82 // https://developers.google.com/cloud-devices/v1/reference/commands 82 // https://developers.google.com/cloud-devices/v1/reference/commands
83 // TODO(vitalybuka): consider to describe object in IDL. 83 // TODO(vitalybuka): consider to describe object in IDL.
84 callback CommandListCallback = void(object[] commands); 84 callback CommandListCallback = void(object[] commands);
85 85
86 // Generic callback for session calls, with status only. 86 // Generic callback for session calls, with status only.
87 callback SessionCallback = void(Status status); 87 callback SessionCallback = void(Status status);
88 88
89 // Called when the device info is availible or on error.
mednik 2015/04/28 00:35:40 Typo: available
Vitaly Buka (NO REVIEWS) 2015/04/28 01:13:21 Done.
90 // |status| : The status of operation (success or type of error).
91 // |deviceInfo| : Content of /privet/info response.
mednik 2015/04/28 00:35:40 Do you need to include the pairingTypes in here? O
Vitaly Buka (NO REVIEWS) 2015/04/28 00:37:52 it's inside of deviceInfo
92 // https://developers.google.com/cloud-devices/v1/reference/local-api/info
93 callback GetDeviceInfoCallback = void(Status status,
94 object deviceInfo);
95
89 // Called when device starts to establish a secure session. 96 // Called when device starts to establish a secure session.
90 // If |status| is |success| app should call |startPairing|. 97 // If |status| is |success| app should call |startPairing|.
91 // |sessionId| : The session ID (identifies the session for future calls). 98 // |sessionId| : The session ID (identifies the session for future calls).
92 // |status| : The status of operation (success or type of error). 99 // |status| : The status of operation (success or type of error).
93 // |pairingTypes| is the list of supported pairing types. 100 // |pairingTypes| is the list of supported pairing types.
94 callback CreateSessionCallback = void(long sessionId, 101 callback CreateSessionCallback = void(long sessionId,
95 Status status, 102 Status status,
96 PairingType[] pairingTypes); 103 PairingType[] pairingTypes);
mednik 2015/04/28 00:35:40 Didn't you say you were going to remove the pairin
Vitaly Buka (NO REVIEWS) 2015/04/28 00:37:52 yes, in different CL when you update the app code.
97 104
98 // Called when the response to the message sent is available or on error. 105 // Called when the response to the message sent is available or on error.
99 // |status| : The status of operation (success or type of error). 106 // |status| : The status of operation (success or type of error).
100 // |response| : The response object with result or error description. May be 107 // |response| : The response object with result or error description. May be
101 // empty for some errors. 108 // empty for some errors.
102 callback SendMessageCallback = void(Status status, object response); 109 callback SendMessageCallback = void(Status status, object response);
103 110
104 // Called as a response to |prefetchWifiPassword| 111 // Called as a response to |prefetchWifiPassword|
105 // |success| : Denotes whether the password fetch has succeeded or failed. 112 // |success| : Denotes whether the password fetch has succeeded or failed.
106 callback SuccessCallback = void(boolean success); 113 callback SuccessCallback = void(boolean success);
(...skipping 15 matching lines...) Expand all
122 // Cache the WiFi password in the browser process for use during 129 // Cache the WiFi password in the browser process for use during
123 // provisioning. This is done to allow the gathering of the wifi password to 130 // provisioning. This is done to allow the gathering of the wifi password to
124 // not be done while connected to the device's network. Callback is called 131 // not be done while connected to the device's network. Callback is called
125 // with true if wifi password was cached and false if it was unavailable. 132 // with true if wifi password was cached and false if it was unavailable.
126 // |ssid| : The network to prefetch password for. 133 // |ssid| : The network to prefetch password for.
127 static void prefetchWifiPassword(DOMString ssid, SuccessCallback callback); 134 static void prefetchWifiPassword(DOMString ssid, SuccessCallback callback);
128 135
129 // Get the list of SSIDs with prefetched callbacks. 136 // Get the list of SSIDs with prefetched callbacks.
130 static void getPrefetchedWifiNameList(SSIDListCallback callback); 137 static void getPrefetchedWifiNameList(SSIDListCallback callback);
131 138
139 // Returns local device information.
140 // |serviceName| : The mDns service name of the device.
141 static void getDeviceInfo(DOMString serviceName,
142 GetDeviceInfoCallback callback);
143
132 // Create new pairing. 144 // Create new pairing.
133 // |serviceName| : The mDns service name of the device. 145 // |serviceName| : The mDns service name of the device.
134 static void createSession(DOMString serviceName, 146 static void createSession(DOMString serviceName,
135 CreateSessionCallback callback); 147 CreateSessionCallback callback);
136 148
137 // Start pairing with selected method. Should be called after 149 // Start pairing with selected method. Should be called after
138 // |establishSession|. 150 // |establishSession|.
139 // |sessionId| : The ID of the session created with |establishSession|. 151 // |sessionId| : The ID of the session created with |establishSession|.
140 // |pairingType| : The value selected from the list provided in 152 // |pairingType| : The value selected from the list provided in
141 // callback of |establishSession|. 153 // callback of |establishSession|.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 // Subscribe to this event to start listening new or updated devices. New 226 // Subscribe to this event to start listening new or updated devices. New
215 // listeners will get called with all known devices on the network, and 227 // listeners will get called with all known devices on the network, and
216 // status updates for devices available through the cloud. 228 // status updates for devices available through the cloud.
217 static void onDeviceStateChanged(GCDDevice device); 229 static void onDeviceStateChanged(GCDDevice device);
218 230
219 // Notifies that device has disappeared. 231 // Notifies that device has disappeared.
220 // |deviceId| : The device has disappeared. 232 // |deviceId| : The device has disappeared.
221 static void onDeviceRemoved(DOMString deviceId); 233 static void onDeviceRemoved(DOMString deviceId);
222 }; 234 };
223 }; 235 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698