From 0646408f9e47b85b304133a46b68311c8a486d6e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 14 Dec 2024 18:18:45 +0300 Subject: fixes #4800 (Steam: cannot send/receive messages) + obsolete message sending code removed --- protocols/Steam/src/api/message.h | 23 - protocols/Steam/src/proto.h | 26 +- ...steammessages_friendmessages.steamclient.pb-c.c | 1942 -------------------- ...eammessages_friendmessages.steamclient.pb-c.cpp | 1942 ++++++++++++++++++++ ...steammessages_friendmessages.steamclient.pb-c.h | 10 +- protocols/Steam/src/stdafx.h | 2 +- protocols/Steam/src/steam_messages.cpp | 81 +- protocols/Steam/src/steam_proto.cpp | 9 +- protocols/Steam/src/steam_proto.h | 21 +- protocols/Steam/src/steam_ws.cpp | 22 + 10 files changed, 2044 insertions(+), 2034 deletions(-) delete mode 100644 protocols/Steam/src/api/message.h delete mode 100644 protocols/Steam/src/protobuf-c/steammessages_friendmessages.steamclient.pb-c.c create mode 100644 protocols/Steam/src/protobuf-c/steammessages_friendmessages.steamclient.pb-c.cpp (limited to 'protocols/Steam/src') diff --git a/protocols/Steam/src/api/message.h b/protocols/Steam/src/api/message.h deleted file mode 100644 index 5f41876a15..0000000000 --- a/protocols/Steam/src/api/message.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef _STEAM_REQUEST_MESSAGE_H_ -#define _STEAM_REQUEST_MESSAGE_H_ - -struct SendMessageRequest : public HttpRequest -{ - SendMessageRequest(const char *token, const char *umqId, const char *steamId, const char *text) : - HttpRequest(REQUEST_POST, "/ISteamWebUserPresenceOAuth/Message/v0001") - { - this << CHAR_PARAM("access_token", token) << CHAR_PARAM("umqid", umqId) << CHAR_PARAM("steamid_dst", steamId) - << CHAR_PARAM("type", "saytext") << CHAR_PARAM("text", text); - } -}; - -struct SendTypingRequest : public HttpRequest -{ - SendTypingRequest(const char *token, const char *umqId, const char *steamId) : - HttpRequest(REQUEST_POST, "/ISteamWebUserPresenceOAuth/Message/v0001") - { - this << CHAR_PARAM("access_token", token) << CHAR_PARAM("umqid", umqId) << CHAR_PARAM("steamid_dst", steamId) << CHAR_PARAM("type", "typing"); - } -}; - -#endif //_STEAM_REQUEST_MESSAGE_H_ diff --git a/protocols/Steam/src/proto.h b/protocols/Steam/src/proto.h index b6d0fc9315..2998d34d0f 100644 --- a/protocols/Steam/src/proto.h +++ b/protocols/Steam/src/proto.h @@ -1962,6 +1962,25 @@ enum class EMsg ServerSecretChanged = 12100, }; +enum class EChatEntryType +{ + Invalid = 0, + ChatMsg = 1, + Typing = 2, + InviteGame = 3, + Emote = 4, // removed "No longer supported by clients" + LobbyGameStart = 5, // removed "Listen for LobbyGameCreated_t callback instead" + LeftConversation = 6, + Entered = 7, + WasKicked = 8, + WasBanned = 9, + Disconnected = 10, + HistoricalChat = 11, + Reserved1 = 12, + Reserved2 = 13, + LinkBlocked = 14, +}; + enum class EResult { Invalid = 0, @@ -2123,9 +2142,10 @@ namespace proto PROTOBUF_PTR(MsgMulti, cmsg_multi__descriptor); PROTOBUF_PTR(MsgProtoBufHeader, cmsg_proto_buf_header__descriptor); - PROTOBUF_PTR(MsgClientLogonResponse, cmsg_client_logon_response__descriptor); + PROTOBUF_PTR(MsgClientLogonResponse, cmsg_client_logon_response__descriptor); + PROTOBUF_PTR(FriendMessagesSendMessageResponse, cfriend_messages__send_message__response__descriptor); PROTOBUF_PTR(AuthenticationGetPasswordRSAPublicKeyResponse, cauthentication__get_password_rsapublic_key__response__descriptor); PROTOBUF_PTR(AuthenticationBeginAuthSessionViaCredentialsResponse, cauthentication__begin_auth_session_via_credentials__response__descriptor); - PROTOBUF_PTR(AuthenticationPollAuthSessionStatusResponse, cauthentication__poll_auth_session_status__response__descriptor); - PROTOBUF_PTR(AuthenticationUpdateAuthSessionWithSteamGuardCodeResponse, cauthentication__update_auth_session_with_steam_guard_code__response__descriptor); + PROTOBUF_PTR(AuthenticationPollAuthSessionStatusResponse, cauthentication__poll_auth_session_status__response__descriptor); + PROTOBUF_PTR(AuthenticationUpdateAuthSessionWithSteamGuardCodeResponse, cauthentication__update_auth_session_with_steam_guard_code__response__descriptor); }; diff --git a/protocols/Steam/src/protobuf-c/steammessages_friendmessages.steamclient.pb-c.c b/protocols/Steam/src/protobuf-c/steammessages_friendmessages.steamclient.pb-c.c deleted file mode 100644 index e06b9cd276..0000000000 --- a/protocols/Steam/src/protobuf-c/steammessages_friendmessages.steamclient.pb-c.c +++ /dev/null @@ -1,1942 +0,0 @@ -/* Generated by the protocol buffer compiler. DO NOT EDIT! */ -/* Generated from: steammessages_friendmessages.steamclient.proto */ - -/* Do not generate deprecated warnings for self */ -#ifndef PROTOBUF_C__NO_DEPRECATED -#define PROTOBUF_C__NO_DEPRECATED -#endif - -#include "steammessages_friendmessages.steamclient.pb-c.h" -size_t cfriend_messages__get_recent_messages__request__get_packed_size - (const CFriendMessagesGetRecentMessagesRequest *message) -{ - assert(message->descriptor == &cfriend_messages__get_recent_messages__request__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t cfriend_messages__get_recent_messages__request__pack - (const CFriendMessagesGetRecentMessagesRequest *message, - uint8_t *out) -{ - assert(message->descriptor == &cfriend_messages__get_recent_messages__request__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t cfriend_messages__get_recent_messages__request__pack_to_buffer - (const CFriendMessagesGetRecentMessagesRequest *message, - ProtobufCBuffer *buffer) -{ - assert(message->descriptor == &cfriend_messages__get_recent_messages__request__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -CFriendMessagesGetRecentMessagesRequest * - cfriend_messages__get_recent_messages__request__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (CFriendMessagesGetRecentMessagesRequest *) - protobuf_c_message_unpack (&cfriend_messages__get_recent_messages__request__descriptor, - allocator, len, data); -} -void cfriend_messages__get_recent_messages__request__free_unpacked - (CFriendMessagesGetRecentMessagesRequest *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->descriptor == &cfriend_messages__get_recent_messages__request__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} - -size_t cfriend_messages__get_recent_messages__response__get_packed_size - (const CFriendMessagesGetRecentMessagesResponse *message) -{ - assert(message->descriptor == &cfriend_messages__get_recent_messages__response__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t cfriend_messages__get_recent_messages__response__pack - (const CFriendMessagesGetRecentMessagesResponse *message, - uint8_t *out) -{ - assert(message->descriptor == &cfriend_messages__get_recent_messages__response__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t cfriend_messages__get_recent_messages__response__pack_to_buffer - (const CFriendMessagesGetRecentMessagesResponse *message, - ProtobufCBuffer *buffer) -{ - assert(message->descriptor == &cfriend_messages__get_recent_messages__response__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -CFriendMessagesGetRecentMessagesResponse * - cfriend_messages__get_recent_messages__response__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (CFriendMessagesGetRecentMessagesResponse *) - protobuf_c_message_unpack (&cfriend_messages__get_recent_messages__response__descriptor, - allocator, len, data); -} -void cfriend_messages__get_recent_messages__response__free_unpacked - (CFriendMessagesGetRecentMessagesResponse *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->descriptor == &cfriend_messages__get_recent_messages__response__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} - -size_t cfriends_messages__get_active_message_sessions__request__get_packed_size - (const CFriendsMessagesGetActiveMessageSessionsRequest *message) -{ - assert(message->descriptor == &cfriends_messages__get_active_message_sessions__request__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t cfriends_messages__get_active_message_sessions__request__pack - (const CFriendsMessagesGetActiveMessageSessionsRequest *message, - uint8_t *out) -{ - assert(message->descriptor == &cfriends_messages__get_active_message_sessions__request__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t cfriends_messages__get_active_message_sessions__request__pack_to_buffer - (const CFriendsMessagesGetActiveMessageSessionsRequest *message, - ProtobufCBuffer *buffer) -{ - assert(message->descriptor == &cfriends_messages__get_active_message_sessions__request__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -CFriendsMessagesGetActiveMessageSessionsRequest * - cfriends_messages__get_active_message_sessions__request__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (CFriendsMessagesGetActiveMessageSessionsRequest *) - protobuf_c_message_unpack (&cfriends_messages__get_active_message_sessions__request__descriptor, - allocator, len, data); -} -void cfriends_messages__get_active_message_sessions__request__free_unpacked - (CFriendsMessagesGetActiveMessageSessionsRequest *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->descriptor == &cfriends_messages__get_active_message_sessions__request__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} - -size_t cfriends_messages__get_active_message_sessions__response__get_packed_size - (const CFriendsMessagesGetActiveMessageSessionsResponse *message) -{ - assert(message->descriptor == &cfriends_messages__get_active_message_sessions__response__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t cfriends_messages__get_active_message_sessions__response__pack - (const CFriendsMessagesGetActiveMessageSessionsResponse *message, - uint8_t *out) -{ - assert(message->descriptor == &cfriends_messages__get_active_message_sessions__response__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t cfriends_messages__get_active_message_sessions__response__pack_to_buffer - (const CFriendsMessagesGetActiveMessageSessionsResponse *message, - ProtobufCBuffer *buffer) -{ - assert(message->descriptor == &cfriends_messages__get_active_message_sessions__response__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -CFriendsMessagesGetActiveMessageSessionsResponse * - cfriends_messages__get_active_message_sessions__response__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (CFriendsMessagesGetActiveMessageSessionsResponse *) - protobuf_c_message_unpack (&cfriends_messages__get_active_message_sessions__response__descriptor, - allocator, len, data); -} -void cfriends_messages__get_active_message_sessions__response__free_unpacked - (CFriendsMessagesGetActiveMessageSessionsResponse *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->descriptor == &cfriends_messages__get_active_message_sessions__response__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} - -size_t cfriend_messages__send_message__request__get_packed_size - (const CFriendMessagesSendMessageRequest *message) -{ - assert(message->descriptor == &cfriend_messages__send_message__request__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t cfriend_messages__send_message__request__pack - (const CFriendMessagesSendMessageRequest *message, - uint8_t *out) -{ - assert(message->descriptor == &cfriend_messages__send_message__request__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t cfriend_messages__send_message__request__pack_to_buffer - (const CFriendMessagesSendMessageRequest *message, - ProtobufCBuffer *buffer) -{ - assert(message->descriptor == &cfriend_messages__send_message__request__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -CFriendMessagesSendMessageRequest * - cfriend_messages__send_message__request__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (CFriendMessagesSendMessageRequest *) - protobuf_c_message_unpack (&cfriend_messages__send_message__request__descriptor, - allocator, len, data); -} -void cfriend_messages__send_message__request__free_unpacked - (CFriendMessagesSendMessageRequest *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->descriptor == &cfriend_messages__send_message__request__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} - -size_t cfriend_messages__send_message__response__get_packed_size - (const CFriendMessagesSendMessageResponse *message) -{ - assert(message->descriptor == &cfriend_messages__send_message__response__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t cfriend_messages__send_message__response__pack - (const CFriendMessagesSendMessageResponse *message, - uint8_t *out) -{ - assert(message->descriptor == &cfriend_messages__send_message__response__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t cfriend_messages__send_message__response__pack_to_buffer - (const CFriendMessagesSendMessageResponse *message, - ProtobufCBuffer *buffer) -{ - assert(message->descriptor == &cfriend_messages__send_message__response__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -CFriendMessagesSendMessageResponse * - cfriend_messages__send_message__response__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (CFriendMessagesSendMessageResponse *) - protobuf_c_message_unpack (&cfriend_messages__send_message__response__descriptor, - allocator, len, data); -} -void cfriend_messages__send_message__response__free_unpacked - (CFriendMessagesSendMessageResponse *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->descriptor == &cfriend_messages__send_message__response__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} - -size_t cfriend_messages__ack_message__notification__get_packed_size - (const CFriendMessagesAckMessageNotification *message) -{ - assert(message->descriptor == &cfriend_messages__ack_message__notification__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t cfriend_messages__ack_message__notification__pack - (const CFriendMessagesAckMessageNotification *message, - uint8_t *out) -{ - assert(message->descriptor == &cfriend_messages__ack_message__notification__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t cfriend_messages__ack_message__notification__pack_to_buffer - (const CFriendMessagesAckMessageNotification *message, - ProtobufCBuffer *buffer) -{ - assert(message->descriptor == &cfriend_messages__ack_message__notification__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -CFriendMessagesAckMessageNotification * - cfriend_messages__ack_message__notification__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (CFriendMessagesAckMessageNotification *) - protobuf_c_message_unpack (&cfriend_messages__ack_message__notification__descriptor, - allocator, len, data); -} -void cfriend_messages__ack_message__notification__free_unpacked - (CFriendMessagesAckMessageNotification *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->descriptor == &cfriend_messages__ack_message__notification__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} - -size_t cfriend_messages__is_in_friends_uibeta__request__get_packed_size - (const CFriendMessagesIsInFriendsUIBetaRequest *message) -{ - assert(message->descriptor == &cfriend_messages__is_in_friends_uibeta__request__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t cfriend_messages__is_in_friends_uibeta__request__pack - (const CFriendMessagesIsInFriendsUIBetaRequest *message, - uint8_t *out) -{ - assert(message->descriptor == &cfriend_messages__is_in_friends_uibeta__request__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t cfriend_messages__is_in_friends_uibeta__request__pack_to_buffer - (const CFriendMessagesIsInFriendsUIBetaRequest *message, - ProtobufCBuffer *buffer) -{ - assert(message->descriptor == &cfriend_messages__is_in_friends_uibeta__request__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -CFriendMessagesIsInFriendsUIBetaRequest * - cfriend_messages__is_in_friends_uibeta__request__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (CFriendMessagesIsInFriendsUIBetaRequest *) - protobuf_c_message_unpack (&cfriend_messages__is_in_friends_uibeta__request__descriptor, - allocator, len, data); -} -void cfriend_messages__is_in_friends_uibeta__request__free_unpacked - (CFriendMessagesIsInFriendsUIBetaRequest *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->descriptor == &cfriend_messages__is_in_friends_uibeta__request__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} - -size_t cfriend_messages__is_in_friends_uibeta__response__get_packed_size - (const CFriendMessagesIsInFriendsUIBetaResponse *message) -{ - assert(message->descriptor == &cfriend_messages__is_in_friends_uibeta__response__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t cfriend_messages__is_in_friends_uibeta__response__pack - (const CFriendMessagesIsInFriendsUIBetaResponse *message, - uint8_t *out) -{ - assert(message->descriptor == &cfriend_messages__is_in_friends_uibeta__response__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t cfriend_messages__is_in_friends_uibeta__response__pack_to_buffer - (const CFriendMessagesIsInFriendsUIBetaResponse *message, - ProtobufCBuffer *buffer) -{ - assert(message->descriptor == &cfriend_messages__is_in_friends_uibeta__response__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -CFriendMessagesIsInFriendsUIBetaResponse * - cfriend_messages__is_in_friends_uibeta__response__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (CFriendMessagesIsInFriendsUIBetaResponse *) - protobuf_c_message_unpack (&cfriend_messages__is_in_friends_uibeta__response__descriptor, - allocator, len, data); -} -void cfriend_messages__is_in_friends_uibeta__response__free_unpacked - (CFriendMessagesIsInFriendsUIBetaResponse *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->descriptor == &cfriend_messages__is_in_friends_uibeta__response__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} - -size_t cfriend_messages__update_message_reaction__request__get_packed_size - (const CFriendMessagesUpdateMessageReactionRequest *message) -{ - assert(message->descriptor == &cfriend_messages__update_message_reaction__request__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t cfriend_messages__update_message_reaction__request__pack - (const CFriendMessagesUpdateMessageReactionRequest *message, - uint8_t *out) -{ - assert(message->descriptor == &cfriend_messages__update_message_reaction__request__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t cfriend_messages__update_message_reaction__request__pack_to_buffer - (const CFriendMessagesUpdateMessageReactionRequest *message, - ProtobufCBuffer *buffer) -{ - assert(message->descriptor == &cfriend_messages__update_message_reaction__request__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -CFriendMessagesUpdateMessageReactionRequest * - cfriend_messages__update_message_reaction__request__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (CFriendMessagesUpdateMessageReactionRequest *) - protobuf_c_message_unpack (&cfriend_messages__update_message_reaction__request__descriptor, - allocator, len, data); -} -void cfriend_messages__update_message_reaction__request__free_unpacked - (CFriendMessagesUpdateMessageReactionRequest *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->descriptor == &cfriend_messages__update_message_reaction__request__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} - -size_t cfriend_messages__update_message_reaction__response__get_packed_size - (const CFriendMessagesUpdateMessageReactionResponse *message) -{ - assert(message->descriptor == &cfriend_messages__update_message_reaction__response__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t cfriend_messages__update_message_reaction__response__pack - (const CFriendMessagesUpdateMessageReactionResponse *message, - uint8_t *out) -{ - assert(message->descriptor == &cfriend_messages__update_message_reaction__response__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t cfriend_messages__update_message_reaction__response__pack_to_buffer - (const CFriendMessagesUpdateMessageReactionResponse *message, - ProtobufCBuffer *buffer) -{ - assert(message->descriptor == &cfriend_messages__update_message_reaction__response__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -CFriendMessagesUpdateMessageReactionResponse * - cfriend_messages__update_message_reaction__response__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (CFriendMessagesUpdateMessageReactionResponse *) - protobuf_c_message_unpack (&cfriend_messages__update_message_reaction__response__descriptor, - allocator, len, data); -} -void cfriend_messages__update_message_reaction__response__free_unpacked - (CFriendMessagesUpdateMessageReactionResponse *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->descriptor == &cfriend_messages__update_message_reaction__response__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} - -size_t cfriend_messages__incoming_message__notification__get_packed_size - (const CFriendMessagesIncomingMessageNotification *message) -{ - assert(message->descriptor == &cfriend_messages__incoming_message__notification__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t cfriend_messages__incoming_message__notification__pack - (const CFriendMessagesIncomingMessageNotification *message, - uint8_t *out) -{ - assert(message->descriptor == &cfriend_messages__incoming_message__notification__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t cfriend_messages__incoming_message__notification__pack_to_buffer - (const CFriendMessagesIncomingMessageNotification *message, - ProtobufCBuffer *buffer) -{ - assert(message->descriptor == &cfriend_messages__incoming_message__notification__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -CFriendMessagesIncomingMessageNotification * - cfriend_messages__incoming_message__notification__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (CFriendMessagesIncomingMessageNotification *) - protobuf_c_message_unpack (&cfriend_messages__incoming_message__notification__descriptor, - allocator, len, data); -} -void cfriend_messages__incoming_message__notification__free_unpacked - (CFriendMessagesIncomingMessageNotification *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->descriptor == &cfriend_messages__incoming_message__notification__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} - -size_t cfriend_messages__message_reaction__notification__get_packed_size - (const CFriendMessagesMessageReactionNotification *message) -{ - assert(message->descriptor == &cfriend_messages__message_reaction__notification__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t cfriend_messages__message_reaction__notification__pack - (const CFriendMessagesMessageReactionNotification *message, - uint8_t *out) -{ - assert(message->descriptor == &cfriend_messages__message_reaction__notification__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t cfriend_messages__message_reaction__notification__pack_to_buffer - (const CFriendMessagesMessageReactionNotification *message, - ProtobufCBuffer *buffer) -{ - assert(message->descriptor == &cfriend_messages__message_reaction__notification__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -CFriendMessagesMessageReactionNotification * - cfriend_messages__message_reaction__notification__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) -{ - return (CFriendMessagesMessageReactionNotification *) - protobuf_c_message_unpack (&cfriend_messages__message_reaction__notification__descriptor, - allocator, len, data); -} -void cfriend_messages__message_reaction__notification__free_unpacked - (CFriendMessagesMessageReactionNotification *message, - ProtobufCAllocator *allocator) -{ - if(!message) - return; - assert(message->descriptor == &cfriend_messages__message_reaction__notification__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} - -static const ProtobufCFieldDescriptor cfriend_messages__get_recent_messages__request__field_descriptors[9] = -{ - { - "steamid1", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_FIXED64, - offsetof(CFriendMessagesGetRecentMessagesRequest, has_steamid1), - offsetof(CFriendMessagesGetRecentMessagesRequest, steamid1), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "steamid2", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_FIXED64, - offsetof(CFriendMessagesGetRecentMessagesRequest, has_steamid2), - offsetof(CFriendMessagesGetRecentMessagesRequest, steamid2), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "count", - 3, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendMessagesGetRecentMessagesRequest, has_count), - offsetof(CFriendMessagesGetRecentMessagesRequest, count), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "most_recent_conversation", - 4, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(CFriendMessagesGetRecentMessagesRequest, has_most_recent_conversation), - offsetof(CFriendMessagesGetRecentMessagesRequest, most_recent_conversation), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "rtime32_start_time", - 5, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_FIXED32, - offsetof(CFriendMessagesGetRecentMessagesRequest, has_rtime32_start_time), - offsetof(CFriendMessagesGetRecentMessagesRequest, rtime32_start_time), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "bbcode_format", - 6, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(CFriendMessagesGetRecentMessagesRequest, has_bbcode_format), - offsetof(CFriendMessagesGetRecentMessagesRequest, bbcode_format), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "start_ordinal", - 7, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendMessagesGetRecentMessagesRequest, has_start_ordinal), - offsetof(CFriendMessagesGetRecentMessagesRequest, start_ordinal), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "time_last", - 8, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendMessagesGetRecentMessagesRequest, has_time_last), - offsetof(CFriendMessagesGetRecentMessagesRequest, time_last), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "ordinal_last", - 9, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendMessagesGetRecentMessagesRequest, has_ordinal_last), - offsetof(CFriendMessagesGetRecentMessagesRequest, ordinal_last), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned cfriend_messages__get_recent_messages__request__field_indices_by_name[] = { - 5, /* field[5] = bbcode_format */ - 2, /* field[2] = count */ - 3, /* field[3] = most_recent_conversation */ - 8, /* field[8] = ordinal_last */ - 4, /* field[4] = rtime32_start_time */ - 6, /* field[6] = start_ordinal */ - 0, /* field[0] = steamid1 */ - 1, /* field[1] = steamid2 */ - 7, /* field[7] = time_last */ -}; -static const ProtobufCIntRange cfriend_messages__get_recent_messages__request__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 9 } -}; -const ProtobufCMessageDescriptor cfriend_messages__get_recent_messages__request__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "CFriendMessages_GetRecentMessages_Request", - "CFriendMessagesGetRecentMessagesRequest", - "CFriendMessagesGetRecentMessagesRequest", - "", - sizeof(CFriendMessagesGetRecentMessagesRequest), - 9, - cfriend_messages__get_recent_messages__request__field_descriptors, - cfriend_messages__get_recent_messages__request__field_indices_by_name, - 1, cfriend_messages__get_recent_messages__request__number_ranges, - NULL,NULL,NULL,NULL /* reserved[123] */ -}; -static const EMessageReactionType cfriend_messages__get_recent_messages__response__friend_message__message_reaction__reaction_type__default_value = EMESSAGE_REACTION_TYPE__k_EMessageReactionType_Invalid; -static const ProtobufCFieldDescriptor cfriend_messages__get_recent_messages__response__friend_message__message_reaction__field_descriptors[3] = -{ - { - "reaction_type", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_ENUM, - offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage__MessageReaction, has_reaction_type), - offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage__MessageReaction, reaction_type), - &emessage_reaction_type__descriptor, - &cfriend_messages__get_recent_messages__response__friend_message__message_reaction__reaction_type__default_value, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "reaction", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage__MessageReaction, reaction), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "reactors", - 3, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage__MessageReaction, n_reactors), - offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage__MessageReaction, reactors), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned cfriend_messages__get_recent_messages__response__friend_message__message_reaction__field_indices_by_name[] = { - 1, /* field[1] = reaction */ - 0, /* field[0] = reaction_type */ - 2, /* field[2] = reactors */ -}; -static const ProtobufCIntRange cfriend_messages__get_recent_messages__response__friend_message__message_reaction__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 3 } -}; -const ProtobufCMessageDescriptor cfriend_messages__get_recent_messages__response__friend_message__message_reaction__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "CFriendMessages_GetRecentMessages_Response.FriendMessage.MessageReaction", - "MessageReaction", - "CFriendMessagesGetRecentMessagesResponse__FriendMessage__MessageReaction", - "", - sizeof(CFriendMessagesGetRecentMessagesResponse__FriendMessage__MessageReaction), - 3, - cfriend_messages__get_recent_messages__response__friend_message__message_reaction__field_descriptors, - cfriend_messages__get_recent_messages__response__friend_message__message_reaction__field_indices_by_name, - 1, cfriend_messages__get_recent_messages__response__friend_message__message_reaction__number_ranges, - NULL,NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor cfriend_messages__get_recent_messages__response__friend_message__field_descriptors[5] = -{ - { - "accountid", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage, has_accountid), - offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage, accountid), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "timestamp", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage, has_timestamp), - offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage, timestamp), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "message", - 3, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage, message), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "ordinal", - 4, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage, has_ordinal), - offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage, ordinal), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "reactions", - 5, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage, n_reactions), - offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage, reactions), - &cfriend_messages__get_recent_messages__response__friend_message__message_reaction__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned cfriend_messages__get_recent_messages__response__friend_message__field_indices_by_name[] = { - 0, /* field[0] = accountid */ - 2, /* field[2] = message */ - 3, /* field[3] = ordinal */ - 4, /* field[4] = reactions */ - 1, /* field[1] = timestamp */ -}; -static const ProtobufCIntRange cfriend_messages__get_recent_messages__response__friend_message__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 5 } -}; -const ProtobufCMessageDescriptor cfriend_messages__get_recent_messages__response__friend_message__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "CFriendMessages_GetRecentMessages_Response.FriendMessage", - "FriendMessage", - "CFriendMessagesGetRecentMessagesResponse__FriendMessage", - "", - sizeof(CFriendMessagesGetRecentMessagesResponse__FriendMessage), - 5, - cfriend_messages__get_recent_messages__response__friend_message__field_descriptors, - cfriend_messages__get_recent_messages__response__friend_message__field_indices_by_name, - 1, cfriend_messages__get_recent_messages__response__friend_message__number_ranges, - NULL,NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor cfriend_messages__get_recent_messages__response__field_descriptors[2] = -{ - { - "messages", - 1, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - offsetof(CFriendMessagesGetRecentMessagesResponse, n_messages), - offsetof(CFriendMessagesGetRecentMessagesResponse, messages), - &cfriend_messages__get_recent_messages__response__friend_message__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "more_available", - 4, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(CFriendMessagesGetRecentMessagesResponse, has_more_available), - offsetof(CFriendMessagesGetRecentMessagesResponse, more_available), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned cfriend_messages__get_recent_messages__response__field_indices_by_name[] = { - 0, /* field[0] = messages */ - 1, /* field[1] = more_available */ -}; -static const ProtobufCIntRange cfriend_messages__get_recent_messages__response__number_ranges[2 + 1] = -{ - { 1, 0 }, - { 4, 1 }, - { 0, 2 } -}; -const ProtobufCMessageDescriptor cfriend_messages__get_recent_messages__response__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "CFriendMessages_GetRecentMessages_Response", - "CFriendMessagesGetRecentMessagesResponse", - "CFriendMessagesGetRecentMessagesResponse", - "", - sizeof(CFriendMessagesGetRecentMessagesResponse), - 2, - cfriend_messages__get_recent_messages__response__field_descriptors, - cfriend_messages__get_recent_messages__response__field_indices_by_name, - 2, cfriend_messages__get_recent_messages__response__number_ranges, - NULL,NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor cfriends_messages__get_active_message_sessions__request__field_descriptors[2] = -{ - { - "lastmessage_since", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendsMessagesGetActiveMessageSessionsRequest, has_lastmessage_since), - offsetof(CFriendsMessagesGetActiveMessageSessionsRequest, lastmessage_since), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "only_sessions_with_messages", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(CFriendsMessagesGetActiveMessageSessionsRequest, has_only_sessions_with_messages), - offsetof(CFriendsMessagesGetActiveMessageSessionsRequest, only_sessions_with_messages), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned cfriends_messages__get_active_message_sessions__request__field_indices_by_name[] = { - 0, /* field[0] = lastmessage_since */ - 1, /* field[1] = only_sessions_with_messages */ -}; -static const ProtobufCIntRange cfriends_messages__get_active_message_sessions__request__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 2 } -}; -const ProtobufCMessageDescriptor cfriends_messages__get_active_message_sessions__request__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "CFriendsMessages_GetActiveMessageSessions_Request", - "CFriendsMessagesGetActiveMessageSessionsRequest", - "CFriendsMessagesGetActiveMessageSessionsRequest", - "", - sizeof(CFriendsMessagesGetActiveMessageSessionsRequest), - 2, - cfriends_messages__get_active_message_sessions__request__field_descriptors, - cfriends_messages__get_active_message_sessions__request__field_indices_by_name, - 1, cfriends_messages__get_active_message_sessions__request__number_ranges, - NULL,NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor cfriends_messages__get_active_message_sessions__response__friend_message_session__field_descriptors[4] = -{ - { - "accountid_friend", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession, has_accountid_friend), - offsetof(CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession, accountid_friend), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "last_message", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession, has_last_message), - offsetof(CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession, last_message), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "last_view", - 3, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession, has_last_view), - offsetof(CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession, last_view), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "unread_message_count", - 4, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession, has_unread_message_count), - offsetof(CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession, unread_message_count), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned cfriends_messages__get_active_message_sessions__response__friend_message_session__field_indices_by_name[] = { - 0, /* field[0] = accountid_friend */ - 1, /* field[1] = last_message */ - 2, /* field[2] = last_view */ - 3, /* field[3] = unread_message_count */ -}; -static const ProtobufCIntRange cfriends_messages__get_active_message_sessions__response__friend_message_session__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 4 } -}; -const ProtobufCMessageDescriptor cfriends_messages__get_active_message_sessions__response__friend_message_session__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "CFriendsMessages_GetActiveMessageSessions_Response.FriendMessageSession", - "FriendMessageSession", - "CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession", - "", - sizeof(CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession), - 4, - cfriends_messages__get_active_message_sessions__response__friend_message_session__field_descriptors, - cfriends_messages__get_active_message_sessions__response__friend_message_session__field_indices_by_name, - 1, cfriends_messages__get_active_message_sessions__response__friend_message_session__number_ranges, - NULL,NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor cfriends_messages__get_active_message_sessions__response__field_descriptors[2] = -{ - { - "message_sessions", - 1, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - offsetof(CFriendsMessagesGetActiveMessageSessionsResponse, n_message_sessions), - offsetof(CFriendsMessagesGetActiveMessageSessionsResponse, message_sessions), - &cfriends_messages__get_active_message_sessions__response__friend_message_session__descriptor, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "timestamp", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendsMessagesGetActiveMessageSessionsResponse, has_timestamp), - offsetof(CFriendsMessagesGetActiveMessageSessionsResponse, timestamp), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned cfriends_messages__get_active_message_sessions__response__field_indices_by_name[] = { - 0, /* field[0] = message_sessions */ - 1, /* field[1] = timestamp */ -}; -static const ProtobufCIntRange cfriends_messages__get_active_message_sessions__response__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 2 } -}; -const ProtobufCMessageDescriptor cfriends_messages__get_active_message_sessions__response__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "CFriendsMessages_GetActiveMessageSessions_Response", - "CFriendsMessagesGetActiveMessageSessionsResponse", - "CFriendsMessagesGetActiveMessageSessionsResponse", - "", - sizeof(CFriendsMessagesGetActiveMessageSessionsResponse), - 2, - cfriends_messages__get_active_message_sessions__response__field_descriptors, - cfriends_messages__get_active_message_sessions__response__field_indices_by_name, - 1, cfriends_messages__get_active_message_sessions__response__number_ranges, - NULL,NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor cfriend_messages__send_message__request__field_descriptors[7] = -{ - { - "steamid", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_FIXED64, - offsetof(CFriendMessagesSendMessageRequest, has_steamid), - offsetof(CFriendMessagesSendMessageRequest, steamid), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "chat_entry_type", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - offsetof(CFriendMessagesSendMessageRequest, has_chat_entry_type), - offsetof(CFriendMessagesSendMessageRequest, chat_entry_type), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "message", - 3, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(CFriendMessagesSendMessageRequest, message), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "contains_bbcode", - 4, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(CFriendMessagesSendMessageRequest, has_contains_bbcode), - offsetof(CFriendMessagesSendMessageRequest, contains_bbcode), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "echo_to_sender", - 5, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(CFriendMessagesSendMessageRequest, has_echo_to_sender), - offsetof(CFriendMessagesSendMessageRequest, echo_to_sender), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "low_priority", - 6, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(CFriendMessagesSendMessageRequest, has_low_priority), - offsetof(CFriendMessagesSendMessageRequest, low_priority), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "client_message_id", - 8, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(CFriendMessagesSendMessageRequest, client_message_id), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned cfriend_messages__send_message__request__field_indices_by_name[] = { - 1, /* field[1] = chat_entry_type */ - 6, /* field[6] = client_message_id */ - 3, /* field[3] = contains_bbcode */ - 4, /* field[4] = echo_to_sender */ - 5, /* field[5] = low_priority */ - 2, /* field[2] = message */ - 0, /* field[0] = steamid */ -}; -static const ProtobufCIntRange cfriend_messages__send_message__request__number_ranges[2 + 1] = -{ - { 1, 0 }, - { 8, 6 }, - { 0, 7 } -}; -const ProtobufCMessageDescriptor cfriend_messages__send_message__request__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "CFriendMessages_SendMessage_Request", - "CFriendMessagesSendMessageRequest", - "CFriendMessagesSendMessageRequest", - "", - sizeof(CFriendMessagesSendMessageRequest), - 7, - cfriend_messages__send_message__request__field_descriptors, - cfriend_messages__send_message__request__field_indices_by_name, - 2, cfriend_messages__send_message__request__number_ranges, - NULL,NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor cfriend_messages__send_message__response__field_descriptors[4] = -{ - { - "modified_message", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(CFriendMessagesSendMessageResponse, modified_message), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "server_timestamp", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendMessagesSendMessageResponse, has_server_timestamp), - offsetof(CFriendMessagesSendMessageResponse, server_timestamp), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "ordinal", - 3, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendMessagesSendMessageResponse, has_ordinal), - offsetof(CFriendMessagesSendMessageResponse, ordinal), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "message_without_bb_code", - 4, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(CFriendMessagesSendMessageResponse, message_without_bb_code), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned cfriend_messages__send_message__response__field_indices_by_name[] = { - 3, /* field[3] = message_without_bb_code */ - 0, /* field[0] = modified_message */ - 2, /* field[2] = ordinal */ - 1, /* field[1] = server_timestamp */ -}; -static const ProtobufCIntRange cfriend_messages__send_message__response__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 4 } -}; -const ProtobufCMessageDescriptor cfriend_messages__send_message__response__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "CFriendMessages_SendMessage_Response", - "CFriendMessagesSendMessageResponse", - "CFriendMessagesSendMessageResponse", - "", - sizeof(CFriendMessagesSendMessageResponse), - 4, - cfriend_messages__send_message__response__field_descriptors, - cfriend_messages__send_message__response__field_indices_by_name, - 1, cfriend_messages__send_message__response__number_ranges, - NULL,NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor cfriend_messages__ack_message__notification__field_descriptors[2] = -{ - { - "steamid_partner", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_FIXED64, - offsetof(CFriendMessagesAckMessageNotification, has_steamid_partner), - offsetof(CFriendMessagesAckMessageNotification, steamid_partner), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "timestamp", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendMessagesAckMessageNotification, has_timestamp), - offsetof(CFriendMessagesAckMessageNotification, timestamp), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned cfriend_messages__ack_message__notification__field_indices_by_name[] = { - 0, /* field[0] = steamid_partner */ - 1, /* field[1] = timestamp */ -}; -static const ProtobufCIntRange cfriend_messages__ack_message__notification__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 2 } -}; -const ProtobufCMessageDescriptor cfriend_messages__ack_message__notification__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "CFriendMessages_AckMessage_Notification", - "CFriendMessagesAckMessageNotification", - "CFriendMessagesAckMessageNotification", - "", - sizeof(CFriendMessagesAckMessageNotification), - 2, - cfriend_messages__ack_message__notification__field_descriptors, - cfriend_messages__ack_message__notification__field_indices_by_name, - 1, cfriend_messages__ack_message__notification__number_ranges, - NULL,NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor cfriend_messages__is_in_friends_uibeta__request__field_descriptors[1] = -{ - { - "steamid", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_FIXED64, - offsetof(CFriendMessagesIsInFriendsUIBetaRequest, has_steamid), - offsetof(CFriendMessagesIsInFriendsUIBetaRequest, steamid), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned cfriend_messages__is_in_friends_uibeta__request__field_indices_by_name[] = { - 0, /* field[0] = steamid */ -}; -static const ProtobufCIntRange cfriend_messages__is_in_friends_uibeta__request__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 1 } -}; -const ProtobufCMessageDescriptor cfriend_messages__is_in_friends_uibeta__request__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "CFriendMessages_IsInFriendsUIBeta_Request", - "CFriendMessagesIsInFriendsUIBetaRequest", - "CFriendMessagesIsInFriendsUIBetaRequest", - "", - sizeof(CFriendMessagesIsInFriendsUIBetaRequest), - 1, - cfriend_messages__is_in_friends_uibeta__request__field_descriptors, - cfriend_messages__is_in_friends_uibeta__request__field_indices_by_name, - 1, cfriend_messages__is_in_friends_uibeta__request__number_ranges, - NULL,NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor cfriend_messages__is_in_friends_uibeta__response__field_descriptors[2] = -{ - { - "online_in_friendsui", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(CFriendMessagesIsInFriendsUIBetaResponse, has_online_in_friendsui), - offsetof(CFriendMessagesIsInFriendsUIBetaResponse, online_in_friendsui), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "has_used_friendsui", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(CFriendMessagesIsInFriendsUIBetaResponse, has_has_used_friendsui), - offsetof(CFriendMessagesIsInFriendsUIBetaResponse, has_used_friendsui), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned cfriend_messages__is_in_friends_uibeta__response__field_indices_by_name[] = { - 1, /* field[1] = has_used_friendsui */ - 0, /* field[0] = online_in_friendsui */ -}; -static const ProtobufCIntRange cfriend_messages__is_in_friends_uibeta__response__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 2 } -}; -const ProtobufCMessageDescriptor cfriend_messages__is_in_friends_uibeta__response__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "CFriendMessages_IsInFriendsUIBeta_Response", - "CFriendMessagesIsInFriendsUIBetaResponse", - "CFriendMessagesIsInFriendsUIBetaResponse", - "", - sizeof(CFriendMessagesIsInFriendsUIBetaResponse), - 2, - cfriend_messages__is_in_friends_uibeta__response__field_descriptors, - cfriend_messages__is_in_friends_uibeta__response__field_indices_by_name, - 1, cfriend_messages__is_in_friends_uibeta__response__number_ranges, - NULL,NULL,NULL,NULL /* reserved[123] */ -}; -static const EMessageReactionType cfriend_messages__update_message_reaction__request__reaction_type__default_value = EMESSAGE_REACTION_TYPE__k_EMessageReactionType_Invalid; -static const ProtobufCFieldDescriptor cfriend_messages__update_message_reaction__request__field_descriptors[6] = -{ - { - "steamid", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_FIXED64, - offsetof(CFriendMessagesUpdateMessageReactionRequest, has_steamid), - offsetof(CFriendMessagesUpdateMessageReactionRequest, steamid), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "server_timestamp", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendMessagesUpdateMessageReactionRequest, has_server_timestamp), - offsetof(CFriendMessagesUpdateMessageReactionRequest, server_timestamp), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "ordinal", - 3, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendMessagesUpdateMessageReactionRequest, has_ordinal), - offsetof(CFriendMessagesUpdateMessageReactionRequest, ordinal), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "reaction_type", - 4, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_ENUM, - offsetof(CFriendMessagesUpdateMessageReactionRequest, has_reaction_type), - offsetof(CFriendMessagesUpdateMessageReactionRequest, reaction_type), - &emessage_reaction_type__descriptor, - &cfriend_messages__update_message_reaction__request__reaction_type__default_value, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "reaction", - 5, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(CFriendMessagesUpdateMessageReactionRequest, reaction), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "is_add", - 6, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(CFriendMessagesUpdateMessageReactionRequest, has_is_add), - offsetof(CFriendMessagesUpdateMessageReactionRequest, is_add), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned cfriend_messages__update_message_reaction__request__field_indices_by_name[] = { - 5, /* field[5] = is_add */ - 2, /* field[2] = ordinal */ - 4, /* field[4] = reaction */ - 3, /* field[3] = reaction_type */ - 1, /* field[1] = server_timestamp */ - 0, /* field[0] = steamid */ -}; -static const ProtobufCIntRange cfriend_messages__update_message_reaction__request__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 6 } -}; -const ProtobufCMessageDescriptor cfriend_messages__update_message_reaction__request__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "CFriendMessages_UpdateMessageReaction_Request", - "CFriendMessagesUpdateMessageReactionRequest", - "CFriendMessagesUpdateMessageReactionRequest", - "", - sizeof(CFriendMessagesUpdateMessageReactionRequest), - 6, - cfriend_messages__update_message_reaction__request__field_descriptors, - cfriend_messages__update_message_reaction__request__field_indices_by_name, - 1, cfriend_messages__update_message_reaction__request__number_ranges, - NULL,NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor cfriend_messages__update_message_reaction__response__field_descriptors[1] = -{ - { - "reactors", - 1, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendMessagesUpdateMessageReactionResponse, n_reactors), - offsetof(CFriendMessagesUpdateMessageReactionResponse, reactors), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned cfriend_messages__update_message_reaction__response__field_indices_by_name[] = { - 0, /* field[0] = reactors */ -}; -static const ProtobufCIntRange cfriend_messages__update_message_reaction__response__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 1 } -}; -const ProtobufCMessageDescriptor cfriend_messages__update_message_reaction__response__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "CFriendMessages_UpdateMessageReaction_Response", - "CFriendMessagesUpdateMessageReactionResponse", - "CFriendMessagesUpdateMessageReactionResponse", - "", - sizeof(CFriendMessagesUpdateMessageReactionResponse), - 1, - cfriend_messages__update_message_reaction__response__field_descriptors, - cfriend_messages__update_message_reaction__response__field_indices_by_name, - 1, cfriend_messages__update_message_reaction__response__number_ranges, - NULL,NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor cfriend_messages__incoming_message__notification__field_descriptors[9] = -{ - { - "steamid_friend", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_FIXED64, - offsetof(CFriendMessagesIncomingMessageNotification, has_steamid_friend), - offsetof(CFriendMessagesIncomingMessageNotification, steamid_friend), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "chat_entry_type", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - offsetof(CFriendMessagesIncomingMessageNotification, has_chat_entry_type), - offsetof(CFriendMessagesIncomingMessageNotification, chat_entry_type), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "from_limited_account", - 3, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(CFriendMessagesIncomingMessageNotification, has_from_limited_account), - offsetof(CFriendMessagesIncomingMessageNotification, from_limited_account), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "message", - 4, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(CFriendMessagesIncomingMessageNotification, message), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "rtime32_server_timestamp", - 5, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_FIXED32, - offsetof(CFriendMessagesIncomingMessageNotification, has_rtime32_server_timestamp), - offsetof(CFriendMessagesIncomingMessageNotification, rtime32_server_timestamp), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "ordinal", - 6, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendMessagesIncomingMessageNotification, has_ordinal), - offsetof(CFriendMessagesIncomingMessageNotification, ordinal), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "local_echo", - 7, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(CFriendMessagesIncomingMessageNotification, has_local_echo), - offsetof(CFriendMessagesIncomingMessageNotification, local_echo), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "message_no_bbcode", - 8, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(CFriendMessagesIncomingMessageNotification, message_no_bbcode), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "low_priority", - 9, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(CFriendMessagesIncomingMessageNotification, has_low_priority), - offsetof(CFriendMessagesIncomingMessageNotification, low_priority), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned cfriend_messages__incoming_message__notification__field_indices_by_name[] = { - 1, /* field[1] = chat_entry_type */ - 2, /* field[2] = from_limited_account */ - 6, /* field[6] = local_echo */ - 8, /* field[8] = low_priority */ - 3, /* field[3] = message */ - 7, /* field[7] = message_no_bbcode */ - 5, /* field[5] = ordinal */ - 4, /* field[4] = rtime32_server_timestamp */ - 0, /* field[0] = steamid_friend */ -}; -static const ProtobufCIntRange cfriend_messages__incoming_message__notification__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 9 } -}; -const ProtobufCMessageDescriptor cfriend_messages__incoming_message__notification__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "CFriendMessages_IncomingMessage_Notification", - "CFriendMessagesIncomingMessageNotification", - "CFriendMessagesIncomingMessageNotification", - "", - sizeof(CFriendMessagesIncomingMessageNotification), - 9, - cfriend_messages__incoming_message__notification__field_descriptors, - cfriend_messages__incoming_message__notification__field_indices_by_name, - 1, cfriend_messages__incoming_message__notification__number_ranges, - NULL,NULL,NULL,NULL /* reserved[123] */ -}; -static const EMessageReactionType cfriend_messages__message_reaction__notification__reaction_type__default_value = EMESSAGE_REACTION_TYPE__k_EMessageReactionType_Invalid; -static const ProtobufCFieldDescriptor cfriend_messages__message_reaction__notification__field_descriptors[7] = -{ - { - "steamid_friend", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_FIXED64, - offsetof(CFriendMessagesMessageReactionNotification, has_steamid_friend), - offsetof(CFriendMessagesMessageReactionNotification, steamid_friend), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "server_timestamp", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendMessagesMessageReactionNotification, has_server_timestamp), - offsetof(CFriendMessagesMessageReactionNotification, server_timestamp), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "ordinal", - 3, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - offsetof(CFriendMessagesMessageReactionNotification, has_ordinal), - offsetof(CFriendMessagesMessageReactionNotification, ordinal), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "reactor", - 4, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_FIXED64, - offsetof(CFriendMessagesMessageReactionNotification, has_reactor), - offsetof(CFriendMessagesMessageReactionNotification, reactor), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "reaction_type", - 5, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_ENUM, - offsetof(CFriendMessagesMessageReactionNotification, has_reaction_type), - offsetof(CFriendMessagesMessageReactionNotification, reaction_type), - &emessage_reaction_type__descriptor, - &cfriend_messages__message_reaction__notification__reaction_type__default_value, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "reaction", - 6, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - offsetof(CFriendMessagesMessageReactionNotification, reaction), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "is_add", - 7, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(CFriendMessagesMessageReactionNotification, has_is_add), - offsetof(CFriendMessagesMessageReactionNotification, is_add), - NULL, - NULL, - 0, /* flags */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned cfriend_messages__message_reaction__notification__field_indices_by_name[] = { - 6, /* field[6] = is_add */ - 2, /* field[2] = ordinal */ - 5, /* field[5] = reaction */ - 4, /* field[4] = reaction_type */ - 3, /* field[3] = reactor */ - 1, /* field[1] = server_timestamp */ - 0, /* field[0] = steamid_friend */ -}; -static const ProtobufCIntRange cfriend_messages__message_reaction__notification__number_ranges[1 + 1] = -{ - { 1, 0 }, - { 0, 7 } -}; -const ProtobufCMessageDescriptor cfriend_messages__message_reaction__notification__descriptor = -{ - PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, - "CFriendMessages_MessageReaction_Notification", - "CFriendMessagesMessageReactionNotification", - "CFriendMessagesMessageReactionNotification", - "", - sizeof(CFriendMessagesMessageReactionNotification), - 7, - cfriend_messages__message_reaction__notification__field_descriptors, - cfriend_messages__message_reaction__notification__field_indices_by_name, - 1, cfriend_messages__message_reaction__notification__number_ranges, - NULL,NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCEnumValue emessage_reaction_type__enum_values_by_number[3] = -{ - { "k_EMessageReactionType_Invalid", "EMESSAGE_REACTION_TYPE__k_EMessageReactionType_Invalid", 0 }, - { "k_EMessageReactionType_Emoticon", "EMESSAGE_REACTION_TYPE__k_EMessageReactionType_Emoticon", 1 }, - { "k_EMessageReactionType_Sticker", "EMESSAGE_REACTION_TYPE__k_EMessageReactionType_Sticker", 2 }, -}; -static const ProtobufCIntRange emessage_reaction_type__value_ranges[] = { -{0, 0},{0, 3} -}; -static const ProtobufCEnumValueIndex emessage_reaction_type__enum_values_by_name[3] = -{ - { "k_EMessageReactionType_Emoticon", 1 }, - { "k_EMessageReactionType_Invalid", 0 }, - { "k_EMessageReactionType_Sticker", 2 }, -}; -const ProtobufCEnumDescriptor emessage_reaction_type__descriptor = -{ - PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, - "EMessageReactionType", - "EMessageReactionType", - "EMessageReactionType", - "", - 3, - emessage_reaction_type__enum_values_by_number, - 3, - emessage_reaction_type__enum_values_by_name, - 1, - emessage_reaction_type__value_ranges, - NULL,NULL,NULL,NULL /* reserved[1234] */ -}; -static const ProtobufCMethodDescriptor friend_messages__method_descriptors[6] = -{ - { "GetRecentMessages", &cfriend_messages__get_recent_messages__request__descriptor, &cfriend_messages__get_recent_messages__response__descriptor }, - { "GetActiveMessageSessions", &cfriends_messages__get_active_message_sessions__request__descriptor, &cfriends_messages__get_active_message_sessions__response__descriptor }, - { "SendMessage", &cfriend_messages__send_message__request__descriptor, &cfriend_messages__send_message__response__descriptor }, - { "AckMessage", &cfriend_messages__ack_message__notification__descriptor, &no_response__descriptor }, - { "IsInFriendsUIBeta", &cfriend_messages__is_in_friends_uibeta__request__descriptor, &cfriend_messages__is_in_friends_uibeta__response__descriptor }, - { "UpdateMessageReaction", &cfriend_messages__update_message_reaction__request__descriptor, &cfriend_messages__update_message_reaction__response__descriptor }, -}; -const unsigned friend_messages__method_indices_by_name[] = { - 3, /* AckMessage */ - 1, /* GetActiveMessageSessions */ - 0, /* GetRecentMessages */ - 4, /* IsInFriendsUIBeta */ - 2, /* SendMessage */ - 5 /* UpdateMessageReaction */ -}; -const ProtobufCServiceDescriptor friend_messages__descriptor = -{ - PROTOBUF_C__SERVICE_DESCRIPTOR_MAGIC, - "FriendMessages", - "FriendMessages", - "FriendMessages", - "", - 6, - friend_messages__method_descriptors, - friend_messages__method_indices_by_name -}; -void friend_messages__get_recent_messages(ProtobufCService *service, - const CFriendMessagesGetRecentMessagesRequest *input, - CFriendMessagesGetRecentMessagesResponse_Closure closure, - void *closure_data) -{ - assert(service->descriptor == &friend_messages__descriptor); - service->invoke(service, 0, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); -} -void friend_messages__get_active_message_sessions(ProtobufCService *service, - const CFriendsMessagesGetActiveMessageSessionsRequest *input, - CFriendsMessagesGetActiveMessageSessionsResponse_Closure closure, - void *closure_data) -{ - assert(service->descriptor == &friend_messages__descriptor); - service->invoke(service, 1, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); -} -void friend_messages__send_message(ProtobufCService *service, - const CFriendMessagesSendMessageRequest *input, - CFriendMessagesSendMessageResponse_Closure closure, - void *closure_data) -{ - assert(service->descriptor == &friend_messages__descriptor); - service->invoke(service, 2, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); -} -void friend_messages__ack_message(ProtobufCService *service, - const CFriendMessagesAckMessageNotification *input, - NoResponse_Closure closure, - void *closure_data) -{ - assert(service->descriptor == &friend_messages__descriptor); - service->invoke(service, 3, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); -} -void friend_messages__is_in_friends_uibeta(ProtobufCService *service, - const CFriendMessagesIsInFriendsUIBetaRequest *input, - CFriendMessagesIsInFriendsUIBetaResponse_Closure closure, - void *closure_data) -{ - assert(service->descriptor == &friend_messages__descriptor); - service->invoke(service, 4, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); -} -void friend_messages__update_message_reaction(ProtobufCService *service, - const CFriendMessagesUpdateMessageReactionRequest *input, - CFriendMessagesUpdateMessageReactionResponse_Closure closure, - void *closure_data) -{ - assert(service->descriptor == &friend_messages__descriptor); - service->invoke(service, 5, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); -} -void friend_messages__init (FriendMessages_Service *service, - FriendMessages_ServiceDestroy destroy) -{ - protobuf_c_service_generated_init (&service->base, - &friend_messages__descriptor, - (ProtobufCServiceDestroy) destroy); -} -static const ProtobufCMethodDescriptor friend_messages_client__method_descriptors[3] = -{ - { "IncomingMessage", &cfriend_messages__incoming_message__notification__descriptor, &no_response__descriptor }, - { "NotifyAckMessageEcho", &cfriend_messages__ack_message__notification__descriptor, &no_response__descriptor }, - { "MessageReaction", &cfriend_messages__message_reaction__notification__descriptor, &no_response__descriptor }, -}; -const unsigned friend_messages_client__method_indices_by_name[] = { - 0, /* IncomingMessage */ - 2, /* MessageReaction */ - 1 /* NotifyAckMessageEcho */ -}; -const ProtobufCServiceDescriptor friend_messages_client__descriptor = -{ - PROTOBUF_C__SERVICE_DESCRIPTOR_MAGIC, - "FriendMessagesClient", - "FriendMessagesClient", - "FriendMessagesClient", - "", - 3, - friend_messages_client__method_descriptors, - friend_messages_client__method_indices_by_name -}; -void friend_messages_client__incoming_message(ProtobufCService *service, - const CFriendMessagesIncomingMessageNotification *input, - NoResponse_Closure closure, - void *closure_data) -{ - assert(service->descriptor == &friend_messages_client__descriptor); - service->invoke(service, 0, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); -} -void friend_messages_client__notify_ack_message_echo(ProtobufCService *service, - const CFriendMessagesAckMessageNotification *input, - NoResponse_Closure closure, - void *closure_data) -{ - assert(service->descriptor == &friend_messages_client__descriptor); - service->invoke(service, 1, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); -} -void friend_messages_client__message_reaction(ProtobufCService *service, - const CFriendMessagesMessageReactionNotification *input, - NoResponse_Closure closure, - void *closure_data) -{ - assert(service->descriptor == &friend_messages_client__descriptor); - service->invoke(service, 2, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); -} -void friend_messages_client__init (FriendMessagesClient_Service *service, - FriendMessagesClient_ServiceDestroy destroy) -{ - protobuf_c_service_generated_init (&service->base, - &friend_messages_client__descriptor, - (ProtobufCServiceDestroy) destroy); -} diff --git a/protocols/Steam/src/protobuf-c/steammessages_friendmessages.steamclient.pb-c.cpp b/protocols/Steam/src/protobuf-c/steammessages_friendmessages.steamclient.pb-c.cpp new file mode 100644 index 0000000000..e06b9cd276 --- /dev/null +++ b/protocols/Steam/src/protobuf-c/steammessages_friendmessages.steamclient.pb-c.cpp @@ -0,0 +1,1942 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: steammessages_friendmessages.steamclient.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "steammessages_friendmessages.steamclient.pb-c.h" +size_t cfriend_messages__get_recent_messages__request__get_packed_size + (const CFriendMessagesGetRecentMessagesRequest *message) +{ + assert(message->descriptor == &cfriend_messages__get_recent_messages__request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t cfriend_messages__get_recent_messages__request__pack + (const CFriendMessagesGetRecentMessagesRequest *message, + uint8_t *out) +{ + assert(message->descriptor == &cfriend_messages__get_recent_messages__request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t cfriend_messages__get_recent_messages__request__pack_to_buffer + (const CFriendMessagesGetRecentMessagesRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->descriptor == &cfriend_messages__get_recent_messages__request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CFriendMessagesGetRecentMessagesRequest * + cfriend_messages__get_recent_messages__request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CFriendMessagesGetRecentMessagesRequest *) + protobuf_c_message_unpack (&cfriend_messages__get_recent_messages__request__descriptor, + allocator, len, data); +} +void cfriend_messages__get_recent_messages__request__free_unpacked + (CFriendMessagesGetRecentMessagesRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->descriptor == &cfriend_messages__get_recent_messages__request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} + +size_t cfriend_messages__get_recent_messages__response__get_packed_size + (const CFriendMessagesGetRecentMessagesResponse *message) +{ + assert(message->descriptor == &cfriend_messages__get_recent_messages__response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t cfriend_messages__get_recent_messages__response__pack + (const CFriendMessagesGetRecentMessagesResponse *message, + uint8_t *out) +{ + assert(message->descriptor == &cfriend_messages__get_recent_messages__response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t cfriend_messages__get_recent_messages__response__pack_to_buffer + (const CFriendMessagesGetRecentMessagesResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->descriptor == &cfriend_messages__get_recent_messages__response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CFriendMessagesGetRecentMessagesResponse * + cfriend_messages__get_recent_messages__response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CFriendMessagesGetRecentMessagesResponse *) + protobuf_c_message_unpack (&cfriend_messages__get_recent_messages__response__descriptor, + allocator, len, data); +} +void cfriend_messages__get_recent_messages__response__free_unpacked + (CFriendMessagesGetRecentMessagesResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->descriptor == &cfriend_messages__get_recent_messages__response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} + +size_t cfriends_messages__get_active_message_sessions__request__get_packed_size + (const CFriendsMessagesGetActiveMessageSessionsRequest *message) +{ + assert(message->descriptor == &cfriends_messages__get_active_message_sessions__request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t cfriends_messages__get_active_message_sessions__request__pack + (const CFriendsMessagesGetActiveMessageSessionsRequest *message, + uint8_t *out) +{ + assert(message->descriptor == &cfriends_messages__get_active_message_sessions__request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t cfriends_messages__get_active_message_sessions__request__pack_to_buffer + (const CFriendsMessagesGetActiveMessageSessionsRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->descriptor == &cfriends_messages__get_active_message_sessions__request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CFriendsMessagesGetActiveMessageSessionsRequest * + cfriends_messages__get_active_message_sessions__request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CFriendsMessagesGetActiveMessageSessionsRequest *) + protobuf_c_message_unpack (&cfriends_messages__get_active_message_sessions__request__descriptor, + allocator, len, data); +} +void cfriends_messages__get_active_message_sessions__request__free_unpacked + (CFriendsMessagesGetActiveMessageSessionsRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->descriptor == &cfriends_messages__get_active_message_sessions__request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} + +size_t cfriends_messages__get_active_message_sessions__response__get_packed_size + (const CFriendsMessagesGetActiveMessageSessionsResponse *message) +{ + assert(message->descriptor == &cfriends_messages__get_active_message_sessions__response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t cfriends_messages__get_active_message_sessions__response__pack + (const CFriendsMessagesGetActiveMessageSessionsResponse *message, + uint8_t *out) +{ + assert(message->descriptor == &cfriends_messages__get_active_message_sessions__response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t cfriends_messages__get_active_message_sessions__response__pack_to_buffer + (const CFriendsMessagesGetActiveMessageSessionsResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->descriptor == &cfriends_messages__get_active_message_sessions__response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CFriendsMessagesGetActiveMessageSessionsResponse * + cfriends_messages__get_active_message_sessions__response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CFriendsMessagesGetActiveMessageSessionsResponse *) + protobuf_c_message_unpack (&cfriends_messages__get_active_message_sessions__response__descriptor, + allocator, len, data); +} +void cfriends_messages__get_active_message_sessions__response__free_unpacked + (CFriendsMessagesGetActiveMessageSessionsResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->descriptor == &cfriends_messages__get_active_message_sessions__response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} + +size_t cfriend_messages__send_message__request__get_packed_size + (const CFriendMessagesSendMessageRequest *message) +{ + assert(message->descriptor == &cfriend_messages__send_message__request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t cfriend_messages__send_message__request__pack + (const CFriendMessagesSendMessageRequest *message, + uint8_t *out) +{ + assert(message->descriptor == &cfriend_messages__send_message__request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t cfriend_messages__send_message__request__pack_to_buffer + (const CFriendMessagesSendMessageRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->descriptor == &cfriend_messages__send_message__request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CFriendMessagesSendMessageRequest * + cfriend_messages__send_message__request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CFriendMessagesSendMessageRequest *) + protobuf_c_message_unpack (&cfriend_messages__send_message__request__descriptor, + allocator, len, data); +} +void cfriend_messages__send_message__request__free_unpacked + (CFriendMessagesSendMessageRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->descriptor == &cfriend_messages__send_message__request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} + +size_t cfriend_messages__send_message__response__get_packed_size + (const CFriendMessagesSendMessageResponse *message) +{ + assert(message->descriptor == &cfriend_messages__send_message__response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t cfriend_messages__send_message__response__pack + (const CFriendMessagesSendMessageResponse *message, + uint8_t *out) +{ + assert(message->descriptor == &cfriend_messages__send_message__response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t cfriend_messages__send_message__response__pack_to_buffer + (const CFriendMessagesSendMessageResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->descriptor == &cfriend_messages__send_message__response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CFriendMessagesSendMessageResponse * + cfriend_messages__send_message__response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CFriendMessagesSendMessageResponse *) + protobuf_c_message_unpack (&cfriend_messages__send_message__response__descriptor, + allocator, len, data); +} +void cfriend_messages__send_message__response__free_unpacked + (CFriendMessagesSendMessageResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->descriptor == &cfriend_messages__send_message__response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} + +size_t cfriend_messages__ack_message__notification__get_packed_size + (const CFriendMessagesAckMessageNotification *message) +{ + assert(message->descriptor == &cfriend_messages__ack_message__notification__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t cfriend_messages__ack_message__notification__pack + (const CFriendMessagesAckMessageNotification *message, + uint8_t *out) +{ + assert(message->descriptor == &cfriend_messages__ack_message__notification__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t cfriend_messages__ack_message__notification__pack_to_buffer + (const CFriendMessagesAckMessageNotification *message, + ProtobufCBuffer *buffer) +{ + assert(message->descriptor == &cfriend_messages__ack_message__notification__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CFriendMessagesAckMessageNotification * + cfriend_messages__ack_message__notification__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CFriendMessagesAckMessageNotification *) + protobuf_c_message_unpack (&cfriend_messages__ack_message__notification__descriptor, + allocator, len, data); +} +void cfriend_messages__ack_message__notification__free_unpacked + (CFriendMessagesAckMessageNotification *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->descriptor == &cfriend_messages__ack_message__notification__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} + +size_t cfriend_messages__is_in_friends_uibeta__request__get_packed_size + (const CFriendMessagesIsInFriendsUIBetaRequest *message) +{ + assert(message->descriptor == &cfriend_messages__is_in_friends_uibeta__request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t cfriend_messages__is_in_friends_uibeta__request__pack + (const CFriendMessagesIsInFriendsUIBetaRequest *message, + uint8_t *out) +{ + assert(message->descriptor == &cfriend_messages__is_in_friends_uibeta__request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t cfriend_messages__is_in_friends_uibeta__request__pack_to_buffer + (const CFriendMessagesIsInFriendsUIBetaRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->descriptor == &cfriend_messages__is_in_friends_uibeta__request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CFriendMessagesIsInFriendsUIBetaRequest * + cfriend_messages__is_in_friends_uibeta__request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CFriendMessagesIsInFriendsUIBetaRequest *) + protobuf_c_message_unpack (&cfriend_messages__is_in_friends_uibeta__request__descriptor, + allocator, len, data); +} +void cfriend_messages__is_in_friends_uibeta__request__free_unpacked + (CFriendMessagesIsInFriendsUIBetaRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->descriptor == &cfriend_messages__is_in_friends_uibeta__request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} + +size_t cfriend_messages__is_in_friends_uibeta__response__get_packed_size + (const CFriendMessagesIsInFriendsUIBetaResponse *message) +{ + assert(message->descriptor == &cfriend_messages__is_in_friends_uibeta__response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t cfriend_messages__is_in_friends_uibeta__response__pack + (const CFriendMessagesIsInFriendsUIBetaResponse *message, + uint8_t *out) +{ + assert(message->descriptor == &cfriend_messages__is_in_friends_uibeta__response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t cfriend_messages__is_in_friends_uibeta__response__pack_to_buffer + (const CFriendMessagesIsInFriendsUIBetaResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->descriptor == &cfriend_messages__is_in_friends_uibeta__response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CFriendMessagesIsInFriendsUIBetaResponse * + cfriend_messages__is_in_friends_uibeta__response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CFriendMessagesIsInFriendsUIBetaResponse *) + protobuf_c_message_unpack (&cfriend_messages__is_in_friends_uibeta__response__descriptor, + allocator, len, data); +} +void cfriend_messages__is_in_friends_uibeta__response__free_unpacked + (CFriendMessagesIsInFriendsUIBetaResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->descriptor == &cfriend_messages__is_in_friends_uibeta__response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} + +size_t cfriend_messages__update_message_reaction__request__get_packed_size + (const CFriendMessagesUpdateMessageReactionRequest *message) +{ + assert(message->descriptor == &cfriend_messages__update_message_reaction__request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t cfriend_messages__update_message_reaction__request__pack + (const CFriendMessagesUpdateMessageReactionRequest *message, + uint8_t *out) +{ + assert(message->descriptor == &cfriend_messages__update_message_reaction__request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t cfriend_messages__update_message_reaction__request__pack_to_buffer + (const CFriendMessagesUpdateMessageReactionRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->descriptor == &cfriend_messages__update_message_reaction__request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CFriendMessagesUpdateMessageReactionRequest * + cfriend_messages__update_message_reaction__request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CFriendMessagesUpdateMessageReactionRequest *) + protobuf_c_message_unpack (&cfriend_messages__update_message_reaction__request__descriptor, + allocator, len, data); +} +void cfriend_messages__update_message_reaction__request__free_unpacked + (CFriendMessagesUpdateMessageReactionRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->descriptor == &cfriend_messages__update_message_reaction__request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} + +size_t cfriend_messages__update_message_reaction__response__get_packed_size + (const CFriendMessagesUpdateMessageReactionResponse *message) +{ + assert(message->descriptor == &cfriend_messages__update_message_reaction__response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t cfriend_messages__update_message_reaction__response__pack + (const CFriendMessagesUpdateMessageReactionResponse *message, + uint8_t *out) +{ + assert(message->descriptor == &cfriend_messages__update_message_reaction__response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t cfriend_messages__update_message_reaction__response__pack_to_buffer + (const CFriendMessagesUpdateMessageReactionResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->descriptor == &cfriend_messages__update_message_reaction__response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CFriendMessagesUpdateMessageReactionResponse * + cfriend_messages__update_message_reaction__response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CFriendMessagesUpdateMessageReactionResponse *) + protobuf_c_message_unpack (&cfriend_messages__update_message_reaction__response__descriptor, + allocator, len, data); +} +void cfriend_messages__update_message_reaction__response__free_unpacked + (CFriendMessagesUpdateMessageReactionResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->descriptor == &cfriend_messages__update_message_reaction__response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} + +size_t cfriend_messages__incoming_message__notification__get_packed_size + (const CFriendMessagesIncomingMessageNotification *message) +{ + assert(message->descriptor == &cfriend_messages__incoming_message__notification__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t cfriend_messages__incoming_message__notification__pack + (const CFriendMessagesIncomingMessageNotification *message, + uint8_t *out) +{ + assert(message->descriptor == &cfriend_messages__incoming_message__notification__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t cfriend_messages__incoming_message__notification__pack_to_buffer + (const CFriendMessagesIncomingMessageNotification *message, + ProtobufCBuffer *buffer) +{ + assert(message->descriptor == &cfriend_messages__incoming_message__notification__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CFriendMessagesIncomingMessageNotification * + cfriend_messages__incoming_message__notification__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CFriendMessagesIncomingMessageNotification *) + protobuf_c_message_unpack (&cfriend_messages__incoming_message__notification__descriptor, + allocator, len, data); +} +void cfriend_messages__incoming_message__notification__free_unpacked + (CFriendMessagesIncomingMessageNotification *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->descriptor == &cfriend_messages__incoming_message__notification__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} + +size_t cfriend_messages__message_reaction__notification__get_packed_size + (const CFriendMessagesMessageReactionNotification *message) +{ + assert(message->descriptor == &cfriend_messages__message_reaction__notification__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t cfriend_messages__message_reaction__notification__pack + (const CFriendMessagesMessageReactionNotification *message, + uint8_t *out) +{ + assert(message->descriptor == &cfriend_messages__message_reaction__notification__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t cfriend_messages__message_reaction__notification__pack_to_buffer + (const CFriendMessagesMessageReactionNotification *message, + ProtobufCBuffer *buffer) +{ + assert(message->descriptor == &cfriend_messages__message_reaction__notification__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +CFriendMessagesMessageReactionNotification * + cfriend_messages__message_reaction__notification__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (CFriendMessagesMessageReactionNotification *) + protobuf_c_message_unpack (&cfriend_messages__message_reaction__notification__descriptor, + allocator, len, data); +} +void cfriend_messages__message_reaction__notification__free_unpacked + (CFriendMessagesMessageReactionNotification *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->descriptor == &cfriend_messages__message_reaction__notification__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} + +static const ProtobufCFieldDescriptor cfriend_messages__get_recent_messages__request__field_descriptors[9] = +{ + { + "steamid1", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_FIXED64, + offsetof(CFriendMessagesGetRecentMessagesRequest, has_steamid1), + offsetof(CFriendMessagesGetRecentMessagesRequest, steamid1), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "steamid2", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_FIXED64, + offsetof(CFriendMessagesGetRecentMessagesRequest, has_steamid2), + offsetof(CFriendMessagesGetRecentMessagesRequest, steamid2), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "count", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendMessagesGetRecentMessagesRequest, has_count), + offsetof(CFriendMessagesGetRecentMessagesRequest, count), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "most_recent_conversation", + 4, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(CFriendMessagesGetRecentMessagesRequest, has_most_recent_conversation), + offsetof(CFriendMessagesGetRecentMessagesRequest, most_recent_conversation), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "rtime32_start_time", + 5, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_FIXED32, + offsetof(CFriendMessagesGetRecentMessagesRequest, has_rtime32_start_time), + offsetof(CFriendMessagesGetRecentMessagesRequest, rtime32_start_time), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "bbcode_format", + 6, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(CFriendMessagesGetRecentMessagesRequest, has_bbcode_format), + offsetof(CFriendMessagesGetRecentMessagesRequest, bbcode_format), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "start_ordinal", + 7, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendMessagesGetRecentMessagesRequest, has_start_ordinal), + offsetof(CFriendMessagesGetRecentMessagesRequest, start_ordinal), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "time_last", + 8, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendMessagesGetRecentMessagesRequest, has_time_last), + offsetof(CFriendMessagesGetRecentMessagesRequest, time_last), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "ordinal_last", + 9, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendMessagesGetRecentMessagesRequest, has_ordinal_last), + offsetof(CFriendMessagesGetRecentMessagesRequest, ordinal_last), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned cfriend_messages__get_recent_messages__request__field_indices_by_name[] = { + 5, /* field[5] = bbcode_format */ + 2, /* field[2] = count */ + 3, /* field[3] = most_recent_conversation */ + 8, /* field[8] = ordinal_last */ + 4, /* field[4] = rtime32_start_time */ + 6, /* field[6] = start_ordinal */ + 0, /* field[0] = steamid1 */ + 1, /* field[1] = steamid2 */ + 7, /* field[7] = time_last */ +}; +static const ProtobufCIntRange cfriend_messages__get_recent_messages__request__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 9 } +}; +const ProtobufCMessageDescriptor cfriend_messages__get_recent_messages__request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CFriendMessages_GetRecentMessages_Request", + "CFriendMessagesGetRecentMessagesRequest", + "CFriendMessagesGetRecentMessagesRequest", + "", + sizeof(CFriendMessagesGetRecentMessagesRequest), + 9, + cfriend_messages__get_recent_messages__request__field_descriptors, + cfriend_messages__get_recent_messages__request__field_indices_by_name, + 1, cfriend_messages__get_recent_messages__request__number_ranges, + NULL,NULL,NULL,NULL /* reserved[123] */ +}; +static const EMessageReactionType cfriend_messages__get_recent_messages__response__friend_message__message_reaction__reaction_type__default_value = EMESSAGE_REACTION_TYPE__k_EMessageReactionType_Invalid; +static const ProtobufCFieldDescriptor cfriend_messages__get_recent_messages__response__friend_message__message_reaction__field_descriptors[3] = +{ + { + "reaction_type", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage__MessageReaction, has_reaction_type), + offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage__MessageReaction, reaction_type), + &emessage_reaction_type__descriptor, + &cfriend_messages__get_recent_messages__response__friend_message__message_reaction__reaction_type__default_value, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "reaction", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage__MessageReaction, reaction), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "reactors", + 3, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage__MessageReaction, n_reactors), + offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage__MessageReaction, reactors), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned cfriend_messages__get_recent_messages__response__friend_message__message_reaction__field_indices_by_name[] = { + 1, /* field[1] = reaction */ + 0, /* field[0] = reaction_type */ + 2, /* field[2] = reactors */ +}; +static const ProtobufCIntRange cfriend_messages__get_recent_messages__response__friend_message__message_reaction__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 3 } +}; +const ProtobufCMessageDescriptor cfriend_messages__get_recent_messages__response__friend_message__message_reaction__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CFriendMessages_GetRecentMessages_Response.FriendMessage.MessageReaction", + "MessageReaction", + "CFriendMessagesGetRecentMessagesResponse__FriendMessage__MessageReaction", + "", + sizeof(CFriendMessagesGetRecentMessagesResponse__FriendMessage__MessageReaction), + 3, + cfriend_messages__get_recent_messages__response__friend_message__message_reaction__field_descriptors, + cfriend_messages__get_recent_messages__response__friend_message__message_reaction__field_indices_by_name, + 1, cfriend_messages__get_recent_messages__response__friend_message__message_reaction__number_ranges, + NULL,NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor cfriend_messages__get_recent_messages__response__friend_message__field_descriptors[5] = +{ + { + "accountid", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage, has_accountid), + offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage, accountid), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "timestamp", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage, has_timestamp), + offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage, timestamp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "message", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage, message), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "ordinal", + 4, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage, has_ordinal), + offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage, ordinal), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "reactions", + 5, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage, n_reactions), + offsetof(CFriendMessagesGetRecentMessagesResponse__FriendMessage, reactions), + &cfriend_messages__get_recent_messages__response__friend_message__message_reaction__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned cfriend_messages__get_recent_messages__response__friend_message__field_indices_by_name[] = { + 0, /* field[0] = accountid */ + 2, /* field[2] = message */ + 3, /* field[3] = ordinal */ + 4, /* field[4] = reactions */ + 1, /* field[1] = timestamp */ +}; +static const ProtobufCIntRange cfriend_messages__get_recent_messages__response__friend_message__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 5 } +}; +const ProtobufCMessageDescriptor cfriend_messages__get_recent_messages__response__friend_message__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CFriendMessages_GetRecentMessages_Response.FriendMessage", + "FriendMessage", + "CFriendMessagesGetRecentMessagesResponse__FriendMessage", + "", + sizeof(CFriendMessagesGetRecentMessagesResponse__FriendMessage), + 5, + cfriend_messages__get_recent_messages__response__friend_message__field_descriptors, + cfriend_messages__get_recent_messages__response__friend_message__field_indices_by_name, + 1, cfriend_messages__get_recent_messages__response__friend_message__number_ranges, + NULL,NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor cfriend_messages__get_recent_messages__response__field_descriptors[2] = +{ + { + "messages", + 1, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CFriendMessagesGetRecentMessagesResponse, n_messages), + offsetof(CFriendMessagesGetRecentMessagesResponse, messages), + &cfriend_messages__get_recent_messages__response__friend_message__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "more_available", + 4, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(CFriendMessagesGetRecentMessagesResponse, has_more_available), + offsetof(CFriendMessagesGetRecentMessagesResponse, more_available), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned cfriend_messages__get_recent_messages__response__field_indices_by_name[] = { + 0, /* field[0] = messages */ + 1, /* field[1] = more_available */ +}; +static const ProtobufCIntRange cfriend_messages__get_recent_messages__response__number_ranges[2 + 1] = +{ + { 1, 0 }, + { 4, 1 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor cfriend_messages__get_recent_messages__response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CFriendMessages_GetRecentMessages_Response", + "CFriendMessagesGetRecentMessagesResponse", + "CFriendMessagesGetRecentMessagesResponse", + "", + sizeof(CFriendMessagesGetRecentMessagesResponse), + 2, + cfriend_messages__get_recent_messages__response__field_descriptors, + cfriend_messages__get_recent_messages__response__field_indices_by_name, + 2, cfriend_messages__get_recent_messages__response__number_ranges, + NULL,NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor cfriends_messages__get_active_message_sessions__request__field_descriptors[2] = +{ + { + "lastmessage_since", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendsMessagesGetActiveMessageSessionsRequest, has_lastmessage_since), + offsetof(CFriendsMessagesGetActiveMessageSessionsRequest, lastmessage_since), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "only_sessions_with_messages", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(CFriendsMessagesGetActiveMessageSessionsRequest, has_only_sessions_with_messages), + offsetof(CFriendsMessagesGetActiveMessageSessionsRequest, only_sessions_with_messages), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned cfriends_messages__get_active_message_sessions__request__field_indices_by_name[] = { + 0, /* field[0] = lastmessage_since */ + 1, /* field[1] = only_sessions_with_messages */ +}; +static const ProtobufCIntRange cfriends_messages__get_active_message_sessions__request__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor cfriends_messages__get_active_message_sessions__request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CFriendsMessages_GetActiveMessageSessions_Request", + "CFriendsMessagesGetActiveMessageSessionsRequest", + "CFriendsMessagesGetActiveMessageSessionsRequest", + "", + sizeof(CFriendsMessagesGetActiveMessageSessionsRequest), + 2, + cfriends_messages__get_active_message_sessions__request__field_descriptors, + cfriends_messages__get_active_message_sessions__request__field_indices_by_name, + 1, cfriends_messages__get_active_message_sessions__request__number_ranges, + NULL,NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor cfriends_messages__get_active_message_sessions__response__friend_message_session__field_descriptors[4] = +{ + { + "accountid_friend", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession, has_accountid_friend), + offsetof(CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession, accountid_friend), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "last_message", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession, has_last_message), + offsetof(CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession, last_message), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "last_view", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession, has_last_view), + offsetof(CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession, last_view), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "unread_message_count", + 4, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession, has_unread_message_count), + offsetof(CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession, unread_message_count), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned cfriends_messages__get_active_message_sessions__response__friend_message_session__field_indices_by_name[] = { + 0, /* field[0] = accountid_friend */ + 1, /* field[1] = last_message */ + 2, /* field[2] = last_view */ + 3, /* field[3] = unread_message_count */ +}; +static const ProtobufCIntRange cfriends_messages__get_active_message_sessions__response__friend_message_session__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 4 } +}; +const ProtobufCMessageDescriptor cfriends_messages__get_active_message_sessions__response__friend_message_session__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CFriendsMessages_GetActiveMessageSessions_Response.FriendMessageSession", + "FriendMessageSession", + "CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession", + "", + sizeof(CFriendsMessagesGetActiveMessageSessionsResponse__FriendMessageSession), + 4, + cfriends_messages__get_active_message_sessions__response__friend_message_session__field_descriptors, + cfriends_messages__get_active_message_sessions__response__friend_message_session__field_indices_by_name, + 1, cfriends_messages__get_active_message_sessions__response__friend_message_session__number_ranges, + NULL,NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor cfriends_messages__get_active_message_sessions__response__field_descriptors[2] = +{ + { + "message_sessions", + 1, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(CFriendsMessagesGetActiveMessageSessionsResponse, n_message_sessions), + offsetof(CFriendsMessagesGetActiveMessageSessionsResponse, message_sessions), + &cfriends_messages__get_active_message_sessions__response__friend_message_session__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "timestamp", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendsMessagesGetActiveMessageSessionsResponse, has_timestamp), + offsetof(CFriendsMessagesGetActiveMessageSessionsResponse, timestamp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned cfriends_messages__get_active_message_sessions__response__field_indices_by_name[] = { + 0, /* field[0] = message_sessions */ + 1, /* field[1] = timestamp */ +}; +static const ProtobufCIntRange cfriends_messages__get_active_message_sessions__response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor cfriends_messages__get_active_message_sessions__response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CFriendsMessages_GetActiveMessageSessions_Response", + "CFriendsMessagesGetActiveMessageSessionsResponse", + "CFriendsMessagesGetActiveMessageSessionsResponse", + "", + sizeof(CFriendsMessagesGetActiveMessageSessionsResponse), + 2, + cfriends_messages__get_active_message_sessions__response__field_descriptors, + cfriends_messages__get_active_message_sessions__response__field_indices_by_name, + 1, cfriends_messages__get_active_message_sessions__response__number_ranges, + NULL,NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor cfriend_messages__send_message__request__field_descriptors[7] = +{ + { + "steamid", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_FIXED64, + offsetof(CFriendMessagesSendMessageRequest, has_steamid), + offsetof(CFriendMessagesSendMessageRequest, steamid), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "chat_entry_type", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT32, + offsetof(CFriendMessagesSendMessageRequest, has_chat_entry_type), + offsetof(CFriendMessagesSendMessageRequest, chat_entry_type), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "message", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(CFriendMessagesSendMessageRequest, message), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "contains_bbcode", + 4, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(CFriendMessagesSendMessageRequest, has_contains_bbcode), + offsetof(CFriendMessagesSendMessageRequest, contains_bbcode), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "echo_to_sender", + 5, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(CFriendMessagesSendMessageRequest, has_echo_to_sender), + offsetof(CFriendMessagesSendMessageRequest, echo_to_sender), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "low_priority", + 6, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(CFriendMessagesSendMessageRequest, has_low_priority), + offsetof(CFriendMessagesSendMessageRequest, low_priority), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "client_message_id", + 8, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(CFriendMessagesSendMessageRequest, client_message_id), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned cfriend_messages__send_message__request__field_indices_by_name[] = { + 1, /* field[1] = chat_entry_type */ + 6, /* field[6] = client_message_id */ + 3, /* field[3] = contains_bbcode */ + 4, /* field[4] = echo_to_sender */ + 5, /* field[5] = low_priority */ + 2, /* field[2] = message */ + 0, /* field[0] = steamid */ +}; +static const ProtobufCIntRange cfriend_messages__send_message__request__number_ranges[2 + 1] = +{ + { 1, 0 }, + { 8, 6 }, + { 0, 7 } +}; +const ProtobufCMessageDescriptor cfriend_messages__send_message__request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CFriendMessages_SendMessage_Request", + "CFriendMessagesSendMessageRequest", + "CFriendMessagesSendMessageRequest", + "", + sizeof(CFriendMessagesSendMessageRequest), + 7, + cfriend_messages__send_message__request__field_descriptors, + cfriend_messages__send_message__request__field_indices_by_name, + 2, cfriend_messages__send_message__request__number_ranges, + NULL,NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor cfriend_messages__send_message__response__field_descriptors[4] = +{ + { + "modified_message", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(CFriendMessagesSendMessageResponse, modified_message), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "server_timestamp", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendMessagesSendMessageResponse, has_server_timestamp), + offsetof(CFriendMessagesSendMessageResponse, server_timestamp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "ordinal", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendMessagesSendMessageResponse, has_ordinal), + offsetof(CFriendMessagesSendMessageResponse, ordinal), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "message_without_bb_code", + 4, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(CFriendMessagesSendMessageResponse, message_without_bb_code), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned cfriend_messages__send_message__response__field_indices_by_name[] = { + 3, /* field[3] = message_without_bb_code */ + 0, /* field[0] = modified_message */ + 2, /* field[2] = ordinal */ + 1, /* field[1] = server_timestamp */ +}; +static const ProtobufCIntRange cfriend_messages__send_message__response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 4 } +}; +const ProtobufCMessageDescriptor cfriend_messages__send_message__response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CFriendMessages_SendMessage_Response", + "CFriendMessagesSendMessageResponse", + "CFriendMessagesSendMessageResponse", + "", + sizeof(CFriendMessagesSendMessageResponse), + 4, + cfriend_messages__send_message__response__field_descriptors, + cfriend_messages__send_message__response__field_indices_by_name, + 1, cfriend_messages__send_message__response__number_ranges, + NULL,NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor cfriend_messages__ack_message__notification__field_descriptors[2] = +{ + { + "steamid_partner", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_FIXED64, + offsetof(CFriendMessagesAckMessageNotification, has_steamid_partner), + offsetof(CFriendMessagesAckMessageNotification, steamid_partner), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "timestamp", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendMessagesAckMessageNotification, has_timestamp), + offsetof(CFriendMessagesAckMessageNotification, timestamp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned cfriend_messages__ack_message__notification__field_indices_by_name[] = { + 0, /* field[0] = steamid_partner */ + 1, /* field[1] = timestamp */ +}; +static const ProtobufCIntRange cfriend_messages__ack_message__notification__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor cfriend_messages__ack_message__notification__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CFriendMessages_AckMessage_Notification", + "CFriendMessagesAckMessageNotification", + "CFriendMessagesAckMessageNotification", + "", + sizeof(CFriendMessagesAckMessageNotification), + 2, + cfriend_messages__ack_message__notification__field_descriptors, + cfriend_messages__ack_message__notification__field_indices_by_name, + 1, cfriend_messages__ack_message__notification__number_ranges, + NULL,NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor cfriend_messages__is_in_friends_uibeta__request__field_descriptors[1] = +{ + { + "steamid", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_FIXED64, + offsetof(CFriendMessagesIsInFriendsUIBetaRequest, has_steamid), + offsetof(CFriendMessagesIsInFriendsUIBetaRequest, steamid), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned cfriend_messages__is_in_friends_uibeta__request__field_indices_by_name[] = { + 0, /* field[0] = steamid */ +}; +static const ProtobufCIntRange cfriend_messages__is_in_friends_uibeta__request__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor cfriend_messages__is_in_friends_uibeta__request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CFriendMessages_IsInFriendsUIBeta_Request", + "CFriendMessagesIsInFriendsUIBetaRequest", + "CFriendMessagesIsInFriendsUIBetaRequest", + "", + sizeof(CFriendMessagesIsInFriendsUIBetaRequest), + 1, + cfriend_messages__is_in_friends_uibeta__request__field_descriptors, + cfriend_messages__is_in_friends_uibeta__request__field_indices_by_name, + 1, cfriend_messages__is_in_friends_uibeta__request__number_ranges, + NULL,NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor cfriend_messages__is_in_friends_uibeta__response__field_descriptors[2] = +{ + { + "online_in_friendsui", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(CFriendMessagesIsInFriendsUIBetaResponse, has_online_in_friendsui), + offsetof(CFriendMessagesIsInFriendsUIBetaResponse, online_in_friendsui), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "has_used_friendsui", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(CFriendMessagesIsInFriendsUIBetaResponse, has_has_used_friendsui), + offsetof(CFriendMessagesIsInFriendsUIBetaResponse, has_used_friendsui), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned cfriend_messages__is_in_friends_uibeta__response__field_indices_by_name[] = { + 1, /* field[1] = has_used_friendsui */ + 0, /* field[0] = online_in_friendsui */ +}; +static const ProtobufCIntRange cfriend_messages__is_in_friends_uibeta__response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor cfriend_messages__is_in_friends_uibeta__response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CFriendMessages_IsInFriendsUIBeta_Response", + "CFriendMessagesIsInFriendsUIBetaResponse", + "CFriendMessagesIsInFriendsUIBetaResponse", + "", + sizeof(CFriendMessagesIsInFriendsUIBetaResponse), + 2, + cfriend_messages__is_in_friends_uibeta__response__field_descriptors, + cfriend_messages__is_in_friends_uibeta__response__field_indices_by_name, + 1, cfriend_messages__is_in_friends_uibeta__response__number_ranges, + NULL,NULL,NULL,NULL /* reserved[123] */ +}; +static const EMessageReactionType cfriend_messages__update_message_reaction__request__reaction_type__default_value = EMESSAGE_REACTION_TYPE__k_EMessageReactionType_Invalid; +static const ProtobufCFieldDescriptor cfriend_messages__update_message_reaction__request__field_descriptors[6] = +{ + { + "steamid", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_FIXED64, + offsetof(CFriendMessagesUpdateMessageReactionRequest, has_steamid), + offsetof(CFriendMessagesUpdateMessageReactionRequest, steamid), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "server_timestamp", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendMessagesUpdateMessageReactionRequest, has_server_timestamp), + offsetof(CFriendMessagesUpdateMessageReactionRequest, server_timestamp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "ordinal", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendMessagesUpdateMessageReactionRequest, has_ordinal), + offsetof(CFriendMessagesUpdateMessageReactionRequest, ordinal), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "reaction_type", + 4, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(CFriendMessagesUpdateMessageReactionRequest, has_reaction_type), + offsetof(CFriendMessagesUpdateMessageReactionRequest, reaction_type), + &emessage_reaction_type__descriptor, + &cfriend_messages__update_message_reaction__request__reaction_type__default_value, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "reaction", + 5, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(CFriendMessagesUpdateMessageReactionRequest, reaction), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "is_add", + 6, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(CFriendMessagesUpdateMessageReactionRequest, has_is_add), + offsetof(CFriendMessagesUpdateMessageReactionRequest, is_add), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned cfriend_messages__update_message_reaction__request__field_indices_by_name[] = { + 5, /* field[5] = is_add */ + 2, /* field[2] = ordinal */ + 4, /* field[4] = reaction */ + 3, /* field[3] = reaction_type */ + 1, /* field[1] = server_timestamp */ + 0, /* field[0] = steamid */ +}; +static const ProtobufCIntRange cfriend_messages__update_message_reaction__request__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 6 } +}; +const ProtobufCMessageDescriptor cfriend_messages__update_message_reaction__request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CFriendMessages_UpdateMessageReaction_Request", + "CFriendMessagesUpdateMessageReactionRequest", + "CFriendMessagesUpdateMessageReactionRequest", + "", + sizeof(CFriendMessagesUpdateMessageReactionRequest), + 6, + cfriend_messages__update_message_reaction__request__field_descriptors, + cfriend_messages__update_message_reaction__request__field_indices_by_name, + 1, cfriend_messages__update_message_reaction__request__number_ranges, + NULL,NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor cfriend_messages__update_message_reaction__response__field_descriptors[1] = +{ + { + "reactors", + 1, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendMessagesUpdateMessageReactionResponse, n_reactors), + offsetof(CFriendMessagesUpdateMessageReactionResponse, reactors), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned cfriend_messages__update_message_reaction__response__field_indices_by_name[] = { + 0, /* field[0] = reactors */ +}; +static const ProtobufCIntRange cfriend_messages__update_message_reaction__response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor cfriend_messages__update_message_reaction__response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CFriendMessages_UpdateMessageReaction_Response", + "CFriendMessagesUpdateMessageReactionResponse", + "CFriendMessagesUpdateMessageReactionResponse", + "", + sizeof(CFriendMessagesUpdateMessageReactionResponse), + 1, + cfriend_messages__update_message_reaction__response__field_descriptors, + cfriend_messages__update_message_reaction__response__field_indices_by_name, + 1, cfriend_messages__update_message_reaction__response__number_ranges, + NULL,NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCFieldDescriptor cfriend_messages__incoming_message__notification__field_descriptors[9] = +{ + { + "steamid_friend", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_FIXED64, + offsetof(CFriendMessagesIncomingMessageNotification, has_steamid_friend), + offsetof(CFriendMessagesIncomingMessageNotification, steamid_friend), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "chat_entry_type", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT32, + offsetof(CFriendMessagesIncomingMessageNotification, has_chat_entry_type), + offsetof(CFriendMessagesIncomingMessageNotification, chat_entry_type), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "from_limited_account", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(CFriendMessagesIncomingMessageNotification, has_from_limited_account), + offsetof(CFriendMessagesIncomingMessageNotification, from_limited_account), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "message", + 4, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(CFriendMessagesIncomingMessageNotification, message), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "rtime32_server_timestamp", + 5, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_FIXED32, + offsetof(CFriendMessagesIncomingMessageNotification, has_rtime32_server_timestamp), + offsetof(CFriendMessagesIncomingMessageNotification, rtime32_server_timestamp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "ordinal", + 6, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendMessagesIncomingMessageNotification, has_ordinal), + offsetof(CFriendMessagesIncomingMessageNotification, ordinal), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "local_echo", + 7, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(CFriendMessagesIncomingMessageNotification, has_local_echo), + offsetof(CFriendMessagesIncomingMessageNotification, local_echo), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "message_no_bbcode", + 8, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(CFriendMessagesIncomingMessageNotification, message_no_bbcode), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "low_priority", + 9, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(CFriendMessagesIncomingMessageNotification, has_low_priority), + offsetof(CFriendMessagesIncomingMessageNotification, low_priority), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned cfriend_messages__incoming_message__notification__field_indices_by_name[] = { + 1, /* field[1] = chat_entry_type */ + 2, /* field[2] = from_limited_account */ + 6, /* field[6] = local_echo */ + 8, /* field[8] = low_priority */ + 3, /* field[3] = message */ + 7, /* field[7] = message_no_bbcode */ + 5, /* field[5] = ordinal */ + 4, /* field[4] = rtime32_server_timestamp */ + 0, /* field[0] = steamid_friend */ +}; +static const ProtobufCIntRange cfriend_messages__incoming_message__notification__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 9 } +}; +const ProtobufCMessageDescriptor cfriend_messages__incoming_message__notification__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CFriendMessages_IncomingMessage_Notification", + "CFriendMessagesIncomingMessageNotification", + "CFriendMessagesIncomingMessageNotification", + "", + sizeof(CFriendMessagesIncomingMessageNotification), + 9, + cfriend_messages__incoming_message__notification__field_descriptors, + cfriend_messages__incoming_message__notification__field_indices_by_name, + 1, cfriend_messages__incoming_message__notification__number_ranges, + NULL,NULL,NULL,NULL /* reserved[123] */ +}; +static const EMessageReactionType cfriend_messages__message_reaction__notification__reaction_type__default_value = EMESSAGE_REACTION_TYPE__k_EMessageReactionType_Invalid; +static const ProtobufCFieldDescriptor cfriend_messages__message_reaction__notification__field_descriptors[7] = +{ + { + "steamid_friend", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_FIXED64, + offsetof(CFriendMessagesMessageReactionNotification, has_steamid_friend), + offsetof(CFriendMessagesMessageReactionNotification, steamid_friend), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "server_timestamp", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendMessagesMessageReactionNotification, has_server_timestamp), + offsetof(CFriendMessagesMessageReactionNotification, server_timestamp), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "ordinal", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(CFriendMessagesMessageReactionNotification, has_ordinal), + offsetof(CFriendMessagesMessageReactionNotification, ordinal), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "reactor", + 4, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_FIXED64, + offsetof(CFriendMessagesMessageReactionNotification, has_reactor), + offsetof(CFriendMessagesMessageReactionNotification, reactor), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "reaction_type", + 5, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(CFriendMessagesMessageReactionNotification, has_reaction_type), + offsetof(CFriendMessagesMessageReactionNotification, reaction_type), + &emessage_reaction_type__descriptor, + &cfriend_messages__message_reaction__notification__reaction_type__default_value, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "reaction", + 6, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(CFriendMessagesMessageReactionNotification, reaction), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "is_add", + 7, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(CFriendMessagesMessageReactionNotification, has_is_add), + offsetof(CFriendMessagesMessageReactionNotification, is_add), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned cfriend_messages__message_reaction__notification__field_indices_by_name[] = { + 6, /* field[6] = is_add */ + 2, /* field[2] = ordinal */ + 5, /* field[5] = reaction */ + 4, /* field[4] = reaction_type */ + 3, /* field[3] = reactor */ + 1, /* field[1] = server_timestamp */ + 0, /* field[0] = steamid_friend */ +}; +static const ProtobufCIntRange cfriend_messages__message_reaction__notification__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 7 } +}; +const ProtobufCMessageDescriptor cfriend_messages__message_reaction__notification__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "CFriendMessages_MessageReaction_Notification", + "CFriendMessagesMessageReactionNotification", + "CFriendMessagesMessageReactionNotification", + "", + sizeof(CFriendMessagesMessageReactionNotification), + 7, + cfriend_messages__message_reaction__notification__field_descriptors, + cfriend_messages__message_reaction__notification__field_indices_by_name, + 1, cfriend_messages__message_reaction__notification__number_ranges, + NULL,NULL,NULL,NULL /* reserved[123] */ +}; +static const ProtobufCEnumValue emessage_reaction_type__enum_values_by_number[3] = +{ + { "k_EMessageReactionType_Invalid", "EMESSAGE_REACTION_TYPE__k_EMessageReactionType_Invalid", 0 }, + { "k_EMessageReactionType_Emoticon", "EMESSAGE_REACTION_TYPE__k_EMessageReactionType_Emoticon", 1 }, + { "k_EMessageReactionType_Sticker", "EMESSAGE_REACTION_TYPE__k_EMessageReactionType_Sticker", 2 }, +}; +static const ProtobufCIntRange emessage_reaction_type__value_ranges[] = { +{0, 0},{0, 3} +}; +static const ProtobufCEnumValueIndex emessage_reaction_type__enum_values_by_name[3] = +{ + { "k_EMessageReactionType_Emoticon", 1 }, + { "k_EMessageReactionType_Invalid", 0 }, + { "k_EMessageReactionType_Sticker", 2 }, +}; +const ProtobufCEnumDescriptor emessage_reaction_type__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "EMessageReactionType", + "EMessageReactionType", + "EMessageReactionType", + "", + 3, + emessage_reaction_type__enum_values_by_number, + 3, + emessage_reaction_type__enum_values_by_name, + 1, + emessage_reaction_type__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; +static const ProtobufCMethodDescriptor friend_messages__method_descriptors[6] = +{ + { "GetRecentMessages", &cfriend_messages__get_recent_messages__request__descriptor, &cfriend_messages__get_recent_messages__response__descriptor }, + { "GetActiveMessageSessions", &cfriends_messages__get_active_message_sessions__request__descriptor, &cfriends_messages__get_active_message_sessions__response__descriptor }, + { "SendMessage", &cfriend_messages__send_message__request__descriptor, &cfriend_messages__send_message__response__descriptor }, + { "AckMessage", &cfriend_messages__ack_message__notification__descriptor, &no_response__descriptor }, + { "IsInFriendsUIBeta", &cfriend_messages__is_in_friends_uibeta__request__descriptor, &cfriend_messages__is_in_friends_uibeta__response__descriptor }, + { "UpdateMessageReaction", &cfriend_messages__update_message_reaction__request__descriptor, &cfriend_messages__update_message_reaction__response__descriptor }, +}; +const unsigned friend_messages__method_indices_by_name[] = { + 3, /* AckMessage */ + 1, /* GetActiveMessageSessions */ + 0, /* GetRecentMessages */ + 4, /* IsInFriendsUIBeta */ + 2, /* SendMessage */ + 5 /* UpdateMessageReaction */ +}; +const ProtobufCServiceDescriptor friend_messages__descriptor = +{ + PROTOBUF_C__SERVICE_DESCRIPTOR_MAGIC, + "FriendMessages", + "FriendMessages", + "FriendMessages", + "", + 6, + friend_messages__method_descriptors, + friend_messages__method_indices_by_name +}; +void friend_messages__get_recent_messages(ProtobufCService *service, + const CFriendMessagesGetRecentMessagesRequest *input, + CFriendMessagesGetRecentMessagesResponse_Closure closure, + void *closure_data) +{ + assert(service->descriptor == &friend_messages__descriptor); + service->invoke(service, 0, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); +} +void friend_messages__get_active_message_sessions(ProtobufCService *service, + const CFriendsMessagesGetActiveMessageSessionsRequest *input, + CFriendsMessagesGetActiveMessageSessionsResponse_Closure closure, + void *closure_data) +{ + assert(service->descriptor == &friend_messages__descriptor); + service->invoke(service, 1, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); +} +void friend_messages__send_message(ProtobufCService *service, + const CFriendMessagesSendMessageRequest *input, + CFriendMessagesSendMessageResponse_Closure closure, + void *closure_data) +{ + assert(service->descriptor == &friend_messages__descriptor); + service->invoke(service, 2, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); +} +void friend_messages__ack_message(ProtobufCService *service, + const CFriendMessagesAckMessageNotification *input, + NoResponse_Closure closure, + void *closure_data) +{ + assert(service->descriptor == &friend_messages__descriptor); + service->invoke(service, 3, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); +} +void friend_messages__is_in_friends_uibeta(ProtobufCService *service, + const CFriendMessagesIsInFriendsUIBetaRequest *input, + CFriendMessagesIsInFriendsUIBetaResponse_Closure closure, + void *closure_data) +{ + assert(service->descriptor == &friend_messages__descriptor); + service->invoke(service, 4, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); +} +void friend_messages__update_message_reaction(ProtobufCService *service, + const CFriendMessagesUpdateMessageReactionRequest *input, + CFriendMessagesUpdateMessageReactionResponse_Closure closure, + void *closure_data) +{ + assert(service->descriptor == &friend_messages__descriptor); + service->invoke(service, 5, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); +} +void friend_messages__init (FriendMessages_Service *service, + FriendMessages_ServiceDestroy destroy) +{ + protobuf_c_service_generated_init (&service->base, + &friend_messages__descriptor, + (ProtobufCServiceDestroy) destroy); +} +static const ProtobufCMethodDescriptor friend_messages_client__method_descriptors[3] = +{ + { "IncomingMessage", &cfriend_messages__incoming_message__notification__descriptor, &no_response__descriptor }, + { "NotifyAckMessageEcho", &cfriend_messages__ack_message__notification__descriptor, &no_response__descriptor }, + { "MessageReaction", &cfriend_messages__message_reaction__notification__descriptor, &no_response__descriptor }, +}; +const unsigned friend_messages_client__method_indices_by_name[] = { + 0, /* IncomingMessage */ + 2, /* MessageReaction */ + 1 /* NotifyAckMessageEcho */ +}; +const ProtobufCServiceDescriptor friend_messages_client__descriptor = +{ + PROTOBUF_C__SERVICE_DESCRIPTOR_MAGIC, + "FriendMessagesClient", + "FriendMessagesClient", + "FriendMessagesClient", + "", + 3, + friend_messages_client__method_descriptors, + friend_messages_client__method_indices_by_name +}; +void friend_messages_client__incoming_message(ProtobufCService *service, + const CFriendMessagesIncomingMessageNotification *input, + NoResponse_Closure closure, + void *closure_data) +{ + assert(service->descriptor == &friend_messages_client__descriptor); + service->invoke(service, 0, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); +} +void friend_messages_client__notify_ack_message_echo(ProtobufCService *service, + const CFriendMessagesAckMessageNotification *input, + NoResponse_Closure closure, + void *closure_data) +{ + assert(service->descriptor == &friend_messages_client__descriptor); + service->invoke(service, 1, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); +} +void friend_messages_client__message_reaction(ProtobufCService *service, + const CFriendMessagesMessageReactionNotification *input, + NoResponse_Closure closure, + void *closure_data) +{ + assert(service->descriptor == &friend_messages_client__descriptor); + service->invoke(service, 2, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data); +} +void friend_messages_client__init (FriendMessagesClient_Service *service, + FriendMessagesClient_ServiceDestroy destroy) +{ + protobuf_c_service_generated_init (&service->base, + &friend_messages_client__descriptor, + (ProtobufCServiceDestroy) destroy); +} diff --git a/protocols/Steam/src/protobuf-c/steammessages_friendmessages.steamclient.pb-c.h b/protocols/Steam/src/protobuf-c/steammessages_friendmessages.steamclient.pb-c.h index 3d4c801e5b..9a747e890b 100644 --- a/protocols/Steam/src/protobuf-c/steammessages_friendmessages.steamclient.pb-c.h +++ b/protocols/Steam/src/protobuf-c/steammessages_friendmessages.steamclient.pb-c.h @@ -4,7 +4,7 @@ #ifndef PROTOBUF_C_steammessages_5ffriendmessages_2esteamclient_2eproto__INCLUDED #define PROTOBUF_C_steammessages_5ffriendmessages_2esteamclient_2eproto__INCLUDED -#include +#include "protobuf-c.h" PROTOBUF_C__BEGIN_DECLS @@ -70,14 +70,6 @@ extern const ProtobufCServiceDescriptor friend_messages_client__descriptor; extern "C" void message_init_generic(const ProtobufCMessageDescriptor * desc, ProtobufCMessage * message); -struct ProtobufCppMessage : public ProtobufCMessage -{ - ProtobufCppMessage(const ProtobufCMessageDescriptor &descr) - { - message_init_generic(&descr, this); - } -}; - struct CFriendMessagesGetRecentMessagesRequest : public ProtobufCppMessage { CFriendMessagesGetRecentMessagesRequest() : diff --git a/protocols/Steam/src/stdafx.h b/protocols/Steam/src/stdafx.h index 2beb51b714..2fd47d20f1 100644 --- a/protocols/Steam/src/stdafx.h +++ b/protocols/Steam/src/stdafx.h @@ -41,6 +41,7 @@ #include "protobuf-c/steammessages_auth.steamclient.pb-c.h" #include "protobuf-c/steammessages_clientserver_login.pb-c.h" +#include "protobuf-c/steammessages_friendmessages.steamclient.pb-c.h" #include "proto.h" #define MODULE "Steam" @@ -79,7 +80,6 @@ int64_t getRandomInt(); #include "api/friend.h" #include "api/friend_list.h" #include "api/history.h" -#include "api/message.h" #include "api/pending.h" #include "api/search.h" #include "api/session.h" diff --git a/protocols/Steam/src/steam_messages.cpp b/protocols/Steam/src/steam_messages.cpp index ba4f60271f..b5a89e3c8c 100644 --- a/protocols/Steam/src/steam_messages.cpp +++ b/protocols/Steam/src/steam_messages.cpp @@ -1,55 +1,48 @@ #include "stdafx.h" -struct SendMessageParam +int CSteamProto::SendMsg(MCONTACT hContact, MEVENT, const char *message) { - MCONTACT hContact; - HANDLE hMessage; -}; + if (!IsOnline()) + return -1; -int CSteamProto::OnSendMessage(MCONTACT hContact, const char *message) -{ UINT hMessage = InterlockedIncrement(&hMessageProcess); + CMStringA szId(FORMAT, "%d", hMessage); + { + mir_cslock lck(m_csOwnMessages); + m_arOwnMessages.insert(new COwnMessage(hContact, hMessage)); + } - SendMessageParam *param = (SendMessageParam *)mir_calloc(sizeof(SendMessageParam)); - param->hContact = hContact; - param->hMessage = (HANDLE)hMessage; + CFriendMessagesSendMessageRequest request; + request.chat_entry_type = (int)EChatEntryType::ChatMsg; request.has_chat_entry_type = true; + request.client_message_id = szId.GetBuffer(); + request.contains_bbcode = request.has_contains_bbcode = true; + request.steamid = GetId(hContact, DBKEY_STEAM_ID); request.has_steamid = true; + request.message = (char *)message; + WSSendClient("FriendMessages.SendMessage#1", request, &CSteamProto::OnMessageSent); - ptrA steamId(getStringA(hContact, DBKEY_STEAM_ID)); - SendRequest(new SendMessageRequest(m_szAccessToken, m_szUmqId, steamId, message), &CSteamProto::OnMessageSent, param); return hMessage; } -void CSteamProto::OnMessageSent(const MHttpResponse &response, void *arg) +void CSteamProto::OnMessageSent(const uint8_t *buf, size_t cbLen) { - SendMessageParam *param = (SendMessageParam *)arg; - - std::string error = Translate("Unknown error"); - ptrW steamId(getWStringA(param->hContact, DBKEY_STEAM_ID)); - time_t timestamp = NULL; - - JSONNode root = JSONNode::parse(response.body); - const JSONNode &node = root["error"]; - if (node) - error = node.as_string(); - - timestamp = atol(root["utc_timestamp"].as_string().c_str()); - if (timestamp > getDword(param->hContact, DB_KEY_LASTMSGTS)) - setDword(param->hContact, DB_KEY_LASTMSGTS, timestamp); - - if (mir_strcmpi(error.c_str(), "OK") != 0) { - debugLogA(__FUNCTION__ ": failed to send message for %s (%s)", steamId.get(), error.c_str()); - ProtoBroadcastAck(param->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, param->hMessage, _A2T(error.c_str())); + proto::FriendMessagesSendMessageResponse reply(buf, cbLen); + if (!reply) + return; + + COwnMessage *pOwn; + { + mir_cslock lck(m_csOwnMessages); + pOwn = m_arOwnMessages.find((COwnMessage *)&reply->ordinal); } - else { - // remember server time of this message - auto it = m_mpOutMessages.find(param->hMessage); - if (it == m_mpOutMessages.end() && timestamp != NULL) - m_mpOutMessages[param->hMessage] = timestamp; - - ProtoBroadcastAck(param->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, param->hMessage, 0); + + if (pOwn) { + uint32_t timestamp = (reply->has_server_timestamp) ? reply->server_timestamp : 0; + if (timestamp > getDword(pOwn->hContact, DB_KEY_LASTMSGTS)) + setDword(pOwn->hContact, DB_KEY_LASTMSGTS, timestamp); + + pOwn->timestamp = timestamp; + ProtoBroadcastAck(pOwn->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)pOwn->iMessageId, 0); } - - mir_free(param); } int CSteamProto::OnPreCreateMessage(WPARAM, LPARAM lParam) @@ -58,10 +51,10 @@ int CSteamProto::OnPreCreateMessage(WPARAM, LPARAM lParam) if (mir_strcmp(Proto_GetBaseAccountName(evt->hContact), m_szModuleName)) return 0; - auto it = m_mpOutMessages.find((HANDLE)evt->seq); - if (it != m_mpOutMessages.end()) { - evt->dbei->timestamp = it->second; - m_mpOutMessages.erase(it); + mir_cslock lck(m_csOwnMessages); + if (auto *pOwn = m_arOwnMessages.find((COwnMessage *)&evt->seq)) { + evt->dbei->timestamp = pOwn->timestamp; + m_arOwnMessages.remove(pOwn); } return 0; @@ -74,6 +67,6 @@ int CSteamProto::UserIsTyping(MCONTACT hContact, int type) return 0; ptrA steamId(getStringA(hContact, DBKEY_STEAM_ID)); - SendRequest(new SendTypingRequest(m_szAccessToken, m_szUmqId, steamId)); + //SendRequest(new SendTypingRequest(m_szAccessToken, m_szUmqId, steamId)); return 0; } diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index 158b5e215b..9d39d7e907 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -11,6 +11,7 @@ CSteamProto::CSteamProto(const char *protoName, const wchar_t *userName) : PROTO(protoName, userName), m_impl(*this), m_arRequests(10, CompareRequests), + m_arOwnMessages(1, NumericKeySortT), m_wszGroupName(this, "DefaultGroup", L"Steam"), m_wszDeviceName(this, "DeviceName", L"Miranda NG") { @@ -223,14 +224,6 @@ HANDLE CSteamProto::SearchByName(const wchar_t *nick, const wchar_t *firstName, return (HANDLE)STEAM_SEARCH_BYNAME; } -int CSteamProto::SendMsg(MCONTACT hContact, MEVENT, const char *message) -{ - if (!IsOnline()) - return -1; - - return OnSendMessage(hContact, message); -} - int CSteamProto::SetStatus(int new_status) { // Routing statuses not supported by Steam diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h index 5b61ae97f5..7503b4873d 100644 --- a/protocols/Steam/src/steam_proto.h +++ b/protocols/Steam/src/steam_proto.h @@ -59,6 +59,17 @@ struct ProtoRequest MsgCallback pCallback; }; +struct COwnMessage +{ + COwnMessage(MCONTACT _1, int _2) : + hContact(_1), + iMessageId(_2) + {} + + int iMessageId, timestamp = 0; + MCONTACT hContact; +}; + class CSteamProto : public PROTO { friend class CSteamGuardDialog; @@ -108,14 +119,13 @@ class CSteamProto : public PROTO void SetId(MCONTACT, const char *pszSetting, int64_t id); // polling - CMStringA m_szRefreshToken, m_szAccessToken, m_szUmqId; + CMStringA m_szRefreshToken, m_szAccessToken; ULONG hAuthProcess = 1; ULONG hMessageProcess = 1; int m_iPollingInterval; time_t m_iPollingStartTime; mir_cs m_addContactLock; mir_cs m_setStatusLock; - std::map m_mpOutMessages; // connection WebSocket *m_ws; @@ -131,6 +141,7 @@ class CSteamProto : public PROTO void WSSend(EMsg msgType, const ProtobufCppMessage &msg); void WSSendHeader(EMsg msgType, const CMsgProtoBufHeader &hdr, const ProtobufCppMessage &msg); + void WSSendClient(const char *pszServiceName, const ProtobufCppMessage &msg, MsgCallback pCallback = 0); void WSSendService(const char *pszServiceName, const ProtobufCppMessage &msg, MsgCallback pCallback = 0); // requests @@ -203,8 +214,10 @@ class CSteamProto : public PROTO void OnSearchByNameStarted(const MHttpResponse &response, void *arg); // messages - int OnSendMessage(MCONTACT hContact, const char *message); - void OnMessageSent(const MHttpResponse &response, void *arg); + mir_cs m_csOwnMessages; + OBJLIST m_arOwnMessages; + + void OnMessageSent(const uint8_t *buf, size_t cbLen); int __cdecl OnPreCreateMessage(WPARAM, LPARAM lParam); // history diff --git a/protocols/Steam/src/steam_ws.cpp b/protocols/Steam/src/steam_ws.cpp index e6ee7f7d7a..dcf6d0743a 100644 --- a/protocols/Steam/src/steam_ws.cpp +++ b/protocols/Steam/src/steam_ws.cpp @@ -173,6 +173,10 @@ void CSteamProto::ProcessMessage(const uint8_t *buf, size_t cbLen) case EMsg::ClientLogOnResponse: OnClientLogon(buf, cbLen); break; + + case EMsg::ClientLoggedOff: + Logout(); + break; } } @@ -219,6 +223,24 @@ void CSteamProto::WSSendHeader(EMsg msgType, const CMsgProtoBufHeader &hdr, cons m_ws->sendBinary(hdrbuf.data(), hdrbuf.length()); } +void CSteamProto::WSSendClient(const char *pszServiceName, const ProtobufCppMessage &msg, MsgCallback pCallback) +{ + CMsgProtoBufHeader hdr; + hdr.has_client_sessionid = hdr.has_steamid = hdr.has_jobid_source = hdr.has_jobid_target = true; + hdr.client_sessionid = m_iSessionId; + hdr.jobid_source = getRandomInt(); + hdr.jobid_target = -1; + hdr.target_job_name = (char *)pszServiceName; + hdr.realm = 1; hdr.has_realm = true; + + if (pCallback) { + mir_cslock lck(m_csRequests); + m_arRequests.insert(new ProtoRequest(hdr.jobid_source, pCallback)); + } + + WSSendHeader(EMsg::ServiceMethodCallFromClient, hdr, msg); +} + void CSteamProto::WSSendService(const char *pszServiceName, const ProtobufCppMessage &msg, MsgCallback pCallback) { CMsgProtoBufHeader hdr; -- cgit v1.2.3