| // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| [ |
| { |
| "namespace": "cloudPrintPrivate", |
| "description": "none", |
| "types": [ |
| { |
| "id": "PrinterSettings", |
| "type": "object", |
| "description": "Settings per printer.", |
| "properties": { |
| "name": { |
| "type": "string", |
| "description": "Unique printer id." |
| }, |
| "connect": { |
| "type": "boolean", |
| "description": "Whether printer is selected." |
| } |
| } |
| }, |
| { |
| "id": "UserSettings", |
| "type": "object", |
| "description": "Settings set by user.", |
| "properties": { |
| "printers": { |
| "description": "Printer settings.", |
| "type": "array", |
| "items": { |
| "$ref": "PrinterSettings" |
| } |
| }, |
| "connectNewPrinters": { |
| "type": "boolean", |
| "description": "Whether should printer be connected." |
| } |
| } |
| } |
| ], |
| "functions": [ |
| { |
| "name": "setupConnector", |
| "description": "Setup Cloud Print Connector.", |
| "type": "function", |
| "parameters": [ |
| { |
| "name": "userEmail", |
| "type": "string", |
| "description": "The email address of the user." |
| }, |
| { |
| "name": "robotEmail", |
| "type": "string", |
| "description": "The email address of the robot account." |
| }, |
| { |
| "name": "credentials", |
| "type": "string", |
| "description": "The login credentials(OAuth2 Auth code)." |
| }, |
| { |
| "name": "userSettings", |
| "$ref": "UserSettings", |
| "description": "Options configured by user." |
| } |
| ] |
| }, |
| { |
| "name": "getHostName", |
| "description": "Returns local hostname.", |
| "type": "function", |
| "parameters": [ |
| { |
| "name": "callback", |
| "type": "function", |
| "description": "Called to return host name.", |
| "parameters": [ |
| { |
| "name": "result", |
| "type": "string", |
| "description": "Host name." |
| } |
| ] |
| } |
| ] |
| }, |
| { |
| "name": "getPrinters", |
| "description": "Returns local printers.", |
| "type": "function", |
| "parameters": [ |
| { |
| "name": "callback", |
| "type": "function", |
| "description": "Called to return printers.", |
| "parameters": [ |
| { |
| "name": "result", |
| "type": "array", |
| "items": {"type": "string"}, |
| "description": "List of printer names." |
| } |
| ] |
| } |
| ] |
| }, |
| { |
| "name": "getClientId", |
| "description": "Gets the Client ID used to access Google service APIs.", |
| "type": "function", |
| "parameters": [ |
| { |
| "name": "callback", |
| "type": "function", |
| "description": "Called to return the client ID.", |
| "parameters": [ |
| { |
| "name": "result", |
| "type": "string", |
| "description": "Client ID." |
| } |
| ] |
| } |
| ] |
| } |
| ] |
| } |
| ] |