Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
platform
Web
PlatformUserAgentWebRequestFactory.h
1
// Copyright (c) 2014 eeGeo. All rights reserved.
2
3
#pragma once
4
5
#include "IWebLoadRequestFactory.h"
6
#include "IWebLoadRequest.h"
7
#include "WebLoadRequestCompletionCallback.h"
8
9
namespace
Eegeo
10
{
11
namespace
Web
12
{
13
class
PlatformUserAgentWebRequestFactory
:
public
IWebLoadRequestFactory
,
private
NonCopyable
14
{
15
public
:
16
PlatformUserAgentWebRequestFactory
(
IWebLoadRequestFactory
& decoratedFactory,
const
std::string& userAgent)
17
: m_factory(decoratedFactory)
18
, m_userAgent(userAgent)
19
{
20
21
}
22
23
~
PlatformUserAgentWebRequestFactory
()
24
{
25
26
}
27
28
WebRequestBuilder
Begin(
const
Eegeo::Web::HttpVerbs::Values httpVerb,
29
const
std::string& url,
30
IWebLoadRequestCompletionCallback
& callback)
31
{
32
return
m_factory.Begin(httpVerb, url, callback).SetUserAgent(m_userAgent).SetShouldCacheResponse(
true
);
33
}
34
35
private
:
36
IWebLoadRequestFactory
& m_factory;
37
const
std::string m_userAgent;
38
};
39
}
40
}
41
Generated on Sat Jun 10 2023 02:00:35 for eeGeo Platform SDK by
1.8.3.1