forked from ciphrex/mSIGNA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdates.h
53 lines (43 loc) · 1.22 KB
/
updates.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
///////////////////////////////////////////////////////////////////
//
// mSIGNA
//
// updates.h
//
// Copyright (c) 2014 Eric Lombrozo
//
// All Rights Reserved.
#pragma once
#include <string>
#include <stdexcept>
#include <boost/asio/error.hpp>
class UrlParser
{
public:
UrlParser() { }
UrlParser(const std::string& url) { parse(url); }
void parse(const std::string& url);
const std::string& getService() const { return service; }
const std::string& getHost() const { return host; }
const std::string& getPath() const { return path; }
private:
std::string service;
std::string host;
std::string path;
};
class LatestVersionInfo
{
public:
void download(const std::string& url);
const std::string& getVersionString() const { return versionString; }
uint32_t getVersionInt() const { return versionInt; }
uint32_t getSchema() const { return schema; }
const std::string& getWin64Url() const { return win64Url; }
const std::string& getOsxUrl() const { return osxUrl; }
private:
std::string versionString;
uint32_t versionInt;
uint32_t schema;
std::string win64Url;
std::string osxUrl;
};