From 035610c806a5ea06ab62ad89a496506be479d862 Mon Sep 17 00:00:00 2001 From: "zork@chromium.org" Date: Wed, 6 Aug 2014 17:30:03 +0000 Subject: Add pairing API protocol definition. BUG=None R=achuith@chromium.org Review URL: https://codereview.chromium.org/406033002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287796 0039d316-1c4b-4281-b951-d872f2087c98 --- components/pairing/BUILD.gn | 10 +++++ components/pairing/pairing_api.proto | 80 ++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 components/pairing/pairing_api.proto (limited to 'components/pairing') diff --git a/components/pairing/BUILD.gn b/components/pairing/BUILD.gn index 5022bc5..af7b979 100644 --- a/components/pairing/BUILD.gn +++ b/components/pairing/BUILD.gn @@ -2,6 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//third_party/protobuf/proto_library.gni") + source_set("pairing") { sources = [ "pairing/fake_controller_pairing_controller.cc", @@ -19,3 +21,11 @@ source_set("pairing") { "//device/bluetooth", ] } + +proto_library("proto") { + sources = [ + "pairing_api.proto", + ] + 'proto_in_dir' = 'pairing' + 'proto_out_dir' = 'components/pairing' +} diff --git a/components/pairing/pairing_api.proto b/components/pairing/pairing_api.proto new file mode 100644 index 0000000..98eab7a --- /dev/null +++ b/components/pairing/pairing_api.proto @@ -0,0 +1,80 @@ +// Copyright 2014 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. +// +// Protocol buffer definitions for Syncable FileSystem. + +syntax = "proto2"; + +option optimize_for = LITE_RUNTIME; + +package pairing_api; + +message HostStatusParameters { + enum Connectivity { + CONNECTIVITY_UNTESTED = 0; + CONNECTIVITY_NONE = 1; + CONNECTIVITY_LIMITED = 2; + CONNECTIVITY_CONNECTING = 3; + CONNECTIVITY_CONNECTED = 4; + } + + enum UpdateStatus { + UPDATE_STATUS_UNKNOWN = 0; + UPDATE_STATUS_UPDATING = 1; + UPDATE_STATUS_REBOOTING = 2; + UPDATE_STATUS_UPDATED = 3; + } + + optional string domain = 1; + optional Connectivity connectivity = 2; + optional UpdateStatus update_status = 3; + repeated string paired_controllers = 4; +} + +message HostStatus { + optional int32 api_version = 1; + optional HostStatusParameters parameters = 2; +} + +message ConfigureHostParameters { + optional bool accepted_eula = 1; + optional string lang = 2; + optional string timezone = 3; + optional bool send_reports = 4; + optional string keyboard_layout = 5; +} + +message ConfigureHost { + optional int32 api_version = 1; + optional ConfigureHostParameters parameters = 2; +} + +message PairDevicesParameters { + optional string controller_access_token = 1; + optional string admin_access_token = 2; +} + +message PairDevices { + optional int32 api_version = 1; + optional PairDevicesParameters parameters = 2; +} + +message CompleteSetupParameters { + optional bool add_another = 1; +} + +message CompleteSetup { + optional int32 api_version = 1; + optional CompleteSetupParameters parameters = 2; +} + +message ErrorParameters { + optional int32 code = 1; + optional string description = 2; +} + +message Error { + optional int32 api_version = 1; + optional ErrorParameters parameters = 2; +} -- cgit v1.1