com.taptap.sdk.cloudsave 4.8.0-beta.1 → 4.8.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Mobile/Editor/NativeDependencies.xml +7 -1
- package/Mobile/Runtime/TapCloudSaveBridge.cs +117 -16
- package/Runtime/Internal/ITapCloudSaveBridge.cs +7 -3
- package/Runtime/Internal/TapCloudSaveInitTask.cs +2 -0
- package/Runtime/Internal/TapTapCloudSaveInternal.cs +9 -3
- package/Runtime/Public/TapTapCloudSave.cs +4 -2
- package/Standalone/Editor/TapCloudSaveStandaloneProcessBuild.cs +26 -0
- package/Standalone/Editor/TapCloudSaveStandaloneProcessBuild.cs.meta +11 -0
- package/Standalone/Editor/TapSDK.CloudSave.Standalone.Editor.asmdef +17 -0
- package/Standalone/Editor/TapSDK.CloudSave.Standalone.Editor.asmdef.meta +7 -0
- package/Standalone/Editor.meta +8 -0
- package/Standalone/Plugins/x86_64/cloudsave_sdk.dll +0 -0
- package/Standalone/Plugins/x86_64/cloudsave_sdk.dll.meta +80 -0
- package/Standalone/Plugins/x86_64.meta +8 -0
- package/Standalone/Plugins.meta +8 -0
- package/Standalone/Runtime/Internal/TapCloudSaveArchiveListResponse.cs +11 -0
- package/Standalone/Runtime/Internal/TapCloudSaveArchiveListResponse.cs.meta +11 -0
- package/Standalone/Runtime/Internal/TapCloudSaveBaseResponse.cs +29 -0
- package/Standalone/Runtime/Internal/TapCloudSaveBaseResponse.cs.meta +11 -0
- package/Standalone/Runtime/Internal/TapCloudSaveTracker.cs +101 -0
- package/Standalone/Runtime/Internal/TapCloudSaveTracker.cs.meta +11 -0
- package/Standalone/Runtime/Internal/TapCloudSaveWrapper.cs +518 -0
- package/Standalone/Runtime/Internal/TapCloudSaveWrapper.cs.meta +11 -0
- package/Standalone/Runtime/Internal.meta +8 -0
- package/Standalone/Runtime/TapCloudSaveResultCode.cs +9 -0
- package/Standalone/Runtime/TapCloudSaveResultCode.cs.meta +11 -0
- package/Standalone/Runtime/TapCloudSaveStandalone.cs +733 -0
- package/Standalone/Runtime/TapCloudSaveStandalone.cs.meta +11 -0
- package/Standalone/Runtime.meta +8 -0
- package/Standalone/TapSDK.CloudSave.Standalone.Runtime.asmdef +22 -0
- package/Standalone/TapSDK.CloudSave.Standalone.Runtime.asmdef.meta +7 -0
- package/Standalone.meta +8 -0
- package/link.xml.meta +1 -1
- package/package.json +10 -10
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
<repositories>
|
|
5
5
|
<repository>https://repo.maven.apache.org/maven2</repository>
|
|
6
6
|
</repositories>
|
|
7
|
-
<androidPackage spec="com.taptap.sdk:tap-cloudsave-unity:4.8.
|
|
7
|
+
<androidPackage spec="com.taptap.sdk:tap-cloudsave-unity:4.8.1-beta.1"/>
|
|
8
8
|
</androidPackages>
|
|
9
|
+
<iosPods>
|
|
10
|
+
<sources>
|
|
11
|
+
<source>https://github.com/CocoaPods/Specs.git</source>
|
|
12
|
+
</sources>
|
|
13
|
+
<iosPod name="TapTapCloudSaveSDK" version="~> 4.8.1-beta.1" bitcodeEnabled="false" addToAllTargets="false"/>
|
|
14
|
+
</iosPods>
|
|
9
15
|
</dependencies>
|
|
@@ -6,6 +6,12 @@ using TapSDK.CloudSave.Internal;
|
|
|
6
6
|
|
|
7
7
|
namespace TapSDK.CloudSave.Mobile
|
|
8
8
|
{
|
|
9
|
+
public class ErrorResponse
|
|
10
|
+
{
|
|
11
|
+
[JsonProperty("errorCode")] public int ErrorCode { get; set; }
|
|
12
|
+
[JsonProperty("errorMessage")] public string ErrorMessage { get; set; }
|
|
13
|
+
}
|
|
14
|
+
|
|
9
15
|
public class TapCloudSaveBridge : ITapCloudSaveBridge
|
|
10
16
|
{
|
|
11
17
|
public static string TAP_CLOUDSAVE_SERVICE = "BridgeCloudSaveService";
|
|
@@ -19,6 +25,11 @@ namespace TapSDK.CloudSave.Mobile
|
|
|
19
25
|
EngineBridge.GetInstance().Register(TDS_CLOUDSAVE_SERVICE_CLZ, TDS_CLOUDSAVE_SERVICE_IMPL);
|
|
20
26
|
}
|
|
21
27
|
|
|
28
|
+
public void Init(TapTapSdkOptions options)
|
|
29
|
+
{
|
|
30
|
+
// 原生由原生内部实现
|
|
31
|
+
}
|
|
32
|
+
|
|
22
33
|
public void RegisterCloudSaveCallback(ITapCloudSaveCallback callback)
|
|
23
34
|
{
|
|
24
35
|
EngineBridge.GetInstance().CallHandler(new Command.Builder()
|
|
@@ -37,7 +48,7 @@ namespace TapSDK.CloudSave.Mobile
|
|
|
37
48
|
callback.OnResult(-1);
|
|
38
49
|
return;
|
|
39
50
|
}
|
|
40
|
-
|
|
51
|
+
|
|
41
52
|
var result = JsonConvert.DeserializeObject<TapEngineBridgeResult>(response.content);
|
|
42
53
|
if (result != null && result.code == TapEngineBridgeResult.RESULT_SUCCESS)
|
|
43
54
|
{
|
|
@@ -63,12 +74,12 @@ namespace TapSDK.CloudSave.Mobile
|
|
|
63
74
|
});
|
|
64
75
|
}
|
|
65
76
|
|
|
66
|
-
public void CreateArchive(
|
|
77
|
+
public void CreateArchive(ArchiveMetadata metadata, string archiveFilePath, string archiveCoverPath, ITapCloudSaveRequestCallback callback)
|
|
67
78
|
{
|
|
68
79
|
EngineBridge.GetInstance().CallHandler(new Command.Builder()
|
|
69
80
|
.Service(TAP_CLOUDSAVE_SERVICE)
|
|
70
81
|
.Method("createArchive")
|
|
71
|
-
.Args("archiveMetadata", metadata)
|
|
82
|
+
.Args("archiveMetadata", JsonConvert.SerializeObject(metadata))
|
|
72
83
|
.Args("archiveFilePath", archiveFilePath)
|
|
73
84
|
.Args("archiveCoverPath", archiveCoverPath)
|
|
74
85
|
.Callback(true)
|
|
@@ -100,7 +111,22 @@ namespace TapSDK.CloudSave.Mobile
|
|
|
100
111
|
}
|
|
101
112
|
else
|
|
102
113
|
{
|
|
103
|
-
|
|
114
|
+
try
|
|
115
|
+
{
|
|
116
|
+
var errorResponse = JsonConvert.DeserializeObject<ErrorResponse>(result.content);
|
|
117
|
+
if (errorResponse != null)
|
|
118
|
+
{
|
|
119
|
+
callback.OnRequestError(errorResponse.ErrorCode, errorResponse.ErrorMessage);
|
|
120
|
+
}
|
|
121
|
+
else
|
|
122
|
+
{
|
|
123
|
+
callback.OnRequestError(-1, "Failed to create archive: content="+response.content);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
catch (Exception e)
|
|
127
|
+
{
|
|
128
|
+
callback.OnRequestError(-1, "Failed to create archive: content="+response.content);
|
|
129
|
+
}
|
|
104
130
|
}
|
|
105
131
|
}
|
|
106
132
|
catch (Exception e)
|
|
@@ -110,15 +136,15 @@ namespace TapSDK.CloudSave.Mobile
|
|
|
110
136
|
});
|
|
111
137
|
}
|
|
112
138
|
|
|
113
|
-
public void UpdateArchive(string archiveUuid,
|
|
139
|
+
public void UpdateArchive(string archiveUuid, ArchiveMetadata metadata, string archiveFilePath, string archiveCoverPath, ITapCloudSaveRequestCallback callback)
|
|
114
140
|
{
|
|
115
141
|
EngineBridge.GetInstance().CallHandler(new Command.Builder()
|
|
116
142
|
.Service(TAP_CLOUDSAVE_SERVICE)
|
|
117
143
|
.Method("updateArchive")
|
|
118
|
-
.Args("
|
|
119
|
-
.Args("
|
|
120
|
-
.Args("
|
|
121
|
-
.Args("
|
|
144
|
+
.Args("archiveUUIDForUpdate", archiveUuid)
|
|
145
|
+
.Args("archiveMetadataForUpdate", JsonConvert.SerializeObject(metadata))
|
|
146
|
+
.Args("archiveFilePathForUpdate", archiveFilePath)
|
|
147
|
+
.Args("archiveCoverPathForUpdate", archiveCoverPath)
|
|
122
148
|
.Callback(true)
|
|
123
149
|
.OnceTime(true)
|
|
124
150
|
.CommandBuilder(), (response) =>
|
|
@@ -148,7 +174,22 @@ namespace TapSDK.CloudSave.Mobile
|
|
|
148
174
|
}
|
|
149
175
|
else
|
|
150
176
|
{
|
|
151
|
-
|
|
177
|
+
try
|
|
178
|
+
{
|
|
179
|
+
var errorResponse = JsonConvert.DeserializeObject<ErrorResponse>(result.content);
|
|
180
|
+
if (errorResponse != null)
|
|
181
|
+
{
|
|
182
|
+
callback.OnRequestError(errorResponse.ErrorCode, errorResponse.ErrorMessage);
|
|
183
|
+
}
|
|
184
|
+
else
|
|
185
|
+
{
|
|
186
|
+
callback.OnRequestError(-1, "Failed to update archive: content="+response.content);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
catch (Exception e)
|
|
190
|
+
{
|
|
191
|
+
callback.OnRequestError(-1, "Failed to update archive: content="+response.content);
|
|
192
|
+
}
|
|
152
193
|
}
|
|
153
194
|
}
|
|
154
195
|
catch (Exception e)
|
|
@@ -193,7 +234,22 @@ namespace TapSDK.CloudSave.Mobile
|
|
|
193
234
|
}
|
|
194
235
|
else
|
|
195
236
|
{
|
|
196
|
-
|
|
237
|
+
try
|
|
238
|
+
{
|
|
239
|
+
var errorResponse = JsonConvert.DeserializeObject<ErrorResponse>(result.content);
|
|
240
|
+
if (errorResponse != null)
|
|
241
|
+
{
|
|
242
|
+
callback.OnRequestError(errorResponse.ErrorCode, errorResponse.ErrorMessage);
|
|
243
|
+
}
|
|
244
|
+
else
|
|
245
|
+
{
|
|
246
|
+
callback.OnRequestError(-1, "Failed to delete archive: content="+response.content);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
catch (Exception e)
|
|
250
|
+
{
|
|
251
|
+
callback.OnRequestError(-1, "Failed to delete archive: content="+response.content);
|
|
252
|
+
}
|
|
197
253
|
}
|
|
198
254
|
}
|
|
199
255
|
catch (Exception e)
|
|
@@ -237,7 +293,22 @@ namespace TapSDK.CloudSave.Mobile
|
|
|
237
293
|
}
|
|
238
294
|
else
|
|
239
295
|
{
|
|
240
|
-
|
|
296
|
+
try
|
|
297
|
+
{
|
|
298
|
+
var errorResponse = JsonConvert.DeserializeObject<ErrorResponse>(result.content);
|
|
299
|
+
if (errorResponse != null)
|
|
300
|
+
{
|
|
301
|
+
callback.OnRequestError(errorResponse.ErrorCode, errorResponse.ErrorMessage);
|
|
302
|
+
}
|
|
303
|
+
else
|
|
304
|
+
{
|
|
305
|
+
callback.OnRequestError(-1, "Failed to get archive list: content="+response.content);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
catch (Exception e)
|
|
309
|
+
{
|
|
310
|
+
callback.OnRequestError(-1, "Failed to get archive list: content="+response.content);
|
|
311
|
+
}
|
|
241
312
|
}
|
|
242
313
|
}
|
|
243
314
|
catch (Exception e)
|
|
@@ -283,7 +354,22 @@ namespace TapSDK.CloudSave.Mobile
|
|
|
283
354
|
}
|
|
284
355
|
else
|
|
285
356
|
{
|
|
286
|
-
|
|
357
|
+
try
|
|
358
|
+
{
|
|
359
|
+
var errorResponse = JsonConvert.DeserializeObject<ErrorResponse>(result.content);
|
|
360
|
+
if (errorResponse != null)
|
|
361
|
+
{
|
|
362
|
+
callback.OnRequestError(errorResponse.ErrorCode, errorResponse.ErrorMessage);
|
|
363
|
+
}
|
|
364
|
+
else
|
|
365
|
+
{
|
|
366
|
+
callback.OnRequestError(-1, "Failed to get archive data: content="+response.content);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
catch (Exception e)
|
|
370
|
+
{
|
|
371
|
+
callback.OnRequestError(-1, "Failed to get archive data: content="+response.content);
|
|
372
|
+
}
|
|
287
373
|
}
|
|
288
374
|
}
|
|
289
375
|
catch (Exception e)
|
|
@@ -298,8 +384,8 @@ namespace TapSDK.CloudSave.Mobile
|
|
|
298
384
|
EngineBridge.GetInstance().CallHandler(new Command.Builder()
|
|
299
385
|
.Service(TAP_CLOUDSAVE_SERVICE)
|
|
300
386
|
.Method("getArchiveCover")
|
|
301
|
-
.Args("
|
|
302
|
-
.Args("
|
|
387
|
+
.Args("archiveUUIDForCover", archiveUuid)
|
|
388
|
+
.Args("archiveFileIDForCover", archiveFileId)
|
|
303
389
|
.Callback(true)
|
|
304
390
|
.OnceTime(true)
|
|
305
391
|
.CommandBuilder(), (response) =>
|
|
@@ -329,7 +415,22 @@ namespace TapSDK.CloudSave.Mobile
|
|
|
329
415
|
}
|
|
330
416
|
else
|
|
331
417
|
{
|
|
332
|
-
|
|
418
|
+
try
|
|
419
|
+
{
|
|
420
|
+
var errorResponse = JsonConvert.DeserializeObject<ErrorResponse>(result.content);
|
|
421
|
+
if (errorResponse != null)
|
|
422
|
+
{
|
|
423
|
+
callback.OnRequestError(errorResponse.ErrorCode, errorResponse.ErrorMessage);
|
|
424
|
+
}
|
|
425
|
+
else
|
|
426
|
+
{
|
|
427
|
+
callback.OnRequestError(-1, "Failed to get archive cover: content="+response.content);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
catch (Exception e)
|
|
431
|
+
{
|
|
432
|
+
callback.OnRequestError(-1, "Failed to get archive cover: content="+response.content);
|
|
433
|
+
}
|
|
333
434
|
}
|
|
334
435
|
}
|
|
335
436
|
catch (Exception e)
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
using TapSDK.Core;
|
|
2
|
+
|
|
3
|
+
namespace TapSDK.CloudSave.Internal
|
|
2
4
|
{
|
|
3
5
|
public interface ITapCloudSaveBridge
|
|
4
6
|
{
|
|
7
|
+
void Init(TapTapSdkOptions options);
|
|
8
|
+
|
|
5
9
|
void RegisterCloudSaveCallback(ITapCloudSaveCallback callback);
|
|
6
10
|
|
|
7
|
-
void CreateArchive(
|
|
11
|
+
void CreateArchive(ArchiveMetadata metadata, string archiveFilePath, string archiveCoverPath,
|
|
8
12
|
ITapCloudSaveRequestCallback callback);
|
|
9
13
|
|
|
10
|
-
void UpdateArchive(string archiveUuid,
|
|
14
|
+
void UpdateArchive(string archiveUuid, ArchiveMetadata metadata, string archiveFilePath, string archiveCoverPath,
|
|
11
15
|
ITapCloudSaveRequestCallback callback);
|
|
12
16
|
|
|
13
17
|
void DeleteArchive(string archiveUuid, ITapCloudSaveRequestCallback callback);
|
|
@@ -9,10 +9,12 @@ namespace TapSDK.CloudSave.Internal.Init
|
|
|
9
9
|
|
|
10
10
|
public void Init(TapTapSdkOptions coreOption)
|
|
11
11
|
{
|
|
12
|
+
TapTapCloudSaveInternal.Init(coreOption);
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
public void Init(TapTapSdkOptions coreOption, TapTapSdkBaseOptions[] otherOptions)
|
|
15
16
|
{
|
|
17
|
+
TapTapCloudSaveInternal.Init(coreOption);
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
20
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
using TapSDK.Core;
|
|
1
2
|
using TapSDK.Core.Internal.Utils;
|
|
2
3
|
|
|
3
4
|
namespace TapSDK.CloudSave.Internal
|
|
@@ -11,19 +12,24 @@ namespace TapSDK.CloudSave.Internal
|
|
|
11
12
|
Bridge = BridgeUtils.CreateBridgeImplementation(typeof(ITapCloudSaveBridge), "TapSDK.CloudSave")
|
|
12
13
|
as ITapCloudSaveBridge;
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
+
|
|
16
|
+
internal static void Init(TapTapSdkOptions options)
|
|
17
|
+
{
|
|
18
|
+
Bridge?.Init(options);
|
|
19
|
+
}
|
|
20
|
+
|
|
15
21
|
internal static void RegisterCloudSaveCallback(ITapCloudSaveCallback callback)
|
|
16
22
|
{
|
|
17
23
|
Bridge?.RegisterCloudSaveCallback(callback);
|
|
18
24
|
}
|
|
19
25
|
|
|
20
|
-
internal static void CreateArchive(
|
|
26
|
+
internal static void CreateArchive(ArchiveMetadata metadata, string archiveFilePath, string archiveCoverPath,
|
|
21
27
|
ITapCloudSaveRequestCallback callback)
|
|
22
28
|
{
|
|
23
29
|
Bridge?.CreateArchive(metadata, archiveFilePath, archiveCoverPath, callback);
|
|
24
30
|
}
|
|
25
31
|
|
|
26
|
-
internal static void UpdateArchive(string archiveUuid,
|
|
32
|
+
internal static void UpdateArchive(string archiveUuid, ArchiveMetadata metadata, string archiveFilePath,
|
|
27
33
|
string archiveCoverPath, ITapCloudSaveRequestCallback callback)
|
|
28
34
|
{
|
|
29
35
|
Bridge?.UpdateArchive(archiveUuid, metadata, archiveFilePath, archiveCoverPath, callback);
|
|
@@ -4,18 +4,20 @@ namespace TapSDK.CloudSave
|
|
|
4
4
|
{
|
|
5
5
|
public class TapTapCloudSave
|
|
6
6
|
{
|
|
7
|
+
public static readonly string Version = "4.8.1-beta.1";
|
|
8
|
+
|
|
7
9
|
public static void RegisterCloudSaveCallback(ITapCloudSaveCallback callback)
|
|
8
10
|
{
|
|
9
11
|
TapTapCloudSaveInternal.RegisterCloudSaveCallback(callback);
|
|
10
12
|
}
|
|
11
13
|
|
|
12
|
-
public static void CreateArchive(
|
|
14
|
+
public static void CreateArchive(ArchiveMetadata metadata, string archiveFilePath, string archiveCoverPath,
|
|
13
15
|
ITapCloudSaveRequestCallback callback)
|
|
14
16
|
{
|
|
15
17
|
TapTapCloudSaveInternal.CreateArchive(metadata, archiveFilePath, archiveCoverPath, callback);
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
public static void UpdateArchive(string archiveUuid,
|
|
20
|
+
public static void UpdateArchive(string archiveUuid, ArchiveMetadata metadata, string archiveFilePath,
|
|
19
21
|
string archiveCoverPath, ITapCloudSaveRequestCallback callback)
|
|
20
22
|
{
|
|
21
23
|
TapTapCloudSaveInternal.UpdateArchive(archiveUuid, metadata, archiveFilePath, archiveCoverPath, callback);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using TapSDK.Core.Editor;
|
|
3
|
+
using UnityEditor.Build.Reporting;
|
|
4
|
+
|
|
5
|
+
namespace TapSDK.CloudSave.Standalone.Editor
|
|
6
|
+
{
|
|
7
|
+
public class TapCloudSaveStandaloneProcessBuild : SDKLinkProcessBuild
|
|
8
|
+
{
|
|
9
|
+
public override int callbackOrder => 0;
|
|
10
|
+
|
|
11
|
+
public override string LinkPath => "TapSDK/CloudSave/link.xml";
|
|
12
|
+
|
|
13
|
+
public override LinkedAssembly[] LinkedAssemblies =>
|
|
14
|
+
new LinkedAssembly[]
|
|
15
|
+
{
|
|
16
|
+
new LinkedAssembly { Fullname = "TapSDK.CloudSave.Runtime" },
|
|
17
|
+
new LinkedAssembly { Fullname = "TapSDK.CloudSave.Standalone.Runtime" },
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
public override Func<BuildReport, bool> IsTargetPlatform =>
|
|
21
|
+
(report) =>
|
|
22
|
+
{
|
|
23
|
+
return BuildTargetUtils.IsSupportStandalone(report.summary.platform);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "TapSDK.CloudSave.Standalone.Editor",
|
|
3
|
+
"references": [
|
|
4
|
+
"GUID:56f3da7a178484843974054bafe77e73"
|
|
5
|
+
],
|
|
6
|
+
"includePlatforms": [
|
|
7
|
+
"Editor"
|
|
8
|
+
],
|
|
9
|
+
"excludePlatforms": [],
|
|
10
|
+
"allowUnsafeCode": false,
|
|
11
|
+
"overrideReferences": false,
|
|
12
|
+
"precompiledReferences": [],
|
|
13
|
+
"autoReferenced": true,
|
|
14
|
+
"defineConstraints": [],
|
|
15
|
+
"versionDefines": [],
|
|
16
|
+
"noEngineReferences": false
|
|
17
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: ab1626c057f474478a7240f424e355cd
|
|
3
|
+
PluginImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
iconMap: {}
|
|
7
|
+
executionOrder: {}
|
|
8
|
+
defineConstraints: []
|
|
9
|
+
isPreloaded: 0
|
|
10
|
+
isOverridable: 0
|
|
11
|
+
isExplicitlyReferenced: 0
|
|
12
|
+
validateReferences: 1
|
|
13
|
+
platformData:
|
|
14
|
+
- first:
|
|
15
|
+
: Any
|
|
16
|
+
second:
|
|
17
|
+
enabled: 0
|
|
18
|
+
settings:
|
|
19
|
+
Exclude Android: 1
|
|
20
|
+
Exclude Editor: 0
|
|
21
|
+
Exclude Linux64: 0
|
|
22
|
+
Exclude OSXUniversal: 0
|
|
23
|
+
Exclude Win: 0
|
|
24
|
+
Exclude Win64: 0
|
|
25
|
+
Exclude iOS: 1
|
|
26
|
+
- first:
|
|
27
|
+
Android: Android
|
|
28
|
+
second:
|
|
29
|
+
enabled: 0
|
|
30
|
+
settings:
|
|
31
|
+
CPU: ARMv7
|
|
32
|
+
- first:
|
|
33
|
+
Any:
|
|
34
|
+
second:
|
|
35
|
+
enabled: 0
|
|
36
|
+
settings: {}
|
|
37
|
+
- first:
|
|
38
|
+
Editor: Editor
|
|
39
|
+
second:
|
|
40
|
+
enabled: 1
|
|
41
|
+
settings:
|
|
42
|
+
CPU: x86_64
|
|
43
|
+
DefaultValueInitialized: true
|
|
44
|
+
OS: AnyOS
|
|
45
|
+
- first:
|
|
46
|
+
Standalone: Linux64
|
|
47
|
+
second:
|
|
48
|
+
enabled: 1
|
|
49
|
+
settings:
|
|
50
|
+
CPU: AnyCPU
|
|
51
|
+
- first:
|
|
52
|
+
Standalone: OSXUniversal
|
|
53
|
+
second:
|
|
54
|
+
enabled: 1
|
|
55
|
+
settings:
|
|
56
|
+
CPU: x86_64
|
|
57
|
+
- first:
|
|
58
|
+
Standalone: Win
|
|
59
|
+
second:
|
|
60
|
+
enabled: 1
|
|
61
|
+
settings:
|
|
62
|
+
CPU: None
|
|
63
|
+
- first:
|
|
64
|
+
Standalone: Win64
|
|
65
|
+
second:
|
|
66
|
+
enabled: 1
|
|
67
|
+
settings:
|
|
68
|
+
CPU: AnyCPU
|
|
69
|
+
- first:
|
|
70
|
+
iPhone: iOS
|
|
71
|
+
second:
|
|
72
|
+
enabled: 0
|
|
73
|
+
settings:
|
|
74
|
+
AddToEmbeddedBinaries: false
|
|
75
|
+
CPU: AnyCPU
|
|
76
|
+
CompileFlags:
|
|
77
|
+
FrameworkDependencies:
|
|
78
|
+
userData:
|
|
79
|
+
assetBundleName:
|
|
80
|
+
assetBundleVariant:
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
using Newtonsoft.Json;
|
|
2
|
+
using Newtonsoft.Json.Linq;
|
|
3
|
+
|
|
4
|
+
namespace TapSDK.CloudSave.Standalone
|
|
5
|
+
{
|
|
6
|
+
internal class TapCloudSaveBaseResponse
|
|
7
|
+
{
|
|
8
|
+
[JsonProperty("success")]
|
|
9
|
+
public bool success { get; set; }
|
|
10
|
+
|
|
11
|
+
[JsonProperty("now")]
|
|
12
|
+
public int now { get; set; }
|
|
13
|
+
|
|
14
|
+
[JsonProperty("data")]
|
|
15
|
+
public JObject data { get; set; }
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
internal class TapCloudSaveError
|
|
19
|
+
{
|
|
20
|
+
[JsonProperty("code")]
|
|
21
|
+
public int code { get; set; }
|
|
22
|
+
|
|
23
|
+
[JsonProperty("msg")]
|
|
24
|
+
public string msg { get; set; }
|
|
25
|
+
|
|
26
|
+
[JsonProperty("error")]
|
|
27
|
+
public string error { get; set; }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using Newtonsoft.Json;
|
|
4
|
+
using TapSDK.Core.Standalone.Internal.Openlog;
|
|
5
|
+
|
|
6
|
+
namespace TapSDK.CloudSave.Standalone
|
|
7
|
+
{
|
|
8
|
+
internal class TapCloudSaveTracker
|
|
9
|
+
{
|
|
10
|
+
private const string ACTION_INIT = "init";
|
|
11
|
+
private const string ACTION_START = "start";
|
|
12
|
+
private const string ACTION_SUCCESS = "success";
|
|
13
|
+
private const string ACTION_FAIL = "fail";
|
|
14
|
+
|
|
15
|
+
private static TapCloudSaveTracker instance;
|
|
16
|
+
|
|
17
|
+
private TapOpenlogStandalone openlog;
|
|
18
|
+
|
|
19
|
+
private TapCloudSaveTracker()
|
|
20
|
+
{
|
|
21
|
+
openlog = new TapOpenlogStandalone("TapCloudSave", TapTapCloudSave.Version);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
public static TapCloudSaveTracker Instance
|
|
25
|
+
{
|
|
26
|
+
get
|
|
27
|
+
{
|
|
28
|
+
if (instance == null)
|
|
29
|
+
{
|
|
30
|
+
instance = new TapCloudSaveTracker();
|
|
31
|
+
}
|
|
32
|
+
return instance;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
internal void TrackInit()
|
|
37
|
+
{
|
|
38
|
+
ReportLog(ACTION_INIT);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
internal void TrackStart(string funcNace, string seesionId)
|
|
42
|
+
{
|
|
43
|
+
Dictionary<string, string> parameters = new Dictionary<string, string>
|
|
44
|
+
{
|
|
45
|
+
{ "func_name", funcNace },
|
|
46
|
+
{ "session_id", seesionId },
|
|
47
|
+
};
|
|
48
|
+
ReportLog(
|
|
49
|
+
ACTION_START,
|
|
50
|
+
new Dictionary<string, string>()
|
|
51
|
+
{
|
|
52
|
+
{ "args", JsonConvert.SerializeObject(parameters) },
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
internal void TrackSuccess(string funcNace, string seesionId)
|
|
58
|
+
{
|
|
59
|
+
Dictionary<string, string> parameters = new Dictionary<string, string>
|
|
60
|
+
{
|
|
61
|
+
{ "func_name", funcNace },
|
|
62
|
+
{ "session_id", seesionId },
|
|
63
|
+
};
|
|
64
|
+
ReportLog(
|
|
65
|
+
ACTION_SUCCESS,
|
|
66
|
+
new Dictionary<string, string>()
|
|
67
|
+
{
|
|
68
|
+
{ "args", JsonConvert.SerializeObject(parameters) },
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
internal void TrackFailure(
|
|
74
|
+
string funcNace,
|
|
75
|
+
string seesionId,
|
|
76
|
+
int errorCode = -1,
|
|
77
|
+
string errorMessage = null
|
|
78
|
+
)
|
|
79
|
+
{
|
|
80
|
+
Dictionary<string, string> parameters = new Dictionary<string, string>
|
|
81
|
+
{
|
|
82
|
+
{ "func_name", funcNace },
|
|
83
|
+
{ "session_id", seesionId },
|
|
84
|
+
{ "error_code", errorCode.ToString() },
|
|
85
|
+
{ "error_msg", errorMessage },
|
|
86
|
+
};
|
|
87
|
+
ReportLog(
|
|
88
|
+
ACTION_FAIL,
|
|
89
|
+
new Dictionary<string, string>()
|
|
90
|
+
{
|
|
91
|
+
{ "args", JsonConvert.SerializeObject(parameters) },
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
private void ReportLog(string action, Dictionary<string, string> parameters = null)
|
|
97
|
+
{
|
|
98
|
+
openlog.LogBusiness(action, parameters);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|