forked from CobaltFusion/DebugViewPP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSourceType.h
More file actions
54 lines (41 loc) · 1.29 KB
/
Copy pathSourceType.h
File metadata and controls
54 lines (41 loc) · 1.29 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
// (C) Copyright Gert-Jan de Vos and Jan Wilmans 2013.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#pragma once
#include <string>
namespace fusion {
namespace debugviewpp {
class LogSource;
#define SOURCE_TYPES() \
SOURCE_TYPE(System, 0, "System") \
SOURCE_TYPE(Pipe, 1, "Pipe") \
SOURCE_TYPE(File, 2, "File") \
SOURCE_TYPE(Udp, 3, "UDP Socket") \
SOURCE_TYPE(Tcp, 4, "TCP Socket") \
SOURCE_TYPE(DebugViewAgent, 5, "DbgView Agent")
struct SourceType
{
#define SOURCE_TYPE(en, id, name) en,
enum type
{
SOURCE_TYPES()
};
#undef SOURCE_TYPE
};
struct SourceInfo
{
SourceInfo(const std::wstring& description, SourceType::type sourceType);
SourceInfo(const std::wstring& description, SourceType::type sourceType, const std::wstring& address, int port);
bool enabled;
std::wstring description;
SourceType::type type;
std::wstring address;
int port;
};
int SourceTypeToInt(SourceType::type value);
SourceType::type IntToSourceType(int value);
std::string SourceTypeToString(SourceType::type value);
SourceType::type StringToSourceType(const std::string& s);
} // namespace debugviewpp
} // namespace fusion