-
Notifications
You must be signed in to change notification settings - Fork 699
Expand file tree
/
Copy pathobject.h
More file actions
60 lines (46 loc) · 1.16 KB
/
object.h
File metadata and controls
60 lines (46 loc) · 1.16 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
/**
* This code is auto-generated; unless you know what you're doing, do not modify!
**/
#ifndef GITOBJECT_H
#define GITOBJECT_H
#include <nan.h>
#include <string>
#include "git2.h"
using namespace node;
using namespace v8;
class GitObject : public ObjectWrap {
public:
static Persistent<Function> constructor_template;
static void Initialize (Handle<v8::Object> target);
git_object *GetValue();
static Handle<Value> New(void *raw);
private:
GitObject(git_object *raw);
~GitObject();
static NAN_METHOD(New);
static NAN_METHOD(Oid);
static NAN_METHOD(Type);
struct PeelBaton {
int error_code;
const git_error* error;
git_object * peeled;
const git_object * object;
git_otype target_type;
};
class PeelWorker : public NanAsyncWorker {
public:
PeelWorker(
PeelBaton *_baton,
NanCallback *callback
) : NanAsyncWorker(callback)
, baton(_baton) {};
~PeelWorker() {};
void Execute();
void HandleOKCallback();
private:
PeelBaton *baton;
};
static NAN_METHOD(Peel);
git_object *raw;
};
#endif