-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUtilities.h
More file actions
executable file
·58 lines (50 loc) · 1.72 KB
/
Utilities.h
File metadata and controls
executable file
·58 lines (50 loc) · 1.72 KB
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
53
54
55
56
57
//
// * *
// __ *
// ,db' * *
// ,d8/ * * *
// 888
// `db\ * *
// `o`_ **
// * / )
// * /\__/\ * ( ( *
// ,-.,-.,) (.,-.,-.,-.) ).,-.,-.
// | @| ={ }= | @| / / | @|o |
// _j__j__j_) `-------/ /__j__j__j_
// ________( /___________
// | | @| \ || o|O | @|
// |o | |,'\ , ,'"| | | | hjw
// vV\|/vV|`-'\ ,---\ | \Vv\hjwVv\//v
// _) ) `. \ /
// (__/ ) )
//
// Utilities.h
// Neko SDK
//
// Copyright © 2019 Neko Vision. All rights reserved.
//
#pragma once
#include "Engine/Containers/HashMap.h"
#include "Engine/Utilities/NekoString.h"
#include "Engine/Network/Http/Request.h"
namespace Neko::Net::Http { class Response; }
namespace Neko::Skylar
{
using namespace Neko::Net;
// binary
static const char* DefaultMimeType = "application/octet-stream";
/**
* Gets a mime type (e.g. image/jpeg) from file name.
*
* @param fileName File name with extension.
* @param mimes Supported mime types.
*/
String GetMimeByFileName(const String& fileName, const THashMap<uint32, String>& mimes);
/**
* Parser url with a query to hashmap (e.g. /get?fileId=14&access=read..).
*
* @param incomingData Query parameters will be saved in that map.
* @param uri Url to parse.
*/
void GetIncomingQueryVars(THashMap<uint32, String>& incomingData, const String& uri, IAllocator& allocator);
}