-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRemoteConfigSettings.cs
More file actions
160 lines (124 loc) · 4.48 KB
/
RemoteConfigSettings.cs
File metadata and controls
160 lines (124 loc) · 4.48 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
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using UnityEngine.Bindings;
using UnityEngine.Internal;
using UnityEngine.Scripting;
namespace UnityEngine
{
[ExcludeFromDocs]
[NativeHeader("UnityAnalyticsScriptingClasses.h")]
[NativeHeader("Modules/UnityAnalytics/RemoteSettings/RemoteSettings.h")]
[StructLayout(LayoutKind.Sequential)]
public class RemoteConfigSettings : IDisposable
{
[NonSerialized]
internal IntPtr m_Ptr;
private RemoteConfigSettings()
{
}
public RemoteConfigSettings(string configKey)
{
}
public event Action<bool> Updated;
~RemoteConfigSettings()
{
}
private void Destroy()
{
return;
}
public void Dispose()
{
return;
}
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern IntPtr Internal_Create(RemoteConfigSettings rcs, string configKey);
[ThreadSafe]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern void Internal_Destroy(IntPtr ptr);
[RequiredByNativeCode]
internal static void RemoteConfigSettingsUpdated(
RemoteConfigSettings rcs,
bool wasLastUpdatedFromServer)
{
return;
}
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern bool QueueConfig(string name, object param, int ver = 1, string prefix = "");
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern bool SendDeviceInfoInConfigRequest();
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern void AddSessionTag(string tag);
[MethodImpl(MethodImplOptions.InternalCall)]
public extern void ForceUpdate();
[MethodImpl(MethodImplOptions.InternalCall)]
public extern bool WasLastUpdatedFromServer();
[ExcludeFromDocs]
public int GetInt(string key)
{
return 0;
}
[MethodImpl(MethodImplOptions.InternalCall)]
public extern int GetInt(string key, [Internal.DefaultValue("0")] int defaultValue);
[ExcludeFromDocs]
public long GetLong(string key)
{
return 0L;
}
[MethodImpl(MethodImplOptions.InternalCall)]
public extern long GetLong(string key, [Internal.DefaultValue("0")] long defaultValue);
[ExcludeFromDocs]
public float GetFloat(string key)
{
return 0.0f;
}
[MethodImpl(MethodImplOptions.InternalCall)]
public extern float GetFloat(string key, [Internal.DefaultValue("0.0F")] float defaultValue);
[ExcludeFromDocs]
public string GetString(string key)
{
return "";
}
[MethodImpl(MethodImplOptions.InternalCall)]
public extern string GetString(string key, [Internal.DefaultValue("\"\"")] string defaultValue);
[ExcludeFromDocs]
public bool GetBool(string key)
{
return false;
}
[MethodImpl(MethodImplOptions.InternalCall)]
public extern bool GetBool(string key, [Internal.DefaultValue("false")] bool defaultValue);
[MethodImpl(MethodImplOptions.InternalCall)]
public extern bool HasKey(string key);
[MethodImpl(MethodImplOptions.InternalCall)]
public extern int GetCount();
[MethodImpl(MethodImplOptions.InternalCall)]
public extern string[] GetKeys();
public T GetObject<T>(string key = "")
{
return (T)this.GetObject(typeof(T), "");
}
public object GetObject(Type type, string key = "")
{
return null;
}
public object GetObject(string key, object defaultValue)
{
return null;
}
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern object GetAsScriptingObject(Type t, object defaultValue, string key);
public IDictionary<string, object> GetDictionary(string key = "")
{
return (IDictionary<string, object>)null;
}
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern void UseSafeLock();
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern void ReleaseSafeLock();
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern IntPtr GetSafeTopMap();
}
}