OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 [ | 5 [ |
6 { | 6 { |
7 "namespace": "cloudPrintPrivate", | 7 "namespace": "cloudPrintPrivate", |
8 "nodoc": "true", | 8 "nodoc": "true", |
| 9 "types": [ |
| 10 { |
| 11 "id": "PrinterSettings", |
| 12 "type": "object", |
| 13 "description": "Settings per printer.", |
| 14 "properties": { |
| 15 "name": { |
| 16 "type": "string", |
| 17 "description": "Unique printer id." |
| 18 }, |
| 19 "connect": { |
| 20 "type": "boolean", |
| 21 "description": "Whether printer is selected." |
| 22 } |
| 23 } |
| 24 }, |
| 25 { |
| 26 "id": "UserSettings", |
| 27 "type": "object", |
| 28 "description": "Settings set by user.", |
| 29 "properties": { |
| 30 "printers": { |
| 31 "description": "Printer settings.", |
| 32 "type": "array", |
| 33 "items": { |
| 34 "$ref": "PrinterSettings" |
| 35 } |
| 36 }, |
| 37 "connectNewPrinters": { |
| 38 "type": "boolean", |
| 39 "description": "Whether should printer be connected." |
| 40 } |
| 41 } |
| 42 } |
| 43 ], |
9 "functions": [ | 44 "functions": [ |
10 { | 45 { |
11 "name": "setupConnector", | 46 "name": "setupConnector", |
12 "description": "Setup Cloud Print Connector.", | 47 "description": "Setup Cloud Print Connector.", |
13 "type": "function", | 48 "type": "function", |
14 "parameters": [ | 49 "parameters": [ |
15 { | 50 { |
16 "name": "userEmail", | 51 "name": "userEmail", |
17 "type": "string", | 52 "type": "string", |
18 "description": "The email address of the user." | 53 "description": "The email address of the user." |
19 }, | 54 }, |
20 { | 55 { |
21 "name": "robotEmail", | 56 "name": "robotEmail", |
22 "type": "string", | 57 "type": "string", |
23 "description": "The email address of the robot account." | 58 "description": "The email address of the robot account." |
24 }, | 59 }, |
25 { | 60 { |
26 "name": "credentials", | 61 "name": "credentials", |
27 "type": "string", | 62 "type": "string", |
28 "description": "The login credentials(OAuth2 Auth code)." | 63 "description": "The login credentials(OAuth2 Auth code)." |
29 }, | 64 }, |
30 { | 65 { |
31 "name": "connectNewPrinters", | 66 "name": "userSettings", |
32 "type": "boolean", | 67 "$ref": "UserSettings", |
33 "description": "True if new printers should be connected." | 68 "description": "Options configured by user." |
34 }, | |
35 { | |
36 "name": "printerBlacklist", | |
37 "description": "Printers that should not be connected.", | |
38 "type": "array", | |
39 "items": {"type": "string"} | |
40 } | 69 } |
41 ] | 70 ] |
42 }, | 71 }, |
43 { | 72 { |
44 "name": "getHostName", | 73 "name": "getHostName", |
45 "description": "Returns local hostname.", | 74 "description": "Returns local hostname.", |
46 "type": "function", | 75 "type": "function", |
47 "parameters": [ | 76 "parameters": [ |
48 { | 77 { |
49 "name": "callback", | 78 "name": "callback", |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 "type": "string", | 123 "type": "string", |
95 "description": "Client ID." | 124 "description": "Client ID." |
96 } | 125 } |
97 ] | 126 ] |
98 } | 127 } |
99 ] | 128 ] |
100 } | 129 } |
101 ] | 130 ] |
102 } | 131 } |
103 ] | 132 ] |
OLD | NEW |