-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGitRepository.h
95 lines (79 loc) · 2.21 KB
/
GitRepository.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
//---------------------------------------------------------------------------
#ifndef GitRepositoryH
#define GitRepositoryH
//---------------------------------------------------------------------------
#include <System.hpp>
#include <System.JSON.hpp>
//---------------------------------------------------------------------------
/**
* User.
*/
class TUser : public System::TObject
{
typedef System::TObject inherited;
public:
__fastcall TUser();
inline __fastcall virtual ~TUser() { }
String Login;
};
/**
* Repository.
*/
class TRepository : public System::TObject
{
typedef System::TObject inherited;
public:
__fastcall TRepository();
__fastcall virtual ~TRepository();
TUser* Owner;
String Name;
String FullName;
bool Private;
String Description;
bool Fork;
String CloneUrl;
String MirrorUrl;
int OpenIssueCount;
bool HasWiki;
bool HasIssues;
bool HasProjects;
bool HasDownloads;
String Homepage;
};
/**
* Issue.
*/
class TIssue : public System::TObject
{
typedef System::TObject inherited;
public:
__fastcall TIssue();
inline __fastcall virtual ~TIssue() { }
String Title;
String Body;
String State;
int Number;
};
/**
* Organization.
*/
class TOrganization : public System::TObject
{
typedef System::TObject inherited;
public:
__fastcall TOrganization();
inline __fastcall virtual ~TOrganization() { }
String Login;
String Description;
};
void __fastcall JsonToUser(const String AJson, TUser* AUser);
void __fastcall JsonToUser(TJSONObject* AJsonObject, TUser* AUser);
void __fastcall JsonToRepo(const String AJson, TRepository* ARepository);
void __fastcall JsonToRepo(TJSONObject* AJsonObject, TRepository* ARepository);
void __fastcall JsonToIssue(const String AJson, TIssue* AIssue);
void __fastcall JsonToIssue(TJSONObject* AJsonObject, TIssue* AIssue);
void __fastcall JsonToOrganization(const String AJson, TOrganization* AOrganization);
void __fastcall JsonToOrganization(TJSONObject* AJsonObject, TOrganization* AOrganization);
void __fastcall RepoToJson(const TRepository& ARepository, String& AJson);
//---------------------------------------------------------------------------
#endif