-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgalaxy.protocols.communication_service.proto
425 lines (360 loc) · 11.3 KB
/
galaxy.protocols.communication_service.proto
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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
syntax = "proto2";
package galaxy.protocols.communication_service;
enum MessageSort {
MESSAGE_SORT = 1;
}
enum MessageType {
option allow_alias = true;
UNKNOWN_MESSAGE = 0;
LIBRARY_INFO_REQUEST = 1;
LIBRARY_INFO_RESPONSE = 2;
AUTH_INFO_REQUEST = 3;
AUTH_INFO_RESPONSE = 4;
GET_USER_STATS_REQUEST = 15;
GET_USER_STATS_RESPONSE = 16;
UPDATE_USER_STAT_REQUEST = 17;
UPDATE_USER_STAT_RESPONSE = 18;
DELETE_USER_STATS_REQUEST = 19;
DELETE_USER_STATS_RESPONSE = 20;
GET_GLOBAL_STATS_REQUEST = 21;
GET_GLOBAL_STATS_RESPONSE = 22;
GET_USER_ACHIEVEMENTS_REQUEST = 23;
GET_USER_ACHIEVEMENTS_RESPONSE = 24;
UNLOCK_USER_ACHIEVEMENT_REQUEST = 25;
UNLOCK_USER_ACHIEVEMENT_RESPONSE = 26;
CLEAR_USER_ACHIEVEMENT_REQUEST = 27;
CLEAR_USER_ACHIEVEMENT_RESPONSE = 28;
DELETE_USER_ACHIEVEMENTS_REQUEST = 29;
DELETE_USER_ACHIEVEMENTS_RESPONSE = 30;
GET_LEADERBOARDS_REQUEST = 31;
GET_LEADERBOARDS_RESPONSE = 32;
GET_LEADERBOARD_ENTRIES_GLOBAL_REQUEST = 33;
GET_LEADERBOARD_ENTRIES_AROUND_USER_REQUEST = 34;
GET_LEADERBOARD_ENTRIES_FOR_USERS_REQUEST = 35;
GET_LEADERBOARD_ENTRIES_RESPONSE = 36;
SET_LEADERBOARD_SCORE_REQUEST = 37;
SET_LEADERBOARD_SCORE_RESPONSE = 38;
AUTH_STATE_CHANGE_NOTIFICATION = 39;
GET_LEADERBOARDS_BY_KEY_REQUEST = 40;
CREATE_LEADERBOARD_REQUEST = 41;
CREATE_LEADERBOARD_RESPONSE = 42;
GET_USER_TIME_PLAYED_REQUEST = 43;
GET_USER_TIME_PLAYED_RESPONSE = 44;
SHARE_FILE_REQUEST = 47;
SHARE_FILE_RESPONSE = 48;
START_OVERLAY_SESSION_REQUEST = 49;
START_OVERLAY_SESSION_RESPONSE = 50;
START_GAME_SESSION_REQUEST = 49;
START_GAME_SESSION_RESPONSE = 50;
START_STORAGE_SYNCHRONIZATION_REQUEST = 51;
START_STORAGE_SYNCHRONIZATION_RESPONSE = 52;
STORAGE_SYNCHRONIZATION_PROGRESS_NOTIFICATION = 53;
STORAGE_SYNCHRONIZATION_SUCCESS_NOTIFICATION = 54;
STORAGE_SYNCHRONIZATION_FAILURE_NOTIFICATION = 55;
ABORT_STORAGE_SYNCHRONIZATION_REQUEST = 56;
ABORT_STORAGE_SYNCHRONIZATION_RESPONSE = 57;
OVERLAY_STATE_CHANGE_NOTIFICATION = 58;
CONFIGURE_ENVIRONMENT_REQUEST = 59;
CONFIGURE_ENVIRONMENT_RESPONSE = 60;
}
enum Bitness {
BITNESS_UNDEFINED = 0;
BITNESS_32_BIT = 1;
BITNESS_64_BIT = 2;
};
enum CompilerType {
COMPILER_TYPE_UNDEFINED = 0;
COMPILER_TYPE_CLANG = 1;
COMPILER_TYPE_GCC = 2;
COMPILER_TYPE_MSVC = 3;
};
enum PlatformType {
PLATFORM_TYPE_UNDEFINED = 0;
PLATFORM_TYPE_GALAXY = 1;
PLATFORM_TYPE_STEAM = 2;
};
enum EnvironmentType {
ENVIRONMENT_PRODUCTION = 0;
ENVIRONMENT_TEST = 1;
ENVIRONMENT_PREPROD = 2;
};
enum Region {
REGION_WORLD_WIDE = 0;
REGION_CHINA = 1;
};
enum UpdateStatus {
UNKNOWN_UPDATE_STATUS = 0;
UPDATE_PENDING = 1;
UPDATE_FAILED = 2;
UPDATE_COMPLETE = 3;
};
enum ValueType {
VALUE_TYPE_UNDEFINED = 0;
VALUE_TYPE_INT = 1;
VALUE_TYPE_FLOAT = 2;
VALUE_TYPE_AVGRATE = 3;
};
enum SortMethod {
SORT_METHOD_UNDEFINED = 0;
SORT_METHOD_ASCENDING = 1;
SORT_METHOD_DESCENDING = 2;
};
enum DisplayType {
DISPLAY_TYPE_UNDEFINED = 0;
DISPLAY_TYPE_NUMERIC = 1;
DISPLAY_TYPE_TIME_SECONDS = 2;
DISPLAY_TYPE_TIME_MILLISECONDS = 3;
};
enum SynchronizationPolicy {
SYNCHRONIZATION_POLICY_FAIL_ON_CONFLICT = 0;
SYNCHRONIZATION_POLICY_PREFER_LOCAL = 1;
SYNCHRONIZATION_POLICY_PREFER_REMOTE = 2;
SYNCHRONIZATION_POLICY_SKIP_CONFLICTS = 3;
};
enum SynchronizationModifierFlag {
SYNCHRONIZATION_MODIFIER_DO_NOT_PULL = 1;
SYNCHRONIZATION_MODIFIER_DO_NOT_PUSH = 2;
SYNCHRONIZATION_MODIFIER_RESTORE_MISSING = 4;
SYNCHRONIZATION_MODIFIER_DO_NOT_USE_DATABASE = 8;
SYNCHRONIZATION_MODIFIER_VERIFY_LOCAL_DATA = 16;
};
message LibraryInfoRequest {
optional Bitness bitness = 1;
optional CompilerType compiler_type = 2;
optional string compiler_version = 3;
}
message LibraryInfoResponse {
optional string location = 1;
optional UpdateStatus update_status = 2;
}
message AuthInfoRequest {
optional string client_id = 1;
optional string client_secret = 2;
optional PlatformType platform_type = 3;
optional string steam_ticket = 4;
optional uint32 game_pid = 5;
optional bool openid = 6;
}
message AuthInfoResponse {
optional string refresh_token = 1;
optional EnvironmentType environment_type = 2;
optional fixed64 user_id = 3;
optional string user_name = 4;
optional Region region = 5;
}
message GetUserStatsRequest {
optional fixed64 user_id = 1;
}
message GetUserStatsResponse {
message UserStat {
optional fixed64 stat_id = 1;
optional string key = 2;
optional ValueType value_type = 3;
optional float float_value = 4;
optional int32 int_value = 5;
optional double window_size = 6;
optional float float_default_value = 7;
optional int32 int_default_value = 8;
optional float float_min_value = 9;
optional int32 int_min_value = 10;
optional float float_max_value = 11;
optional int32 int_max_value = 12;
optional float float_max_change = 13;
optional int32 int_max_change = 14;
optional bool increment_only = 15;
}
repeated UserStat user_stats = 1;
}
message UpdateUserStatRequest {
optional fixed64 stat_id = 1;
optional ValueType value_type = 2;
optional float float_value = 3;
optional int32 int_value = 4;
}
message GetGlobalStatsRequest {
optional uint32 days = 1;
}
message GetGlobalStatsResponse {
message GlobalStat {
optional fixed64 stat_id = 1;
optional string key = 2;
optional ValueType value_type = 3;
optional float float_value = 4;
optional int64 int_value = 5;
optional double window_size = 6;
}
repeated GlobalStat global_stats = 1;
}
message GetUserAchievementsRequest {
optional fixed64 user_id = 1;
}
message GetUserAchievementsResponse {
message UserAchievement {
optional fixed64 achievement_id = 1;
optional string key = 2;
optional string name = 3;
optional string description = 4;
optional string image_url_locked = 5;
optional string image_url_unlocked = 6;
optional bool visible_while_locked = 7;
optional fixed32 unlock_time = 8;
optional float rarity = 9;
optional string rarity_level_description = 10;
optional string rarity_level_slug = 11;
}
repeated UserAchievement user_achievements = 1;
optional string language = 2;
optional string achievements_mode = 3;
}
message UnlockUserAchievementRequest {
optional fixed64 achievement_id = 1;
optional fixed32 time = 2;
}
message ClearUserAchievementRequest {
optional fixed64 achievement_id = 1;
}
message GetLeaderboardsResponse {
message LeaderboardDefinition {
optional fixed64 leaderboard_id = 1;
optional string key = 2;
optional string name = 3;
optional SortMethod sort_method = 4;
optional DisplayType display_type = 5;
}
repeated LeaderboardDefinition leaderboard_definitions = 1;
}
message GetLeaderboardEntriesGlobalRequest {
optional fixed64 leaderboard_id = 1;
optional uint32 range_start = 2;
optional uint32 range_end = 3;
}
message GetLeaderboardEntriesAroundUserRequest {
optional fixed64 leaderboard_id = 1;
optional fixed64 user_id = 2;
optional uint32 count_before = 3;
optional uint32 count_after = 4;
}
message GetLeaderboardEntriesForUsersRequest {
optional fixed64 leaderboard_id = 1;
repeated fixed64 user_ids = 2;
}
message GetLeaderboardEntriesResponse {
message LeaderboardEntry {
optional uint32 rank = 1;
optional uint32 score = 2;
optional fixed64 user_id = 3;
optional bytes details = 4;
}
repeated LeaderboardEntry leaderboard_entries = 1;
optional uint32 leaderboard_entry_total_count = 2;
}
message SetLeaderboardScoreRequest {
required fixed64 leaderboard_id = 1;
required int32 score = 2;
required bool force_update = 3;
optional bytes details = 4;
}
message SetLeaderboardScoreResponse {
required int32 score = 1;
required uint32 old_rank = 2;
required uint32 new_rank = 3;
optional uint32 leaderboard_entry_total_count = 4 [default = 0];
}
message AuthStateChangeNotification {
optional string refresh_token = 1;
}
message GetLeaderboardsByKeyRequest {
repeated string key = 1;
}
message CreateLeaderboardRequest {
optional string key = 1;
optional string name = 2;
optional SortMethod sort_method = 3;
optional DisplayType display_type = 4;
}
message CreateLeaderboardResponse {
optional fixed64 leaderboard_id = 1;
}
message GetUserTimePlayedRequest {
optional uint64 user_id = 1;
}
message GetUserTimePlayedResponse {
optional uint32 time_played = 1;
}
message ShareFileRequest {
optional string filename = 1;
}
message ShareFileResponse {
optional uint64 file_handle = 1;
}
message StartOverlaySessionRequest {
optional uint32 game_pid = 1;
}
message StartGameSessionRequest {
enum OverlaySupport {
OVERLAY_SUPPORT_NOT_AVAILABLE = 0;
OVERLAY_SUPPORT_DISABLED = 1;
OVERLAY_SUPPORT_ENABLED = 2;
}
optional uint32 game_pid = 1;
optional OverlaySupport overlay_support = 2;
}
message StartStorageSynchronizationRequest {
message StorageLocation {
optional string name = 1;
optional string path = 2;
}
repeated StorageLocation locations = 1;
optional string client_id = 2;
optional string client_secret = 3;
optional uint32 installation_id = 4;
optional SynchronizationPolicy synchronization_policy = 5;
optional SynchronizationModifierFlag synchronization_modifier_flags = 6;
}
message StorageSynchronizationProgressNotification {
optional uint32 progress_fraction_numerator = 1;
optional uint32 progress_fraction_denominator = 2;
optional string client_id = 3;
}
message StorageSynchronizationSuccessNotification {
optional string client_id = 2;
}
message StorageSynchronizationFailureNotification {
enum FailureReason {
FAILURE_REASON_UNDEFINED = 0;
FAILURE_REASON_CONFLICT = 1;
FAILURE_REASON_ABORTED = 2;
FAILURE_REASON_QUOTA_EXCEEDED = 3;
FAILURE_REASON_NO_DISC_SPACE = 4;
}
message ConflictDetails {
optional uint32 local_storage_last_modified_time = 1;
optional uint32 remote_storage_last_modified_time = 2;
}
message QuotaExceededDetails {
optional uint32 quota_bytes = 1;
optional uint32 quota_used_bytes = 2;
optional uint32 required_bytes = 3;
optional uint32 required_uploads = 4;
}
optional string client_id = 2;
optional FailureReason failure_reason = 3;
optional ConflictDetails conflict_details = 4;
optional QuotaExceededDetails quota_exceeded_details = 5;
}
message AbortStorageSynchronizationRequest {
optional string client_id = 1;
}
message OverlayStateChangeNotification {
enum OverlayState {
OVERLAY_STATE_NOT_SUPPORTED = 0;
OVERLAY_STATE_DISABLED = 1;
OVERLAY_STATE_FAILED_TO_INITIALIZE = 2;
OVERLAY_STATE_INITIALIZED = 3;
}
optional OverlayState overlay_state = 1;
}
message ConfigureEnvironmentRequest {
optional EnvironmentType environment_type = 1;
optional Region region = 2;
}