|
1 | 1 | /** |
2 | | - * Copyright (c) 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com> |
3 | | - * @author Michael Robinson @codeofinterest <mike@pagesofinterest.net> |
4 | | - * |
5 | | - * Dual licensed under the MIT and GPL licenses. |
6 | | - */ |
| 2 | + * This code is auto-generated; unless you know what you're doing, do not modify! |
| 3 | + **/ |
7 | 4 |
|
8 | 5 | #ifndef INDEX_H |
9 | 6 | #define INDEX_H |
10 | 7 |
|
| 8 | +#include <v8.h> |
11 | 9 | #include <node.h> |
| 10 | +#include <string> |
12 | 11 |
|
13 | 12 | #include "git2.h" |
14 | 13 |
|
15 | 14 | using namespace node; |
| 15 | +using namespace v8; |
16 | 16 |
|
17 | | -/** |
18 | | - * Class: GitIndex |
19 | | - * Wrapper for libgit2 git_error. |
20 | | - */ |
21 | | -class GitIndex : public ObjectWrap { |
| 17 | +class Index : public ObjectWrap { |
22 | 18 | public: |
23 | | - /** |
24 | | - * Variable: constructor_template |
25 | | - * Used to create Node.js constructor. |
26 | | - */ |
27 | | - static v8::Persistent<v8::FunctionTemplate> constructor_template; |
28 | | - /** |
29 | | - * Function: Initialize |
30 | | - * Used to intialize the EventEmitter from Node.js |
31 | | - * |
32 | | - * Parameters: |
33 | | - * target - v8::Object the Node.js global module object |
34 | | - */ |
35 | | - static void Initialize(v8::Handle<v8::Object> target); |
36 | | - |
37 | | - protected: |
38 | | - /** |
39 | | - * Constructor: GitIndex |
40 | | - */ |
41 | | - GitIndex() {}; |
42 | | - /** |
43 | | - * Deconstructor: GitIndex |
44 | | - */ |
45 | | - ~GitIndex() {}; |
46 | | - /** |
47 | | - * Function: New |
48 | | - * |
49 | | - * Parameters: |
50 | | - * args v8::Arguments function call |
51 | | - * |
52 | | - * Returns: |
53 | | - * v8::Object args.This() |
54 | | - */ |
55 | | - static v8::Handle<v8::Value> New(const v8::Arguments& args); |
| 19 | + |
| 20 | + static Persistent<Function> constructor_template; |
| 21 | + static void Initialize (Handle<v8::Object> target); |
| 22 | + |
| 23 | + git_index *GetValue(); |
| 24 | + |
| 25 | + private: |
| 26 | + Index(git_index *raw); |
| 27 | + ~Index(); |
| 28 | + |
| 29 | + static Handle<Value> New(const Arguments& args); |
| 30 | + |
| 31 | + |
| 32 | + static Handle<Value> Open(const Arguments& args); |
| 33 | + static void OpenWork(uv_work_t* req); |
| 34 | + static void OpenAfterWork(uv_work_t* req); |
| 35 | + |
| 36 | + struct OpenBaton { |
| 37 | + uv_work_t request; |
| 38 | + const git_error* error; |
| 39 | + git_index * out; |
| 40 | + Persistent<Value> index_pathReference; |
| 41 | + const char * index_path; |
| 42 | + Persistent<Function> callback; |
| 43 | + }; |
| 44 | + static Handle<Value> New(const Arguments& args); |
| 45 | + static Handle<Value> Owner(const Arguments& args); |
| 46 | + static Handle<Value> Read(const Arguments& args); |
| 47 | + static void ReadWork(uv_work_t* req); |
| 48 | + static void ReadAfterWork(uv_work_t* req); |
| 49 | + |
| 50 | + struct ReadBaton { |
| 51 | + uv_work_t request; |
| 52 | + const git_error* error; |
| 53 | + Persistent<Value> indexReference; |
| 54 | + git_index * index; |
| 55 | + Persistent<Function> callback; |
| 56 | + }; |
| 57 | + static Handle<Value> Write(const Arguments& args); |
| 58 | + static void WriteWork(uv_work_t* req); |
| 59 | + static void WriteAfterWork(uv_work_t* req); |
| 60 | + |
| 61 | + struct WriteBaton { |
| 62 | + uv_work_t request; |
| 63 | + const git_error* error; |
| 64 | + Persistent<Value> indexReference; |
| 65 | + git_index * index; |
| 66 | + Persistent<Function> callback; |
| 67 | + }; |
| 68 | + static Handle<Value> ReadTree(const Arguments& args); |
| 69 | + static void ReadTreeWork(uv_work_t* req); |
| 70 | + static void ReadTreeAfterWork(uv_work_t* req); |
| 71 | + |
| 72 | + struct ReadTreeBaton { |
| 73 | + uv_work_t request; |
| 74 | + const git_error* error; |
| 75 | + Persistent<Value> indexReference; |
| 76 | + git_index * index; |
| 77 | + Persistent<Value> treeReference; |
| 78 | + const git_tree * tree; |
| 79 | + Persistent<Function> callback; |
| 80 | + }; |
| 81 | + static Handle<Value> WriteTree(const Arguments& args); |
| 82 | + static void WriteTreeWork(uv_work_t* req); |
| 83 | + static void WriteTreeAfterWork(uv_work_t* req); |
| 84 | + |
| 85 | + struct WriteTreeBaton { |
| 86 | + uv_work_t request; |
| 87 | + const git_error* error; |
| 88 | + git_oid * out; |
| 89 | + Persistent<Value> indexReference; |
| 90 | + git_index * index; |
| 91 | + Persistent<Function> callback; |
| 92 | + }; |
| 93 | + static Handle<Value> Entrycount(const Arguments& args); |
| 94 | + static Handle<Value> Clear(const Arguments& args); |
| 95 | + static Handle<Value> Remove(const Arguments& args); |
| 96 | + static Handle<Value> RemoveDirectory(const Arguments& args); |
| 97 | + static Handle<Value> AddBypath(const Arguments& args); |
| 98 | + static void AddBypathWork(uv_work_t* req); |
| 99 | + static void AddBypathAfterWork(uv_work_t* req); |
| 100 | + |
| 101 | + struct AddBypathBaton { |
| 102 | + uv_work_t request; |
| 103 | + const git_error* error; |
| 104 | + Persistent<Value> indexReference; |
| 105 | + git_index * index; |
| 106 | + Persistent<Value> pathReference; |
| 107 | + const char * path; |
| 108 | + Persistent<Function> callback; |
| 109 | + }; |
| 110 | + static Handle<Value> RemoveBypath(const Arguments& args); |
| 111 | + static Handle<Value> Find(const Arguments& args); |
| 112 | + static Handle<Value> ConflictRemove(const Arguments& args); |
| 113 | + static Handle<Value> ConflictCleanup(const Arguments& args); |
| 114 | + static Handle<Value> HasConflicts(const Arguments& args); |
| 115 | + git_index *raw; |
56 | 116 | }; |
57 | 117 |
|
58 | 118 | #endif |
0 commit comments