// This is a generated file, modify: generate/templates/templates/struct_header.h #ifndef GITPROXYOPTIONS_H #define GITPROXYOPTIONS_H #include #include #include #include #include #include "async_baton.h" #include "callback_wrapper.h" #include "reference_counter.h" #include "nodegit_wrapper.h" extern "C" { #include } #include "../include/cred.h" #include "../include/cert.h" using namespace node; using namespace v8; class GitProxyOptions; struct GitProxyOptionsTraits { typedef GitProxyOptions cppClass; typedef git_proxy_options cType; static const bool isDuplicable = false; static void duplicate(git_proxy_options **dest, git_proxy_options *src) { Nan::ThrowError("duplicate called on GitProxyOptions which cannot be duplicated"); } static const bool isSingleton = false; static const bool isFreeable = true; static void free(git_proxy_options *raw) { unsigned long referenceCount = 0; if (referenceCount == 0) { ::free(raw); // :: to avoid calling this free recursively } } }; class GitProxyOptions : public NodeGitWrapper { // grant full access to base class friend class NodeGitWrapper; public: GitProxyOptions(git_proxy_options* raw, bool selfFreeing, v8::Local owner = v8::Local()); static void InitializeComponent (v8::Local target); static int credentials_cppCallback ( git_cred ** cred , const char * url , const char * username_from_url , unsigned int allowed_types , void * payload ); static void credentials_async(void *baton); static void credentials_promiseCompleted(bool isFulfilled, AsyncBaton *_baton, v8::Local result); struct CredentialsBaton : public AsyncBatonWithResult { git_cred ** cred; const char * url; const char * username_from_url; unsigned int allowed_types; void * payload; CredentialsBaton(const int &defaultResult) : AsyncBatonWithResult(defaultResult) { } }; static GitProxyOptions * credentials_getInstanceFromBaton ( CredentialsBaton *baton); static int certificate_check_cppCallback ( git_cert * cert , int valid , const char * host , void * payload ); static void certificate_check_async(void *baton); static void certificate_check_promiseCompleted(bool isFulfilled, AsyncBaton *_baton, v8::Local result); struct CertificateCheckBaton : public AsyncBatonWithResult { git_cert * cert; int valid; const char * host; void * payload; CertificateCheckBaton(const int &defaultResult) : AsyncBatonWithResult(defaultResult) { } }; static GitProxyOptions * certificate_check_getInstanceFromBaton ( CertificateCheckBaton *baton); private: GitProxyOptions(); ~GitProxyOptions(); void ConstructFields(); static NAN_GETTER(GetVersion); static NAN_SETTER(SetVersion); static NAN_GETTER(GetType); static NAN_SETTER(SetType); static NAN_GETTER(GetUrl); static NAN_SETTER(SetUrl); CallbackWrapper credentials; static NAN_GETTER(GetCredentials); static NAN_SETTER(SetCredentials); CallbackWrapper certificate_check; static NAN_GETTER(GetCertificateCheck); static NAN_SETTER(SetCertificateCheck); Nan::Persistent payload; static NAN_GETTER(GetPayload); static NAN_SETTER(SetPayload); }; #endif