forked from haiwen/seafile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommit.vala
70 lines (53 loc) · 1.63 KB
/
commit.vala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// compile this file with `valac --pkg posix repo.vala -C -H repo.h`
namespace Seafile {
public class Commit : Object {
// _id is for fast access from c code. id is for
// vala to automatically generate a property. Note,
// if a Vala property is start with _, it is not
// translated into a GObject property.
public char _id[41];
public string id {
get { return (string)_id; }
set { Posix.memcpy(_id, value, 40); _id[40] = '\0'; }
}
public string creator_name { get; set; }
public string _creator; // creator
public string creator {
get { return _creator; }
set { _creator = value; }
}
public string _desc; // description: what does this commit change
public string desc {
get { return _desc; }
set { _desc = value; }
}
public int64 _ctime; // create time
public int64 ctime {
get { return _ctime; }
set { _ctime = value; }
}
public string parent_id { get; set;}
public string second_parent_id { get; set; }
public string _repo_id;
public string repo_id {
get { return _repo_id; }
set { _repo_id = value; }
}
// A commit point to a file or dir, not both.
public string _root_id;
public string root_id {
get { return _root_id; }
set { _root_id = value; }
}
// Repo data-format version of this commit
public int version { get; set; }
public bool new_merge { get; set; }
public bool conflict { get; set; }
// Used for returning file revision
public string rev_file_id { get; set; }
public int64 rev_file_size { get; set; }
// Set if this commit renames a revision of a file
public string rev_renamed_old_path { get; set; }
public string device_name { get; set; }
}
} // namespace