Advertisement
rotrevrep

custom libgit2 vapi

Aug 21st, 2014
2,667
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Vala 1.59 KB | None | 0 0
  1. [CCode (cheader_filename = "git2.h")]
  2. namespace Git {
  3.     [Compact]
  4.     [CCode (cname = "git_repository")]
  5.     public class Repository {
  6.        
  7.         public static int init (out Repository repo, string path, bool is_bare);
  8.         public static int open (out Repository repo, string path);
  9.         public static int open_bare (out Repository repo, string bare_path);
  10.         public static int wrap_odb (out Repository repo, Odb? odb);
  11.        
  12.         [CCode (instance_pos = -1)]
  13.         public int head (out Reference reference);
  14.         public bool head_detached();
  15.         public bool head_unborn();
  16.         public bool is_bare();
  17.         public bool is_empty();
  18.         public string path();
  19.         public string workdir();
  20.         public int set_workdir (string wd, bool update_link);
  21.        
  22.     }
  23.    
  24.     [Compact]
  25.     [CCode (cname = "git_reference")]
  26.     public class Reference {
  27.         public int cmp (Reference r);
  28.     }
  29.    
  30.     [Compact]
  31.     [CCode (cname = "git_reflog")]
  32.     public class Reflog {
  33.         public static int read (out Reflog log, Repository repo, string name);
  34.        
  35.         [CCode (cname = "git_reflog_entry_byindex")]
  36.         public Entry get (size_t index);
  37.         public Entry entry_byindex (size_t index);
  38.        
  39.         public size_t size {
  40.             [CCode (cname = "git_reflog_entrycount")]
  41.             get;
  42.         }
  43.        
  44.         [Compact]
  45.         [CCode (cname = "git_reflog_entry", free_function = "git_reflog_entry__free")]
  46.         public class Entry {
  47.             [CCode (cname = "git_reflog_entry__alloc")]
  48.             public Entry();
  49.             public Signature committer();
  50.             public string message();
  51.         }
  52.     }
  53.    
  54.     [Compact]
  55.     [CCode (cname = "git_signature")]
  56.     public class Signature {
  57.        
  58.     }
  59.    
  60.     [Compact]
  61.     [CCode (cname = "git_odb")]
  62.     public class Odb {}
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement