You.i Engine
YiDeepLinkBridge.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2020. All rights reserved.
2 #ifndef _YI_DEEP_LINK_BRIDGE_H_
3 #define _YI_DEEP_LINK_BRIDGE_H_
4 
5 #include "network/YiUrl.h"
6 #include "signal/YiSignal.h"
8 
18 {
19 public:
20  typedef std::function<void(bool, const CYIUrl &)> OpenUrlCallback;
21 
22  virtual ~CYIDeepLinkBridge() {}
23 
29  void SetFirstLaunchUrl(const CYIUrl &url);
30 
34  const CYIUrl &GetFirstLaunchUrl() const;
35 
39  virtual bool CanOpenUrl(const CYIUrl &url) const = 0;
40 
47  void OpenUrl(const CYIUrl &url);
48 
56  void OpenUrl(const CYIUrl &url, OpenUrlCallback callback);
57 
70 
71 protected:
72  virtual void OpenUrlImpl(const CYIUrl &url, OpenUrlCallback callback) = 0;
73 
74 private:
75  CYIUrl m_firstLaunchUrl;
76 };
77 
82 #endif // _YI_DEEP_LINK_BRIDGE_H_
void SetFirstLaunchUrl(const CYIUrl &url)
const CYIUrl & GetFirstLaunchUrl() const
virtual bool CanOpenUrl(const CYIUrl &url) const =0
CYISignal< const CYIUrl & > IncomingUrlReceived
Definition: YiDeepLinkBridge.h:61
A class used to encapsulate an URL.
Definition: YiUrl.h:24
Definition: YiSignalHandler.h:175
CYISignal< const CYIUrl & > OutgoingOpenUrlSucceeded
Definition: YiDeepLinkBridge.h:65
Class for accessing deep link urls which launched the app, and for launching other apps using urls...
Definition: YiDeepLinkBridge.h:17
std::function< void(bool, const CYIUrl &)> OpenUrlCallback
Definition: YiDeepLinkBridge.h:20
CYISignal< const CYIUrl & > OutgoingOpenUrlFailed
Definition: YiDeepLinkBridge.h:69
virtual void OpenUrlImpl(const CYIUrl &url, OpenUrlCallback callback)=0
void OpenUrl(const CYIUrl &url)
virtual ~CYIDeepLinkBridge()
Definition: YiDeepLinkBridge.h:22