forked from Unity-Technologies/UnityCsReference
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVCProvider.bindings.cs
More file actions
284 lines (218 loc) · 11.6 KB
/
Copy pathVCProvider.bindings.cs
File metadata and controls
284 lines (218 loc) · 11.6 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Scripting;
using System.Runtime.InteropServices;
namespace UnityEditor.VersionControl
{
// This MUST be kept synchronized with the VCS_PROVIDER_UNSET_IDENTIFIER enum in VCProvider.cpp
enum VCSProviderIdentifier
{
UnsetIdentifier = -1
}
// Keep internal and undocumented until we expose more functionality
[NativeHeader("Editor/Src/VersionControl/VCProvider_bindings.h")]
public partial class Provider
{
[StaticAccessor("GetVCProvider()", StaticAccessorType.Dot)]
public static extern bool enabled
{
[NativeMethod("Enabled")]
get;
}
[StaticAccessor("GetVCProvider()", StaticAccessorType.Dot)]
public static extern bool isActive
{
[NativeMethod("IsActive")]
get;
}
[UsedByNativeCode]
[StructLayout(LayoutKind.Sequential)]
private struct Traits
{
public bool requiresNetwork;
public bool enablesCheckout;
public bool enablesVersioningFolders;
public bool enablesChangelists;
}
private static extern Traits activeTraits
{
[FreeFunction("VersionControlBindings::VCProvider::GetActiveTraits")]
get;
}
public static bool requiresNetwork
{
get { return activeTraits.requiresNetwork; }
}
public static bool hasChangelistSupport
{
get { return activeTraits.enablesChangelists; }
}
public static bool hasCheckoutSupport
{
get { return activeTraits.enablesCheckout; }
}
public static bool isVersioningFolders
{
get { return activeTraits.enablesVersioningFolders; }
}
[StaticAccessor("GetVCProvider()", StaticAccessorType.Dot)]
public static extern OnlineState onlineState
{
[NativeMethod("GetOnlineState")]
get;
}
[StaticAccessor("GetVCProvider()", StaticAccessorType.Dot)]
public static extern string offlineReason
{
[NativeMethod("OfflineReason")]
get;
}
public static extern Task activeTask
{
[FreeFunction("VersionControlBindings::VCProvider::GetActiveTask")]
get;
}
[StaticAccessor("GetVCProvider()", StaticAccessorType.Dot)]
internal static extern Texture2D overlayAtlas
{
[NativeMethod("GetOverlayAtlas")]
get;
}
[FreeFunction("VersionControlBindings::VCProvider::GetAtlasRectForState")]
internal static extern Rect GetAtlasRectForState(int state);
[FreeFunction("VersionControlBindings::VCProvider::GetActivePlugin")]
public static extern Plugin GetActivePlugin();
[FreeFunction("VersionControlBindings::VCProvider::GetActiveConfigFields")]
public static extern ConfigField[] GetActiveConfigFields();
[StaticAccessor("GetVCProvider()", StaticAccessorType.Dot)]
internal static extern bool IsCustomCommandEnabled(string name);
[StaticAccessor("GetVCProvider()", StaticAccessorType.Dot)]
internal static extern CustomCommand[] customCommands
{
[NativeMethod("GetMonoCustomCommands")]
get;
}
[FreeFunction("VersionControlBindings::VCProvider::Internal_CacheStatus")]
private static extern Asset Internal_CacheStatus(string assetPath);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_Status")]
private static extern Task Internal_Status(Asset[] assets, bool recursively);
[FreeFunction("VersionControlBindings::VCProvider::Internal_StatusStrings")]
private static extern Task Internal_StatusStrings(string[] assetsProjectPaths, bool recursively);
[FreeFunction("VersionControlBindings::VCProvider::Internal_StatusAbsolutePath")]
private static extern Task Internal_StatusAbsolutePath(string assetPath);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_CheckoutIsValid")]
private static extern bool Internal_CheckoutIsValid(Asset[] assets, CheckoutMode mode);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_Checkout")]
private static extern Task Internal_Checkout(Asset[] assets, CheckoutMode mode);
[FreeFunction("VersionControlBindings::VCProvider::Internal_CheckoutStrings")]
private static extern Task Internal_CheckoutStrings(string[] assets, CheckoutMode mode);
[FreeFunction("VersionControlBindings::VCProvider::Internal_PromptAndCheckoutIfNeeded")]
private static extern bool Internal_PromptAndCheckoutIfNeeded(string[] assets, string promptIfCheckoutIsNeeded);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_Delete")]
private static extern Task Internal_Delete(Asset[] assets);
[FreeFunction("VersionControlBindings::VCProvider::Internal_DeleteAtProjectPath")]
private static extern Task Internal_DeleteAtProjectPath([NotNull] string assetProjectPath);
[FreeFunction("VersionControlBindings::VCProvider::Internal_MoveAsStrings")]
private static extern Task Internal_MoveAsStrings([NotNull] string from, [NotNull] string to);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_AddIsValid")]
private static extern bool Internal_AddIsValid(Asset[] assets);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_Add")]
private static extern Task Internal_Add(Asset[] assets, bool recursive);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_DeleteChangeSetsIsValid")]
private static extern bool Internal_DeleteChangeSetsIsValid(ChangeSet[] changesets);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_DeleteChangeSets")]
private static extern Task Internal_DeleteChangeSets(ChangeSet[] changesets);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_RevertChangeSets")]
private static extern Task Internal_RevertChangeSets(ChangeSet[] changesets, RevertMode mode);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_SubmitIsValid")]
private static extern bool Internal_SubmitIsValid(ChangeSet changeset, Asset[] assets);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_Submit")]
private static extern Task Internal_Submit(ChangeSet changeset, Asset[] assets, string description, bool saveOnly);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_DiffIsValid")]
private static extern bool Internal_DiffIsValid(Asset[] assets);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_DiffHead")]
private static extern Task Internal_DiffHead(Asset[] assets, bool includingMetaFiles);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_ResolveIsValid")]
private static extern bool Internal_ResolveIsValid(Asset[] assets);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_Resolve")]
private static extern Task Internal_Resolve(Asset[] assets, ResolveMethod resolveMethod);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_Merge")]
private static extern Task Internal_Merge(Asset[] assets, MergeMethod mergeMethod);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_LockIsValid")]
private static extern bool Internal_LockIsValid(Asset[] assets);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_UnlockIsValid")]
private static extern bool Internal_UnlockIsValid(Asset[] assets);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_Lock")]
private static extern Task Internal_Lock(Asset[] assets, bool locked);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_RevertIsValid")]
private static extern bool Internal_RevertIsValid(Asset[] assets, RevertMode revertMode);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_Revert")]
private static extern Task Internal_Revert(Asset[] assets, RevertMode revertMode);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_GetLatestIsValid")]
private static extern bool Internal_GetLatestIsValid(Asset[] assets);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_GetLatest")]
private static extern Task Internal_GetLatest(Asset[] assets);
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_SetFileMode")]
private static extern Task Internal_SetFileMode(Asset[] assets, FileMode fileMode);
[FreeFunction("VersionControlBindings::VCProvider::Internal_SetFileModeStrings")]
private static extern Task Internal_SetFileModeStrings(string[] assets, FileMode fileMode);
[FreeFunction("VersionControlBindings::VCProvider::Internal_ChangeSetDescription")]
private static extern Task Internal_ChangeSetDescription([NotNull] ChangeSet changeset);
[FreeFunction("VersionControlBindings::VCProvider::Internal_ChangeSetStatus")]
private static extern Task Internal_ChangeSetStatus([NotNull] ChangeSet changeset);
[FreeFunction("VersionControlBindings::VCProvider::ChangeSets")]
public static extern Task ChangeSets();
[NativeThrows]
[FreeFunction("VersionControlBindings::VCProvider::Internal_ChangeSetMove")]
private static extern Task Internal_ChangeSetMove(Asset[] assets, [NotNull] ChangeSet target);
[FreeFunction("VersionControlBindings::VCProvider::Incoming")]
public static extern Task Incoming();
[FreeFunction("VersionControlBindings::VCProvider::Internal_IncomingChangeSetAssets")]
private static extern Task Internal_IncomingChangeSetAssets([NotNull] ChangeSet changeset);
[FreeFunction("VersionControlBindings::VCProvider::UpdateSettings")]
public static extern Task UpdateSettings();
[FreeFunction("VersionControlBindings::VCProvider::GetAssetByPath")]
public static extern Asset GetAssetByPath(string unityPath);
[FreeFunction("VersionControlBindings::VCProvider::GetAssetByGUID")]
public static extern Asset GetAssetByGUID(string guid);
[FreeFunction("VersionControlBindings::VCProvider::Internal_GetAssetArrayFromSelection")]
private static extern Asset[] Internal_GetAssetArrayFromSelection();
[FreeFunction("VersionControlBindings::VCProvider::IsOpenForEdit")]
public static extern bool IsOpenForEdit([NotNull] Asset asset);
[StaticAccessor("GetVCProvider()", StaticAccessorType.Dot)]
internal static extern int GenerateID();
[StaticAccessor("GetVCCache()", StaticAccessorType.Dot)]
[NativeMethod("Clear")]
public static extern void ClearCache();
[StaticAccessor("GetVCCache()", StaticAccessorType.Dot)]
[NativeMethod("Invalidate")]
internal static extern void InvalidateCache();
}
}