// This is a generated file, modify: generate/templates/templates/class_content.cc

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

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

#include "../include/nodegit.h"
#include "../include/lock_master.h"
#include "../include/functions/copy.h"
#include "../include/openssl.h"
#include "nodegit_wrapper.cc"
#include "../include/async_libgit2_queue_worker.h"


#include <iostream>

using namespace std;
using namespace v8;
using namespace node;


void GitOpenssl::InitializeComponent(v8::Local<v8::Object> target)
{
  Nan::HandleScope scope;

  v8::Local<Object> object = Nan::New<Object>();

  Nan::SetMethod(object, "setLocking", SetLocking);

  Nan::Set(target, Nan::New<String>("Openssl").ToLocalChecked(), object);
}


/*
   * @return Number  result    */
NAN_METHOD(GitOpenssl::SetLocking)
{
  Nan::EscapableHandleScope scope;


  giterr_clear();

  {
    LockMaster lockMaster(/*asyncAction: */false);

    int result = git_openssl_set_locking(
                 );


    v8::Local<v8::Value> to;
// start convert_to_v8 block
    to = Nan::New<Number>( result);
    // end convert_to_v8 block
    return info.GetReturnValue().Set(scope.Escape(to));
  }
}
