forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCaching.cs
More file actions
147 lines (147 loc) · 4.64 KB
/
Caching.cs
File metadata and controls
147 lines (147 loc) · 4.64 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
using System;
using System.Runtime.CompilerServices;
namespace UnityEngine
{
public sealed class Caching
{
[Obsolete("this API is not for public use.")]
public static extern CacheIndex[] index
{
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
public static extern long spaceFree
{
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
public static extern long maximumAvailableDiskSpace
{
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
set;
}
public static extern long spaceOccupied
{
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
[Obsolete("Please use Caching.spaceFree instead")]
public static extern int spaceAvailable
{
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
[Obsolete("Please use Caching.spaceOccupied instead")]
public static extern int spaceUsed
{
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
public static extern int expirationDelay
{
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
set;
}
public static extern bool enabled
{
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
set;
}
public static extern bool ready
{
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
public static bool Authorize(string name, string domain, long size, string signature)
{
return Caching.Authorize(name, domain, size, -1, signature);
}
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern bool Authorize(string name, string domain, long size, int expiration, string signature);
[Obsolete("Size is now specified as a long")]
public static bool Authorize(string name, string domain, int size, int expiration, string signature)
{
return Caching.Authorize(name, domain, (long)size, expiration, signature);
}
[Obsolete("Size is now specified as a long")]
public static bool Authorize(string name, string domain, int size, string signature)
{
return Caching.Authorize(name, domain, (long)size, signature);
}
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern bool CleanCache();
[Obsolete("this API is not for public use."), WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern bool CleanNamedCache(string name);
[Obsolete("This function is obsolete and has no effect."), WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern bool DeleteFromCache(string url);
[Obsolete("This function is obsolete and will always return -1. Use IsVersionCached instead."), WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern int GetVersionFromCache(string url);
public static bool IsVersionCached(string url, int version)
{
Hash128 hash = new Hash128(0u, 0u, 0u, (uint)version);
return Caching.IsVersionCached(url, hash);
}
public static bool IsVersionCached(string url, Hash128 hash)
{
return Caching.INTERNAL_CALL_IsVersionCached(url, ref hash);
}
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern bool INTERNAL_CALL_IsVersionCached(string url, ref Hash128 hash);
public static bool MarkAsUsed(string url, int version)
{
Hash128 hash = new Hash128(0u, 0u, 0u, (uint)version);
return Caching.MarkAsUsed(url, hash);
}
public static bool MarkAsUsed(string url, Hash128 hash)
{
return Caching.INTERNAL_CALL_MarkAsUsed(url, ref hash);
}
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern bool INTERNAL_CALL_MarkAsUsed(string url, ref Hash128 hash);
public static void SetNoBackupFlag(string url, int version)
{
}
public static void SetNoBackupFlag(string url, Hash128 hash)
{
Caching.INTERNAL_CALL_SetNoBackupFlag(url, ref hash);
}
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void INTERNAL_CALL_SetNoBackupFlag(string url, ref Hash128 hash);
public static void ResetNoBackupFlag(string url, int version)
{
}
public static void ResetNoBackupFlag(string url, Hash128 hash)
{
Caching.INTERNAL_CALL_ResetNoBackupFlag(url, ref hash);
}
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void INTERNAL_CALL_ResetNoBackupFlag(string url, ref Hash128 hash);
}
}