libqi-api  release-2.5.3-2016-11-18
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gateway.hpp
Go to the documentation of this file.
1 #pragma once
2 /*
3 ** Copyright (C) 2014 Aldebaran Robotics
4 ** See COPYING for the license
5 */
6 
7 #ifndef _QIMESSAGING_GATEWAY_HPP_
8 #define _QIMESSAGING_GATEWAY_HPP_
9 
10 #include <boost/shared_ptr.hpp>
11 
12 #include <qi/api.hpp>
13 #include <qi/property.hpp>
14 #include <qi/future.hpp>
15 #include <qi/url.hpp>
16 #include <qi/anyvalue.hpp>
17 #include <qi/signal.hpp>
18 
19 namespace qi
20 {
21 class AuthProviderFactory;
22 using AuthProviderFactoryPtr = boost::shared_ptr<AuthProviderFactory>;
23 class ClientAuthenticatorFactory;
24 using ClientAuthenticatorFactoryPtr = boost::shared_ptr<ClientAuthenticatorFactory>;
25 class GatewayPrivate;
26 using GatewayPrivatePtr = boost::shared_ptr<GatewayPrivate>;
27 
29 {
31 public:
36  Gateway(bool enforceAuth = false);
37  ~Gateway();
38 
40 
41  void setAuthProviderFactory(AuthProviderFactoryPtr provider);
42  void setLocalClientAuthProviderFactory(AuthProviderFactoryPtr provider);
43  void setClientAuthenticatorFactory(ClientAuthenticatorFactoryPtr authenticator);
44  UrlVector endpoints() const;
45  bool listen(const Url& url);
46  bool setIdentity(const std::string& key, const std::string& crt);
47  qi::Future<void> attachToServiceDirectory(const Url& serviceDirectoryUrl);
48  void close();
49 };
50 }
51 
52 #endif // _QIMESSAGING_GATEWAY_HPP_
#define QI_API
Definition: api.hpp:33
Property< bool > & connected
Definition: gateway.hpp:39
dll import/export and compiler message
boost::shared_ptr< AuthProviderFactory > AuthProviderFactoryPtr
boost::shared_ptr< ClientAuthenticatorFactory > ClientAuthenticatorFactoryPtr
std::vector< Url > UrlVector
Definition: url.hpp:135
Definition: url.hpp:35
boost::shared_ptr< GatewayPrivate > GatewayPrivatePtr
Definition: gateway.hpp:26