From 59f9ba5fef0e2e6f3cd5558a21d03cf09c184be1 Mon Sep 17 00:00:00 2001 From: lotodore Date: Sun, 7 Nov 2010 07:26:56 +0000 Subject: [PATCH] Adding new chat type for private messages in lobby. --- docs/pokerth.asn1 | 7 +++++- src/third_party/asn1/AfkWarningMessage.c | 2 +- src/third_party/asn1/ChatMessage.c | 18 +++++++------- src/third_party/asn1/ChatRequestMessage.c | 25 ++++++++++++++------ src/third_party/asn1/ChatRequestMessage.h | 3 +++ src/third_party/asn1/ChatRequestTypeGame.c | 2 +- src/third_party/asn1/ChatTypeGame.c | 4 ++-- src/third_party/asn1/ChatTypeLobby.c | 2 +- src/third_party/asn1/DialogMessage.c | 2 +- src/third_party/asn1/ErrorMessage.c | 2 +- src/third_party/asn1/TimeoutWarningMessage.c | 4 ++-- 11 files changed, 45 insertions(+), 26 deletions(-) diff --git a/docs/pokerth.asn1 b/docs/pokerth.asn1 index d5e65b90..ed3fab06 100644 --- a/docs/pokerth.asn1 +++ b/docs/pokerth.asn1 @@ -643,7 +643,8 @@ StatisticsData ::= SEQUENCE { ChatRequestMessage ::= [APPLICATION 129] SEQUENCE { chatRequestType CHOICE { chatRequestTypeLobby [0] ChatRequestTypeLobby, - chatRequestTypeGame [1] ChatRequestTypeGame + chatRequestTypeGame [1] ChatRequestTypeGame, + chatRequestTypePrivate [2] ChatRequestTypePrivate }, chatText UTF8String (SIZE(1..128)) } @@ -655,6 +656,10 @@ ChatRequestTypeGame ::= SEQUENCE { gameId NonZeroId } +ChatRequestTypePrivate ::= SEQUENCE { + targetPlayerId NonZeroId +} + ChatMessage ::= [APPLICATION 130] SEQUENCE { chatType CHOICE { chatTypeLobby [0] ChatTypeLobby, diff --git a/src/third_party/asn1/AfkWarningMessage.c b/src/third_party/asn1/AfkWarningMessage.c index 8728b628..342cb1c5 100644 --- a/src/third_party/asn1/AfkWarningMessage.c +++ b/src/third_party/asn1/AfkWarningMessage.c @@ -23,7 +23,7 @@ static ber_tlv_tag_t asn_DEF_AfkWarningMessage_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_TYPE_tag2member_t asn_MAP_AfkWarningMessage_tag2el_1[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* remainingTimeouts at 700 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* remainingTimeouts at 705 */ }; static asn_SEQUENCE_specifics_t asn_SPC_AfkWarningMessage_specs_1 = { sizeof(struct AfkWarningMessage), diff --git a/src/third_party/asn1/ChatMessage.c b/src/third_party/asn1/ChatMessage.c index c462ab37..951a1a08 100644 --- a/src/third_party/asn1/ChatMessage.c +++ b/src/third_party/asn1/ChatMessage.c @@ -78,10 +78,10 @@ static asn_TYPE_member_t asn_MBR_chatType_2[] = { }, }; static asn_TYPE_tag2member_t asn_MAP_chatType_tag2el_2[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* chatTypeLobby at 660 */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* chatTypeGame at 661 */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* chatTypeBot at 662 */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* chatTypeBroadcast at 664 */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* chatTypeLobby at 665 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* chatTypeGame at 666 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* chatTypeBot at 667 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* chatTypeBroadcast at 669 */ }; static asn_CHOICE_specifics_t asn_SPC_chatType_specs_2 = { sizeof(struct chatType), @@ -141,11 +141,11 @@ static ber_tlv_tag_t asn_DEF_ChatMessage_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_TYPE_tag2member_t asn_MAP_ChatMessage_tag2el_1[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 }, /* chatText at 665 */ - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* chatTypeLobby at 660 */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* chatTypeGame at 661 */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 }, /* chatTypeBot at 662 */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 } /* chatTypeBroadcast at 664 */ + { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 }, /* chatText at 670 */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* chatTypeLobby at 665 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* chatTypeGame at 666 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 }, /* chatTypeBot at 667 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 } /* chatTypeBroadcast at 669 */ }; static asn_SEQUENCE_specifics_t asn_SPC_ChatMessage_specs_1 = { sizeof(struct ChatMessage), diff --git a/src/third_party/asn1/ChatRequestMessage.c b/src/third_party/asn1/ChatRequestMessage.c index 8702c8f8..79469933 100644 --- a/src/third_party/asn1/ChatRequestMessage.c +++ b/src/third_party/asn1/ChatRequestMessage.c @@ -58,10 +58,20 @@ static asn_TYPE_member_t asn_MBR_chatRequestType_2[] = { 0, "chatRequestTypeGame" }, + { ATF_NOFLAGS, 0, offsetof(struct chatRequestType, choice.chatRequestTypePrivate), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ChatRequestTypePrivate, + 0, /* Defer constraints checking to the member type */ + 0, /* PER is not compiled, use -gen-PER */ + 0, + "chatRequestTypePrivate" + }, }; static asn_TYPE_tag2member_t asn_MAP_chatRequestType_tag2el_2[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* chatRequestTypeLobby at 645 */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* chatRequestTypeGame at 647 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* chatRequestTypeGame at 646 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* chatRequestTypePrivate at 648 */ }; static asn_CHOICE_specifics_t asn_SPC_chatRequestType_specs_2 = { sizeof(struct chatRequestType), @@ -69,9 +79,9 @@ static asn_CHOICE_specifics_t asn_SPC_chatRequestType_specs_2 = { offsetof(struct chatRequestType, present), sizeof(((struct chatRequestType *)0)->present), asn_MAP_chatRequestType_tag2el_2, - 2, /* Count of tags in the map */ + 3, /* Count of tags in the map */ 0, - 2 /* Extensions start */ + 3 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_chatRequestType_2 = { @@ -92,7 +102,7 @@ asn_TYPE_descriptor_t asn_DEF_chatRequestType_2 = { 0, /* No tags (count) */ 0, /* No PER visible constraints */ asn_MBR_chatRequestType_2, - 2, /* Elements count */ + 3, /* Elements count */ &asn_SPC_chatRequestType_specs_2 /* Additional specs */ }; @@ -121,15 +131,16 @@ static ber_tlv_tag_t asn_DEF_ChatRequestMessage_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_TYPE_tag2member_t asn_MAP_ChatRequestMessage_tag2el_1[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 }, /* chatText at 648 */ + { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 }, /* chatText at 649 */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* chatRequestTypeLobby at 645 */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 } /* chatRequestTypeGame at 647 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* chatRequestTypeGame at 646 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 } /* chatRequestTypePrivate at 648 */ }; static asn_SEQUENCE_specifics_t asn_SPC_ChatRequestMessage_specs_1 = { sizeof(struct ChatRequestMessage), offsetof(struct ChatRequestMessage, _asn_ctx), asn_MAP_ChatRequestMessage_tag2el_1, - 3, /* Count of tags in the map */ + 4, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* Start extensions */ 3 /* Stop extensions */ diff --git a/src/third_party/asn1/ChatRequestMessage.h b/src/third_party/asn1/ChatRequestMessage.h index ab5fd1a7..95b1e078 100644 --- a/src/third_party/asn1/ChatRequestMessage.h +++ b/src/third_party/asn1/ChatRequestMessage.h @@ -15,6 +15,7 @@ #include #include "ChatRequestTypeLobby.h" #include "ChatRequestTypeGame.h" +#include "ChatRequestTypePrivate.h" #include #include @@ -27,6 +28,7 @@ typedef enum chatRequestType_PR { chatRequestType_PR_NOTHING, /* No components present */ chatRequestType_PR_chatRequestTypeLobby, chatRequestType_PR_chatRequestTypeGame, + chatRequestType_PR_chatRequestTypePrivate, /* Extensions may appear below */ } chatRequestType_PR; @@ -38,6 +40,7 @@ typedef struct ChatRequestMessage { union ChatRequestMessage__chatRequestType_u { ChatRequestTypeLobby_t chatRequestTypeLobby; ChatRequestTypeGame_t chatRequestTypeGame; + ChatRequestTypePrivate_t chatRequestTypePrivate; /* * This type is extensible, * possible extensions are below. diff --git a/src/third_party/asn1/ChatRequestTypeGame.c b/src/third_party/asn1/ChatRequestTypeGame.c index 46d85498..1a66f81b 100644 --- a/src/third_party/asn1/ChatRequestTypeGame.c +++ b/src/third_party/asn1/ChatRequestTypeGame.c @@ -22,7 +22,7 @@ static ber_tlv_tag_t asn_DEF_ChatRequestTypeGame_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_TYPE_tag2member_t asn_MAP_ChatRequestTypeGame_tag2el_1[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* gameId at 656 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* gameId at 657 */ }; static asn_SEQUENCE_specifics_t asn_SPC_ChatRequestTypeGame_specs_1 = { sizeof(struct ChatRequestTypeGame), diff --git a/src/third_party/asn1/ChatTypeGame.c b/src/third_party/asn1/ChatTypeGame.c index 89407ae7..7169401d 100644 --- a/src/third_party/asn1/ChatTypeGame.c +++ b/src/third_party/asn1/ChatTypeGame.c @@ -31,8 +31,8 @@ static ber_tlv_tag_t asn_DEF_ChatTypeGame_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_TYPE_tag2member_t asn_MAP_ChatTypeGame_tag2el_1[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 673 */ - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* playerId at 675 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* gameId at 678 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* playerId at 680 */ }; static asn_SEQUENCE_specifics_t asn_SPC_ChatTypeGame_specs_1 = { sizeof(struct ChatTypeGame), diff --git a/src/third_party/asn1/ChatTypeLobby.c b/src/third_party/asn1/ChatTypeLobby.c index 4a4bed30..df84bab1 100644 --- a/src/third_party/asn1/ChatTypeLobby.c +++ b/src/third_party/asn1/ChatTypeLobby.c @@ -22,7 +22,7 @@ static ber_tlv_tag_t asn_DEF_ChatTypeLobby_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_TYPE_tag2member_t asn_MAP_ChatTypeLobby_tag2el_1[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* playerId at 670 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* playerId at 675 */ }; static asn_SEQUENCE_specifics_t asn_SPC_ChatTypeLobby_specs_1 = { sizeof(struct ChatTypeLobby), diff --git a/src/third_party/asn1/DialogMessage.c b/src/third_party/asn1/DialogMessage.c index 2996a312..cddd0f02 100644 --- a/src/third_party/asn1/DialogMessage.c +++ b/src/third_party/asn1/DialogMessage.c @@ -55,7 +55,7 @@ static ber_tlv_tag_t asn_DEF_DialogMessage_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_TYPE_tag2member_t asn_MAP_DialogMessage_tag2el_1[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 } /* notificationText at 684 */ + { (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 0, 0, 0 } /* notificationText at 689 */ }; static asn_SEQUENCE_specifics_t asn_SPC_DialogMessage_specs_1 = { sizeof(struct DialogMessage), diff --git a/src/third_party/asn1/ErrorMessage.c b/src/third_party/asn1/ErrorMessage.c index 6c35a7da..3a5374fb 100644 --- a/src/third_party/asn1/ErrorMessage.c +++ b/src/third_party/asn1/ErrorMessage.c @@ -166,7 +166,7 @@ static ber_tlv_tag_t asn_DEF_ErrorMessage_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_TYPE_tag2member_t asn_MAP_ErrorMessage_tag2el_1[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* errorReason at 704 */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* errorReason at 709 */ }; static asn_SEQUENCE_specifics_t asn_SPC_ErrorMessage_specs_1 = { sizeof(struct ErrorMessage), diff --git a/src/third_party/asn1/TimeoutWarningMessage.c b/src/third_party/asn1/TimeoutWarningMessage.c index cbb6f000..a52551c6 100644 --- a/src/third_party/asn1/TimeoutWarningMessage.c +++ b/src/third_party/asn1/TimeoutWarningMessage.c @@ -149,8 +149,8 @@ static ber_tlv_tag_t asn_DEF_TimeoutWarningMessage_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_TYPE_tag2member_t asn_MAP_TimeoutWarningMessage_tag2el_1[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* remainingSeconds at 693 */ - { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* timeoutReason at 689 */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* remainingSeconds at 698 */ + { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* timeoutReason at 694 */ }; static asn_SEQUENCE_specifics_t asn_SPC_TimeoutWarningMessage_specs_1 = { sizeof(struct TimeoutWarningMessage),