Cogs.Core
Extensions
TerrainProvider
Source
HTTPRasterSource.h
1
#pragma once
2
#include "BaseRasterSource.h"
3
4
#include "Desktop/HTTP/HTTPDataFetcher.h"
5
6
namespace
Cogs::Core::TerrainProvider
7
{
8
9
struct
HTTPConfig
:
BaseConfig
10
{
11
virtual
~HTTPConfig
() =
default
;
12
StringRef
baseUrl = NoString;
13
StringRef
username = NoString;
14
StringRef
password = NoString;
15
};
16
17
class
HTTPRasterSource
:
public
BaseRasterSource
18
{
19
public
:
20
HTTPRasterSource
(
Context
* context);
21
bool
init(
const
HTTPConfig
& conf, std::unique_ptr<ICache>&& icache);
22
void
getConfig(
HTTPConfig
& conf)
const
;
23
24
protected
:
25
StringRef
baseUrl = NoString;
26
StringRef
username = NoString;
27
StringRef
password = NoString;
28
29
Cogs::Desktop::HTTPDataFetcher httpDataFetcher;
30
31
void
requestTile(
Request
* req)
final
;
32
virtual
bool
createFetchTileUrl(std::string& url,
TileId
id
) = 0;
33
};
34
35
}
Cogs::Core::Context
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition:
Context.h:83
Cogs::Core::TerrainProvider::BaseRasterSource
Definition:
BaseRasterSource.h:94
Cogs::Core::TerrainProvider::HTTPRasterSource
Definition:
HTTPRasterSource.h:18
Cogs::Core::StringRef
Definition:
Strings.h:8
Cogs::Core::TerrainProvider::BaseConfig
Definition:
BaseRasterSource.h:46
Cogs::Core::TerrainProvider::HTTPConfig
Definition:
HTTPRasterSource.h:10
Cogs::Core::TerrainProvider::Request
Definition:
BaseRasterSource.h:72
Cogs::Core::TerrainProvider::TileId
Definition:
BaseRasterSource.h:63
Generated by
1.9.6