Home | History | Annotate | Download | only in api
      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
      3 // found in the LICENSE file.
      4 
      5 [
      6   {
      7     "namespace": "cloudPrintPrivate",
      8     "description": "none",
      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     ],
     44     "functions": [
     45       {
     46         "name": "setupConnector",
     47         "description": "Setup Cloud Print Connector.",
     48         "type": "function",
     49         "parameters": [
     50           {
     51             "name": "userEmail",
     52             "type": "string",
     53             "description": "The email address of the user."
     54           },
     55           {
     56             "name": "robotEmail",
     57             "type": "string",
     58             "description": "The email address of the robot account."
     59           },
     60           {
     61             "name": "credentials",
     62             "type": "string",
     63             "description": "The login credentials(OAuth2 Auth code)."
     64           },
     65           {
     66             "name": "userSettings",
     67             "$ref": "UserSettings",
     68             "description": "Options configured by user."
     69           }
     70         ]
     71       },
     72       {
     73         "name": "getHostName",
     74         "description": "Returns local hostname.",
     75         "type": "function",
     76         "parameters": [
     77           {
     78             "name": "callback",
     79             "type": "function",
     80             "description": "Called to return host name.",
     81             "parameters": [
     82               {
     83                 "name": "result",
     84                 "type": "string",
     85                 "description": "Host name."
     86               }
     87             ]
     88           }
     89         ]
     90       },
     91       {
     92         "name": "getPrinters",
     93         "description": "Returns local printers.",
     94         "type": "function",
     95         "parameters": [
     96           {
     97             "name": "callback",
     98             "type": "function",
     99             "description": "Called to return printers.",
    100             "parameters": [
    101               {
    102                 "name": "result",
    103                 "type": "array",
    104                 "items": {"type": "string"},
    105                 "description": "List of printer names."
    106               }
    107             ]
    108           }
    109         ]
    110       },
    111       {
    112         "name": "getClientId",
    113         "description": "Gets the Client ID used to access Google service APIs.",
    114         "type": "function",
    115         "parameters": [
    116           {
    117             "name": "callback",
    118             "type": "function",
    119             "description": "Called to return the client ID.",
    120             "parameters": [
    121               {
    122                 "name": "result",
    123                 "type": "string",
    124                 "description": "Client ID."
    125               }
    126             ]
    127           }
    128         ]
    129       }
    130     ]
    131   }
    132 ]
    133