-
Notifications
You must be signed in to change notification settings - Fork 156
/
Copy pathsteammessages_gamenotifications.proto
157 lines (126 loc) · 9.28 KB
/
steammessages_gamenotifications.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
syntax = "proto2";
import "steammessages_base.proto";
import "steammessages_unified_base.proto";
option py_generic_services = true;
message CGameNotifications_Variable {
optional string key = 1 [(description) = "The name of the variable in the localized text -- anywhere that %variablename% is found within the text it will be substituded with the given value"];
optional string value = 2 [(description) = "The value of the variable to substitute in the localized text in place of the given variable. Can itself be a localization token."];
}
message CGameNotifications_LocalizedText {
optional string token = 1 [(description) = "A localization token that maps to the desired string."];
repeated .CGameNotifications_Variable variables = 2 [(description) = "A list of variables values to substitute in any variables found in the localized string."];
optional string rendered_text = 3 [(description) = "Text rendered in the requested language, complete with variable substitutions, if a language was specified."];
}
message CGameNotifications_UserStatus {
optional fixed64 steamid = 1 [(description) = "The specific user's steamid."];
optional string state = 2 [(description) = "The user's state. ready -- the user is ready to play. waiting -- The game is waiting on an action from the user. completed, the game is over."];
optional .CGameNotifications_LocalizedText title = 3 [(description) = "Title of the session to display to this user in their list of active sessions."];
optional .CGameNotifications_LocalizedText message = 4 [(description) = "Subtitle of the session to display to this user user within their list of active sessions."];
}
message CGameNotifications_CreateSession_Request {
optional uint32 appid = 1 [(description) = "The appid to create the session for."];
optional uint64 context = 2 [(description) = "Game-specified context value the game can used to associate the session with some object on their backend."];
optional .CGameNotifications_LocalizedText title = 3 [(description) = "The title of the session to be displayed within each user's list of sessions."];
repeated .CGameNotifications_UserStatus users = 4 [(description) = "The initial state of all users in the session."];
optional fixed64 steamid = 5 [(description) = "(Optional) steamid to make the request on behalf of -- if specified, the user must be in the session and all users being added to the session must be friends with the user."];
}
message CGameNotifications_CreateSession_Response {
optional uint64 sessionid = 1 [(description) = "The sessionid of the created session."];
}
message CGameNotifications_DeleteSession_Request {
optional uint64 sessionid = 1 [(description) = "The sessionid to delete."];
optional uint32 appid = 2 [(description) = "The appid of the session to delete."];
optional fixed64 steamid = 3 [(description) = "(Optional) steamid to make the request on behalf of -- if specified, the user must be in the session."];
}
message CGameNotifications_DeleteSession_Response {
}
message CGameNotifications_UpdateSession_Request {
optional uint64 sessionid = 1 [(description) = "The sessionid to update."];
optional uint32 appid = 2 [(description) = "The appid of the session to update."];
optional .CGameNotifications_LocalizedText title = 3 [(description) = "(Optional) The new title of the session. If not specified, the title will not be changed."];
repeated .CGameNotifications_UserStatus users = 4 [(description) = "(Optional) A list of users whose state will be updated to reflect the given state. If the users are not already in the session, they will be added to it."];
optional fixed64 steamid = 6 [(description) = "(Optional) steamid to make the request on behalf of -- if specified, the user must be in the session and all users being added to the session must be friends with the user."];
}
message CGameNotifications_UpdateSession_Response {
}
message CGameNotifications_EnumerateSessions_Request {
optional uint32 appid = 1 [(description) = "The sessionid to request details for. Optional. If not specified, all the user's sessions will be returned."];
optional bool include_all_user_messages = 3 [(description) = "(Optional) Boolean determining whether the message for all users should be included. Defaults to false."];
optional bool include_auth_user_message = 4 [(description) = "(Optional) Boolean determining whether the message for the authenticated user should be included. Defaults to false."];
optional string language = 5 [(description) = "(Optional) Language to localize the text in."];
}
message CGameNotifications_Session {
optional uint64 sessionid = 1 [(description) = "The sessionid for this session."];
optional uint64 appid = 2 [(description) = "The appid for the session."];
optional uint64 context = 3 [(description) = "Game-specified context value the game can used to associate the session with some object on their backend."];
optional .CGameNotifications_LocalizedText title = 4 [(description) = "The current title for the session."];
optional uint32 time_created = 5 [(description) = "The time the session was created."];
optional uint32 time_updated = 6 [(description) = "The last time the session was updated."];
repeated .CGameNotifications_UserStatus user_status = 7 [(description) = "The status of all the users in the session."];
}
message CGameNotifications_EnumerateSessions_Response {
repeated .CGameNotifications_Session sessions = 1 [(description) = "A list of the user's sessions."];
}
message CGameNotifications_GetSessionDetails_Request {
message RequestedSession {
optional uint64 sessionid = 1 [(description) = "The sessionid to get details for."];
optional bool include_auth_user_message = 3 [(description) = "(Optional) Boolean determining whether the message for the authenticated user should be included. Defaults to false."];
}
repeated .CGameNotifications_GetSessionDetails_Request.RequestedSession sessions = 1;
optional uint32 appid = 2 [(description) = "The appid for the sessions."];
optional string language = 3 [(description) = "Language to localize the text in."];
}
message CGameNotifications_GetSessionDetails_Response {
repeated .CGameNotifications_Session sessions = 1 [(description) = "The details of the session."];
}
message GameNotificationSettings {
optional uint32 appid = 1 [(description) = "The appid to create the session for."];
optional bool allow_notifications = 2 [(description) = "Whether the user allows notification for this app."];
}
message CGameNotifications_UpdateNotificationSettings_Request {
repeated .GameNotificationSettings game_notification_settings = 1;
}
message CGameNotifications_UpdateNotificationSettings_Response {
}
message CGameNotifications_OnNotificationsRequested_Notification {
optional fixed64 steamid = 1 [(description) = "steamid of the user who notifications were requested for."];
optional uint32 appid = 2 [(description) = "The appid that requested notifications."];
}
message CGameNotifications_OnUserStatusChanged_Notification {
optional fixed64 steamid = 1 [(description) = "steamid of the user whose status changed."];
optional uint64 sessionid = 2 [(description) = "The sessionid of the session where the user's status was changed."];
optional uint32 appid = 3 [(description) = "The appid of the session where the user's status changed."];
optional .CGameNotifications_UserStatus status = 4 [(description) = "(Optional) New status of the user."];
optional bool removed = 5 [(description) = "(Optional) User has been removed from the session."];
}
service GameNotifications {
option (service_description) = "A service for functions related to the asyncronous game notification server.";
rpc UserCreateSession (.CGameNotifications_CreateSession_Request) returns (.CGameNotifications_CreateSession_Response) {
option (method_description) = "Creates an async game session";
}
rpc UserDeleteSession (.CGameNotifications_DeleteSession_Request) returns (.CGameNotifications_DeleteSession_Response) {
option (method_description) = "Deletes an async game session";
}
rpc UserUpdateSession (.CGameNotifications_UpdateSession_Request) returns (.CGameNotifications_UpdateSession_Response) {
option (method_description) = "Updates an async game session";
}
rpc EnumerateSessions (.CGameNotifications_EnumerateSessions_Request) returns (.CGameNotifications_EnumerateSessions_Response) {
option (method_description) = "Enumerates a user's sessions";
}
rpc GetSessionDetails (.CGameNotifications_GetSessionDetails_Request) returns (.CGameNotifications_GetSessionDetails_Response) {
option (method_description) = "Get the details for a specific session";
}
rpc UpdateNotificationSettings (.CGameNotifications_UpdateNotificationSettings_Request) returns (.CGameNotifications_UpdateNotificationSettings_Response) {
option (method_description) = "Updates whether a user allows game notifications for a specific app";
}
}
service GameNotificationsClient {
option (service_description) = "Client notifications";
option (service_execution_site) = k_EProtoExecutionSiteSteamClient;
rpc OnNotificationsRequested (.CGameNotifications_OnNotificationsRequested_Notification) returns (.NoResponse) {
option (method_description) = "Requests that the user opt into notifications";
}
rpc OnUserStatusChanged (.CGameNotifications_OnUserStatusChanged_Notification) returns (.NoResponse) {
option (method_description) = "Notification that the user's status has changed";
}
}