AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
PairingAgent.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ALEXA_CLIENT_SDK_BLUETOOTHIMPLEMENTATIONS_BLUEZ_INCLUDE_BLUEZ_PAIRINGAGENT_H_
17 #define ALEXA_CLIENT_SDK_BLUETOOTHIMPLEMENTATIONS_BLUEZ_INCLUDE_BLUEZ_PAIRINGAGENT_H_
18 
19 #include <memory>
20 
21 #include <gio/gio.h>
22 
23 #include "BlueZ/DBusObject.h"
24 #include "BlueZ/DBusProxy.h"
25 
26 namespace alexaClientSDK {
27 namespace bluetoothImplementations {
28 namespace blueZ {
29 
34 class PairingAgent : public DBusObject<PairingAgent> {
35 public:
37  virtual ~PairingAgent();
38 
45  static std::unique_ptr<PairingAgent> create(std::shared_ptr<DBusConnection> connection);
46 
47 private:
49  PairingAgent(std::shared_ptr<DBusConnection> connection);
50 
56  bool init();
57 
63  bool registerAgent();
64 
70  bool unregisterAgent();
71 
78  bool requestDefaultAgent();
79 
85  void release(GVariant* arguments, GDBusMethodInvocation* invocation);
88  void requestPinCode(GVariant* arguments, GDBusMethodInvocation* invocation);
89  void displayPinCode(GVariant* arguments, GDBusMethodInvocation* invocation);
90  void requestPasskey(GVariant* arguments, GDBusMethodInvocation* invocation);
91  void displayPasskey(GVariant* arguments, GDBusMethodInvocation* invocation);
92  void requestConfirmation(GVariant* arguments, GDBusMethodInvocation* invocation);
93  void requestAuthorization(GVariant* arguments, GDBusMethodInvocation* invocation);
94  void authorizeService(GVariant* arguments, GDBusMethodInvocation* invocation);
95  void cancel(GVariant* arguments, GDBusMethodInvocation* invocation);
97 
99  std::shared_ptr<DBusProxy> m_agentManager;
100 };
101 
102 } // namespace blueZ
103 } // namespace bluetoothImplementations
104 } // namespace alexaClientSDK
105 
106 #endif // ALEXA_CLIENT_SDK_BLUETOOTHIMPLEMENTATIONS_BLUEZ_INCLUDE_BLUEZ_PAIRINGAGENT_H_
static std::unique_ptr< PairingAgent > create(std::shared_ptr< DBusConnection > connection)
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0