BlackBerry Dynamics
Runtime library for iOS applications
15.3.8766.41
BlackBerry Developers
Toggle main menu visibility
Loading...
Searching...
No Matches
GDSafeUrl.h
Go to the documentation of this file.
1
//
2
// Copyright (c) 2019 Blackberry Inc. All rights reserved.
3
//
4
5
#pragma once
6
7
#ifdef __cplusplus
8
#include <memory>
9
10
11
#ifndef GD_C_API
12
# if !defined(_WIN32)
13
# define GD_C_API __attribute__((visibility("default")))
14
# else
15
# define GD_C_API
16
# endif
17
#endif
18
19
namespace
GD
{
20
class
SafeUrl
21
45
{
46
public
:
47
53
enum class
UrlCheckResult
{
56
UNKNOWN = 0,
59
SAFE = 1,
62
UNSAFE = 20
63
};
64
65
70
enum class
UrlCheckError
{
73
NONE = 0,
76
NETWORK = 1,
79
GENERAL = 2
80
};
81
87
88
class
SafeUrlResultItem
{
89
90
public
:
91
92
SafeUrlResultItem
(
const
UrlCheckResult
&
result
,
const
UrlCheckError
&
error
,
const
long
long
reference
);
93
94
public
:
95
UrlCheckResult
result
;
96
UrlCheckError
error
;
97
long
long
reference
;
98
};
99
105
106
class
SafeUrlCallback
{
107
108
public
:
109
virtual
void
completed
(
const
SafeUrlResultItem
& resultItem ) = 0;
110
virtual
~SafeUrlCallback
() =
default
;
111
};
112
113
128
GD_C_API
void
checkUrl
(
const
std::string &url,
const
std::weak_ptr<SafeUrlCallback> callback,
129
const
long
long
reference = 0,
const
bool
suppressUserPrompt =
false
)
const
;
130
131
132
140
GD_C_API
bool
isSafeBrowsingEnabled
();
141
};
142
143
};
144
#endif
GD::SafeUrl::SafeUrlCallback
Callback object returned from SafeURL.
Definition
GDSafeUrl.h:106
GD::SafeUrl::SafeUrlCallback::completed
virtual void completed(const SafeUrlResultItem &resultItem)=0
GD::SafeUrl::SafeUrlCallback::~SafeUrlCallback
virtual ~SafeUrlCallback()=default
GD::SafeUrl::SafeUrlResultItem
Item within the SafeURL callback.
Definition
GDSafeUrl.h:88
GD::SafeUrl::SafeUrlResultItem::result
UrlCheckResult result
Definition
GDSafeUrl.h:95
GD::SafeUrl::SafeUrlResultItem::error
UrlCheckError error
Definition
GDSafeUrl.h:96
GD::SafeUrl::SafeUrlResultItem::reference
long long reference
Definition
GDSafeUrl.h:97
GD::SafeUrl::SafeUrlResultItem::SafeUrlResultItem
SafeUrlResultItem(const UrlCheckResult &result, const UrlCheckError &error, const long long reference)
GD::SafeUrl
Check that URLs are safe using BlackBerry Protect (C++).
Definition
GDSafeUrl.h:45
GD::SafeUrl::checkUrl
void checkUrl(const std::string &url, const std::weak_ptr< SafeUrlCallback > callback, const long long reference=0, const bool suppressUserPrompt=false) const
This function checks whether or not the url is safe to make an http request.
GD::SafeUrl::isSafeBrowsingEnabled
bool isSafeBrowsingEnabled()
Determine if Safe Browsing is enabled.
GD::SafeUrl::UrlCheckError
UrlCheckError
Error codes from testing if a URL is safe.
Definition
GDSafeUrl.h:70
GD::SafeUrl::UrlCheckResult
UrlCheckResult
Result codes from testing if a URL is safe.
Definition
GDSafeUrl.h:53
GD
Definition
GDKerberosAuthHandler.h:17
build
GD.framework
Headers
GDSafeUrl.h
Generated
with v1.18.0
doxygen
. Version 15.3.8766.41. ©
BlackBerry Limited. All rights reserved.