libqi-api  2.8.7.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gateway.hpp
Go to the documentation of this file.
1 /*
2 ** Copyright (C) 2018 Aldebaran Robotics
3 ** See COPYING for the license
4 */
5 
6 #ifndef QIMESSAGING_GATEWAY_HPP
7 #define QIMESSAGING_GATEWAY_HPP
8 
9 #pragma once
10 
12 
13 namespace qi
14 {
15 
17 {
18 private:
19  ServiceDirectoryProxy _proxy; // must be declared before any other member
20 
21 public:
26 
31  Gateway(bool enforceAuth = true);
32 
33  ~Gateway();
34 
35  QI_API_DEPRECATED_MSG("Use `status` instead.")
36  Property<bool>& connected;
37 
38  Property<Status>& status;
39 
40  UrlVector endpoints() const;
41 
42  QI_API_DEPRECATED_MSG("Use listenAsync() instead.")
43  bool listen(const Url& url);
44 
45  Future<ListenStatus> listenAsync(const Url& url);
46 
47  QI_API_DEPRECATED_MSG("Use setValidateIdentity() instead.")
48  bool setIdentity(const std::string& key, const std::string& crt);
49 
50  Future<IdValidationStatus> setValidateIdentity(const std::string& key, const std::string& crt);
51 
52  void setAuthProviderFactory(AuthProviderFactoryPtr provider);
53 
54  qi::Future<void> attachToServiceDirectory(const Url& serviceDirectoryUrl);
55 
56  void close();
57 };
58 }
59 
60 #endif // QIMESSAGING_GATEWAY_HPP
#define QI_API
Definition: api.hpp:33
boost::shared_ptr< AuthProviderFactory > AuthProviderFactoryPtr
#define QI_API_DEPRECATED_MSG(msg__)
Compiler flags to mark a function as deprecated. It will generate a compiler warning.
Definition: macro.hpp:55
std::vector< Url > UrlVector
Definition: url.hpp:155
Definition: url.hpp:35