-
Notifications
You must be signed in to change notification settings - Fork 56
/
ref.h
60 lines (41 loc) · 1.17 KB
/
ref.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
#ifndef GITTEH_REF_H
#define GITTEH_REF_H
#include "gitteh.h"
#include "gitobjectwrap_new.h"
namespace gitteh {
class Repository;
struct ref_data;
class Reference : public WrappedGitObject<Reference, git_reference> {
public:
Reference(git_reference*);
static Persistent<FunctionTemplate> constructor_template;
static void Init(Handle<Object>);
void setOwner(void*);
void lock();
void unlock();
Repository *repository_;
git_reference *ref_;
bool deleted_;
protected:
static Handle<Value> New(const Arguments&);
static Handle<Value> Rename(const Arguments&);
static Handle<Value> Delete(const Arguments&);
static Handle<Value> Resolve(const Arguments&);
static Handle<Value> SetTarget(const Arguments&);
void processInitData();
int doInit();
git_ref_t type_;
private:
static void EIO_Rename(eio_req*);
static int EIO_AfterRename(eio_req*);
static void EIO_Delete(eio_req*);
static int EIO_AfterDelete(eio_req*);
static void EIO_Resolve(eio_req*);
static int EIO_AfterResolve(eio_req*);
static void EIO_SetTarget(eio_req*);
static int EIO_AfterSetTarget(eio_req*);
gitteh_lock lock_;
ref_data *initData_;
};
} // namespace gitteh
#endif //GITTEH_REF_H