#ifndef GITPATCH_H
#define GITPATCH_H

#include <nan.h>
#include <string>

extern "C" {
#include <git2.h>
}

#include "../include/delta.h"
#include "../include/diff_file.h"
#include "../include/diff_line.h"

// Forward declaration.
struct git_patch {
  };

using namespace node;
using namespace v8;

class GitPatch : public ObjectWrap {
  public:

    static Persistent<Function> constructor_template;
    static void Initialize (Handle<v8::Object> target);

        git_patch *GetValue();

    static Handle<Value> New(void *raw);
    
  private:
        GitPatch(git_patch *raw);
    ~GitPatch();
    
    static NAN_METHOD(New);

    
                  
    static NAN_METHOD(GetDelta);
                        
    static NAN_METHOD(FromDiff);
                        
    static NAN_METHOD(NumHunks);
                        
    static NAN_METHOD(NumLinesInHunk);
                        
    static NAN_METHOD(GetLineInHunk);
          
        git_patch *raw;
    };

#endif
