-
Notifications
You must be signed in to change notification settings - Fork 699
Expand file tree
/
Copy pathreference.h
More file actions
111 lines (88 loc) · 2.58 KB
/
reference.h
File metadata and controls
111 lines (88 loc) · 2.58 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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/**
* This code is auto-generated; unless you know what you're doing, do not modify!
**/
#ifndef GITREFERENCE_H
#define GITREFERENCE_H
#include <v8.h>
#include <node.h>
#include <string>
#include "nan.h"
#include "git2.h"
using namespace node;
using namespace v8;
class GitReference : public ObjectWrap {
public:
static Persistent<FunctionTemplate> constructor_template;
static void Initialize (Handle<v8::Object> target);
git_reference *GetValue();
static Handle<Value> New(void *raw);
private:
GitReference(git_reference *raw);
~GitReference();
static NAN_METHOD(New);
static NAN_METHOD(OidForName);
static void OidForNameWork(uv_work_t* req);
static void OidForNameAfterWork(uv_work_t* req);
struct OidForNameBaton {
uv_work_t request;
int error_code;
const git_error* error;
git_oid * out;
Persistent<Value> repoReference;
git_repository * repo;
Persistent<Value> nameReference;
const char * name;
Persistent<Function> callback;
};
static NAN_METHOD(Target);
static NAN_METHOD(SymbolicTarget);
static NAN_METHOD(Type);
static NAN_METHOD(Name);
static NAN_METHOD(Resolve);
static void ResolveWork(uv_work_t* req);
static void ResolveAfterWork(uv_work_t* req);
struct ResolveBaton {
uv_work_t request;
int error_code;
const git_error* error;
git_reference * out;
Persistent<Value> refReference;
const git_reference * ref;
Persistent<Function> callback;
};
static NAN_METHOD(SetSymbolicTarget);
static NAN_METHOD(setTarget);
static NAN_METHOD(Rename);
static void RenameWork(uv_work_t* req);
static void RenameAfterWork(uv_work_t* req);
struct RenameBaton {
uv_work_t request;
int error_code;
const git_error* error;
git_reference * out;
Persistent<Value> refReference;
git_reference * ref;
Persistent<Value> new_nameReference;
const char * new_name;
Persistent<Value> forceReference;
int force;
Persistent<Function> callback;
};
static NAN_METHOD(Delete);
static void DeleteWork(uv_work_t* req);
static void DeleteAfterWork(uv_work_t* req);
struct DeleteBaton {
uv_work_t request;
int error_code;
const git_error* error;
Persistent<Value> refReference;
git_reference * ref;
Persistent<Function> callback;
};
static NAN_METHOD(IsBranch);
static NAN_METHOD(IsRemote);
static NAN_METHOD(Peel);
static NAN_METHOD(IsValidName);
git_reference *raw;
};
#endif