From 3540aa379c4b156a575563aa0bfb1ffdc1356625 Mon Sep 17 00:00:00 2001 From: Promi Date: Fri, 2 Dec 2016 10:49:05 +0100 Subject: [PATCH] Initial commit --- .gdbinit | 2 + .gitignore | 25 + COPYING | 661 + COPYING_ORIGINAL | 22 + Makefile.am | 85 + README.md | 78 + configure.ac | 12 + src/aither/console-logger.cc | 49 + src/aither/console-logger.hh | 37 + src/aither/log-severity.hh | 30 + src/aither/log.cc | 97 + src/aither/log.hh | 41 + src/aither/logger.cc | 68 + src/aither/logger.hh | 54 + src/aither/void-logger.cc | 32 + src/aither/void-logger.hh | 33 + src/io/file.hh | 47 + src/io/raw-s16le-file-sample-reader.cc | 58 + src/io/raw-s16le-file-sample-reader.hh | 37 + src/io/raw-s16le-file-sample-writer.cc | 60 + src/io/raw-s16le-file-sample-writer.hh | 39 + src/io/sample-reader.cc | 23 + src/io/sample-reader.hh | 55 + src/io/sample-writer.cc | 23 + src/io/sample-writer.hh | 56 + src/io/wavefile-format.hh | 38 + src/io/wavefile-reader.hh | 31 + src/main.cc | 194 + src/mumble/Mumble.pb.cc | 17784 ++++++++++++++++++ src/mumble/Mumble.pb.h | 13317 +++++++++++++ src/mumble/Mumble.proto | 561 + src/mumble/audio-player.cc | 290 + src/mumble/audio-player.hh | 103 + src/mumble/audio-recorder.cc | 166 + src/mumble/audio-recorder.hh | 69 + src/mumble/cert-manager.cc | 105 + src/mumble/cert-manager.hh | 78 + src/mumble/channel.cc | 69 + src/mumble/channel.hh | 90 + src/mumble/client.cc | 589 + src/mumble/client.hh | 239 + src/mumble/codec.hh | 70 + src/mumble/configuration.hh | 53 + src/mumble/connection.cc | 150 + src/mumble/connection.hh | 71 + src/mumble/img-reader.cc | 94 + src/mumble/img-reader.hh | 41 + src/mumble/messages.cc | 121 + src/mumble/messages.hh | 45 + src/mumble/mumble-2-mumble.cc | 174 + src/mumble/mumble-2-mumble.hh | 84 + src/mumble/mumble.hh | 53 + src/mumble/packet-data-stream.cc | 215 + src/mumble/packet-data-stream.hh | 74 + src/mumble/udp-packet.cc | 122 + src/mumble/udp-packet.hh | 60 + src/mumble/user.cc | 106 + src/mumble/user.hh | 134 + src/mumble/version.hh | 30 + src/network/tcp-socket.cc | 94 + src/network/tcp-socket.hh | 42 + src/openssl/basic-input-output.cc | 36 + src/openssl/basic-input-output.hh | 45 + src/openssl/memory-basic-input-output.cc | 38 + src/openssl/memory-basic-input-output.hh | 43 + src/openssl/openssl.cc | 31 + src/openssl/openssl.hh | 24 + src/openssl/pem.cc | 126 + src/openssl/pem.hh | 49 + src/openssl/pkey/envelope-message-digest.cc | 32 + src/openssl/pkey/envelope-message-digest.hh | 37 + src/openssl/pkey/envelope.cc | 65 + src/openssl/pkey/envelope.hh | 51 + src/openssl/pkey/rsa.cc | 96 + src/openssl/pkey/rsa.hh | 50 + src/openssl/ssl/context.cc | 58 + src/openssl/ssl/context.hh | 44 + src/openssl/ssl/method.cc | 39 + src/openssl/ssl/method.hh | 38 + src/openssl/ssl/socket.cc | 85 + src/openssl/ssl/socket.hh | 42 + src/openssl/x509/certificate.cc | 115 + src/openssl/x509/certificate.hh | 57 + src/openssl/x509/extension-factory.cc | 69 + src/openssl/x509/extension-factory.hh | 37 + src/openssl/x509/extension.cc | 31 + src/openssl/x509/extension.hh | 37 + src/openssl/x509/name.cc | 54 + src/openssl/x509/name.hh | 40 + src/opus/constants.hh | 54 + src/opus/decoder.cc | 93 + src/opus/decoder.hh | 53 + src/opus/encoder.cc | 250 + src/opus/encoder.hh | 111 + src/pluginbot/conf.cc | 117 + src/pluginbot/conf.hh | 32 + src/pluginbot/main.cc | 966 + src/pluginbot/main.hh | 105 + src/pluginbot/plugin.hh | 97 + src/util/base64.hh | 75 + src/util/endian.hh | 119 + 101 files changed, 40821 insertions(+) create mode 100644 .gdbinit create mode 100644 .gitignore create mode 100644 COPYING create mode 100644 COPYING_ORIGINAL create mode 100644 Makefile.am create mode 100644 README.md create mode 100644 configure.ac create mode 100644 src/aither/console-logger.cc create mode 100644 src/aither/console-logger.hh create mode 100644 src/aither/log-severity.hh create mode 100644 src/aither/log.cc create mode 100644 src/aither/log.hh create mode 100644 src/aither/logger.cc create mode 100644 src/aither/logger.hh create mode 100644 src/aither/void-logger.cc create mode 100644 src/aither/void-logger.hh create mode 100644 src/io/file.hh create mode 100644 src/io/raw-s16le-file-sample-reader.cc create mode 100644 src/io/raw-s16le-file-sample-reader.hh create mode 100644 src/io/raw-s16le-file-sample-writer.cc create mode 100644 src/io/raw-s16le-file-sample-writer.hh create mode 100644 src/io/sample-reader.cc create mode 100644 src/io/sample-reader.hh create mode 100644 src/io/sample-writer.cc create mode 100644 src/io/sample-writer.hh create mode 100644 src/io/wavefile-format.hh create mode 100644 src/io/wavefile-reader.hh create mode 100644 src/main.cc create mode 100644 src/mumble/Mumble.pb.cc create mode 100644 src/mumble/Mumble.pb.h create mode 100644 src/mumble/Mumble.proto create mode 100644 src/mumble/audio-player.cc create mode 100644 src/mumble/audio-player.hh create mode 100644 src/mumble/audio-recorder.cc create mode 100644 src/mumble/audio-recorder.hh create mode 100644 src/mumble/cert-manager.cc create mode 100644 src/mumble/cert-manager.hh create mode 100644 src/mumble/channel.cc create mode 100644 src/mumble/channel.hh create mode 100644 src/mumble/client.cc create mode 100644 src/mumble/client.hh create mode 100644 src/mumble/codec.hh create mode 100644 src/mumble/configuration.hh create mode 100644 src/mumble/connection.cc create mode 100644 src/mumble/connection.hh create mode 100644 src/mumble/img-reader.cc create mode 100644 src/mumble/img-reader.hh create mode 100644 src/mumble/messages.cc create mode 100644 src/mumble/messages.hh create mode 100644 src/mumble/mumble-2-mumble.cc create mode 100644 src/mumble/mumble-2-mumble.hh create mode 100644 src/mumble/mumble.hh create mode 100644 src/mumble/packet-data-stream.cc create mode 100644 src/mumble/packet-data-stream.hh create mode 100644 src/mumble/udp-packet.cc create mode 100644 src/mumble/udp-packet.hh create mode 100644 src/mumble/user.cc create mode 100644 src/mumble/user.hh create mode 100644 src/mumble/version.hh create mode 100644 src/network/tcp-socket.cc create mode 100644 src/network/tcp-socket.hh create mode 100644 src/openssl/basic-input-output.cc create mode 100644 src/openssl/basic-input-output.hh create mode 100644 src/openssl/memory-basic-input-output.cc create mode 100644 src/openssl/memory-basic-input-output.hh create mode 100644 src/openssl/openssl.cc create mode 100644 src/openssl/openssl.hh create mode 100644 src/openssl/pem.cc create mode 100644 src/openssl/pem.hh create mode 100644 src/openssl/pkey/envelope-message-digest.cc create mode 100644 src/openssl/pkey/envelope-message-digest.hh create mode 100644 src/openssl/pkey/envelope.cc create mode 100644 src/openssl/pkey/envelope.hh create mode 100644 src/openssl/pkey/rsa.cc create mode 100644 src/openssl/pkey/rsa.hh create mode 100644 src/openssl/ssl/context.cc create mode 100644 src/openssl/ssl/context.hh create mode 100644 src/openssl/ssl/method.cc create mode 100644 src/openssl/ssl/method.hh create mode 100644 src/openssl/ssl/socket.cc create mode 100644 src/openssl/ssl/socket.hh create mode 100644 src/openssl/x509/certificate.cc create mode 100644 src/openssl/x509/certificate.hh create mode 100644 src/openssl/x509/extension-factory.cc create mode 100644 src/openssl/x509/extension-factory.hh create mode 100644 src/openssl/x509/extension.cc create mode 100644 src/openssl/x509/extension.hh create mode 100644 src/openssl/x509/name.cc create mode 100644 src/openssl/x509/name.hh create mode 100644 src/opus/constants.hh create mode 100644 src/opus/decoder.cc create mode 100644 src/opus/decoder.hh create mode 100644 src/opus/encoder.cc create mode 100644 src/opus/encoder.hh create mode 100644 src/pluginbot/conf.cc create mode 100644 src/pluginbot/conf.hh create mode 100644 src/pluginbot/main.cc create mode 100644 src/pluginbot/main.hh create mode 100644 src/pluginbot/plugin.hh create mode 100644 src/util/base64.hh create mode 100644 src/util/endian.hh diff --git a/.gdbinit b/.gdbinit new file mode 100644 index 0000000..6e5dabc --- /dev/null +++ b/.gdbinit @@ -0,0 +1,2 @@ +catch throw +layout src diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a905ccf --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +\#*\# +.\#* +*~ +mrpbpp +aclocal.m4 +config.* +missing +install-sh +depcomp +*.o +*.lo +*.la +INSTALL +.deps/ +.dirstamp +Makefile +Makefile.in +configure +autom4te.cache +compile +libtool +ltmain.sh +.libs/ +mrpbpp-nettest +_cert/ diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..dba13ed --- /dev/null +++ b/COPYING @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/COPYING_ORIGINAL b/COPYING_ORIGINAL new file mode 100644 index 0000000..f4fedd1 --- /dev/null +++ b/COPYING_ORIGINAL @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 by dafoxia, Natenom + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..191d64f --- /dev/null +++ b/Makefile.am @@ -0,0 +1,85 @@ +AUTOMAKE_OPTIONS = subdir-objects + +lib_LTLIBRARIES = \ + libaither.la \ + libmumble-pluginbot-plusplus-io.la \ + libmumble-pluginbot-plusplus-network.la \ + libmumble-pluginbot-plusplus-openssl.la \ + libmumble-pluginbot-plusplus-opus.la \ + libmumble-pluginbot-plusplus-mumble.la + +bin_PROGRAMS = mumble-pluginbot-plusplus + +libaither_la_SOURCES = \ + src/aither/log.cc \ + src/aither/logger.cc \ + src/aither/console-logger.cc \ + src/aither/void-logger.cc + +libmumble-pluginbot-plusplus_io_la_SOURCES = \ + src/io/sample-reader.cc \ + src/io/sample-writer.cc \ + src/io/raw-s16le-file-sample-reader.cc \ + src/io/raw-s16le-file-sample-writer.cc + +libmumble-pluginbot-plusplus_network_la_SOURCES = \ + src/network/tcp-socket.cc + +libmumble-pluginbot-plusplus_openssl_la_SOURCES = \ + src/openssl/basic-input-output.cc \ + src/openssl/memory-basic-input-output.cc \ + src/openssl/openssl.cc \ + src/openssl/pem.cc \ + src/openssl/pkey/envelope.cc \ + src/openssl/pkey/envelope-message-digest.cc \ + src/openssl/pkey/rsa.cc \ + src/openssl/ssl/context.cc \ + src/openssl/ssl/method.cc \ + src/openssl/ssl/socket.cc \ + src/openssl/x509/certificate.cc \ + src/openssl/x509/extension.cc \ + src/openssl/x509/extension-factory.cc \ + src/openssl/x509/name.cc + +libmumble-pluginbot-plusplus_opus_la_SOURCES = \ + src/opus/decoder.cc \ + src/opus/encoder.cc + +libmumble-pluginbot-plusplus_mumble_la_SOURCES = \ + src/mumble/audio-player.cc \ + src/mumble/audio-recorder.cc \ + src/mumble/cert-manager.cc \ + src/mumble/channel.cc \ + src/mumble/client.cc \ + src/mumble/connection.cc \ + src/mumble/img-reader.cc \ + src/mumble/messages.cc \ + src/mumble/mumble-2-mumble.cc \ + src/mumble/packet-data-stream.cc \ + src/mumble/Mumble.pb.cc \ + src/mumble/udp-packet.cc \ + src/mumble/user.cc + +mumble-pluginbot-plusplus_SOURCES = \ + src/main.cc \ + src/pluginbot/main.cc \ + src/pluginbot/conf.cc + +AM_CPPFLAGS = \ + -std=c++1z \ + -Wall \ + -Wextra \ + -pedantic \ + -I$(srcdir)/src \ + $(mumble-pluginbot-plusplus_CFLAGS) + +mumble-pluginbot-plusplus_LDADD = \ + $(mumble-pluginbot-plusplus_LIBS) \ + -lm \ + libaither.la \ + libmumble-pluginbot-plusplus-io.la \ + libmumble-pluginbot-plusplus-network.la \ + libmumble-pluginbot-plusplus-openssl.la \ + libmumble-pluginbot-plusplus-opus.la \ + libmumble-pluginbot-plusplus-mumble.la \ + -lstdc++fs diff --git a/README.md b/README.md new file mode 100644 index 0000000..589f31a --- /dev/null +++ b/README.md @@ -0,0 +1,78 @@ +# mumble-pluginbot-plusplus + +## Introduction + +mumble-pluginbot-plusplus is an extensible [Mumble] (https://wiki.mumble.info/wiki/Main_Page) bot which can play audio, can be fed by different sources, and much more. + +It is a C++ rewrite of several libraries and the original mumble-ruby-pluginbot written in Ruby: + +- [opus-ruby] (https://github.com/dafoxia/opus-ruby) +- [mumble-ruby] (https://github.com/dafoxia/mumble-ruby) +- [mumble-ruby-plugin-bot] (https://github.com/dafoxia/mumble-ruby-pluginbot) + +Thanks to all the original authors! See the source code for copyright information. + +## Status + +The rewrite is **not complete** yet. + +What works: + +- Command line parsing (Pass "--help" to the executable to see the syntax) +- Creating a RSA private + public key pair (PEM format) +- Creating a X.509 certificate (PEM format) +- Connection to a Mumble server +- Auto moving to a channel after connect +- Some simple chat commands such as ".help" +- FIFO reading / OPUS encoding / Streaming (in theory, can't be tested at this stage) + +What doesn't work: + +- Some chat commands don't work +- Plugins +- CELT support +- Portaudio support +- WAV reading / writing +- Automatic MPD startup +- Probably more ;) + +## Dependencies + +The code is using modern C++ language features only present in C++14 and partly C++17. It currently uses the experimental filesystem library. + +- GCC 6.2+ or Clang 3.8+ +- autoconf + automake +- OpenSSL +- libopus 1.1 +- libprotobuf + +## Building + Installing + +The repository is autotools-based, you have to regenerate the configure script with commands like: + + $ automake --add-missing + $ libtoolize --add-missing + $ autoreconf + +Then the usual autotools process applies: + + $ ./configure + $ make + $ sudo make install + +## License + +mumble-pluginbot-plusplus is licensed under the AGPLv3+ license. The original code is licensed under the MIT license. + +## Code structure + +The code consists of several libtool libraries and a binary: + +- libaither - Contains a Log class with severity levels +- libmumble-pluginbot-plusplus-io - Basic File I/O +- libmumble-pluginbot-plusplus-network - TCP network socket +- libmumble-pluginbot-plusplus-openssl - Wrapper for OpenSSL (certificate + SSL/TLS) +- libmumble-pluginbot-plusplus-opus - libopus C++ wrapper +- libmumble-pluginbot-plusplus-mumble - Utility classes to talk to a Mumble server +- mumble-pluginbot-plusplus - The main binary containing the core Bot + diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..858213c --- /dev/null +++ b/configure.ac @@ -0,0 +1,12 @@ +AC_INIT([mrpbpp], 1.0) +AM_INIT_AUTOMAKE([foreign]) +AM_SILENT_RULES([yes]) + +AC_PROG_CXX +AC_PROG_LIBTOOL + +PKG_CHECK_MODULES(MRPBPP, [opus >= 1.1 openssl protobuf]) + +AC_CONFIG_FILES([Makefile]) + +AC_OUTPUT diff --git a/src/aither/console-logger.cc b/src/aither/console-logger.cc new file mode 100644 index 0000000..16187d9 --- /dev/null +++ b/src/aither/console-logger.cc @@ -0,0 +1,49 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "aither/console-logger.hh" + +#include + +namespace Aither +{ + struct ConsoleLogger::Impl + { + FILE *m_fp; + Impl (FILE *fp) : m_fp (fp) + { + } + }; + + ConsoleLogger::ConsoleLogger (FILE *fp) : pimpl (new Impl (fp)) + { + } + + ConsoleLogger::~ConsoleLogger () + { + } + + int ConsoleLogger::printf (const char *format, ...) + { + va_list args; + va_start (args, format); + int rc = std::vfprintf (pimpl->m_fp, format, args); + va_end (args); + return rc; + } +} diff --git a/src/aither/console-logger.hh b/src/aither/console-logger.hh new file mode 100644 index 0000000..ee5dda5 --- /dev/null +++ b/src/aither/console-logger.hh @@ -0,0 +1,37 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include + +#include "aither/logger.hh" + +namespace Aither +{ + class ConsoleLogger : public Logger + { + public: + ConsoleLogger (FILE* fp); + ~ConsoleLogger (); + virtual int printf (const char *format, ...); + private: + struct Impl; + const std::unique_ptr pimpl; + }; +} diff --git a/src/aither/log-severity.hh b/src/aither/log-severity.hh new file mode 100644 index 0000000..2af6720 --- /dev/null +++ b/src/aither/log-severity.hh @@ -0,0 +1,30 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +namespace Aither +{ + enum class LogSeverity + { + Debug, + Verbose, + Warning, + Error + }; +} diff --git a/src/aither/log.cc b/src/aither/log.cc new file mode 100644 index 0000000..f15378f --- /dev/null +++ b/src/aither/log.cc @@ -0,0 +1,97 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + +#include "aither/log.hh" +#include "aither/console-logger.hh" +#include "aither/void-logger.hh" + +namespace Aither +{ + struct Log::Impl + { + LogSeverity m_minimum_severity; + std::unique_ptr m_debug; + std::unique_ptr m_verbose; + std::unique_ptr m_warning; + std::unique_ptr m_error; + + Impl (LogSeverity minimum_severity) + { + m_minimum_severity = minimum_severity; + switch (minimum_severity) + { + case LogSeverity::Debug: + m_debug = std::make_unique (stdout); + m_verbose = std::make_unique (stdout); + m_warning = std::make_unique (stdout); + m_error = std::make_unique (stderr); + break; + + case LogSeverity::Verbose: + m_debug = std::make_unique (); + m_verbose = std::make_unique (stdout); + m_warning = std::make_unique (stdout); + m_error = std::make_unique (stderr); + break; + + case LogSeverity::Warning: + m_debug = std::make_unique (); + m_verbose = std::make_unique (); + m_warning = std::make_unique (stdout); + m_error = std::make_unique (stderr); + break; + + case LogSeverity::Error: + m_debug = std::make_unique (); + m_verbose = std::make_unique (); + m_warning = std::make_unique (); + m_error = std::make_unique (stderr); + break; + } + } + }; + + Log::Log (LogSeverity minimum_severity) : pimpl (new Impl (minimum_severity)) + { + } + + Log::~Log () + { + } + + Logger& Log::debug () const + { + return *pimpl->m_debug; + } + + Logger& Log::verbose () const + { + return *pimpl->m_verbose; + } + + Logger& Log::warning () const + { + return *pimpl->m_warning; + } + + Logger& Log::error () const + { + return *pimpl->m_error; + } +} diff --git a/src/aither/log.hh b/src/aither/log.hh new file mode 100644 index 0000000..4bdbe20 --- /dev/null +++ b/src/aither/log.hh @@ -0,0 +1,41 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include + +#include "aither/log-severity.hh" +#include "aither/logger.hh" + +namespace Aither +{ + class Log + { + public: + Log (LogSeverity minimum_severity); + ~Log (); + Logger& debug () const; + Logger& verbose () const; + Logger& warning () const; + Logger& error () const; + private: + struct Impl; + const std::unique_ptr pimpl; + }; +} diff --git a/src/aither/logger.cc b/src/aither/logger.cc new file mode 100644 index 0000000..1ed6db8 --- /dev/null +++ b/src/aither/logger.cc @@ -0,0 +1,68 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "aither/logger.hh" + +namespace Aither +{ + Logger::~Logger () + { + } + + std::string get_date_string (std::chrono::system_clock::time_point t) + { + static char some_buffer[100]; + auto as_time_t = std::chrono::system_clock::to_time_t (t); + struct tm tm; + if (::gmtime_r (&as_time_t, &tm)) + { + if (std::strftime (some_buffer, sizeof(some_buffer), "%F", &tm)) + { + return std::string {some_buffer}; + } + } + throw std::runtime_error ("Failed to get current date as string"); + } + + std::string get_datetime_string (std::chrono::system_clock::time_point t) + { + static char some_buffer[100]; + auto as_time_t = std::chrono::system_clock::to_time_t (t); + struct tm tm; + if (::gmtime_r (&as_time_t, &tm)) + { + if (std::strftime (some_buffer, sizeof(some_buffer), "%F %T", &tm)) + { + return std::string {some_buffer}; + } + } + throw std::runtime_error ("Failed to get current date as string"); + } +} + +Aither::Logger& operator<< (Aither::Logger& l, const std::string &s) +{ + l.printf (s.c_str ()); + return l; +} + +Aither::Logger& operator<< (Aither::Logger& l, const char *s) +{ + l.printf (s); + return l; +} diff --git a/src/aither/logger.hh b/src/aither/logger.hh new file mode 100644 index 0000000..2047f60 --- /dev/null +++ b/src/aither/logger.hh @@ -0,0 +1,54 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include + +namespace Aither +{ + class Logger + { + public: + virtual ~Logger (); + virtual int printf (const char *format, ...) = 0; + }; + std::string get_date_string (std::chrono::system_clock::time_point t); + std::string get_datetime_string (std::chrono::system_clock::time_point t); +} + +Aither::Logger& operator<< (Aither::Logger& l, const std::string &s); +Aither::Logger& operator<< (Aither::Logger& l, const char *s); + + +#define AITHER_DEBUG(s) \ + m_log.debug () << Aither::get_datetime_string (std::chrono::system_clock::now ()) \ + << " - " s << "\n" + +#define AITHER_ERROR(s) \ + m_log.error () << Aither::get_datetime_string (std::chrono::system_clock::now ()) \ + << " - " s << "\n" + +#define AITHER_VERBOSE(s) \ + m_log.verbose () << Aither::get_datetime_string (std::chrono::system_clock::now ()) \ + << " - " s << "\n" + +#define AITHER_WARNING(s) \ + m_log.warning () << Aither::get_datetime_string (std::chrono::system_clock::now ()) \ + << " - " s << "\n" diff --git a/src/aither/void-logger.cc b/src/aither/void-logger.cc new file mode 100644 index 0000000..99850f7 --- /dev/null +++ b/src/aither/void-logger.cc @@ -0,0 +1,32 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "aither/void-logger.hh" + +namespace Aither +{ + VoidLogger::VoidLogger () + { + } + + int VoidLogger::printf (const char *format, ...) + { + (void) format; + return 0; + } +} diff --git a/src/aither/void-logger.hh b/src/aither/void-logger.hh new file mode 100644 index 0000000..181942f --- /dev/null +++ b/src/aither/void-logger.hh @@ -0,0 +1,33 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include + +#include "aither/logger.hh" + +namespace Aither +{ + class VoidLogger : public Logger + { + public: + VoidLogger (); + virtual int printf (const char *format, ...); + }; +} diff --git a/src/io/file.hh b/src/io/file.hh new file mode 100644 index 0000000..2e262fe --- /dev/null +++ b/src/io/file.hh @@ -0,0 +1,47 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include + +namespace IO +{ + class File + { + public: + static inline std::string read_all_text (const + std::experimental::filesystem::path path) + { + // From http://stackoverflow.com/a/2602258/426242 + std::ifstream ifs (path); + std::stringstream buffer; + buffer << ifs.rdbuf (); + return buffer.str (); + } + + static inline void write_all_text (const std::experimental::filesystem::path + path, + const std::string text) + { + std::ofstream ofs (path); + std::stringstream buffer (text); + buffer >> ofs.rdbuf (); + } + }; +} diff --git a/src/io/raw-s16le-file-sample-reader.cc b/src/io/raw-s16le-file-sample-reader.cc new file mode 100644 index 0000000..fa45141 --- /dev/null +++ b/src/io/raw-s16le-file-sample-reader.cc @@ -0,0 +1,58 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "util/endian.hh" +#include "io/raw-s16le-file-sample-reader.hh" + +RawFileReader::RawFileReader (const std::string &file) + : m_stream (file, std::ios::binary) +{ +} + +std::vector RawFileReader::internal_read (size_t count) +{ + auto size = count * 2; + std::vector buffer (size , 0); + m_stream.read (reinterpret_cast (buffer.data ()), size); + if (m_stream.gcount () == 0) + { + buffer.clear (); + } + else if (static_cast (m_stream.gcount ()) != size) + { + throw std::string ("failed to read enough samples from stream"); + } + return EndianUtils::from_s16le (buffer); +} + +void RawFileReader::internal_each_buffer (size_t count, + std::function&)> f) +{ + auto samples = internal_read (count); + while (samples.size () != 0) + { + f (samples); + samples = internal_read (count); + } +} + +void RawFileReader::internal_close () +{ + m_stream.close (); + SampleReader::close (); +} diff --git a/src/io/raw-s16le-file-sample-reader.hh b/src/io/raw-s16le-file-sample-reader.hh new file mode 100644 index 0000000..a14b7a9 --- /dev/null +++ b/src/io/raw-s16le-file-sample-reader.hh @@ -0,0 +1,37 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include + +#include "io/sample-reader.hh" + +class RawFileReader : public SampleReader +{ +private: + std::ifstream m_stream; +protected: + virtual std::vector internal_read (size_t count); + virtual void internal_each_buffer (size_t count, + std::function&)> f); + virtual void internal_close (); +public: + RawFileReader (const std::string &file); +}; diff --git a/src/io/raw-s16le-file-sample-writer.cc b/src/io/raw-s16le-file-sample-writer.cc new file mode 100644 index 0000000..3588fe2 --- /dev/null +++ b/src/io/raw-s16le-file-sample-writer.cc @@ -0,0 +1,60 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "util/endian.hh" +#include "io/raw-s16le-file-sample-writer.hh" + +/* +RawS16LESampeWriter::RawFileReader (const std::string &file) + : m_stream (file, std::ios::binary) +{ +} + +std::vector RawFileReader::internal_read (size_t count) +{ + auto size = count * 2; + std::vector buffer (size , 0); + m_stream.read (reinterpret_cast (buffer.data ()), size); + if (m_stream.gcount () == 0) + { + buffer.clear (); + } + else if (static_cast (m_stream.gcount ()) != size) + { + throw std::string ("failed to read enough samples from stream"); + } + return EndianUtils::from_s16le (buffer); +} + +void RawFileReader::internal_each_buffer (size_t count, + std::function&)> f) +{ + auto samples = internal_read (count); + while (samples.size () != 0) + { + f (samples); + samples = internal_read (count); + } +} + +void RawFileReader::internal_close () +{ + m_stream.close (); + SampleStream::close (); +} +*/ diff --git a/src/io/raw-s16le-file-sample-writer.hh b/src/io/raw-s16le-file-sample-writer.hh new file mode 100644 index 0000000..de3f046 --- /dev/null +++ b/src/io/raw-s16le-file-sample-writer.hh @@ -0,0 +1,39 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include + +#include "io/sample-writer.hh" + +class RawS16LEFileWriter : public SampleWriter +{ +private: + //std::ifstream m_stream; +protected: + /* + virtual std::vector internal_read (size_t count); + virtual void internal_each_buffer (size_t count, + std::function&)> f); + virtual void internal_close (); + */ +public: + //RawFileReader (const std::string &file); +}; diff --git a/src/io/sample-reader.cc b/src/io/sample-reader.cc new file mode 100644 index 0000000..2b22457 --- /dev/null +++ b/src/io/sample-reader.cc @@ -0,0 +1,23 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "io/sample-reader.hh" + +SampleReader::~SampleReader () +{ +} diff --git a/src/io/sample-reader.hh b/src/io/sample-reader.hh new file mode 100644 index 0000000..a290a45 --- /dev/null +++ b/src/io/sample-reader.hh @@ -0,0 +1,55 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include + +class SampleReader +{ +private: + bool m_closed = false; +protected: + virtual std::vector internal_read (size_t count) = 0; + virtual void internal_each_buffer (size_t count, + std::function&)> f) = 0; + virtual void internal_close () + { + m_closed = true; + } +public: + virtual ~SampleReader (); + inline bool closed () const + { + return m_closed; + } + inline std::vector read (size_t count) + { + return internal_read (count); + } + inline void each_buffer (size_t count, + std::function&)> f) + { + internal_each_buffer (count, f); + } + inline void close () + { + internal_close (); + } +}; diff --git a/src/io/sample-writer.cc b/src/io/sample-writer.cc new file mode 100644 index 0000000..5b9507b --- /dev/null +++ b/src/io/sample-writer.cc @@ -0,0 +1,23 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "io/sample-writer.hh" + +SampleWriter::~SampleWriter () +{ +} diff --git a/src/io/sample-writer.hh b/src/io/sample-writer.hh new file mode 100644 index 0000000..4a49919 --- /dev/null +++ b/src/io/sample-writer.hh @@ -0,0 +1,56 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include + +class SampleWriter +{ +private: + bool m_closed = false; +protected: + //virtual std::vector internal_read (size_t count) = 0; + //virtual void internal_each_buffer (size_t count, std::function&)> f) = 0; + // virtual void internal_close () + //{ + // m_closed = true; + //} +public: + virtual ~SampleWriter (); + /* + inline bool closed () const + { + return m_closed; + } + inline std::vector read (size_t count) + { + return internal_read (count); + } + inline void each_buffer (size_t count, + std::function&)> f) + { + internal_each_buffer (count, f); + } + inline void close () + { + internal_close (); + } + */ +}; diff --git a/src/io/wavefile-format.hh b/src/io/wavefile-format.hh new file mode 100644 index 0000000..78f9717 --- /dev/null +++ b/src/io/wavefile-format.hh @@ -0,0 +1,38 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +namespace WaveFile +{ + enum class Channels + { + mono + }; + + enum class SampleFormat + { + pcm_16 + }; + + class Format + { + public: + Format (Channels channels, SampleFormat sample_format, size_t sample_rate); + }; +} diff --git a/src/io/wavefile-reader.hh b/src/io/wavefile-reader.hh new file mode 100644 index 0000000..c2b1c07 --- /dev/null +++ b/src/io/wavefile-reader.hh @@ -0,0 +1,31 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include "io/sample-reader.hh" +#include "io/wavefile-reader.hh" + +namespace WaveFile +{ + class Reader : public SampleReader + { + public: + Reader (const std::string &file, const Format &format); + }; +} diff --git a/src/main.cc b/src/main.cc new file mode 100644 index 0000000..d8f3639 --- /dev/null +++ b/src/main.cc @@ -0,0 +1,194 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2015 dafoxia + Copyright (c) 2015 netinetwalker + Copyright (c) 2015 Natenom + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include +#include +#include +#include +#include + +#include "aither/log.hh" +#include "openssl/openssl.hh" +#include "pluginbot/main.hh" +#include "pluginbot/conf.hh" + +std::string +parse_cmd_options (int argc, char *argv[], std::map &settings) +{ + std::string config_filename; + static struct option long_options[] = + { + {"help", no_argument, nullptr, 1}, + {"config", required_argument, nullptr, 2}, + {"mumblehost", required_argument, nullptr, 3}, + {"mumbleport", required_argument, nullptr, 4}, + {"name", required_argument, nullptr, 5}, + {"userpass", required_argument, nullptr, 6}, + {"targetchannel", required_argument, nullptr, 7}, + {"bitrate", required_argument, nullptr, 8}, + {"fifo", required_argument, nullptr, 9}, + {"mpdhost", required_argument, nullptr, 10}, + {"mpdport", required_argument, nullptr, 11}, + {"controllable", required_argument, nullptr, 12}, + {"certdir", required_argument, nullptr, 13}, + {nullptr, 0, nullptr, 0} + }; + int c; + int option_index = 0; + while ((c = getopt_long (argc, argv, "c:h:p:n:u:t:b:f:H:P:C:d:", + long_options, &option_index)) != -1) + { + switch (c) + { + case 1: + std::cout << "Usage: " << argv[0] << " [options]\n"; + std::cout << "Options:\n"; + std::cout << " -c --config Config filename\n"; + std::cout << " -h --mumblehost Mumble server IP or hostname\n"; + std::cout << " -p --mumbleport Mumble server port\n"; + std::cout << " -n --name Bot nickname\n"; + std::cout << " -u --userpass User password (optional)\n"; + std::cout << " -t --targetchannel Auto join channel\n"; + std::cout << " -b --bitrate Desired audio bitrate\n"; + std::cout << " -f --fifo Path to FIFO file\n"; + std::cout << " -H --mpdhost MPD hostname\n"; + std::cout << " -P --mpdport MPD port\n"; + std::cout << " -C --controllable true if bot should be controllable from chat commands\n"; + std::cout << " -d --certdir Path to cert\n"; + exit (0); + break; + case 2: + case 'c': + config_filename = optarg; + break; + case 3: + case 'h': + settings["mumbleserver_host"] = optarg; + break; + case 4: + case 'p': + settings["mumbleserver_port"] = optarg; + break; + case 5: + case 'n': + settings["mumbleserver_username"] = optarg; + break; + case 6: + case 'u': + settings["mumbleserver_userpassword"] = optarg; + break; + case 7: + case 't': + settings["mumbleserver_targetchannel"] = optarg; + break; + case 8: + case 'b': + settings["quality_bitrate"] = optarg; + break; + case 9: + case 'f': + settings["mpd_fifopath"] = optarg; + break; + case 10: + case 'H': + settings["mpd_host"] = optarg; + break; + case 11: + case 'P': + settings["mpd_port"] = optarg; + break; + case 12: + case 'C': + settings["controllable"] = optarg; + break; + case 13: + case 'd': + settings["certdirectory"] = optarg; + break; + } + } + return config_filename; +} + +int +real_main (int argc, char *argv[]) +{ + using namespace std::chrono_literals; + setlocale (LC_ALL, ""); + OpenSSL::library_init (); + std::map settings; + auto &&c = MumblePluginBot::std_config (); + settings.insert (std::begin (c), std::end (c)); + const std::string config_filename {parse_cmd_options (argc, argv, settings)}; + Aither::Log m_log {settings["debug"] == "true" ? Aither::LogSeverity::Debug : Aither::LogSeverity::Verbose}; + AITHER_VERBOSE("Config loaded!"); + int i = 0; + for (;;) + { + MumblePluginBot::Main client (settings, config_filename, m_log); + AITHER_VERBOSE("pluginbot is starting..."); + client.init_settings (); + AITHER_VERBOSE("start"); + client.mumble_start (); + try + { + while (client.run ()) + { + std::this_thread::sleep_for (0.5s); + i++; + if (i > 60) + { + //return 1; + } + } + } + catch (...) + { + AITHER_ERROR("An error occurred: #{$!}"); + AITHER_ERROR("Backtrace: #{$@}"); + client.disconnect (); + } + AITHER_VERBOSE(""); + AITHER_VERBOSE("----------------------------------------------"); + AITHER_VERBOSE("-- Restart --"); + AITHER_VERBOSE("----------------------------------------------"); + AITHER_DEBUG("Sleeping for 3 seconds"); + std::this_thread::sleep_for (3s); + } + return 0; +} + +int +main (int argc, char *argv[]) +{ + try + { + return real_main (argc, argv); + } + catch (const std::string &s) + { + std::cerr << "An error occured: " << s << std::endl; + } + catch (const std::exception &e) + { + std::cerr << "An error occured: " << e.what () << std::endl; + } +} diff --git a/src/mumble/Mumble.pb.cc b/src/mumble/Mumble.pb.cc new file mode 100644 index 0000000..845509c --- /dev/null +++ b/src/mumble/Mumble.pb.cc @@ -0,0 +1,17784 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Mumble.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "Mumble.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace MumbleProto +{ + + namespace + { + + const ::google::protobuf::Descriptor* Version_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + Version_reflection_ = NULL; + const ::google::protobuf::Descriptor* UDPTunnel_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + UDPTunnel_reflection_ = NULL; + const ::google::protobuf::Descriptor* Authenticate_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + Authenticate_reflection_ = NULL; + const ::google::protobuf::Descriptor* Ping_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + Ping_reflection_ = NULL; + const ::google::protobuf::Descriptor* Reject_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + Reject_reflection_ = NULL; + const ::google::protobuf::EnumDescriptor* Reject_RejectType_descriptor_ = NULL; + const ::google::protobuf::Descriptor* ServerSync_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + ServerSync_reflection_ = NULL; + const ::google::protobuf::Descriptor* ChannelRemove_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + ChannelRemove_reflection_ = NULL; + const ::google::protobuf::Descriptor* ChannelState_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + ChannelState_reflection_ = NULL; + const ::google::protobuf::Descriptor* UserRemove_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + UserRemove_reflection_ = NULL; + const ::google::protobuf::Descriptor* UserState_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + UserState_reflection_ = NULL; + const ::google::protobuf::Descriptor* BanList_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + BanList_reflection_ = NULL; + const ::google::protobuf::Descriptor* BanList_BanEntry_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + BanList_BanEntry_reflection_ = NULL; + const ::google::protobuf::Descriptor* TextMessage_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + TextMessage_reflection_ = NULL; + const ::google::protobuf::Descriptor* PermissionDenied_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + PermissionDenied_reflection_ = NULL; + const ::google::protobuf::EnumDescriptor* PermissionDenied_DenyType_descriptor_ + = NULL; + const ::google::protobuf::Descriptor* ACL_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + ACL_reflection_ = NULL; + const ::google::protobuf::Descriptor* ACL_ChanGroup_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + ACL_ChanGroup_reflection_ = NULL; + const ::google::protobuf::Descriptor* ACL_ChanACL_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + ACL_ChanACL_reflection_ = NULL; + const ::google::protobuf::Descriptor* QueryUsers_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + QueryUsers_reflection_ = NULL; + const ::google::protobuf::Descriptor* CryptSetup_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + CryptSetup_reflection_ = NULL; + const ::google::protobuf::Descriptor* ContextActionModify_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + ContextActionModify_reflection_ = NULL; + const ::google::protobuf::EnumDescriptor* + ContextActionModify_Context_descriptor_ = NULL; + const ::google::protobuf::EnumDescriptor* + ContextActionModify_Operation_descriptor_ = NULL; + const ::google::protobuf::Descriptor* ContextAction_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + ContextAction_reflection_ = NULL; + const ::google::protobuf::Descriptor* UserList_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + UserList_reflection_ = NULL; + const ::google::protobuf::Descriptor* UserList_User_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + UserList_User_reflection_ = NULL; + const ::google::protobuf::Descriptor* VoiceTarget_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + VoiceTarget_reflection_ = NULL; + const ::google::protobuf::Descriptor* VoiceTarget_Target_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + VoiceTarget_Target_reflection_ = NULL; + const ::google::protobuf::Descriptor* PermissionQuery_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + PermissionQuery_reflection_ = NULL; + const ::google::protobuf::Descriptor* CodecVersion_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + CodecVersion_reflection_ = NULL; + const ::google::protobuf::Descriptor* UserStats_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + UserStats_reflection_ = NULL; + const ::google::protobuf::Descriptor* UserStats_Stats_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + UserStats_Stats_reflection_ = NULL; + const ::google::protobuf::Descriptor* RequestBlob_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + RequestBlob_reflection_ = NULL; + const ::google::protobuf::Descriptor* ServerConfig_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + ServerConfig_reflection_ = NULL; + const ::google::protobuf::Descriptor* SuggestConfig_descriptor_ = NULL; + const ::google::protobuf::internal::GeneratedMessageReflection* + SuggestConfig_reflection_ = NULL; + + } // namespace + + + void protobuf_AssignDesc_Mumble_2eproto() + { + protobuf_AddDesc_Mumble_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "Mumble.proto"); + GOOGLE_CHECK(file != NULL); + Version_descriptor_ = file->message_type(0); + static const int Version_offsets_[4] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Version, version_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Version, release_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Version, os_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Version, os_version_), + }; + Version_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Version_descriptor_, + Version::default_instance_, + Version_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Version, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Version, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Version)); + UDPTunnel_descriptor_ = file->message_type(1); + static const int UDPTunnel_offsets_[1] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UDPTunnel, packet_), + }; + UDPTunnel_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + UDPTunnel_descriptor_, + UDPTunnel::default_instance_, + UDPTunnel_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UDPTunnel, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UDPTunnel, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(UDPTunnel)); + Authenticate_descriptor_ = file->message_type(2); + static const int Authenticate_offsets_[5] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Authenticate, username_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Authenticate, password_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Authenticate, tokens_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Authenticate, celt_versions_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Authenticate, opus_), + }; + Authenticate_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Authenticate_descriptor_, + Authenticate::default_instance_, + Authenticate_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Authenticate, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Authenticate, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Authenticate)); + Ping_descriptor_ = file->message_type(3); + static const int Ping_offsets_[11] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ping, timestamp_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ping, good_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ping, late_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ping, lost_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ping, resync_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ping, udp_packets_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ping, tcp_packets_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ping, udp_ping_avg_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ping, udp_ping_var_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ping, tcp_ping_avg_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ping, tcp_ping_var_), + }; + Ping_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Ping_descriptor_, + Ping::default_instance_, + Ping_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ping, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Ping, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Ping)); + Reject_descriptor_ = file->message_type(4); + static const int Reject_offsets_[2] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Reject, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Reject, reason_), + }; + Reject_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Reject_descriptor_, + Reject::default_instance_, + Reject_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Reject, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Reject, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Reject)); + Reject_RejectType_descriptor_ = Reject_descriptor_->enum_type(0); + ServerSync_descriptor_ = file->message_type(5); + static const int ServerSync_offsets_[4] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerSync, session_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerSync, max_bandwidth_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerSync, welcome_text_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerSync, permissions_), + }; + ServerSync_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ServerSync_descriptor_, + ServerSync::default_instance_, + ServerSync_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerSync, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerSync, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ServerSync)); + ChannelRemove_descriptor_ = file->message_type(6); + static const int ChannelRemove_offsets_[1] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChannelRemove, channel_id_), + }; + ChannelRemove_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ChannelRemove_descriptor_, + ChannelRemove::default_instance_, + ChannelRemove_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChannelRemove, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChannelRemove, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ChannelRemove)); + ChannelState_descriptor_ = file->message_type(7); + static const int ChannelState_offsets_[11] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChannelState, channel_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChannelState, parent_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChannelState, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChannelState, links_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChannelState, description_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChannelState, links_add_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChannelState, links_remove_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChannelState, temporary_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChannelState, position_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChannelState, description_hash_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChannelState, max_users_), + }; + ChannelState_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ChannelState_descriptor_, + ChannelState::default_instance_, + ChannelState_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChannelState, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ChannelState, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ChannelState)); + UserRemove_descriptor_ = file->message_type(8); + static const int UserRemove_offsets_[4] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserRemove, session_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserRemove, actor_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserRemove, reason_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserRemove, ban_), + }; + UserRemove_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + UserRemove_descriptor_, + UserRemove::default_instance_, + UserRemove_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserRemove, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserRemove, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(UserRemove)); + UserState_descriptor_ = file->message_type(9); + static const int UserState_offsets_[19] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, session_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, actor_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, user_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, channel_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, mute_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, deaf_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, suppress_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, self_mute_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, self_deaf_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, texture_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, plugin_context_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, plugin_identity_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, comment_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, hash_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, comment_hash_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, texture_hash_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, priority_speaker_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, recording_), + }; + UserState_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + UserState_descriptor_, + UserState::default_instance_, + UserState_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserState, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(UserState)); + BanList_descriptor_ = file->message_type(10); + static const int BanList_offsets_[2] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BanList, bans_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BanList, query_), + }; + BanList_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + BanList_descriptor_, + BanList::default_instance_, + BanList_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BanList, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BanList, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(BanList)); + BanList_BanEntry_descriptor_ = BanList_descriptor_->nested_type(0); + static const int BanList_BanEntry_offsets_[7] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BanList_BanEntry, address_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BanList_BanEntry, mask_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BanList_BanEntry, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BanList_BanEntry, hash_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BanList_BanEntry, reason_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BanList_BanEntry, start_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BanList_BanEntry, duration_), + }; + BanList_BanEntry_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + BanList_BanEntry_descriptor_, + BanList_BanEntry::default_instance_, + BanList_BanEntry_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BanList_BanEntry, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BanList_BanEntry, + _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(BanList_BanEntry)); + TextMessage_descriptor_ = file->message_type(11); + static const int TextMessage_offsets_[5] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TextMessage, actor_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TextMessage, session_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TextMessage, channel_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TextMessage, tree_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TextMessage, message_), + }; + TextMessage_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + TextMessage_descriptor_, + TextMessage::default_instance_, + TextMessage_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TextMessage, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TextMessage, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(TextMessage)); + PermissionDenied_descriptor_ = file->message_type(12); + static const int PermissionDenied_offsets_[6] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PermissionDenied, permission_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PermissionDenied, channel_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PermissionDenied, session_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PermissionDenied, reason_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PermissionDenied, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PermissionDenied, name_), + }; + PermissionDenied_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + PermissionDenied_descriptor_, + PermissionDenied::default_instance_, + PermissionDenied_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PermissionDenied, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PermissionDenied, + _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(PermissionDenied)); + PermissionDenied_DenyType_descriptor_ = PermissionDenied_descriptor_->enum_type( + 0); + ACL_descriptor_ = file->message_type(13); + static const int ACL_offsets_[5] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL, channel_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL, inherit_acls_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL, groups_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL, acls_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL, query_), + }; + ACL_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ACL_descriptor_, + ACL::default_instance_, + ACL_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ACL)); + ACL_ChanGroup_descriptor_ = ACL_descriptor_->nested_type(0); + static const int ACL_ChanGroup_offsets_[7] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL_ChanGroup, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL_ChanGroup, inherited_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL_ChanGroup, inherit_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL_ChanGroup, inheritable_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL_ChanGroup, add_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL_ChanGroup, remove_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL_ChanGroup, inherited_members_), + }; + ACL_ChanGroup_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ACL_ChanGroup_descriptor_, + ACL_ChanGroup::default_instance_, + ACL_ChanGroup_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL_ChanGroup, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL_ChanGroup, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ACL_ChanGroup)); + ACL_ChanACL_descriptor_ = ACL_descriptor_->nested_type(1); + static const int ACL_ChanACL_offsets_[7] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL_ChanACL, apply_here_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL_ChanACL, apply_subs_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL_ChanACL, inherited_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL_ChanACL, user_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL_ChanACL, group_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL_ChanACL, grant_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL_ChanACL, deny_), + }; + ACL_ChanACL_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ACL_ChanACL_descriptor_, + ACL_ChanACL::default_instance_, + ACL_ChanACL_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL_ChanACL, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ACL_ChanACL, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ACL_ChanACL)); + QueryUsers_descriptor_ = file->message_type(14); + static const int QueryUsers_offsets_[2] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryUsers, ids_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryUsers, names_), + }; + QueryUsers_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + QueryUsers_descriptor_, + QueryUsers::default_instance_, + QueryUsers_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryUsers, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(QueryUsers, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(QueryUsers)); + CryptSetup_descriptor_ = file->message_type(15); + static const int CryptSetup_offsets_[3] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CryptSetup, key_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CryptSetup, client_nonce_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CryptSetup, server_nonce_), + }; + CryptSetup_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + CryptSetup_descriptor_, + CryptSetup::default_instance_, + CryptSetup_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CryptSetup, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CryptSetup, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(CryptSetup)); + ContextActionModify_descriptor_ = file->message_type(16); + static const int ContextActionModify_offsets_[4] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ContextActionModify, action_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ContextActionModify, text_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ContextActionModify, context_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ContextActionModify, operation_), + }; + ContextActionModify_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ContextActionModify_descriptor_, + ContextActionModify::default_instance_, + ContextActionModify_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ContextActionModify, + _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ContextActionModify, + _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ContextActionModify)); + ContextActionModify_Context_descriptor_ = + ContextActionModify_descriptor_->enum_type(0); + ContextActionModify_Operation_descriptor_ = + ContextActionModify_descriptor_->enum_type(1); + ContextAction_descriptor_ = file->message_type(17); + static const int ContextAction_offsets_[3] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ContextAction, session_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ContextAction, channel_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ContextAction, action_), + }; + ContextAction_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ContextAction_descriptor_, + ContextAction::default_instance_, + ContextAction_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ContextAction, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ContextAction, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ContextAction)); + UserList_descriptor_ = file->message_type(18); + static const int UserList_offsets_[1] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserList, users_), + }; + UserList_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + UserList_descriptor_, + UserList::default_instance_, + UserList_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserList, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserList, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(UserList)); + UserList_User_descriptor_ = UserList_descriptor_->nested_type(0); + static const int UserList_User_offsets_[4] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserList_User, user_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserList_User, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserList_User, last_seen_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserList_User, last_channel_), + }; + UserList_User_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + UserList_User_descriptor_, + UserList_User::default_instance_, + UserList_User_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserList_User, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserList_User, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(UserList_User)); + VoiceTarget_descriptor_ = file->message_type(19); + static const int VoiceTarget_offsets_[2] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VoiceTarget, id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VoiceTarget, targets_), + }; + VoiceTarget_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + VoiceTarget_descriptor_, + VoiceTarget::default_instance_, + VoiceTarget_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VoiceTarget, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VoiceTarget, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(VoiceTarget)); + VoiceTarget_Target_descriptor_ = VoiceTarget_descriptor_->nested_type(0); + static const int VoiceTarget_Target_offsets_[5] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VoiceTarget_Target, session_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VoiceTarget_Target, channel_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VoiceTarget_Target, group_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VoiceTarget_Target, links_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VoiceTarget_Target, children_), + }; + VoiceTarget_Target_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + VoiceTarget_Target_descriptor_, + VoiceTarget_Target::default_instance_, + VoiceTarget_Target_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VoiceTarget_Target, + _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VoiceTarget_Target, + _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(VoiceTarget_Target)); + PermissionQuery_descriptor_ = file->message_type(20); + static const int PermissionQuery_offsets_[3] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PermissionQuery, channel_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PermissionQuery, permissions_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PermissionQuery, flush_), + }; + PermissionQuery_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + PermissionQuery_descriptor_, + PermissionQuery::default_instance_, + PermissionQuery_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PermissionQuery, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PermissionQuery, + _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(PermissionQuery)); + CodecVersion_descriptor_ = file->message_type(21); + static const int CodecVersion_offsets_[4] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodecVersion, alpha_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodecVersion, beta_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodecVersion, prefer_alpha_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodecVersion, opus_), + }; + CodecVersion_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + CodecVersion_descriptor_, + CodecVersion::default_instance_, + CodecVersion_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodecVersion, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodecVersion, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(CodecVersion)); + UserStats_descriptor_ = file->message_type(22); + static const int UserStats_offsets_[19] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, session_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, stats_only_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, certificates_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, from_client_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, from_server_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, udp_packets_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, tcp_packets_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, udp_ping_avg_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, udp_ping_var_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, tcp_ping_avg_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, tcp_ping_var_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, version_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, celt_versions_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, address_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, bandwidth_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, onlinesecs_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, idlesecs_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, strong_certificate_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, opus_), + }; + UserStats_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + UserStats_descriptor_, + UserStats::default_instance_, + UserStats_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(UserStats)); + UserStats_Stats_descriptor_ = UserStats_descriptor_->nested_type(0); + static const int UserStats_Stats_offsets_[4] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats_Stats, good_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats_Stats, late_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats_Stats, lost_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats_Stats, resync_), + }; + UserStats_Stats_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + UserStats_Stats_descriptor_, + UserStats_Stats::default_instance_, + UserStats_Stats_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats_Stats, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(UserStats_Stats, + _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(UserStats_Stats)); + RequestBlob_descriptor_ = file->message_type(23); + static const int RequestBlob_offsets_[3] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestBlob, session_texture_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestBlob, session_comment_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestBlob, channel_description_), + }; + RequestBlob_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + RequestBlob_descriptor_, + RequestBlob::default_instance_, + RequestBlob_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestBlob, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RequestBlob, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(RequestBlob)); + ServerConfig_descriptor_ = file->message_type(24); + static const int ServerConfig_offsets_[6] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerConfig, max_bandwidth_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerConfig, welcome_text_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerConfig, allow_html_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerConfig, message_length_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerConfig, image_message_length_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerConfig, max_users_), + }; + ServerConfig_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + ServerConfig_descriptor_, + ServerConfig::default_instance_, + ServerConfig_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerConfig, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerConfig, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(ServerConfig)); + SuggestConfig_descriptor_ = file->message_type(25); + static const int SuggestConfig_offsets_[3] = + { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SuggestConfig, version_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SuggestConfig, positional_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SuggestConfig, push_to_talk_), + }; + SuggestConfig_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + SuggestConfig_descriptor_, + SuggestConfig::default_instance_, + SuggestConfig_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SuggestConfig, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SuggestConfig, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(SuggestConfig)); + } + + namespace + { + + GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); + inline void protobuf_AssignDescriptorsOnce() + { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_Mumble_2eproto); + } + + void protobuf_RegisterTypes(const ::std::string&) + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Version_descriptor_, &Version::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + UDPTunnel_descriptor_, &UDPTunnel::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Authenticate_descriptor_, &Authenticate::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Ping_descriptor_, &Ping::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Reject_descriptor_, &Reject::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ServerSync_descriptor_, &ServerSync::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ChannelRemove_descriptor_, &ChannelRemove::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ChannelState_descriptor_, &ChannelState::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + UserRemove_descriptor_, &UserRemove::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + UserState_descriptor_, &UserState::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + BanList_descriptor_, &BanList::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + BanList_BanEntry_descriptor_, &BanList_BanEntry::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + TextMessage_descriptor_, &TextMessage::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + PermissionDenied_descriptor_, &PermissionDenied::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ACL_descriptor_, &ACL::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ACL_ChanGroup_descriptor_, &ACL_ChanGroup::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ACL_ChanACL_descriptor_, &ACL_ChanACL::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + QueryUsers_descriptor_, &QueryUsers::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + CryptSetup_descriptor_, &CryptSetup::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ContextActionModify_descriptor_, &ContextActionModify::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ContextAction_descriptor_, &ContextAction::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + UserList_descriptor_, &UserList::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + UserList_User_descriptor_, &UserList_User::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + VoiceTarget_descriptor_, &VoiceTarget::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + VoiceTarget_Target_descriptor_, &VoiceTarget_Target::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + PermissionQuery_descriptor_, &PermissionQuery::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + CodecVersion_descriptor_, &CodecVersion::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + UserStats_descriptor_, &UserStats::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + UserStats_Stats_descriptor_, &UserStats_Stats::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + RequestBlob_descriptor_, &RequestBlob::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ServerConfig_descriptor_, &ServerConfig::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + SuggestConfig_descriptor_, &SuggestConfig::default_instance()); + } + + } // namespace + + void protobuf_ShutdownFile_Mumble_2eproto() + { + delete Version::default_instance_; + delete Version_reflection_; + delete UDPTunnel::default_instance_; + delete UDPTunnel_reflection_; + delete Authenticate::default_instance_; + delete Authenticate_reflection_; + delete Ping::default_instance_; + delete Ping_reflection_; + delete Reject::default_instance_; + delete Reject_reflection_; + delete ServerSync::default_instance_; + delete ServerSync_reflection_; + delete ChannelRemove::default_instance_; + delete ChannelRemove_reflection_; + delete ChannelState::default_instance_; + delete ChannelState_reflection_; + delete UserRemove::default_instance_; + delete UserRemove_reflection_; + delete UserState::default_instance_; + delete UserState_reflection_; + delete BanList::default_instance_; + delete BanList_reflection_; + delete BanList_BanEntry::default_instance_; + delete BanList_BanEntry_reflection_; + delete TextMessage::default_instance_; + delete TextMessage_reflection_; + delete PermissionDenied::default_instance_; + delete PermissionDenied_reflection_; + delete ACL::default_instance_; + delete ACL_reflection_; + delete ACL_ChanGroup::default_instance_; + delete ACL_ChanGroup_reflection_; + delete ACL_ChanACL::default_instance_; + delete ACL_ChanACL_reflection_; + delete QueryUsers::default_instance_; + delete QueryUsers_reflection_; + delete CryptSetup::default_instance_; + delete CryptSetup_reflection_; + delete ContextActionModify::default_instance_; + delete ContextActionModify_reflection_; + delete ContextAction::default_instance_; + delete ContextAction_reflection_; + delete UserList::default_instance_; + delete UserList_reflection_; + delete UserList_User::default_instance_; + delete UserList_User_reflection_; + delete VoiceTarget::default_instance_; + delete VoiceTarget_reflection_; + delete VoiceTarget_Target::default_instance_; + delete VoiceTarget_Target_reflection_; + delete PermissionQuery::default_instance_; + delete PermissionQuery_reflection_; + delete CodecVersion::default_instance_; + delete CodecVersion_reflection_; + delete UserStats::default_instance_; + delete UserStats_reflection_; + delete UserStats_Stats::default_instance_; + delete UserStats_Stats_reflection_; + delete RequestBlob::default_instance_; + delete RequestBlob_reflection_; + delete ServerConfig::default_instance_; + delete ServerConfig_reflection_; + delete SuggestConfig::default_instance_; + delete SuggestConfig_reflection_; + } + + void protobuf_AddDesc_Mumble_2eproto() + { + static bool already_here = false; + if (already_here) return; + already_here = true; + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\014Mumble.proto\022\013MumbleProto\"K\n\007Version\022\017" + "\n\007version\030\001 \001(\r\022\017\n\007release\030\002 \001(\t\022\n\n\002os\030\003" + " \001(\t\022\022\n\nos_version\030\004 \001(\t\"\033\n\tUDPTunnel\022\016\n" + "\006packet\030\001 \002(\014\"n\n\014Authenticate\022\020\n\010usernam" + "e\030\001 \001(\t\022\020\n\010password\030\002 \001(\t\022\016\n\006tokens\030\003 \003(" + "\t\022\025\n\rcelt_versions\030\004 \003(\005\022\023\n\004opus\030\005 \001(\010:\005" + "false\"\325\001\n\004Ping\022\021\n\ttimestamp\030\001 \001(\004\022\014\n\004goo" + "d\030\002 \001(\r\022\014\n\004late\030\003 \001(\r\022\014\n\004lost\030\004 \001(\r\022\016\n\006r" + "esync\030\005 \001(\r\022\023\n\013udp_packets\030\006 \001(\r\022\023\n\013tcp_" + "packets\030\007 \001(\r\022\024\n\014udp_ping_avg\030\010 \001(\002\022\024\n\014u" + "dp_ping_var\030\t \001(\002\022\024\n\014tcp_ping_avg\030\n \001(\002\022" + "\024\n\014tcp_ping_var\030\013 \001(\002\"\367\001\n\006Reject\022,\n\004type" + "\030\001 \001(\0162\036.MumbleProto.Reject.RejectType\022\016" + "\n\006reason\030\002 \001(\t\"\256\001\n\nRejectType\022\010\n\004None\020\000\022" + "\020\n\014WrongVersion\020\001\022\023\n\017InvalidUsername\020\002\022\017" + "\n\013WrongUserPW\020\003\022\021\n\rWrongServerPW\020\004\022\021\n\rUs" + "ernameInUse\020\005\022\016\n\nServerFull\020\006\022\021\n\rNoCerti" + "ficate\020\007\022\025\n\021AuthenticatorFail\020\010\"_\n\nServe" + "rSync\022\017\n\007session\030\001 \001(\r\022\025\n\rmax_bandwidth\030" + "\002 \001(\r\022\024\n\014welcome_text\030\003 \001(\t\022\023\n\013permissio" + "ns\030\004 \001(\004\"#\n\rChannelRemove\022\022\n\nchannel_id\030" + "\001 \002(\r\"\351\001\n\014ChannelState\022\022\n\nchannel_id\030\001 \001" + "(\r\022\016\n\006parent\030\002 \001(\r\022\014\n\004name\030\003 \001(\t\022\r\n\005link" + "s\030\004 \003(\r\022\023\n\013description\030\005 \001(\t\022\021\n\tlinks_ad" + "d\030\006 \003(\r\022\024\n\014links_remove\030\007 \003(\r\022\030\n\ttempora" + "ry\030\010 \001(\010:\005false\022\023\n\010position\030\t \001(\005:\0010\022\030\n\020" + "description_hash\030\n \001(\014\022\021\n\tmax_users\030\013 \001(" + "\r\"I\n\nUserRemove\022\017\n\007session\030\001 \002(\r\022\r\n\005acto" + "r\030\002 \001(\r\022\016\n\006reason\030\003 \001(\t\022\013\n\003ban\030\004 \001(\010\"\354\002\n" + "\tUserState\022\017\n\007session\030\001 \001(\r\022\r\n\005actor\030\002 \001" + "(\r\022\014\n\004name\030\003 \001(\t\022\017\n\007user_id\030\004 \001(\r\022\022\n\ncha" + "nnel_id\030\005 \001(\r\022\014\n\004mute\030\006 \001(\010\022\014\n\004deaf\030\007 \001(" + "\010\022\020\n\010suppress\030\010 \001(\010\022\021\n\tself_mute\030\t \001(\010\022\021" + "\n\tself_deaf\030\n \001(\010\022\017\n\007texture\030\013 \001(\014\022\026\n\016pl" + "ugin_context\030\014 \001(\014\022\027\n\017plugin_identity\030\r " + "\001(\t\022\017\n\007comment\030\016 \001(\t\022\014\n\004hash\030\017 \001(\t\022\024\n\014co" + "mment_hash\030\020 \001(\014\022\024\n\014texture_hash\030\021 \001(\014\022\030" + "\n\020priority_speaker\030\022 \001(\010\022\021\n\trecording\030\023 " + "\001(\010\"\304\001\n\007BanList\022+\n\004bans\030\001 \003(\0132\035.MumblePr" + "oto.BanList.BanEntry\022\024\n\005query\030\002 \001(\010:\005fal" + "se\032v\n\010BanEntry\022\017\n\007address\030\001 \002(\014\022\014\n\004mask\030" + "\002 \002(\r\022\014\n\004name\030\003 \001(\t\022\014\n\004hash\030\004 \001(\t\022\016\n\006rea" + "son\030\005 \001(\t\022\r\n\005start\030\006 \001(\t\022\020\n\010duration\030\007 \001" + "(\r\"c\n\013TextMessage\022\r\n\005actor\030\001 \001(\r\022\017\n\007sess" + "ion\030\002 \003(\r\022\022\n\nchannel_id\030\003 \003(\r\022\017\n\007tree_id" + "\030\004 \003(\r\022\017\n\007message\030\005 \002(\t\"\337\002\n\020PermissionDe" + "nied\022\022\n\npermission\030\001 \001(\r\022\022\n\nchannel_id\030\002" + " \001(\r\022\017\n\007session\030\003 \001(\r\022\016\n\006reason\030\004 \001(\t\0224\n" + "\004type\030\005 \001(\0162&.MumbleProto.PermissionDeni" + "ed.DenyType\022\014\n\004name\030\006 \001(\t\"\275\001\n\010DenyType\022\010" + "\n\004Text\020\000\022\016\n\nPermission\020\001\022\r\n\tSuperUser\020\002\022" + "\017\n\013ChannelName\020\003\022\017\n\013TextTooLong\020\004\022\007\n\003H9K" + "\020\005\022\024\n\020TemporaryChannel\020\006\022\026\n\022MissingCerti" + "ficate\020\007\022\014\n\010UserName\020\010\022\017\n\013ChannelFull\020\t\022" + "\020\n\014NestingLimit\020\n\"\324\003\n\003ACL\022\022\n\nchannel_id\030" + "\001 \002(\r\022\032\n\014inherit_acls\030\002 \001(\010:\004true\022*\n\006gro" + "ups\030\003 \003(\0132\032.MumbleProto.ACL.ChanGroup\022&\n" + "\004acls\030\004 \003(\0132\030.MumbleProto.ACL.ChanACL\022\024\n" + "\005query\030\005 \001(\010:\005false\032\234\001\n\tChanGroup\022\014\n\004nam" + "e\030\001 \002(\t\022\027\n\tinherited\030\002 \001(\010:\004true\022\025\n\007inhe" + "rit\030\003 \001(\010:\004true\022\031\n\013inheritable\030\004 \001(\010:\004tr" + "ue\022\013\n\003add\030\005 \003(\r\022\016\n\006remove\030\006 \003(\r\022\031\n\021inher" + "ited_members\030\007 \003(\r\032\223\001\n\007ChanACL\022\030\n\napply_" + "here\030\001 \001(\010:\004true\022\030\n\napply_subs\030\002 \001(\010:\004tr" + "ue\022\027\n\tinherited\030\003 \001(\010:\004true\022\017\n\007user_id\030\004" + " \001(\r\022\r\n\005group\030\005 \001(\t\022\r\n\005grant\030\006 \001(\r\022\014\n\004de" + "ny\030\007 \001(\r\"(\n\nQueryUsers\022\013\n\003ids\030\001 \003(\r\022\r\n\005n" + "ames\030\002 \003(\t\"E\n\nCryptSetup\022\013\n\003key\030\001 \001(\014\022\024\n" + "\014client_nonce\030\002 \001(\014\022\024\n\014server_nonce\030\003 \001(" + "\014\"\323\001\n\023ContextActionModify\022\016\n\006action\030\001 \002(" + "\t\022\014\n\004text\030\002 \001(\t\022\017\n\007context\030\003 \001(\r\022=\n\toper" + "ation\030\004 \001(\0162*.MumbleProto.ContextActionM" + "odify.Operation\",\n\007Context\022\n\n\006Server\020\001\022\013" + "\n\007Channel\020\002\022\010\n\004User\020\004\" \n\tOperation\022\007\n\003Ad" + "d\020\000\022\n\n\006Remove\020\001\"D\n\rContextAction\022\017\n\007sess" + "ion\030\001 \001(\r\022\022\n\nchannel_id\030\002 \001(\r\022\016\n\006action\030" + "\003 \002(\t\"\205\001\n\010UserList\022)\n\005users\030\001 \003(\0132\032.Mumb" + "leProto.UserList.User\032N\n\004User\022\017\n\007user_id" + "\030\001 \002(\r\022\014\n\004name\030\002 \001(\t\022\021\n\tlast_seen\030\003 \001(\t\022" + "\024\n\014last_channel\030\004 \001(\r\"\270\001\n\013VoiceTarget\022\n\n" + "\002id\030\001 \001(\r\0220\n\007targets\030\002 \003(\0132\037.MumbleProto" + ".VoiceTarget.Target\032k\n\006Target\022\017\n\007session" + "\030\001 \003(\r\022\022\n\nchannel_id\030\002 \001(\r\022\r\n\005group\030\003 \001(" + "\t\022\024\n\005links\030\004 \001(\010:\005false\022\027\n\010children\030\005 \001(" + "\010:\005false\"P\n\017PermissionQuery\022\022\n\nchannel_i" + "d\030\001 \001(\r\022\023\n\013permissions\030\002 \001(\r\022\024\n\005flush\030\003 " + "\001(\010:\005false\"\\\n\014CodecVersion\022\r\n\005alpha\030\001 \002(" + "\005\022\014\n\004beta\030\002 \002(\005\022\032\n\014prefer_alpha\030\003 \002(\010:\004t" + "rue\022\023\n\004opus\030\004 \001(\010:\005false\"\270\004\n\tUserStats\022\017" + "\n\007session\030\001 \001(\r\022\031\n\nstats_only\030\002 \001(\010:\005fal" + "se\022\024\n\014certificates\030\003 \003(\014\0221\n\013from_client\030" + "\004 \001(\0132\034.MumbleProto.UserStats.Stats\0221\n\013f" + "rom_server\030\005 \001(\0132\034.MumbleProto.UserStats" + ".Stats\022\023\n\013udp_packets\030\006 \001(\r\022\023\n\013tcp_packe" + "ts\030\007 \001(\r\022\024\n\014udp_ping_avg\030\010 \001(\002\022\024\n\014udp_pi" + "ng_var\030\t \001(\002\022\024\n\014tcp_ping_avg\030\n \001(\002\022\024\n\014tc" + "p_ping_var\030\013 \001(\002\022%\n\007version\030\014 \001(\0132\024.Mumb" + "leProto.Version\022\025\n\rcelt_versions\030\r \003(\005\022\017" + "\n\007address\030\016 \001(\014\022\021\n\tbandwidth\030\017 \001(\r\022\022\n\non" + "linesecs\030\020 \001(\r\022\020\n\010idlesecs\030\021 \001(\r\022!\n\022stro" + "ng_certificate\030\022 \001(\010:\005false\022\023\n\004opus\030\023 \001(" + "\010:\005false\032A\n\005Stats\022\014\n\004good\030\001 \001(\r\022\014\n\004late\030" + "\002 \001(\r\022\014\n\004lost\030\003 \001(\r\022\016\n\006resync\030\004 \001(\r\"\\\n\013R" + "equestBlob\022\027\n\017session_texture\030\001 \003(\r\022\027\n\017s" + "ession_comment\030\002 \003(\r\022\033\n\023channel_descript" + "ion\030\003 \003(\r\"\230\001\n\014ServerConfig\022\025\n\rmax_bandwi" + "dth\030\001 \001(\r\022\024\n\014welcome_text\030\002 \001(\t\022\022\n\nallow" + "_html\030\003 \001(\010\022\026\n\016message_length\030\004 \001(\r\022\034\n\024i" + "mage_message_length\030\005 \001(\r\022\021\n\tmax_users\030\006" + " \001(\r\"J\n\rSuggestConfig\022\017\n\007version\030\001 \001(\r\022\022" + "\n\npositional\030\002 \001(\010\022\024\n\014push_to_talk\030\003 \001(\010" + "B\002H\001", 4444); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "Mumble.proto", &protobuf_RegisterTypes); + Version::default_instance_ = new Version(); + UDPTunnel::default_instance_ = new UDPTunnel(); + Authenticate::default_instance_ = new Authenticate(); + Ping::default_instance_ = new Ping(); + Reject::default_instance_ = new Reject(); + ServerSync::default_instance_ = new ServerSync(); + ChannelRemove::default_instance_ = new ChannelRemove(); + ChannelState::default_instance_ = new ChannelState(); + UserRemove::default_instance_ = new UserRemove(); + UserState::default_instance_ = new UserState(); + BanList::default_instance_ = new BanList(); + BanList_BanEntry::default_instance_ = new BanList_BanEntry(); + TextMessage::default_instance_ = new TextMessage(); + PermissionDenied::default_instance_ = new PermissionDenied(); + ACL::default_instance_ = new ACL(); + ACL_ChanGroup::default_instance_ = new ACL_ChanGroup(); + ACL_ChanACL::default_instance_ = new ACL_ChanACL(); + QueryUsers::default_instance_ = new QueryUsers(); + CryptSetup::default_instance_ = new CryptSetup(); + ContextActionModify::default_instance_ = new ContextActionModify(); + ContextAction::default_instance_ = new ContextAction(); + UserList::default_instance_ = new UserList(); + UserList_User::default_instance_ = new UserList_User(); + VoiceTarget::default_instance_ = new VoiceTarget(); + VoiceTarget_Target::default_instance_ = new VoiceTarget_Target(); + PermissionQuery::default_instance_ = new PermissionQuery(); + CodecVersion::default_instance_ = new CodecVersion(); + UserStats::default_instance_ = new UserStats(); + UserStats_Stats::default_instance_ = new UserStats_Stats(); + RequestBlob::default_instance_ = new RequestBlob(); + ServerConfig::default_instance_ = new ServerConfig(); + SuggestConfig::default_instance_ = new SuggestConfig(); + Version::default_instance_->InitAsDefaultInstance(); + UDPTunnel::default_instance_->InitAsDefaultInstance(); + Authenticate::default_instance_->InitAsDefaultInstance(); + Ping::default_instance_->InitAsDefaultInstance(); + Reject::default_instance_->InitAsDefaultInstance(); + ServerSync::default_instance_->InitAsDefaultInstance(); + ChannelRemove::default_instance_->InitAsDefaultInstance(); + ChannelState::default_instance_->InitAsDefaultInstance(); + UserRemove::default_instance_->InitAsDefaultInstance(); + UserState::default_instance_->InitAsDefaultInstance(); + BanList::default_instance_->InitAsDefaultInstance(); + BanList_BanEntry::default_instance_->InitAsDefaultInstance(); + TextMessage::default_instance_->InitAsDefaultInstance(); + PermissionDenied::default_instance_->InitAsDefaultInstance(); + ACL::default_instance_->InitAsDefaultInstance(); + ACL_ChanGroup::default_instance_->InitAsDefaultInstance(); + ACL_ChanACL::default_instance_->InitAsDefaultInstance(); + QueryUsers::default_instance_->InitAsDefaultInstance(); + CryptSetup::default_instance_->InitAsDefaultInstance(); + ContextActionModify::default_instance_->InitAsDefaultInstance(); + ContextAction::default_instance_->InitAsDefaultInstance(); + UserList::default_instance_->InitAsDefaultInstance(); + UserList_User::default_instance_->InitAsDefaultInstance(); + VoiceTarget::default_instance_->InitAsDefaultInstance(); + VoiceTarget_Target::default_instance_->InitAsDefaultInstance(); + PermissionQuery::default_instance_->InitAsDefaultInstance(); + CodecVersion::default_instance_->InitAsDefaultInstance(); + UserStats::default_instance_->InitAsDefaultInstance(); + UserStats_Stats::default_instance_->InitAsDefaultInstance(); + RequestBlob::default_instance_->InitAsDefaultInstance(); + ServerConfig::default_instance_->InitAsDefaultInstance(); + SuggestConfig::default_instance_->InitAsDefaultInstance(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_Mumble_2eproto); + } + +// Force AddDescriptors() to be called at static initialization time. + struct StaticDescriptorInitializer_Mumble_2eproto + { + StaticDescriptorInitializer_Mumble_2eproto() + { + protobuf_AddDesc_Mumble_2eproto(); + } + } static_descriptor_initializer_Mumble_2eproto_; + +// =================================================================== + +#ifndef _MSC_VER + const int Version::kVersionFieldNumber; + const int Version::kReleaseFieldNumber; + const int Version::kOsFieldNumber; + const int Version::kOsVersionFieldNumber; +#endif // !_MSC_VER + + Version::Version() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.Version) + } + + void Version::InitAsDefaultInstance() + { + } + + Version::Version(const Version& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.Version) + } + + void Version::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + version_ = 0u; + release_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + os_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + os_version_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + Version::~Version() + { + // @@protoc_insertion_point(destructor:MumbleProto.Version) + SharedDtor(); + } + + void Version::SharedDtor() + { + if (release_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete release_; + } + if (os_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete os_; + } + if (os_version_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete os_version_; + } + if (this != default_instance_) + { + } + } + + void Version::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* Version::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return Version_descriptor_; + } + + const Version& Version::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + Version* Version::default_instance_ = NULL; + + Version* Version::New() const + { + return new Version; + } + + void Version::Clear() + { + if (_has_bits_[0 / 32] & 15) + { + version_ = 0u; + if (has_release()) + { + if (release_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + release_->clear(); + } + } + if (has_os()) + { + if (os_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + os_->clear(); + } + } + if (has_os_version()) + { + if (os_version_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + os_version_->clear(); + } + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool Version::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.Version) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // optional uint32 version = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &version_))); + set_has_version(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_release; + break; + } + + // optional string release = 2; + case 2: + { + if (tag == 18) + { +parse_release: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_release())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->release().data(), this->release().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "release"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_os; + break; + } + + // optional string os = 3; + case 3: + { + if (tag == 26) + { +parse_os: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_os())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->os().data(), this->os().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "os"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_os_version; + break; + } + + // optional string os_version = 4; + case 4: + { + if (tag == 34) + { +parse_os_version: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_os_version())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->os_version().data(), this->os_version().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "os_version"); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.Version) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.Version) + return false; +#undef DO_ + } + + void Version::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.Version) + // optional uint32 version = 1; + if (has_version()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->version(), + output); + } + + // optional string release = 2; + if (has_release()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->release().data(), this->release().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "release"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->release(), output); + } + + // optional string os = 3; + if (has_os()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->os().data(), this->os().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "os"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->os(), output); + } + + // optional string os_version = 4; + if (has_os_version()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->os_version().data(), this->os_version().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "os_version"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->os_version(), output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.Version) + } + + ::google::protobuf::uint8* Version::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.Version) + // optional uint32 version = 1; + if (has_version()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, + this->version(), target); + } + + // optional string release = 2; + if (has_release()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->release().data(), this->release().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "release"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->release(), target); + } + + // optional string os = 3; + if (has_os()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->os().data(), this->os().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "os"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->os(), target); + } + + // optional string os_version = 4; + if (has_os_version()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->os_version().data(), this->os_version().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "os_version"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->os_version(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.Version) + return target; + } + + int Version::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // optional uint32 version = 1; + if (has_version()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->version()); + } + + // optional string release = 2; + if (has_release()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->release()); + } + + // optional string os = 3; + if (has_os()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->os()); + } + + // optional string os_version = 4; + if (has_os_version()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->os_version()); + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void Version::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const Version* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void Version::MergeFrom(const Version& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_version()) + { + set_version(from.version()); + } + if (from.has_release()) + { + set_release(from.release()); + } + if (from.has_os()) + { + set_os(from.os()); + } + if (from.has_os_version()) + { + set_os_version(from.os_version()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void Version::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void Version::CopyFrom(const Version& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool Version::IsInitialized() const + { + + return true; + } + + void Version::Swap(Version* other) + { + if (other != this) + { + std::swap(version_, other->version_); + std::swap(release_, other->release_); + std::swap(os_, other->os_); + std::swap(os_version_, other->os_version_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata Version::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Version_descriptor_; + metadata.reflection = Version_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int UDPTunnel::kPacketFieldNumber; +#endif // !_MSC_VER + + UDPTunnel::UDPTunnel() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.UDPTunnel) + } + + void UDPTunnel::InitAsDefaultInstance() + { + } + + UDPTunnel::UDPTunnel(const UDPTunnel& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.UDPTunnel) + } + + void UDPTunnel::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + packet_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + UDPTunnel::~UDPTunnel() + { + // @@protoc_insertion_point(destructor:MumbleProto.UDPTunnel) + SharedDtor(); + } + + void UDPTunnel::SharedDtor() + { + if (packet_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete packet_; + } + if (this != default_instance_) + { + } + } + + void UDPTunnel::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* UDPTunnel::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return UDPTunnel_descriptor_; + } + + const UDPTunnel& UDPTunnel::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + UDPTunnel* UDPTunnel::default_instance_ = NULL; + + UDPTunnel* UDPTunnel::New() const + { + return new UDPTunnel; + } + + void UDPTunnel::Clear() + { + if (has_packet()) + { + if (packet_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + packet_->clear(); + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool UDPTunnel::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.UDPTunnel) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // required bytes packet = 1; + case 1: + { + if (tag == 10) + { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_packet())); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.UDPTunnel) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.UDPTunnel) + return false; +#undef DO_ + } + + void UDPTunnel::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.UDPTunnel) + // required bytes packet = 1; + if (has_packet()) + { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 1, this->packet(), output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.UDPTunnel) + } + + ::google::protobuf::uint8* UDPTunnel::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.UDPTunnel) + // required bytes packet = 1; + if (has_packet()) + { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 1, this->packet(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.UDPTunnel) + return target; + } + + int UDPTunnel::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // required bytes packet = 1; + if (has_packet()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->packet()); + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void UDPTunnel::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const UDPTunnel* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void UDPTunnel::MergeFrom(const UDPTunnel& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_packet()) + { + set_packet(from.packet()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void UDPTunnel::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void UDPTunnel::CopyFrom(const UDPTunnel& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool UDPTunnel::IsInitialized() const + { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; + } + + void UDPTunnel::Swap(UDPTunnel* other) + { + if (other != this) + { + std::swap(packet_, other->packet_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata UDPTunnel::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = UDPTunnel_descriptor_; + metadata.reflection = UDPTunnel_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int Authenticate::kUsernameFieldNumber; + const int Authenticate::kPasswordFieldNumber; + const int Authenticate::kTokensFieldNumber; + const int Authenticate::kCeltVersionsFieldNumber; + const int Authenticate::kOpusFieldNumber; +#endif // !_MSC_VER + + Authenticate::Authenticate() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.Authenticate) + } + + void Authenticate::InitAsDefaultInstance() + { + } + + Authenticate::Authenticate(const Authenticate& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.Authenticate) + } + + void Authenticate::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + username_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + password_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + opus_ = false; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + Authenticate::~Authenticate() + { + // @@protoc_insertion_point(destructor:MumbleProto.Authenticate) + SharedDtor(); + } + + void Authenticate::SharedDtor() + { + if (username_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete username_; + } + if (password_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete password_; + } + if (this != default_instance_) + { + } + } + + void Authenticate::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* Authenticate::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return Authenticate_descriptor_; + } + + const Authenticate& Authenticate::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + Authenticate* Authenticate::default_instance_ = NULL; + + Authenticate* Authenticate::New() const + { + return new Authenticate; + } + + void Authenticate::Clear() + { + if (_has_bits_[0 / 32] & 19) + { + if (has_username()) + { + if (username_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + username_->clear(); + } + } + if (has_password()) + { + if (password_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + password_->clear(); + } + } + opus_ = false; + } + tokens_.Clear(); + celt_versions_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool Authenticate::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.Authenticate) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // optional string username = 1; + case 1: + { + if (tag == 10) + { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_username())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->username().data(), this->username().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "username"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_password; + break; + } + + // optional string password = 2; + case 2: + { + if (tag == 18) + { +parse_password: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_password())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->password().data(), this->password().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "password"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_tokens; + break; + } + + // repeated string tokens = 3; + case 3: + { + if (tag == 26) + { +parse_tokens: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_tokens())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->tokens(this->tokens_size() - 1).data(), + this->tokens(this->tokens_size() - 1).length(), + ::google::protobuf::internal::WireFormat::PARSE, + "tokens"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_tokens; + if (input->ExpectTag(32)) goto parse_celt_versions; + break; + } + + // repeated int32 celt_versions = 4; + case 4: + { + if (tag == 32) + { +parse_celt_versions: + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + 1, 32, input, this->mutable_celt_versions()))); + } + else if (tag == 34) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_celt_versions()))); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(32)) goto parse_celt_versions; + if (input->ExpectTag(40)) goto parse_opus; + break; + } + + // optional bool opus = 5 [default = false]; + case 5: + { + if (tag == 40) + { +parse_opus: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &opus_))); + set_has_opus(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.Authenticate) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.Authenticate) + return false; +#undef DO_ + } + + void Authenticate::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.Authenticate) + // optional string username = 1; + if (has_username()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->username().data(), this->username().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "username"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->username(), output); + } + + // optional string password = 2; + if (has_password()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->password().data(), this->password().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "password"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->password(), output); + } + + // repeated string tokens = 3; + for (int i = 0; i < this->tokens_size(); i++) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->tokens(i).data(), this->tokens(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "tokens"); + ::google::protobuf::internal::WireFormatLite::WriteString( + 3, this->tokens(i), output); + } + + // repeated int32 celt_versions = 4; + for (int i = 0; i < this->celt_versions_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteInt32( + 4, this->celt_versions(i), output); + } + + // optional bool opus = 5 [default = false]; + if (has_opus()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->opus(), + output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.Authenticate) + } + + ::google::protobuf::uint8* Authenticate::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.Authenticate) + // optional string username = 1; + if (has_username()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->username().data(), this->username().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "username"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->username(), target); + } + + // optional string password = 2; + if (has_password()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->password().data(), this->password().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "password"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->password(), target); + } + + // repeated string tokens = 3; + for (int i = 0; i < this->tokens_size(); i++) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->tokens(i).data(), this->tokens(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "tokens"); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(3, this->tokens(i), target); + } + + // repeated int32 celt_versions = 4; + for (int i = 0; i < this->celt_versions_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArray(4, this->celt_versions(i), target); + } + + // optional bool opus = 5 [default = false]; + if (has_opus()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, + this->opus(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.Authenticate) + return target; + } + + int Authenticate::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // optional string username = 1; + if (has_username()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->username()); + } + + // optional string password = 2; + if (has_password()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->password()); + } + + // optional bool opus = 5 [default = false]; + if (has_opus()) + { + total_size += 1 + 1; + } + + } + // repeated string tokens = 3; + total_size += 1 * this->tokens_size(); + for (int i = 0; i < this->tokens_size(); i++) + { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->tokens(i)); + } + + // repeated int32 celt_versions = 4; + { + int data_size = 0; + for (int i = 0; i < this->celt_versions_size(); i++) + { + data_size += ::google::protobuf::internal::WireFormatLite:: + Int32Size(this->celt_versions(i)); + } + total_size += 1 * this->celt_versions_size() + data_size; + } + + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void Authenticate::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const Authenticate* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void Authenticate::MergeFrom(const Authenticate& from) + { + GOOGLE_CHECK_NE(&from, this); + tokens_.MergeFrom(from.tokens_); + celt_versions_.MergeFrom(from.celt_versions_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_username()) + { + set_username(from.username()); + } + if (from.has_password()) + { + set_password(from.password()); + } + if (from.has_opus()) + { + set_opus(from.opus()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void Authenticate::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void Authenticate::CopyFrom(const Authenticate& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool Authenticate::IsInitialized() const + { + + return true; + } + + void Authenticate::Swap(Authenticate* other) + { + if (other != this) + { + std::swap(username_, other->username_); + std::swap(password_, other->password_); + tokens_.Swap(&other->tokens_); + celt_versions_.Swap(&other->celt_versions_); + std::swap(opus_, other->opus_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata Authenticate::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Authenticate_descriptor_; + metadata.reflection = Authenticate_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int Ping::kTimestampFieldNumber; + const int Ping::kGoodFieldNumber; + const int Ping::kLateFieldNumber; + const int Ping::kLostFieldNumber; + const int Ping::kResyncFieldNumber; + const int Ping::kUdpPacketsFieldNumber; + const int Ping::kTcpPacketsFieldNumber; + const int Ping::kUdpPingAvgFieldNumber; + const int Ping::kUdpPingVarFieldNumber; + const int Ping::kTcpPingAvgFieldNumber; + const int Ping::kTcpPingVarFieldNumber; +#endif // !_MSC_VER + + Ping::Ping() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.Ping) + } + + void Ping::InitAsDefaultInstance() + { + } + + Ping::Ping(const Ping& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.Ping) + } + + void Ping::SharedCtor() + { + _cached_size_ = 0; + timestamp_ = GOOGLE_ULONGLONG(0); + good_ = 0u; + late_ = 0u; + lost_ = 0u; + resync_ = 0u; + udp_packets_ = 0u; + tcp_packets_ = 0u; + udp_ping_avg_ = 0; + udp_ping_var_ = 0; + tcp_ping_avg_ = 0; + tcp_ping_var_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + Ping::~Ping() + { + // @@protoc_insertion_point(destructor:MumbleProto.Ping) + SharedDtor(); + } + + void Ping::SharedDtor() + { + if (this != default_instance_) + { + } + } + + void Ping::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* Ping::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return Ping_descriptor_; + } + + const Ping& Ping::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + Ping* Ping::default_instance_ = NULL; + + Ping* Ping::New() const + { + return new Ping; + } + + void Ping::Clear() + { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + if (_has_bits_[0 / 32] & 255) + { + ZR_(timestamp_, udp_ping_avg_); + } + ZR_(udp_ping_var_, tcp_ping_var_); + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool Ping::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.Ping) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // optional uint64 timestamp = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, ×tamp_))); + set_has_timestamp(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_good; + break; + } + + // optional uint32 good = 2; + case 2: + { + if (tag == 16) + { +parse_good: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &good_))); + set_has_good(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(24)) goto parse_late; + break; + } + + // optional uint32 late = 3; + case 3: + { + if (tag == 24) + { +parse_late: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &late_))); + set_has_late(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(32)) goto parse_lost; + break; + } + + // optional uint32 lost = 4; + case 4: + { + if (tag == 32) + { +parse_lost: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &lost_))); + set_has_lost(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(40)) goto parse_resync; + break; + } + + // optional uint32 resync = 5; + case 5: + { + if (tag == 40) + { +parse_resync: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &resync_))); + set_has_resync(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(48)) goto parse_udp_packets; + break; + } + + // optional uint32 udp_packets = 6; + case 6: + { + if (tag == 48) + { +parse_udp_packets: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &udp_packets_))); + set_has_udp_packets(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(56)) goto parse_tcp_packets; + break; + } + + // optional uint32 tcp_packets = 7; + case 7: + { + if (tag == 56) + { +parse_tcp_packets: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &tcp_packets_))); + set_has_tcp_packets(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(69)) goto parse_udp_ping_avg; + break; + } + + // optional float udp_ping_avg = 8; + case 8: + { + if (tag == 69) + { +parse_udp_ping_avg: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, &udp_ping_avg_))); + set_has_udp_ping_avg(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(77)) goto parse_udp_ping_var; + break; + } + + // optional float udp_ping_var = 9; + case 9: + { + if (tag == 77) + { +parse_udp_ping_var: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, &udp_ping_var_))); + set_has_udp_ping_var(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(85)) goto parse_tcp_ping_avg; + break; + } + + // optional float tcp_ping_avg = 10; + case 10: + { + if (tag == 85) + { +parse_tcp_ping_avg: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, &tcp_ping_avg_))); + set_has_tcp_ping_avg(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(93)) goto parse_tcp_ping_var; + break; + } + + // optional float tcp_ping_var = 11; + case 11: + { + if (tag == 93) + { +parse_tcp_ping_var: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, &tcp_ping_var_))); + set_has_tcp_ping_var(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.Ping) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.Ping) + return false; +#undef DO_ + } + + void Ping::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.Ping) + // optional uint64 timestamp = 1; + if (has_timestamp()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->timestamp(), + output); + } + + // optional uint32 good = 2; + if (has_good()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->good(), + output); + } + + // optional uint32 late = 3; + if (has_late()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->late(), + output); + } + + // optional uint32 lost = 4; + if (has_lost()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->lost(), + output); + } + + // optional uint32 resync = 5; + if (has_resync()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->resync(), + output); + } + + // optional uint32 udp_packets = 6; + if (has_udp_packets()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(6, + this->udp_packets(), output); + } + + // optional uint32 tcp_packets = 7; + if (has_tcp_packets()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(7, + this->tcp_packets(), output); + } + + // optional float udp_ping_avg = 8; + if (has_udp_ping_avg()) + { + ::google::protobuf::internal::WireFormatLite::WriteFloat(8, + this->udp_ping_avg(), output); + } + + // optional float udp_ping_var = 9; + if (has_udp_ping_var()) + { + ::google::protobuf::internal::WireFormatLite::WriteFloat(9, + this->udp_ping_var(), output); + } + + // optional float tcp_ping_avg = 10; + if (has_tcp_ping_avg()) + { + ::google::protobuf::internal::WireFormatLite::WriteFloat(10, + this->tcp_ping_avg(), output); + } + + // optional float tcp_ping_var = 11; + if (has_tcp_ping_var()) + { + ::google::protobuf::internal::WireFormatLite::WriteFloat(11, + this->tcp_ping_var(), output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.Ping) + } + + ::google::protobuf::uint8* Ping::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.Ping) + // optional uint64 timestamp = 1; + if (has_timestamp()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, + this->timestamp(), target); + } + + // optional uint32 good = 2; + if (has_good()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, + this->good(), target); + } + + // optional uint32 late = 3; + if (has_late()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, + this->late(), target); + } + + // optional uint32 lost = 4; + if (has_lost()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, + this->lost(), target); + } + + // optional uint32 resync = 5; + if (has_resync()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, + this->resync(), target); + } + + // optional uint32 udp_packets = 6; + if (has_udp_packets()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(6, + this->udp_packets(), target); + } + + // optional uint32 tcp_packets = 7; + if (has_tcp_packets()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(7, + this->tcp_packets(), target); + } + + // optional float udp_ping_avg = 8; + if (has_udp_ping_avg()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(8, + this->udp_ping_avg(), target); + } + + // optional float udp_ping_var = 9; + if (has_udp_ping_var()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(9, + this->udp_ping_var(), target); + } + + // optional float tcp_ping_avg = 10; + if (has_tcp_ping_avg()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(10, + this->tcp_ping_avg(), target); + } + + // optional float tcp_ping_var = 11; + if (has_tcp_ping_var()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(11, + this->tcp_ping_var(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.Ping) + return target; + } + + int Ping::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // optional uint64 timestamp = 1; + if (has_timestamp()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->timestamp()); + } + + // optional uint32 good = 2; + if (has_good()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->good()); + } + + // optional uint32 late = 3; + if (has_late()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->late()); + } + + // optional uint32 lost = 4; + if (has_lost()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->lost()); + } + + // optional uint32 resync = 5; + if (has_resync()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->resync()); + } + + // optional uint32 udp_packets = 6; + if (has_udp_packets()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->udp_packets()); + } + + // optional uint32 tcp_packets = 7; + if (has_tcp_packets()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->tcp_packets()); + } + + // optional float udp_ping_avg = 8; + if (has_udp_ping_avg()) + { + total_size += 1 + 4; + } + + } + if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) + { + // optional float udp_ping_var = 9; + if (has_udp_ping_var()) + { + total_size += 1 + 4; + } + + // optional float tcp_ping_avg = 10; + if (has_tcp_ping_avg()) + { + total_size += 1 + 4; + } + + // optional float tcp_ping_var = 11; + if (has_tcp_ping_var()) + { + total_size += 1 + 4; + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void Ping::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const Ping* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void Ping::MergeFrom(const Ping& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_timestamp()) + { + set_timestamp(from.timestamp()); + } + if (from.has_good()) + { + set_good(from.good()); + } + if (from.has_late()) + { + set_late(from.late()); + } + if (from.has_lost()) + { + set_lost(from.lost()); + } + if (from.has_resync()) + { + set_resync(from.resync()); + } + if (from.has_udp_packets()) + { + set_udp_packets(from.udp_packets()); + } + if (from.has_tcp_packets()) + { + set_tcp_packets(from.tcp_packets()); + } + if (from.has_udp_ping_avg()) + { + set_udp_ping_avg(from.udp_ping_avg()); + } + } + if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) + { + if (from.has_udp_ping_var()) + { + set_udp_ping_var(from.udp_ping_var()); + } + if (from.has_tcp_ping_avg()) + { + set_tcp_ping_avg(from.tcp_ping_avg()); + } + if (from.has_tcp_ping_var()) + { + set_tcp_ping_var(from.tcp_ping_var()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void Ping::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void Ping::CopyFrom(const Ping& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool Ping::IsInitialized() const + { + + return true; + } + + void Ping::Swap(Ping* other) + { + if (other != this) + { + std::swap(timestamp_, other->timestamp_); + std::swap(good_, other->good_); + std::swap(late_, other->late_); + std::swap(lost_, other->lost_); + std::swap(resync_, other->resync_); + std::swap(udp_packets_, other->udp_packets_); + std::swap(tcp_packets_, other->tcp_packets_); + std::swap(udp_ping_avg_, other->udp_ping_avg_); + std::swap(udp_ping_var_, other->udp_ping_var_); + std::swap(tcp_ping_avg_, other->tcp_ping_avg_); + std::swap(tcp_ping_var_, other->tcp_ping_var_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata Ping::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Ping_descriptor_; + metadata.reflection = Ping_reflection_; + return metadata; + } + + +// =================================================================== + + const ::google::protobuf::EnumDescriptor* Reject_RejectType_descriptor() + { + protobuf_AssignDescriptorsOnce(); + return Reject_RejectType_descriptor_; + } + bool Reject_RejectType_IsValid(int value) + { + switch(value) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + return true; + default: + return false; + } + } + +#ifndef _MSC_VER + const Reject_RejectType Reject::None; + const Reject_RejectType Reject::WrongVersion; + const Reject_RejectType Reject::InvalidUsername; + const Reject_RejectType Reject::WrongUserPW; + const Reject_RejectType Reject::WrongServerPW; + const Reject_RejectType Reject::UsernameInUse; + const Reject_RejectType Reject::ServerFull; + const Reject_RejectType Reject::NoCertificate; + const Reject_RejectType Reject::AuthenticatorFail; + const Reject_RejectType Reject::RejectType_MIN; + const Reject_RejectType Reject::RejectType_MAX; + const int Reject::RejectType_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER + const int Reject::kTypeFieldNumber; + const int Reject::kReasonFieldNumber; +#endif // !_MSC_VER + + Reject::Reject() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.Reject) + } + + void Reject::InitAsDefaultInstance() + { + } + + Reject::Reject(const Reject& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.Reject) + } + + void Reject::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + type_ = 0; + reason_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + Reject::~Reject() + { + // @@protoc_insertion_point(destructor:MumbleProto.Reject) + SharedDtor(); + } + + void Reject::SharedDtor() + { + if (reason_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete reason_; + } + if (this != default_instance_) + { + } + } + + void Reject::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* Reject::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return Reject_descriptor_; + } + + const Reject& Reject::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + Reject* Reject::default_instance_ = NULL; + + Reject* Reject::New() const + { + return new Reject; + } + + void Reject::Clear() + { + if (_has_bits_[0 / 32] & 3) + { + type_ = 0; + if (has_reason()) + { + if (reason_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_->clear(); + } + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool Reject::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.Reject) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // optional .MumbleProto.Reject.RejectType type = 1; + case 1: + { + if (tag == 8) + { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::MumbleProto::Reject_RejectType_IsValid(value)) + { + set_type(static_cast< ::MumbleProto::Reject_RejectType >(value)); + } + else + { + mutable_unknown_fields()->AddVarint(1, value); + } + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_reason; + break; + } + + // optional string reason = 2; + case 2: + { + if (tag == 18) + { +parse_reason: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_reason())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->reason().data(), this->reason().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "reason"); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.Reject) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.Reject) + return false; +#undef DO_ + } + + void Reject::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.Reject) + // optional .MumbleProto.Reject.RejectType type = 1; + if (has_type()) + { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 1, this->type(), output); + } + + // optional string reason = 2; + if (has_reason()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->reason().data(), this->reason().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "reason"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->reason(), output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.Reject) + } + + ::google::protobuf::uint8* Reject::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.Reject) + // optional .MumbleProto.Reject.RejectType type = 1; + if (has_type()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->type(), target); + } + + // optional string reason = 2; + if (has_reason()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->reason().data(), this->reason().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "reason"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->reason(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.Reject) + return target; + } + + int Reject::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // optional .MumbleProto.Reject.RejectType type = 1; + if (has_type()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); + } + + // optional string reason = 2; + if (has_reason()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->reason()); + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void Reject::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const Reject* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void Reject::MergeFrom(const Reject& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_type()) + { + set_type(from.type()); + } + if (from.has_reason()) + { + set_reason(from.reason()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void Reject::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void Reject::CopyFrom(const Reject& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool Reject::IsInitialized() const + { + + return true; + } + + void Reject::Swap(Reject* other) + { + if (other != this) + { + std::swap(type_, other->type_); + std::swap(reason_, other->reason_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata Reject::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Reject_descriptor_; + metadata.reflection = Reject_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int ServerSync::kSessionFieldNumber; + const int ServerSync::kMaxBandwidthFieldNumber; + const int ServerSync::kWelcomeTextFieldNumber; + const int ServerSync::kPermissionsFieldNumber; +#endif // !_MSC_VER + + ServerSync::ServerSync() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.ServerSync) + } + + void ServerSync::InitAsDefaultInstance() + { + } + + ServerSync::ServerSync(const ServerSync& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.ServerSync) + } + + void ServerSync::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + session_ = 0u; + max_bandwidth_ = 0u; + welcome_text_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + permissions_ = GOOGLE_ULONGLONG(0); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + ServerSync::~ServerSync() + { + // @@protoc_insertion_point(destructor:MumbleProto.ServerSync) + SharedDtor(); + } + + void ServerSync::SharedDtor() + { + if (welcome_text_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete welcome_text_; + } + if (this != default_instance_) + { + } + } + + void ServerSync::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* ServerSync::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return ServerSync_descriptor_; + } + + const ServerSync& ServerSync::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + ServerSync* ServerSync::default_instance_ = NULL; + + ServerSync* ServerSync::New() const + { + return new ServerSync; + } + + void ServerSync::Clear() + { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + if (_has_bits_[0 / 32] & 15) + { + ZR_(session_, max_bandwidth_); + if (has_welcome_text()) + { + if (welcome_text_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + welcome_text_->clear(); + } + } + permissions_ = GOOGLE_ULONGLONG(0); + } + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool ServerSync::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.ServerSync) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // optional uint32 session = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &session_))); + set_has_session(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_max_bandwidth; + break; + } + + // optional uint32 max_bandwidth = 2; + case 2: + { + if (tag == 16) + { +parse_max_bandwidth: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &max_bandwidth_))); + set_has_max_bandwidth(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_welcome_text; + break; + } + + // optional string welcome_text = 3; + case 3: + { + if (tag == 26) + { +parse_welcome_text: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_welcome_text())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->welcome_text().data(), this->welcome_text().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "welcome_text"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(32)) goto parse_permissions; + break; + } + + // optional uint64 permissions = 4; + case 4: + { + if (tag == 32) + { +parse_permissions: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &permissions_))); + set_has_permissions(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.ServerSync) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.ServerSync) + return false; +#undef DO_ + } + + void ServerSync::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.ServerSync) + // optional uint32 session = 1; + if (has_session()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->session(), + output); + } + + // optional uint32 max_bandwidth = 2; + if (has_max_bandwidth()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, + this->max_bandwidth(), output); + } + + // optional string welcome_text = 3; + if (has_welcome_text()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->welcome_text().data(), this->welcome_text().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "welcome_text"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->welcome_text(), output); + } + + // optional uint64 permissions = 4; + if (has_permissions()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, + this->permissions(), output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.ServerSync) + } + + ::google::protobuf::uint8* ServerSync::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.ServerSync) + // optional uint32 session = 1; + if (has_session()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, + this->session(), target); + } + + // optional uint32 max_bandwidth = 2; + if (has_max_bandwidth()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, + this->max_bandwidth(), target); + } + + // optional string welcome_text = 3; + if (has_welcome_text()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->welcome_text().data(), this->welcome_text().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "welcome_text"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->welcome_text(), target); + } + + // optional uint64 permissions = 4; + if (has_permissions()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, + this->permissions(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.ServerSync) + return target; + } + + int ServerSync::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // optional uint32 session = 1; + if (has_session()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->session()); + } + + // optional uint32 max_bandwidth = 2; + if (has_max_bandwidth()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->max_bandwidth()); + } + + // optional string welcome_text = 3; + if (has_welcome_text()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->welcome_text()); + } + + // optional uint64 permissions = 4; + if (has_permissions()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->permissions()); + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void ServerSync::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const ServerSync* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void ServerSync::MergeFrom(const ServerSync& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_session()) + { + set_session(from.session()); + } + if (from.has_max_bandwidth()) + { + set_max_bandwidth(from.max_bandwidth()); + } + if (from.has_welcome_text()) + { + set_welcome_text(from.welcome_text()); + } + if (from.has_permissions()) + { + set_permissions(from.permissions()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void ServerSync::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void ServerSync::CopyFrom(const ServerSync& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool ServerSync::IsInitialized() const + { + + return true; + } + + void ServerSync::Swap(ServerSync* other) + { + if (other != this) + { + std::swap(session_, other->session_); + std::swap(max_bandwidth_, other->max_bandwidth_); + std::swap(welcome_text_, other->welcome_text_); + std::swap(permissions_, other->permissions_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata ServerSync::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ServerSync_descriptor_; + metadata.reflection = ServerSync_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int ChannelRemove::kChannelIdFieldNumber; +#endif // !_MSC_VER + + ChannelRemove::ChannelRemove() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.ChannelRemove) + } + + void ChannelRemove::InitAsDefaultInstance() + { + } + + ChannelRemove::ChannelRemove(const ChannelRemove& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.ChannelRemove) + } + + void ChannelRemove::SharedCtor() + { + _cached_size_ = 0; + channel_id_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + ChannelRemove::~ChannelRemove() + { + // @@protoc_insertion_point(destructor:MumbleProto.ChannelRemove) + SharedDtor(); + } + + void ChannelRemove::SharedDtor() + { + if (this != default_instance_) + { + } + } + + void ChannelRemove::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* ChannelRemove::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return ChannelRemove_descriptor_; + } + + const ChannelRemove& ChannelRemove::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + ChannelRemove* ChannelRemove::default_instance_ = NULL; + + ChannelRemove* ChannelRemove::New() const + { + return new ChannelRemove; + } + + void ChannelRemove::Clear() + { + channel_id_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool ChannelRemove::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.ChannelRemove) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // required uint32 channel_id = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &channel_id_))); + set_has_channel_id(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.ChannelRemove) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.ChannelRemove) + return false; +#undef DO_ + } + + void ChannelRemove::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.ChannelRemove) + // required uint32 channel_id = 1; + if (has_channel_id()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->channel_id(), + output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.ChannelRemove) + } + + ::google::protobuf::uint8* ChannelRemove::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.ChannelRemove) + // required uint32 channel_id = 1; + if (has_channel_id()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, + this->channel_id(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.ChannelRemove) + return target; + } + + int ChannelRemove::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // required uint32 channel_id = 1; + if (has_channel_id()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->channel_id()); + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void ChannelRemove::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const ChannelRemove* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void ChannelRemove::MergeFrom(const ChannelRemove& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_channel_id()) + { + set_channel_id(from.channel_id()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void ChannelRemove::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void ChannelRemove::CopyFrom(const ChannelRemove& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool ChannelRemove::IsInitialized() const + { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; + } + + void ChannelRemove::Swap(ChannelRemove* other) + { + if (other != this) + { + std::swap(channel_id_, other->channel_id_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata ChannelRemove::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ChannelRemove_descriptor_; + metadata.reflection = ChannelRemove_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int ChannelState::kChannelIdFieldNumber; + const int ChannelState::kParentFieldNumber; + const int ChannelState::kNameFieldNumber; + const int ChannelState::kLinksFieldNumber; + const int ChannelState::kDescriptionFieldNumber; + const int ChannelState::kLinksAddFieldNumber; + const int ChannelState::kLinksRemoveFieldNumber; + const int ChannelState::kTemporaryFieldNumber; + const int ChannelState::kPositionFieldNumber; + const int ChannelState::kDescriptionHashFieldNumber; + const int ChannelState::kMaxUsersFieldNumber; +#endif // !_MSC_VER + + ChannelState::ChannelState() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.ChannelState) + } + + void ChannelState::InitAsDefaultInstance() + { + } + + ChannelState::ChannelState(const ChannelState& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.ChannelState) + } + + void ChannelState::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + channel_id_ = 0u; + parent_ = 0u; + name_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + description_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + temporary_ = false; + position_ = 0; + description_hash_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + max_users_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + ChannelState::~ChannelState() + { + // @@protoc_insertion_point(destructor:MumbleProto.ChannelState) + SharedDtor(); + } + + void ChannelState::SharedDtor() + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete name_; + } + if (description_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete description_; + } + if (description_hash_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete description_hash_; + } + if (this != default_instance_) + { + } + } + + void ChannelState::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* ChannelState::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return ChannelState_descriptor_; + } + + const ChannelState& ChannelState::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + ChannelState* ChannelState::default_instance_ = NULL; + + ChannelState* ChannelState::New() const + { + return new ChannelState; + } + + void ChannelState::Clear() + { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + if (_has_bits_[0 / 32] & 151) + { + ZR_(channel_id_, parent_); + if (has_name()) + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_->clear(); + } + } + if (has_description()) + { + if (description_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + description_->clear(); + } + } + temporary_ = false; + } + if (_has_bits_[8 / 32] & 1792) + { + position_ = 0; + if (has_description_hash()) + { + if (description_hash_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + description_hash_->clear(); + } + } + max_users_ = 0u; + } + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + links_.Clear(); + links_add_.Clear(); + links_remove_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool ChannelState::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.ChannelState) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // optional uint32 channel_id = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &channel_id_))); + set_has_channel_id(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_parent; + break; + } + + // optional uint32 parent = 2; + case 2: + { + if (tag == 16) + { +parse_parent: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &parent_))); + set_has_parent(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_name; + break; + } + + // optional string name = 3; + case 3: + { + if (tag == 26) + { +parse_name: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "name"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(32)) goto parse_links; + break; + } + + // repeated uint32 links = 4; + case 4: + { + if (tag == 32) + { +parse_links: + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + 1, 32, input, this->mutable_links()))); + } + else if (tag == 34) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, this->mutable_links()))); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(32)) goto parse_links; + if (input->ExpectTag(42)) goto parse_description; + break; + } + + // optional string description = 5; + case 5: + { + if (tag == 42) + { +parse_description: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_description())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->description().data(), this->description().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "description"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(48)) goto parse_links_add; + break; + } + + // repeated uint32 links_add = 6; + case 6: + { + if (tag == 48) + { +parse_links_add: + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + 1, 48, input, this->mutable_links_add()))); + } + else if (tag == 50) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, this->mutable_links_add()))); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(48)) goto parse_links_add; + if (input->ExpectTag(56)) goto parse_links_remove; + break; + } + + // repeated uint32 links_remove = 7; + case 7: + { + if (tag == 56) + { +parse_links_remove: + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + 1, 56, input, this->mutable_links_remove()))); + } + else if (tag == 58) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, this->mutable_links_remove()))); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(56)) goto parse_links_remove; + if (input->ExpectTag(64)) goto parse_temporary; + break; + } + + // optional bool temporary = 8 [default = false]; + case 8: + { + if (tag == 64) + { +parse_temporary: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &temporary_))); + set_has_temporary(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(72)) goto parse_position; + break; + } + + // optional int32 position = 9 [default = 0]; + case 9: + { + if (tag == 72) + { +parse_position: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &position_))); + set_has_position(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(82)) goto parse_description_hash; + break; + } + + // optional bytes description_hash = 10; + case 10: + { + if (tag == 82) + { +parse_description_hash: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_description_hash())); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(88)) goto parse_max_users; + break; + } + + // optional uint32 max_users = 11; + case 11: + { + if (tag == 88) + { +parse_max_users: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &max_users_))); + set_has_max_users(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.ChannelState) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.ChannelState) + return false; +#undef DO_ + } + + void ChannelState::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.ChannelState) + // optional uint32 channel_id = 1; + if (has_channel_id()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->channel_id(), + output); + } + + // optional uint32 parent = 2; + if (has_parent()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->parent(), + output); + } + + // optional string name = 3; + if (has_name()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->name(), output); + } + + // repeated uint32 links = 4; + for (int i = 0; i < this->links_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32( + 4, this->links(i), output); + } + + // optional string description = 5; + if (has_description()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->description().data(), this->description().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "description"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 5, this->description(), output); + } + + // repeated uint32 links_add = 6; + for (int i = 0; i < this->links_add_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32( + 6, this->links_add(i), output); + } + + // repeated uint32 links_remove = 7; + for (int i = 0; i < this->links_remove_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32( + 7, this->links_remove(i), output); + } + + // optional bool temporary = 8 [default = false]; + if (has_temporary()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(8, this->temporary(), + output); + } + + // optional int32 position = 9 [default = 0]; + if (has_position()) + { + ::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->position(), + output); + } + + // optional bytes description_hash = 10; + if (has_description_hash()) + { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 10, this->description_hash(), output); + } + + // optional uint32 max_users = 11; + if (has_max_users()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(11, this->max_users(), + output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.ChannelState) + } + + ::google::protobuf::uint8* ChannelState::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.ChannelState) + // optional uint32 channel_id = 1; + if (has_channel_id()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, + this->channel_id(), target); + } + + // optional uint32 parent = 2; + if (has_parent()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, + this->parent(), target); + } + + // optional string name = 3; + if (has_name()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->name(), target); + } + + // repeated uint32 links = 4; + for (int i = 0; i < this->links_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteUInt32ToArray(4, this->links(i), target); + } + + // optional string description = 5; + if (has_description()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->description().data(), this->description().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "description"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 5, this->description(), target); + } + + // repeated uint32 links_add = 6; + for (int i = 0; i < this->links_add_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteUInt32ToArray(6, this->links_add(i), target); + } + + // repeated uint32 links_remove = 7; + for (int i = 0; i < this->links_remove_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteUInt32ToArray(7, this->links_remove(i), target); + } + + // optional bool temporary = 8 [default = false]; + if (has_temporary()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(8, + this->temporary(), target); + } + + // optional int32 position = 9 [default = 0]; + if (has_position()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(9, + this->position(), target); + } + + // optional bytes description_hash = 10; + if (has_description_hash()) + { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 10, this->description_hash(), target); + } + + // optional uint32 max_users = 11; + if (has_max_users()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(11, + this->max_users(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.ChannelState) + return target; + } + + int ChannelState::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // optional uint32 channel_id = 1; + if (has_channel_id()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->channel_id()); + } + + // optional uint32 parent = 2; + if (has_parent()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->parent()); + } + + // optional string name = 3; + if (has_name()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // optional string description = 5; + if (has_description()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->description()); + } + + // optional bool temporary = 8 [default = false]; + if (has_temporary()) + { + total_size += 1 + 1; + } + + } + if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) + { + // optional int32 position = 9 [default = 0]; + if (has_position()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->position()); + } + + // optional bytes description_hash = 10; + if (has_description_hash()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->description_hash()); + } + + // optional uint32 max_users = 11; + if (has_max_users()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->max_users()); + } + + } + // repeated uint32 links = 4; + { + int data_size = 0; + for (int i = 0; i < this->links_size(); i++) + { + data_size += ::google::protobuf::internal::WireFormatLite:: + UInt32Size(this->links(i)); + } + total_size += 1 * this->links_size() + data_size; + } + + // repeated uint32 links_add = 6; + { + int data_size = 0; + for (int i = 0; i < this->links_add_size(); i++) + { + data_size += ::google::protobuf::internal::WireFormatLite:: + UInt32Size(this->links_add(i)); + } + total_size += 1 * this->links_add_size() + data_size; + } + + // repeated uint32 links_remove = 7; + { + int data_size = 0; + for (int i = 0; i < this->links_remove_size(); i++) + { + data_size += ::google::protobuf::internal::WireFormatLite:: + UInt32Size(this->links_remove(i)); + } + total_size += 1 * this->links_remove_size() + data_size; + } + + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void ChannelState::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const ChannelState* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void ChannelState::MergeFrom(const ChannelState& from) + { + GOOGLE_CHECK_NE(&from, this); + links_.MergeFrom(from.links_); + links_add_.MergeFrom(from.links_add_); + links_remove_.MergeFrom(from.links_remove_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_channel_id()) + { + set_channel_id(from.channel_id()); + } + if (from.has_parent()) + { + set_parent(from.parent()); + } + if (from.has_name()) + { + set_name(from.name()); + } + if (from.has_description()) + { + set_description(from.description()); + } + if (from.has_temporary()) + { + set_temporary(from.temporary()); + } + } + if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) + { + if (from.has_position()) + { + set_position(from.position()); + } + if (from.has_description_hash()) + { + set_description_hash(from.description_hash()); + } + if (from.has_max_users()) + { + set_max_users(from.max_users()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void ChannelState::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void ChannelState::CopyFrom(const ChannelState& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool ChannelState::IsInitialized() const + { + + return true; + } + + void ChannelState::Swap(ChannelState* other) + { + if (other != this) + { + std::swap(channel_id_, other->channel_id_); + std::swap(parent_, other->parent_); + std::swap(name_, other->name_); + links_.Swap(&other->links_); + std::swap(description_, other->description_); + links_add_.Swap(&other->links_add_); + links_remove_.Swap(&other->links_remove_); + std::swap(temporary_, other->temporary_); + std::swap(position_, other->position_); + std::swap(description_hash_, other->description_hash_); + std::swap(max_users_, other->max_users_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata ChannelState::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ChannelState_descriptor_; + metadata.reflection = ChannelState_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int UserRemove::kSessionFieldNumber; + const int UserRemove::kActorFieldNumber; + const int UserRemove::kReasonFieldNumber; + const int UserRemove::kBanFieldNumber; +#endif // !_MSC_VER + + UserRemove::UserRemove() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.UserRemove) + } + + void UserRemove::InitAsDefaultInstance() + { + } + + UserRemove::UserRemove(const UserRemove& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.UserRemove) + } + + void UserRemove::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + session_ = 0u; + actor_ = 0u; + reason_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ban_ = false; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + UserRemove::~UserRemove() + { + // @@protoc_insertion_point(destructor:MumbleProto.UserRemove) + SharedDtor(); + } + + void UserRemove::SharedDtor() + { + if (reason_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete reason_; + } + if (this != default_instance_) + { + } + } + + void UserRemove::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* UserRemove::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return UserRemove_descriptor_; + } + + const UserRemove& UserRemove::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + UserRemove* UserRemove::default_instance_ = NULL; + + UserRemove* UserRemove::New() const + { + return new UserRemove; + } + + void UserRemove::Clear() + { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + if (_has_bits_[0 / 32] & 15) + { + ZR_(session_, actor_); + if (has_reason()) + { + if (reason_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_->clear(); + } + } + ban_ = false; + } + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool UserRemove::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.UserRemove) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // required uint32 session = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &session_))); + set_has_session(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_actor; + break; + } + + // optional uint32 actor = 2; + case 2: + { + if (tag == 16) + { +parse_actor: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &actor_))); + set_has_actor(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_reason; + break; + } + + // optional string reason = 3; + case 3: + { + if (tag == 26) + { +parse_reason: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_reason())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->reason().data(), this->reason().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "reason"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(32)) goto parse_ban; + break; + } + + // optional bool ban = 4; + case 4: + { + if (tag == 32) + { +parse_ban: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &ban_))); + set_has_ban(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.UserRemove) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.UserRemove) + return false; +#undef DO_ + } + + void UserRemove::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.UserRemove) + // required uint32 session = 1; + if (has_session()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->session(), + output); + } + + // optional uint32 actor = 2; + if (has_actor()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->actor(), + output); + } + + // optional string reason = 3; + if (has_reason()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->reason().data(), this->reason().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "reason"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->reason(), output); + } + + // optional bool ban = 4; + if (has_ban()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->ban(), output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.UserRemove) + } + + ::google::protobuf::uint8* UserRemove::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.UserRemove) + // required uint32 session = 1; + if (has_session()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, + this->session(), target); + } + + // optional uint32 actor = 2; + if (has_actor()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, + this->actor(), target); + } + + // optional string reason = 3; + if (has_reason()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->reason().data(), this->reason().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "reason"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->reason(), target); + } + + // optional bool ban = 4; + if (has_ban()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, + this->ban(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.UserRemove) + return target; + } + + int UserRemove::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // required uint32 session = 1; + if (has_session()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->session()); + } + + // optional uint32 actor = 2; + if (has_actor()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->actor()); + } + + // optional string reason = 3; + if (has_reason()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->reason()); + } + + // optional bool ban = 4; + if (has_ban()) + { + total_size += 1 + 1; + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void UserRemove::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const UserRemove* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void UserRemove::MergeFrom(const UserRemove& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_session()) + { + set_session(from.session()); + } + if (from.has_actor()) + { + set_actor(from.actor()); + } + if (from.has_reason()) + { + set_reason(from.reason()); + } + if (from.has_ban()) + { + set_ban(from.ban()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void UserRemove::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void UserRemove::CopyFrom(const UserRemove& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool UserRemove::IsInitialized() const + { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; + } + + void UserRemove::Swap(UserRemove* other) + { + if (other != this) + { + std::swap(session_, other->session_); + std::swap(actor_, other->actor_); + std::swap(reason_, other->reason_); + std::swap(ban_, other->ban_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata UserRemove::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = UserRemove_descriptor_; + metadata.reflection = UserRemove_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int UserState::kSessionFieldNumber; + const int UserState::kActorFieldNumber; + const int UserState::kNameFieldNumber; + const int UserState::kUserIdFieldNumber; + const int UserState::kChannelIdFieldNumber; + const int UserState::kMuteFieldNumber; + const int UserState::kDeafFieldNumber; + const int UserState::kSuppressFieldNumber; + const int UserState::kSelfMuteFieldNumber; + const int UserState::kSelfDeafFieldNumber; + const int UserState::kTextureFieldNumber; + const int UserState::kPluginContextFieldNumber; + const int UserState::kPluginIdentityFieldNumber; + const int UserState::kCommentFieldNumber; + const int UserState::kHashFieldNumber; + const int UserState::kCommentHashFieldNumber; + const int UserState::kTextureHashFieldNumber; + const int UserState::kPrioritySpeakerFieldNumber; + const int UserState::kRecordingFieldNumber; +#endif // !_MSC_VER + + UserState::UserState() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.UserState) + } + + void UserState::InitAsDefaultInstance() + { + } + + UserState::UserState(const UserState& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.UserState) + } + + void UserState::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + session_ = 0u; + actor_ = 0u; + name_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + user_id_ = 0u; + channel_id_ = 0u; + mute_ = false; + deaf_ = false; + suppress_ = false; + self_mute_ = false; + self_deaf_ = false; + texture_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + plugin_context_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + plugin_identity_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + comment_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + hash_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + comment_hash_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + texture_hash_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + priority_speaker_ = false; + recording_ = false; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + UserState::~UserState() + { + // @@protoc_insertion_point(destructor:MumbleProto.UserState) + SharedDtor(); + } + + void UserState::SharedDtor() + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete name_; + } + if (texture_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete texture_; + } + if (plugin_context_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete plugin_context_; + } + if (plugin_identity_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete plugin_identity_; + } + if (comment_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete comment_; + } + if (hash_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete hash_; + } + if (comment_hash_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete comment_hash_; + } + if (texture_hash_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete texture_hash_; + } + if (this != default_instance_) + { + } + } + + void UserState::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* UserState::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return UserState_descriptor_; + } + + const UserState& UserState::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + UserState* UserState::default_instance_ = NULL; + + UserState* UserState::New() const + { + return new UserState; + } + + void UserState::Clear() + { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + if (_has_bits_[0 / 32] & 255) + { + ZR_(session_, actor_); + ZR_(user_id_, channel_id_); + ZR_(mute_, suppress_); + if (has_name()) + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_->clear(); + } + } + } + if (_has_bits_[8 / 32] & 65280) + { + ZR_(self_mute_, self_deaf_); + if (has_texture()) + { + if (texture_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + texture_->clear(); + } + } + if (has_plugin_context()) + { + if (plugin_context_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + plugin_context_->clear(); + } + } + if (has_plugin_identity()) + { + if (plugin_identity_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + plugin_identity_->clear(); + } + } + if (has_comment()) + { + if (comment_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + comment_->clear(); + } + } + if (has_hash()) + { + if (hash_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + hash_->clear(); + } + } + if (has_comment_hash()) + { + if (comment_hash_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + comment_hash_->clear(); + } + } + } + if (_has_bits_[16 / 32] & 458752) + { + ZR_(priority_speaker_, recording_); + if (has_texture_hash()) + { + if (texture_hash_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + texture_hash_->clear(); + } + } + } + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool UserState::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.UserState) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 16383); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // optional uint32 session = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &session_))); + set_has_session(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_actor; + break; + } + + // optional uint32 actor = 2; + case 2: + { + if (tag == 16) + { +parse_actor: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &actor_))); + set_has_actor(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_name; + break; + } + + // optional string name = 3; + case 3: + { + if (tag == 26) + { +parse_name: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "name"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(32)) goto parse_user_id; + break; + } + + // optional uint32 user_id = 4; + case 4: + { + if (tag == 32) + { +parse_user_id: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &user_id_))); + set_has_user_id(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(40)) goto parse_channel_id; + break; + } + + // optional uint32 channel_id = 5; + case 5: + { + if (tag == 40) + { +parse_channel_id: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &channel_id_))); + set_has_channel_id(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(48)) goto parse_mute; + break; + } + + // optional bool mute = 6; + case 6: + { + if (tag == 48) + { +parse_mute: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &mute_))); + set_has_mute(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(56)) goto parse_deaf; + break; + } + + // optional bool deaf = 7; + case 7: + { + if (tag == 56) + { +parse_deaf: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &deaf_))); + set_has_deaf(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(64)) goto parse_suppress; + break; + } + + // optional bool suppress = 8; + case 8: + { + if (tag == 64) + { +parse_suppress: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &suppress_))); + set_has_suppress(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(72)) goto parse_self_mute; + break; + } + + // optional bool self_mute = 9; + case 9: + { + if (tag == 72) + { +parse_self_mute: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &self_mute_))); + set_has_self_mute(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(80)) goto parse_self_deaf; + break; + } + + // optional bool self_deaf = 10; + case 10: + { + if (tag == 80) + { +parse_self_deaf: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &self_deaf_))); + set_has_self_deaf(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(90)) goto parse_texture; + break; + } + + // optional bytes texture = 11; + case 11: + { + if (tag == 90) + { +parse_texture: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_texture())); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(98)) goto parse_plugin_context; + break; + } + + // optional bytes plugin_context = 12; + case 12: + { + if (tag == 98) + { +parse_plugin_context: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_plugin_context())); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(106)) goto parse_plugin_identity; + break; + } + + // optional string plugin_identity = 13; + case 13: + { + if (tag == 106) + { +parse_plugin_identity: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_plugin_identity())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->plugin_identity().data(), this->plugin_identity().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "plugin_identity"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(114)) goto parse_comment; + break; + } + + // optional string comment = 14; + case 14: + { + if (tag == 114) + { +parse_comment: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_comment())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->comment().data(), this->comment().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "comment"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(122)) goto parse_hash; + break; + } + + // optional string hash = 15; + case 15: + { + if (tag == 122) + { +parse_hash: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_hash())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->hash().data(), this->hash().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "hash"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(130)) goto parse_comment_hash; + break; + } + + // optional bytes comment_hash = 16; + case 16: + { + if (tag == 130) + { +parse_comment_hash: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_comment_hash())); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(138)) goto parse_texture_hash; + break; + } + + // optional bytes texture_hash = 17; + case 17: + { + if (tag == 138) + { +parse_texture_hash: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_texture_hash())); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(144)) goto parse_priority_speaker; + break; + } + + // optional bool priority_speaker = 18; + case 18: + { + if (tag == 144) + { +parse_priority_speaker: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &priority_speaker_))); + set_has_priority_speaker(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(152)) goto parse_recording; + break; + } + + // optional bool recording = 19; + case 19: + { + if (tag == 152) + { +parse_recording: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &recording_))); + set_has_recording(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.UserState) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.UserState) + return false; +#undef DO_ + } + + void UserState::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.UserState) + // optional uint32 session = 1; + if (has_session()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->session(), + output); + } + + // optional uint32 actor = 2; + if (has_actor()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->actor(), + output); + } + + // optional string name = 3; + if (has_name()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->name(), output); + } + + // optional uint32 user_id = 4; + if (has_user_id()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->user_id(), + output); + } + + // optional uint32 channel_id = 5; + if (has_channel_id()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->channel_id(), + output); + } + + // optional bool mute = 6; + if (has_mute()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->mute(), + output); + } + + // optional bool deaf = 7; + if (has_deaf()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->deaf(), + output); + } + + // optional bool suppress = 8; + if (has_suppress()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(8, this->suppress(), + output); + } + + // optional bool self_mute = 9; + if (has_self_mute()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(9, this->self_mute(), + output); + } + + // optional bool self_deaf = 10; + if (has_self_deaf()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(10, this->self_deaf(), + output); + } + + // optional bytes texture = 11; + if (has_texture()) + { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 11, this->texture(), output); + } + + // optional bytes plugin_context = 12; + if (has_plugin_context()) + { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 12, this->plugin_context(), output); + } + + // optional string plugin_identity = 13; + if (has_plugin_identity()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->plugin_identity().data(), this->plugin_identity().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "plugin_identity"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 13, this->plugin_identity(), output); + } + + // optional string comment = 14; + if (has_comment()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->comment().data(), this->comment().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "comment"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 14, this->comment(), output); + } + + // optional string hash = 15; + if (has_hash()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->hash().data(), this->hash().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "hash"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 15, this->hash(), output); + } + + // optional bytes comment_hash = 16; + if (has_comment_hash()) + { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 16, this->comment_hash(), output); + } + + // optional bytes texture_hash = 17; + if (has_texture_hash()) + { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 17, this->texture_hash(), output); + } + + // optional bool priority_speaker = 18; + if (has_priority_speaker()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(18, + this->priority_speaker(), output); + } + + // optional bool recording = 19; + if (has_recording()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(19, this->recording(), + output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.UserState) + } + + ::google::protobuf::uint8* UserState::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.UserState) + // optional uint32 session = 1; + if (has_session()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, + this->session(), target); + } + + // optional uint32 actor = 2; + if (has_actor()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, + this->actor(), target); + } + + // optional string name = 3; + if (has_name()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->name(), target); + } + + // optional uint32 user_id = 4; + if (has_user_id()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, + this->user_id(), target); + } + + // optional uint32 channel_id = 5; + if (has_channel_id()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, + this->channel_id(), target); + } + + // optional bool mute = 6; + if (has_mute()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, + this->mute(), target); + } + + // optional bool deaf = 7; + if (has_deaf()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, + this->deaf(), target); + } + + // optional bool suppress = 8; + if (has_suppress()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(8, + this->suppress(), target); + } + + // optional bool self_mute = 9; + if (has_self_mute()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(9, + this->self_mute(), target); + } + + // optional bool self_deaf = 10; + if (has_self_deaf()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(10, + this->self_deaf(), target); + } + + // optional bytes texture = 11; + if (has_texture()) + { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 11, this->texture(), target); + } + + // optional bytes plugin_context = 12; + if (has_plugin_context()) + { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 12, this->plugin_context(), target); + } + + // optional string plugin_identity = 13; + if (has_plugin_identity()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->plugin_identity().data(), this->plugin_identity().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "plugin_identity"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 13, this->plugin_identity(), target); + } + + // optional string comment = 14; + if (has_comment()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->comment().data(), this->comment().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "comment"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 14, this->comment(), target); + } + + // optional string hash = 15; + if (has_hash()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->hash().data(), this->hash().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "hash"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 15, this->hash(), target); + } + + // optional bytes comment_hash = 16; + if (has_comment_hash()) + { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 16, this->comment_hash(), target); + } + + // optional bytes texture_hash = 17; + if (has_texture_hash()) + { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 17, this->texture_hash(), target); + } + + // optional bool priority_speaker = 18; + if (has_priority_speaker()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(18, + this->priority_speaker(), target); + } + + // optional bool recording = 19; + if (has_recording()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(19, + this->recording(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.UserState) + return target; + } + + int UserState::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // optional uint32 session = 1; + if (has_session()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->session()); + } + + // optional uint32 actor = 2; + if (has_actor()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->actor()); + } + + // optional string name = 3; + if (has_name()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // optional uint32 user_id = 4; + if (has_user_id()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->user_id()); + } + + // optional uint32 channel_id = 5; + if (has_channel_id()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->channel_id()); + } + + // optional bool mute = 6; + if (has_mute()) + { + total_size += 1 + 1; + } + + // optional bool deaf = 7; + if (has_deaf()) + { + total_size += 1 + 1; + } + + // optional bool suppress = 8; + if (has_suppress()) + { + total_size += 1 + 1; + } + + } + if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) + { + // optional bool self_mute = 9; + if (has_self_mute()) + { + total_size += 1 + 1; + } + + // optional bool self_deaf = 10; + if (has_self_deaf()) + { + total_size += 1 + 1; + } + + // optional bytes texture = 11; + if (has_texture()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->texture()); + } + + // optional bytes plugin_context = 12; + if (has_plugin_context()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->plugin_context()); + } + + // optional string plugin_identity = 13; + if (has_plugin_identity()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->plugin_identity()); + } + + // optional string comment = 14; + if (has_comment()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->comment()); + } + + // optional string hash = 15; + if (has_hash()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->hash()); + } + + // optional bytes comment_hash = 16; + if (has_comment_hash()) + { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->comment_hash()); + } + + } + if (_has_bits_[16 / 32] & (0xffu << (16 % 32))) + { + // optional bytes texture_hash = 17; + if (has_texture_hash()) + { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->texture_hash()); + } + + // optional bool priority_speaker = 18; + if (has_priority_speaker()) + { + total_size += 2 + 1; + } + + // optional bool recording = 19; + if (has_recording()) + { + total_size += 2 + 1; + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void UserState::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const UserState* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void UserState::MergeFrom(const UserState& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_session()) + { + set_session(from.session()); + } + if (from.has_actor()) + { + set_actor(from.actor()); + } + if (from.has_name()) + { + set_name(from.name()); + } + if (from.has_user_id()) + { + set_user_id(from.user_id()); + } + if (from.has_channel_id()) + { + set_channel_id(from.channel_id()); + } + if (from.has_mute()) + { + set_mute(from.mute()); + } + if (from.has_deaf()) + { + set_deaf(from.deaf()); + } + if (from.has_suppress()) + { + set_suppress(from.suppress()); + } + } + if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) + { + if (from.has_self_mute()) + { + set_self_mute(from.self_mute()); + } + if (from.has_self_deaf()) + { + set_self_deaf(from.self_deaf()); + } + if (from.has_texture()) + { + set_texture(from.texture()); + } + if (from.has_plugin_context()) + { + set_plugin_context(from.plugin_context()); + } + if (from.has_plugin_identity()) + { + set_plugin_identity(from.plugin_identity()); + } + if (from.has_comment()) + { + set_comment(from.comment()); + } + if (from.has_hash()) + { + set_hash(from.hash()); + } + if (from.has_comment_hash()) + { + set_comment_hash(from.comment_hash()); + } + } + if (from._has_bits_[16 / 32] & (0xffu << (16 % 32))) + { + if (from.has_texture_hash()) + { + set_texture_hash(from.texture_hash()); + } + if (from.has_priority_speaker()) + { + set_priority_speaker(from.priority_speaker()); + } + if (from.has_recording()) + { + set_recording(from.recording()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void UserState::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void UserState::CopyFrom(const UserState& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool UserState::IsInitialized() const + { + + return true; + } + + void UserState::Swap(UserState* other) + { + if (other != this) + { + std::swap(session_, other->session_); + std::swap(actor_, other->actor_); + std::swap(name_, other->name_); + std::swap(user_id_, other->user_id_); + std::swap(channel_id_, other->channel_id_); + std::swap(mute_, other->mute_); + std::swap(deaf_, other->deaf_); + std::swap(suppress_, other->suppress_); + std::swap(self_mute_, other->self_mute_); + std::swap(self_deaf_, other->self_deaf_); + std::swap(texture_, other->texture_); + std::swap(plugin_context_, other->plugin_context_); + std::swap(plugin_identity_, other->plugin_identity_); + std::swap(comment_, other->comment_); + std::swap(hash_, other->hash_); + std::swap(comment_hash_, other->comment_hash_); + std::swap(texture_hash_, other->texture_hash_); + std::swap(priority_speaker_, other->priority_speaker_); + std::swap(recording_, other->recording_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata UserState::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = UserState_descriptor_; + metadata.reflection = UserState_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int BanList_BanEntry::kAddressFieldNumber; + const int BanList_BanEntry::kMaskFieldNumber; + const int BanList_BanEntry::kNameFieldNumber; + const int BanList_BanEntry::kHashFieldNumber; + const int BanList_BanEntry::kReasonFieldNumber; + const int BanList_BanEntry::kStartFieldNumber; + const int BanList_BanEntry::kDurationFieldNumber; +#endif // !_MSC_VER + + BanList_BanEntry::BanList_BanEntry() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.BanList.BanEntry) + } + + void BanList_BanEntry::InitAsDefaultInstance() + { + } + + BanList_BanEntry::BanList_BanEntry(const BanList_BanEntry& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.BanList.BanEntry) + } + + void BanList_BanEntry::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + address_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + mask_ = 0u; + name_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + hash_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + reason_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + start_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + duration_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + BanList_BanEntry::~BanList_BanEntry() + { + // @@protoc_insertion_point(destructor:MumbleProto.BanList.BanEntry) + SharedDtor(); + } + + void BanList_BanEntry::SharedDtor() + { + if (address_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete address_; + } + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete name_; + } + if (hash_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete hash_; + } + if (reason_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete reason_; + } + if (start_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete start_; + } + if (this != default_instance_) + { + } + } + + void BanList_BanEntry::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* BanList_BanEntry::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return BanList_BanEntry_descriptor_; + } + + const BanList_BanEntry& BanList_BanEntry::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + BanList_BanEntry* BanList_BanEntry::default_instance_ = NULL; + + BanList_BanEntry* BanList_BanEntry::New() const + { + return new BanList_BanEntry; + } + + void BanList_BanEntry::Clear() + { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + if (_has_bits_[0 / 32] & 127) + { + ZR_(mask_, duration_); + if (has_address()) + { + if (address_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + address_->clear(); + } + } + if (has_name()) + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_->clear(); + } + } + if (has_hash()) + { + if (hash_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + hash_->clear(); + } + } + if (has_reason()) + { + if (reason_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_->clear(); + } + } + if (has_start()) + { + if (start_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + start_->clear(); + } + } + } + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool BanList_BanEntry::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.BanList.BanEntry) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // required bytes address = 1; + case 1: + { + if (tag == 10) + { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_address())); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_mask; + break; + } + + // required uint32 mask = 2; + case 2: + { + if (tag == 16) + { +parse_mask: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &mask_))); + set_has_mask(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_name; + break; + } + + // optional string name = 3; + case 3: + { + if (tag == 26) + { +parse_name: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "name"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_hash; + break; + } + + // optional string hash = 4; + case 4: + { + if (tag == 34) + { +parse_hash: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_hash())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->hash().data(), this->hash().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "hash"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(42)) goto parse_reason; + break; + } + + // optional string reason = 5; + case 5: + { + if (tag == 42) + { +parse_reason: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_reason())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->reason().data(), this->reason().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "reason"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(50)) goto parse_start; + break; + } + + // optional string start = 6; + case 6: + { + if (tag == 50) + { +parse_start: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_start())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->start().data(), this->start().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "start"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(56)) goto parse_duration; + break; + } + + // optional uint32 duration = 7; + case 7: + { + if (tag == 56) + { +parse_duration: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &duration_))); + set_has_duration(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.BanList.BanEntry) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.BanList.BanEntry) + return false; +#undef DO_ + } + + void BanList_BanEntry::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.BanList.BanEntry) + // required bytes address = 1; + if (has_address()) + { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 1, this->address(), output); + } + + // required uint32 mask = 2; + if (has_mask()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->mask(), + output); + } + + // optional string name = 3; + if (has_name()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->name(), output); + } + + // optional string hash = 4; + if (has_hash()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->hash().data(), this->hash().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "hash"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->hash(), output); + } + + // optional string reason = 5; + if (has_reason()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->reason().data(), this->reason().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "reason"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 5, this->reason(), output); + } + + // optional string start = 6; + if (has_start()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->start().data(), this->start().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "start"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 6, this->start(), output); + } + + // optional uint32 duration = 7; + if (has_duration()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(7, this->duration(), + output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.BanList.BanEntry) + } + + ::google::protobuf::uint8* BanList_BanEntry::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.BanList.BanEntry) + // required bytes address = 1; + if (has_address()) + { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 1, this->address(), target); + } + + // required uint32 mask = 2; + if (has_mask()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, + this->mask(), target); + } + + // optional string name = 3; + if (has_name()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->name(), target); + } + + // optional string hash = 4; + if (has_hash()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->hash().data(), this->hash().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "hash"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->hash(), target); + } + + // optional string reason = 5; + if (has_reason()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->reason().data(), this->reason().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "reason"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 5, this->reason(), target); + } + + // optional string start = 6; + if (has_start()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->start().data(), this->start().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "start"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 6, this->start(), target); + } + + // optional uint32 duration = 7; + if (has_duration()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(7, + this->duration(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.BanList.BanEntry) + return target; + } + + int BanList_BanEntry::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // required bytes address = 1; + if (has_address()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->address()); + } + + // required uint32 mask = 2; + if (has_mask()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->mask()); + } + + // optional string name = 3; + if (has_name()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // optional string hash = 4; + if (has_hash()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->hash()); + } + + // optional string reason = 5; + if (has_reason()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->reason()); + } + + // optional string start = 6; + if (has_start()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->start()); + } + + // optional uint32 duration = 7; + if (has_duration()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->duration()); + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void BanList_BanEntry::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const BanList_BanEntry* source = + ::google::protobuf::internal::dynamic_cast_if_available + ( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void BanList_BanEntry::MergeFrom(const BanList_BanEntry& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_address()) + { + set_address(from.address()); + } + if (from.has_mask()) + { + set_mask(from.mask()); + } + if (from.has_name()) + { + set_name(from.name()); + } + if (from.has_hash()) + { + set_hash(from.hash()); + } + if (from.has_reason()) + { + set_reason(from.reason()); + } + if (from.has_start()) + { + set_start(from.start()); + } + if (from.has_duration()) + { + set_duration(from.duration()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void BanList_BanEntry::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void BanList_BanEntry::CopyFrom(const BanList_BanEntry& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool BanList_BanEntry::IsInitialized() const + { + if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; + + return true; + } + + void BanList_BanEntry::Swap(BanList_BanEntry* other) + { + if (other != this) + { + std::swap(address_, other->address_); + std::swap(mask_, other->mask_); + std::swap(name_, other->name_); + std::swap(hash_, other->hash_); + std::swap(reason_, other->reason_); + std::swap(start_, other->start_); + std::swap(duration_, other->duration_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata BanList_BanEntry::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = BanList_BanEntry_descriptor_; + metadata.reflection = BanList_BanEntry_reflection_; + return metadata; + } + + +// ------------------------------------------------------------------- + +#ifndef _MSC_VER + const int BanList::kBansFieldNumber; + const int BanList::kQueryFieldNumber; +#endif // !_MSC_VER + + BanList::BanList() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.BanList) + } + + void BanList::InitAsDefaultInstance() + { + } + + BanList::BanList(const BanList& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.BanList) + } + + void BanList::SharedCtor() + { + _cached_size_ = 0; + query_ = false; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + BanList::~BanList() + { + // @@protoc_insertion_point(destructor:MumbleProto.BanList) + SharedDtor(); + } + + void BanList::SharedDtor() + { + if (this != default_instance_) + { + } + } + + void BanList::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* BanList::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return BanList_descriptor_; + } + + const BanList& BanList::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + BanList* BanList::default_instance_ = NULL; + + BanList* BanList::New() const + { + return new BanList; + } + + void BanList::Clear() + { + query_ = false; + bans_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool BanList::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.BanList) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // repeated .MumbleProto.BanList.BanEntry bans = 1; + case 1: + { + if (tag == 10) + { +parse_bans: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_bans())); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(10)) goto parse_bans; + if (input->ExpectTag(16)) goto parse_query; + break; + } + + // optional bool query = 2 [default = false]; + case 2: + { + if (tag == 16) + { +parse_query: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &query_))); + set_has_query(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.BanList) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.BanList) + return false; +#undef DO_ + } + + void BanList::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.BanList) + // repeated .MumbleProto.BanList.BanEntry bans = 1; + for (int i = 0; i < this->bans_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->bans(i), output); + } + + // optional bool query = 2 [default = false]; + if (has_query()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->query(), + output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.BanList) + } + + ::google::protobuf::uint8* BanList::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.BanList) + // repeated .MumbleProto.BanList.BanEntry bans = 1; + for (int i = 0; i < this->bans_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->bans(i), target); + } + + // optional bool query = 2 [default = false]; + if (has_query()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, + this->query(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.BanList) + return target; + } + + int BanList::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) + { + // optional bool query = 2 [default = false]; + if (has_query()) + { + total_size += 1 + 1; + } + + } + // repeated .MumbleProto.BanList.BanEntry bans = 1; + total_size += 1 * this->bans_size(); + for (int i = 0; i < this->bans_size(); i++) + { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->bans(i)); + } + + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void BanList::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const BanList* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void BanList::MergeFrom(const BanList& from) + { + GOOGLE_CHECK_NE(&from, this); + bans_.MergeFrom(from.bans_); + if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) + { + if (from.has_query()) + { + set_query(from.query()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void BanList::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void BanList::CopyFrom(const BanList& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool BanList::IsInitialized() const + { + + if (!::google::protobuf::internal::AllAreInitialized(this->bans())) return + false; + return true; + } + + void BanList::Swap(BanList* other) + { + if (other != this) + { + bans_.Swap(&other->bans_); + std::swap(query_, other->query_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata BanList::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = BanList_descriptor_; + metadata.reflection = BanList_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int TextMessage::kActorFieldNumber; + const int TextMessage::kSessionFieldNumber; + const int TextMessage::kChannelIdFieldNumber; + const int TextMessage::kTreeIdFieldNumber; + const int TextMessage::kMessageFieldNumber; +#endif // !_MSC_VER + + TextMessage::TextMessage() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.TextMessage) + } + + void TextMessage::InitAsDefaultInstance() + { + } + + TextMessage::TextMessage(const TextMessage& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.TextMessage) + } + + void TextMessage::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + actor_ = 0u; + message_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + TextMessage::~TextMessage() + { + // @@protoc_insertion_point(destructor:MumbleProto.TextMessage) + SharedDtor(); + } + + void TextMessage::SharedDtor() + { + if (message_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete message_; + } + if (this != default_instance_) + { + } + } + + void TextMessage::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* TextMessage::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return TextMessage_descriptor_; + } + + const TextMessage& TextMessage::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + TextMessage* TextMessage::default_instance_ = NULL; + + TextMessage* TextMessage::New() const + { + return new TextMessage; + } + + void TextMessage::Clear() + { + if (_has_bits_[0 / 32] & 17) + { + actor_ = 0u; + if (has_message()) + { + if (message_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + message_->clear(); + } + } + } + session_.Clear(); + channel_id_.Clear(); + tree_id_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool TextMessage::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.TextMessage) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // optional uint32 actor = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &actor_))); + set_has_actor(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_session; + break; + } + + // repeated uint32 session = 2; + case 2: + { + if (tag == 16) + { +parse_session: + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + 1, 16, input, this->mutable_session()))); + } + else if (tag == 18) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, this->mutable_session()))); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_session; + if (input->ExpectTag(24)) goto parse_channel_id; + break; + } + + // repeated uint32 channel_id = 3; + case 3: + { + if (tag == 24) + { +parse_channel_id: + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + 1, 24, input, this->mutable_channel_id()))); + } + else if (tag == 26) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, this->mutable_channel_id()))); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(24)) goto parse_channel_id; + if (input->ExpectTag(32)) goto parse_tree_id; + break; + } + + // repeated uint32 tree_id = 4; + case 4: + { + if (tag == 32) + { +parse_tree_id: + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + 1, 32, input, this->mutable_tree_id()))); + } + else if (tag == 34) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, this->mutable_tree_id()))); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(32)) goto parse_tree_id; + if (input->ExpectTag(42)) goto parse_message; + break; + } + + // required string message = 5; + case 5: + { + if (tag == 42) + { +parse_message: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_message())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->message().data(), this->message().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "message"); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.TextMessage) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.TextMessage) + return false; +#undef DO_ + } + + void TextMessage::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.TextMessage) + // optional uint32 actor = 1; + if (has_actor()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->actor(), + output); + } + + // repeated uint32 session = 2; + for (int i = 0; i < this->session_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32( + 2, this->session(i), output); + } + + // repeated uint32 channel_id = 3; + for (int i = 0; i < this->channel_id_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32( + 3, this->channel_id(i), output); + } + + // repeated uint32 tree_id = 4; + for (int i = 0; i < this->tree_id_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32( + 4, this->tree_id(i), output); + } + + // required string message = 5; + if (has_message()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->message().data(), this->message().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "message"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 5, this->message(), output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.TextMessage) + } + + ::google::protobuf::uint8* TextMessage::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.TextMessage) + // optional uint32 actor = 1; + if (has_actor()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, + this->actor(), target); + } + + // repeated uint32 session = 2; + for (int i = 0; i < this->session_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteUInt32ToArray(2, this->session(i), target); + } + + // repeated uint32 channel_id = 3; + for (int i = 0; i < this->channel_id_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteUInt32ToArray(3, this->channel_id(i), target); + } + + // repeated uint32 tree_id = 4; + for (int i = 0; i < this->tree_id_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteUInt32ToArray(4, this->tree_id(i), target); + } + + // required string message = 5; + if (has_message()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->message().data(), this->message().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "message"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 5, this->message(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.TextMessage) + return target; + } + + int TextMessage::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // optional uint32 actor = 1; + if (has_actor()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->actor()); + } + + // required string message = 5; + if (has_message()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->message()); + } + + } + // repeated uint32 session = 2; + { + int data_size = 0; + for (int i = 0; i < this->session_size(); i++) + { + data_size += ::google::protobuf::internal::WireFormatLite:: + UInt32Size(this->session(i)); + } + total_size += 1 * this->session_size() + data_size; + } + + // repeated uint32 channel_id = 3; + { + int data_size = 0; + for (int i = 0; i < this->channel_id_size(); i++) + { + data_size += ::google::protobuf::internal::WireFormatLite:: + UInt32Size(this->channel_id(i)); + } + total_size += 1 * this->channel_id_size() + data_size; + } + + // repeated uint32 tree_id = 4; + { + int data_size = 0; + for (int i = 0; i < this->tree_id_size(); i++) + { + data_size += ::google::protobuf::internal::WireFormatLite:: + UInt32Size(this->tree_id(i)); + } + total_size += 1 * this->tree_id_size() + data_size; + } + + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void TextMessage::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const TextMessage* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void TextMessage::MergeFrom(const TextMessage& from) + { + GOOGLE_CHECK_NE(&from, this); + session_.MergeFrom(from.session_); + channel_id_.MergeFrom(from.channel_id_); + tree_id_.MergeFrom(from.tree_id_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_actor()) + { + set_actor(from.actor()); + } + if (from.has_message()) + { + set_message(from.message()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void TextMessage::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void TextMessage::CopyFrom(const TextMessage& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool TextMessage::IsInitialized() const + { + if ((_has_bits_[0] & 0x00000010) != 0x00000010) return false; + + return true; + } + + void TextMessage::Swap(TextMessage* other) + { + if (other != this) + { + std::swap(actor_, other->actor_); + session_.Swap(&other->session_); + channel_id_.Swap(&other->channel_id_); + tree_id_.Swap(&other->tree_id_); + std::swap(message_, other->message_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata TextMessage::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = TextMessage_descriptor_; + metadata.reflection = TextMessage_reflection_; + return metadata; + } + + +// =================================================================== + + const ::google::protobuf::EnumDescriptor* + PermissionDenied_DenyType_descriptor() + { + protobuf_AssignDescriptorsOnce(); + return PermissionDenied_DenyType_descriptor_; + } + bool PermissionDenied_DenyType_IsValid(int value) + { + switch(value) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + return true; + default: + return false; + } + } + +#ifndef _MSC_VER + const PermissionDenied_DenyType PermissionDenied::Text; + const PermissionDenied_DenyType PermissionDenied::Permission; + const PermissionDenied_DenyType PermissionDenied::SuperUser; + const PermissionDenied_DenyType PermissionDenied::ChannelName; + const PermissionDenied_DenyType PermissionDenied::TextTooLong; + const PermissionDenied_DenyType PermissionDenied::H9K; + const PermissionDenied_DenyType PermissionDenied::TemporaryChannel; + const PermissionDenied_DenyType PermissionDenied::MissingCertificate; + const PermissionDenied_DenyType PermissionDenied::UserName; + const PermissionDenied_DenyType PermissionDenied::ChannelFull; + const PermissionDenied_DenyType PermissionDenied::NestingLimit; + const PermissionDenied_DenyType PermissionDenied::DenyType_MIN; + const PermissionDenied_DenyType PermissionDenied::DenyType_MAX; + const int PermissionDenied::DenyType_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER + const int PermissionDenied::kPermissionFieldNumber; + const int PermissionDenied::kChannelIdFieldNumber; + const int PermissionDenied::kSessionFieldNumber; + const int PermissionDenied::kReasonFieldNumber; + const int PermissionDenied::kTypeFieldNumber; + const int PermissionDenied::kNameFieldNumber; +#endif // !_MSC_VER + + PermissionDenied::PermissionDenied() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.PermissionDenied) + } + + void PermissionDenied::InitAsDefaultInstance() + { + } + + PermissionDenied::PermissionDenied(const PermissionDenied& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.PermissionDenied) + } + + void PermissionDenied::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + permission_ = 0u; + channel_id_ = 0u; + session_ = 0u; + reason_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + type_ = 0; + name_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + PermissionDenied::~PermissionDenied() + { + // @@protoc_insertion_point(destructor:MumbleProto.PermissionDenied) + SharedDtor(); + } + + void PermissionDenied::SharedDtor() + { + if (reason_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete reason_; + } + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete name_; + } + if (this != default_instance_) + { + } + } + + void PermissionDenied::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* PermissionDenied::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return PermissionDenied_descriptor_; + } + + const PermissionDenied& PermissionDenied::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + PermissionDenied* PermissionDenied::default_instance_ = NULL; + + PermissionDenied* PermissionDenied::New() const + { + return new PermissionDenied; + } + + void PermissionDenied::Clear() + { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + if (_has_bits_[0 / 32] & 63) + { + ZR_(permission_, channel_id_); + ZR_(session_, type_); + if (has_reason()) + { + if (reason_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_->clear(); + } + } + if (has_name()) + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_->clear(); + } + } + } + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool PermissionDenied::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.PermissionDenied) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // optional uint32 permission = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &permission_))); + set_has_permission(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_channel_id; + break; + } + + // optional uint32 channel_id = 2; + case 2: + { + if (tag == 16) + { +parse_channel_id: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &channel_id_))); + set_has_channel_id(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(24)) goto parse_session; + break; + } + + // optional uint32 session = 3; + case 3: + { + if (tag == 24) + { +parse_session: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &session_))); + set_has_session(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_reason; + break; + } + + // optional string reason = 4; + case 4: + { + if (tag == 34) + { +parse_reason: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_reason())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->reason().data(), this->reason().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "reason"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(40)) goto parse_type; + break; + } + + // optional .MumbleProto.PermissionDenied.DenyType type = 5; + case 5: + { + if (tag == 40) + { +parse_type: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::MumbleProto::PermissionDenied_DenyType_IsValid(value)) + { + set_type(static_cast< ::MumbleProto::PermissionDenied_DenyType >(value)); + } + else + { + mutable_unknown_fields()->AddVarint(5, value); + } + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(50)) goto parse_name; + break; + } + + // optional string name = 6; + case 6: + { + if (tag == 50) + { +parse_name: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "name"); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.PermissionDenied) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.PermissionDenied) + return false; +#undef DO_ + } + + void PermissionDenied::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.PermissionDenied) + // optional uint32 permission = 1; + if (has_permission()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->permission(), + output); + } + + // optional uint32 channel_id = 2; + if (has_channel_id()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->channel_id(), + output); + } + + // optional uint32 session = 3; + if (has_session()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->session(), + output); + } + + // optional string reason = 4; + if (has_reason()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->reason().data(), this->reason().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "reason"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->reason(), output); + } + + // optional .MumbleProto.PermissionDenied.DenyType type = 5; + if (has_type()) + { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 5, this->type(), output); + } + + // optional string name = 6; + if (has_name()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 6, this->name(), output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.PermissionDenied) + } + + ::google::protobuf::uint8* PermissionDenied::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.PermissionDenied) + // optional uint32 permission = 1; + if (has_permission()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, + this->permission(), target); + } + + // optional uint32 channel_id = 2; + if (has_channel_id()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, + this->channel_id(), target); + } + + // optional uint32 session = 3; + if (has_session()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, + this->session(), target); + } + + // optional string reason = 4; + if (has_reason()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->reason().data(), this->reason().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "reason"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->reason(), target); + } + + // optional .MumbleProto.PermissionDenied.DenyType type = 5; + if (has_type()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 5, this->type(), target); + } + + // optional string name = 6; + if (has_name()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 6, this->name(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.PermissionDenied) + return target; + } + + int PermissionDenied::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // optional uint32 permission = 1; + if (has_permission()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->permission()); + } + + // optional uint32 channel_id = 2; + if (has_channel_id()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->channel_id()); + } + + // optional uint32 session = 3; + if (has_session()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->session()); + } + + // optional string reason = 4; + if (has_reason()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->reason()); + } + + // optional .MumbleProto.PermissionDenied.DenyType type = 5; + if (has_type()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); + } + + // optional string name = 6; + if (has_name()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void PermissionDenied::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const PermissionDenied* source = + ::google::protobuf::internal::dynamic_cast_if_available + ( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void PermissionDenied::MergeFrom(const PermissionDenied& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_permission()) + { + set_permission(from.permission()); + } + if (from.has_channel_id()) + { + set_channel_id(from.channel_id()); + } + if (from.has_session()) + { + set_session(from.session()); + } + if (from.has_reason()) + { + set_reason(from.reason()); + } + if (from.has_type()) + { + set_type(from.type()); + } + if (from.has_name()) + { + set_name(from.name()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void PermissionDenied::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void PermissionDenied::CopyFrom(const PermissionDenied& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool PermissionDenied::IsInitialized() const + { + + return true; + } + + void PermissionDenied::Swap(PermissionDenied* other) + { + if (other != this) + { + std::swap(permission_, other->permission_); + std::swap(channel_id_, other->channel_id_); + std::swap(session_, other->session_); + std::swap(reason_, other->reason_); + std::swap(type_, other->type_); + std::swap(name_, other->name_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata PermissionDenied::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = PermissionDenied_descriptor_; + metadata.reflection = PermissionDenied_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int ACL_ChanGroup::kNameFieldNumber; + const int ACL_ChanGroup::kInheritedFieldNumber; + const int ACL_ChanGroup::kInheritFieldNumber; + const int ACL_ChanGroup::kInheritableFieldNumber; + const int ACL_ChanGroup::kAddFieldNumber; + const int ACL_ChanGroup::kRemoveFieldNumber; + const int ACL_ChanGroup::kInheritedMembersFieldNumber; +#endif // !_MSC_VER + + ACL_ChanGroup::ACL_ChanGroup() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.ACL.ChanGroup) + } + + void ACL_ChanGroup::InitAsDefaultInstance() + { + } + + ACL_ChanGroup::ACL_ChanGroup(const ACL_ChanGroup& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.ACL.ChanGroup) + } + + void ACL_ChanGroup::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + name_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + inherited_ = true; + inherit_ = true; + inheritable_ = true; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + ACL_ChanGroup::~ACL_ChanGroup() + { + // @@protoc_insertion_point(destructor:MumbleProto.ACL.ChanGroup) + SharedDtor(); + } + + void ACL_ChanGroup::SharedDtor() + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete name_; + } + if (this != default_instance_) + { + } + } + + void ACL_ChanGroup::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* ACL_ChanGroup::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return ACL_ChanGroup_descriptor_; + } + + const ACL_ChanGroup& ACL_ChanGroup::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + ACL_ChanGroup* ACL_ChanGroup::default_instance_ = NULL; + + ACL_ChanGroup* ACL_ChanGroup::New() const + { + return new ACL_ChanGroup; + } + + void ACL_ChanGroup::Clear() + { + if (_has_bits_[0 / 32] & 15) + { + if (has_name()) + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_->clear(); + } + } + inherited_ = true; + inherit_ = true; + inheritable_ = true; + } + add_.Clear(); + remove_.Clear(); + inherited_members_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool ACL_ChanGroup::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.ACL.ChanGroup) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // required string name = 1; + case 1: + { + if (tag == 10) + { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "name"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_inherited; + break; + } + + // optional bool inherited = 2 [default = true]; + case 2: + { + if (tag == 16) + { +parse_inherited: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &inherited_))); + set_has_inherited(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(24)) goto parse_inherit; + break; + } + + // optional bool inherit = 3 [default = true]; + case 3: + { + if (tag == 24) + { +parse_inherit: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &inherit_))); + set_has_inherit(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(32)) goto parse_inheritable; + break; + } + + // optional bool inheritable = 4 [default = true]; + case 4: + { + if (tag == 32) + { +parse_inheritable: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &inheritable_))); + set_has_inheritable(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(40)) goto parse_add; + break; + } + + // repeated uint32 add = 5; + case 5: + { + if (tag == 40) + { +parse_add: + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + 1, 40, input, this->mutable_add()))); + } + else if (tag == 42) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, this->mutable_add()))); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(40)) goto parse_add; + if (input->ExpectTag(48)) goto parse_remove; + break; + } + + // repeated uint32 remove = 6; + case 6: + { + if (tag == 48) + { +parse_remove: + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + 1, 48, input, this->mutable_remove()))); + } + else if (tag == 50) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, this->mutable_remove()))); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(48)) goto parse_remove; + if (input->ExpectTag(56)) goto parse_inherited_members; + break; + } + + // repeated uint32 inherited_members = 7; + case 7: + { + if (tag == 56) + { +parse_inherited_members: + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + 1, 56, input, this->mutable_inherited_members()))); + } + else if (tag == 58) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, this->mutable_inherited_members()))); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(56)) goto parse_inherited_members; + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.ACL.ChanGroup) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.ACL.ChanGroup) + return false; +#undef DO_ + } + + void ACL_ChanGroup::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.ACL.ChanGroup) + // required string name = 1; + if (has_name()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + // optional bool inherited = 2 [default = true]; + if (has_inherited()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->inherited(), + output); + } + + // optional bool inherit = 3 [default = true]; + if (has_inherit()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->inherit(), + output); + } + + // optional bool inheritable = 4 [default = true]; + if (has_inheritable()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->inheritable(), + output); + } + + // repeated uint32 add = 5; + for (int i = 0; i < this->add_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32( + 5, this->add(i), output); + } + + // repeated uint32 remove = 6; + for (int i = 0; i < this->remove_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32( + 6, this->remove(i), output); + } + + // repeated uint32 inherited_members = 7; + for (int i = 0; i < this->inherited_members_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32( + 7, this->inherited_members(i), output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.ACL.ChanGroup) + } + + ::google::protobuf::uint8* ACL_ChanGroup::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.ACL.ChanGroup) + // required string name = 1; + if (has_name()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // optional bool inherited = 2 [default = true]; + if (has_inherited()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, + this->inherited(), target); + } + + // optional bool inherit = 3 [default = true]; + if (has_inherit()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, + this->inherit(), target); + } + + // optional bool inheritable = 4 [default = true]; + if (has_inheritable()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, + this->inheritable(), target); + } + + // repeated uint32 add = 5; + for (int i = 0; i < this->add_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteUInt32ToArray(5, this->add(i), target); + } + + // repeated uint32 remove = 6; + for (int i = 0; i < this->remove_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteUInt32ToArray(6, this->remove(i), target); + } + + // repeated uint32 inherited_members = 7; + for (int i = 0; i < this->inherited_members_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteUInt32ToArray(7, this->inherited_members(i), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.ACL.ChanGroup) + return target; + } + + int ACL_ChanGroup::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // required string name = 1; + if (has_name()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // optional bool inherited = 2 [default = true]; + if (has_inherited()) + { + total_size += 1 + 1; + } + + // optional bool inherit = 3 [default = true]; + if (has_inherit()) + { + total_size += 1 + 1; + } + + // optional bool inheritable = 4 [default = true]; + if (has_inheritable()) + { + total_size += 1 + 1; + } + + } + // repeated uint32 add = 5; + { + int data_size = 0; + for (int i = 0; i < this->add_size(); i++) + { + data_size += ::google::protobuf::internal::WireFormatLite:: + UInt32Size(this->add(i)); + } + total_size += 1 * this->add_size() + data_size; + } + + // repeated uint32 remove = 6; + { + int data_size = 0; + for (int i = 0; i < this->remove_size(); i++) + { + data_size += ::google::protobuf::internal::WireFormatLite:: + UInt32Size(this->remove(i)); + } + total_size += 1 * this->remove_size() + data_size; + } + + // repeated uint32 inherited_members = 7; + { + int data_size = 0; + for (int i = 0; i < this->inherited_members_size(); i++) + { + data_size += ::google::protobuf::internal::WireFormatLite:: + UInt32Size(this->inherited_members(i)); + } + total_size += 1 * this->inherited_members_size() + data_size; + } + + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void ACL_ChanGroup::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const ACL_ChanGroup* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void ACL_ChanGroup::MergeFrom(const ACL_ChanGroup& from) + { + GOOGLE_CHECK_NE(&from, this); + add_.MergeFrom(from.add_); + remove_.MergeFrom(from.remove_); + inherited_members_.MergeFrom(from.inherited_members_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_name()) + { + set_name(from.name()); + } + if (from.has_inherited()) + { + set_inherited(from.inherited()); + } + if (from.has_inherit()) + { + set_inherit(from.inherit()); + } + if (from.has_inheritable()) + { + set_inheritable(from.inheritable()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void ACL_ChanGroup::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void ACL_ChanGroup::CopyFrom(const ACL_ChanGroup& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool ACL_ChanGroup::IsInitialized() const + { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; + } + + void ACL_ChanGroup::Swap(ACL_ChanGroup* other) + { + if (other != this) + { + std::swap(name_, other->name_); + std::swap(inherited_, other->inherited_); + std::swap(inherit_, other->inherit_); + std::swap(inheritable_, other->inheritable_); + add_.Swap(&other->add_); + remove_.Swap(&other->remove_); + inherited_members_.Swap(&other->inherited_members_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata ACL_ChanGroup::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ACL_ChanGroup_descriptor_; + metadata.reflection = ACL_ChanGroup_reflection_; + return metadata; + } + + +// ------------------------------------------------------------------- + +#ifndef _MSC_VER + const int ACL_ChanACL::kApplyHereFieldNumber; + const int ACL_ChanACL::kApplySubsFieldNumber; + const int ACL_ChanACL::kInheritedFieldNumber; + const int ACL_ChanACL::kUserIdFieldNumber; + const int ACL_ChanACL::kGroupFieldNumber; + const int ACL_ChanACL::kGrantFieldNumber; + const int ACL_ChanACL::kDenyFieldNumber; +#endif // !_MSC_VER + + ACL_ChanACL::ACL_ChanACL() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.ACL.ChanACL) + } + + void ACL_ChanACL::InitAsDefaultInstance() + { + } + + ACL_ChanACL::ACL_ChanACL(const ACL_ChanACL& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.ACL.ChanACL) + } + + void ACL_ChanACL::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + apply_here_ = true; + apply_subs_ = true; + inherited_ = true; + user_id_ = 0u; + group_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + grant_ = 0u; + deny_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + ACL_ChanACL::~ACL_ChanACL() + { + // @@protoc_insertion_point(destructor:MumbleProto.ACL.ChanACL) + SharedDtor(); + } + + void ACL_ChanACL::SharedDtor() + { + if (group_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete group_; + } + if (this != default_instance_) + { + } + } + + void ACL_ChanACL::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* ACL_ChanACL::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return ACL_ChanACL_descriptor_; + } + + const ACL_ChanACL& ACL_ChanACL::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + ACL_ChanACL* ACL_ChanACL::default_instance_ = NULL; + + ACL_ChanACL* ACL_ChanACL::New() const + { + return new ACL_ChanACL; + } + + void ACL_ChanACL::Clear() + { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + if (_has_bits_[0 / 32] & 127) + { + ZR_(grant_, deny_); + apply_here_ = true; + apply_subs_ = true; + inherited_ = true; + user_id_ = 0u; + if (has_group()) + { + if (group_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + group_->clear(); + } + } + } + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool ACL_ChanACL::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.ACL.ChanACL) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // optional bool apply_here = 1 [default = true]; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &apply_here_))); + set_has_apply_here(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_apply_subs; + break; + } + + // optional bool apply_subs = 2 [default = true]; + case 2: + { + if (tag == 16) + { +parse_apply_subs: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &apply_subs_))); + set_has_apply_subs(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(24)) goto parse_inherited; + break; + } + + // optional bool inherited = 3 [default = true]; + case 3: + { + if (tag == 24) + { +parse_inherited: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &inherited_))); + set_has_inherited(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(32)) goto parse_user_id; + break; + } + + // optional uint32 user_id = 4; + case 4: + { + if (tag == 32) + { +parse_user_id: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &user_id_))); + set_has_user_id(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(42)) goto parse_group; + break; + } + + // optional string group = 5; + case 5: + { + if (tag == 42) + { +parse_group: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_group())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->group().data(), this->group().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "group"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(48)) goto parse_grant; + break; + } + + // optional uint32 grant = 6; + case 6: + { + if (tag == 48) + { +parse_grant: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &grant_))); + set_has_grant(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(56)) goto parse_deny; + break; + } + + // optional uint32 deny = 7; + case 7: + { + if (tag == 56) + { +parse_deny: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &deny_))); + set_has_deny(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.ACL.ChanACL) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.ACL.ChanACL) + return false; +#undef DO_ + } + + void ACL_ChanACL::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.ACL.ChanACL) + // optional bool apply_here = 1 [default = true]; + if (has_apply_here()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->apply_here(), + output); + } + + // optional bool apply_subs = 2 [default = true]; + if (has_apply_subs()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->apply_subs(), + output); + } + + // optional bool inherited = 3 [default = true]; + if (has_inherited()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->inherited(), + output); + } + + // optional uint32 user_id = 4; + if (has_user_id()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->user_id(), + output); + } + + // optional string group = 5; + if (has_group()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->group().data(), this->group().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "group"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 5, this->group(), output); + } + + // optional uint32 grant = 6; + if (has_grant()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(6, this->grant(), + output); + } + + // optional uint32 deny = 7; + if (has_deny()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(7, this->deny(), + output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.ACL.ChanACL) + } + + ::google::protobuf::uint8* ACL_ChanACL::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.ACL.ChanACL) + // optional bool apply_here = 1 [default = true]; + if (has_apply_here()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, + this->apply_here(), target); + } + + // optional bool apply_subs = 2 [default = true]; + if (has_apply_subs()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, + this->apply_subs(), target); + } + + // optional bool inherited = 3 [default = true]; + if (has_inherited()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, + this->inherited(), target); + } + + // optional uint32 user_id = 4; + if (has_user_id()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, + this->user_id(), target); + } + + // optional string group = 5; + if (has_group()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->group().data(), this->group().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "group"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 5, this->group(), target); + } + + // optional uint32 grant = 6; + if (has_grant()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(6, + this->grant(), target); + } + + // optional uint32 deny = 7; + if (has_deny()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(7, + this->deny(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.ACL.ChanACL) + return target; + } + + int ACL_ChanACL::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // optional bool apply_here = 1 [default = true]; + if (has_apply_here()) + { + total_size += 1 + 1; + } + + // optional bool apply_subs = 2 [default = true]; + if (has_apply_subs()) + { + total_size += 1 + 1; + } + + // optional bool inherited = 3 [default = true]; + if (has_inherited()) + { + total_size += 1 + 1; + } + + // optional uint32 user_id = 4; + if (has_user_id()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->user_id()); + } + + // optional string group = 5; + if (has_group()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->group()); + } + + // optional uint32 grant = 6; + if (has_grant()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->grant()); + } + + // optional uint32 deny = 7; + if (has_deny()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->deny()); + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void ACL_ChanACL::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const ACL_ChanACL* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void ACL_ChanACL::MergeFrom(const ACL_ChanACL& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_apply_here()) + { + set_apply_here(from.apply_here()); + } + if (from.has_apply_subs()) + { + set_apply_subs(from.apply_subs()); + } + if (from.has_inherited()) + { + set_inherited(from.inherited()); + } + if (from.has_user_id()) + { + set_user_id(from.user_id()); + } + if (from.has_group()) + { + set_group(from.group()); + } + if (from.has_grant()) + { + set_grant(from.grant()); + } + if (from.has_deny()) + { + set_deny(from.deny()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void ACL_ChanACL::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void ACL_ChanACL::CopyFrom(const ACL_ChanACL& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool ACL_ChanACL::IsInitialized() const + { + + return true; + } + + void ACL_ChanACL::Swap(ACL_ChanACL* other) + { + if (other != this) + { + std::swap(apply_here_, other->apply_here_); + std::swap(apply_subs_, other->apply_subs_); + std::swap(inherited_, other->inherited_); + std::swap(user_id_, other->user_id_); + std::swap(group_, other->group_); + std::swap(grant_, other->grant_); + std::swap(deny_, other->deny_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata ACL_ChanACL::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ACL_ChanACL_descriptor_; + metadata.reflection = ACL_ChanACL_reflection_; + return metadata; + } + + +// ------------------------------------------------------------------- + +#ifndef _MSC_VER + const int ACL::kChannelIdFieldNumber; + const int ACL::kInheritAclsFieldNumber; + const int ACL::kGroupsFieldNumber; + const int ACL::kAclsFieldNumber; + const int ACL::kQueryFieldNumber; +#endif // !_MSC_VER + + ACL::ACL() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.ACL) + } + + void ACL::InitAsDefaultInstance() + { + } + + ACL::ACL(const ACL& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.ACL) + } + + void ACL::SharedCtor() + { + _cached_size_ = 0; + channel_id_ = 0u; + inherit_acls_ = true; + query_ = false; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + ACL::~ACL() + { + // @@protoc_insertion_point(destructor:MumbleProto.ACL) + SharedDtor(); + } + + void ACL::SharedDtor() + { + if (this != default_instance_) + { + } + } + + void ACL::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* ACL::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return ACL_descriptor_; + } + + const ACL& ACL::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + ACL* ACL::default_instance_ = NULL; + + ACL* ACL::New() const + { + return new ACL; + } + + void ACL::Clear() + { + if (_has_bits_[0 / 32] & 19) + { + channel_id_ = 0u; + inherit_acls_ = true; + query_ = false; + } + groups_.Clear(); + acls_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool ACL::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.ACL) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // required uint32 channel_id = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &channel_id_))); + set_has_channel_id(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_inherit_acls; + break; + } + + // optional bool inherit_acls = 2 [default = true]; + case 2: + { + if (tag == 16) + { +parse_inherit_acls: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &inherit_acls_))); + set_has_inherit_acls(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_groups; + break; + } + + // repeated .MumbleProto.ACL.ChanGroup groups = 3; + case 3: + { + if (tag == 26) + { +parse_groups: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_groups())); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_groups; + if (input->ExpectTag(34)) goto parse_acls; + break; + } + + // repeated .MumbleProto.ACL.ChanACL acls = 4; + case 4: + { + if (tag == 34) + { +parse_acls: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_acls())); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_acls; + if (input->ExpectTag(40)) goto parse_query; + break; + } + + // optional bool query = 5 [default = false]; + case 5: + { + if (tag == 40) + { +parse_query: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &query_))); + set_has_query(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.ACL) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.ACL) + return false; +#undef DO_ + } + + void ACL::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.ACL) + // required uint32 channel_id = 1; + if (has_channel_id()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->channel_id(), + output); + } + + // optional bool inherit_acls = 2 [default = true]; + if (has_inherit_acls()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->inherit_acls(), + output); + } + + // repeated .MumbleProto.ACL.ChanGroup groups = 3; + for (int i = 0; i < this->groups_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, this->groups(i), output); + } + + // repeated .MumbleProto.ACL.ChanACL acls = 4; + for (int i = 0; i < this->acls_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, this->acls(i), output); + } + + // optional bool query = 5 [default = false]; + if (has_query()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->query(), + output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.ACL) + } + + ::google::protobuf::uint8* ACL::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.ACL) + // required uint32 channel_id = 1; + if (has_channel_id()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, + this->channel_id(), target); + } + + // optional bool inherit_acls = 2 [default = true]; + if (has_inherit_acls()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, + this->inherit_acls(), target); + } + + // repeated .MumbleProto.ACL.ChanGroup groups = 3; + for (int i = 0; i < this->groups_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 3, this->groups(i), target); + } + + // repeated .MumbleProto.ACL.ChanACL acls = 4; + for (int i = 0; i < this->acls_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 4, this->acls(i), target); + } + + // optional bool query = 5 [default = false]; + if (has_query()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, + this->query(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.ACL) + return target; + } + + int ACL::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // required uint32 channel_id = 1; + if (has_channel_id()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->channel_id()); + } + + // optional bool inherit_acls = 2 [default = true]; + if (has_inherit_acls()) + { + total_size += 1 + 1; + } + + // optional bool query = 5 [default = false]; + if (has_query()) + { + total_size += 1 + 1; + } + + } + // repeated .MumbleProto.ACL.ChanGroup groups = 3; + total_size += 1 * this->groups_size(); + for (int i = 0; i < this->groups_size(); i++) + { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->groups(i)); + } + + // repeated .MumbleProto.ACL.ChanACL acls = 4; + total_size += 1 * this->acls_size(); + for (int i = 0; i < this->acls_size(); i++) + { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->acls(i)); + } + + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void ACL::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const ACL* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void ACL::MergeFrom(const ACL& from) + { + GOOGLE_CHECK_NE(&from, this); + groups_.MergeFrom(from.groups_); + acls_.MergeFrom(from.acls_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_channel_id()) + { + set_channel_id(from.channel_id()); + } + if (from.has_inherit_acls()) + { + set_inherit_acls(from.inherit_acls()); + } + if (from.has_query()) + { + set_query(from.query()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void ACL::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void ACL::CopyFrom(const ACL& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool ACL::IsInitialized() const + { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + if (!::google::protobuf::internal::AllAreInitialized(this->groups())) return + false; + return true; + } + + void ACL::Swap(ACL* other) + { + if (other != this) + { + std::swap(channel_id_, other->channel_id_); + std::swap(inherit_acls_, other->inherit_acls_); + groups_.Swap(&other->groups_); + acls_.Swap(&other->acls_); + std::swap(query_, other->query_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata ACL::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ACL_descriptor_; + metadata.reflection = ACL_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int QueryUsers::kIdsFieldNumber; + const int QueryUsers::kNamesFieldNumber; +#endif // !_MSC_VER + + QueryUsers::QueryUsers() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.QueryUsers) + } + + void QueryUsers::InitAsDefaultInstance() + { + } + + QueryUsers::QueryUsers(const QueryUsers& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.QueryUsers) + } + + void QueryUsers::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + QueryUsers::~QueryUsers() + { + // @@protoc_insertion_point(destructor:MumbleProto.QueryUsers) + SharedDtor(); + } + + void QueryUsers::SharedDtor() + { + if (this != default_instance_) + { + } + } + + void QueryUsers::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* QueryUsers::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return QueryUsers_descriptor_; + } + + const QueryUsers& QueryUsers::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + QueryUsers* QueryUsers::default_instance_ = NULL; + + QueryUsers* QueryUsers::New() const + { + return new QueryUsers; + } + + void QueryUsers::Clear() + { + ids_.Clear(); + names_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool QueryUsers::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.QueryUsers) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // repeated uint32 ids = 1; + case 1: + { + if (tag == 8) + { +parse_ids: + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + 1, 8, input, this->mutable_ids()))); + } + else if (tag == 10) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, this->mutable_ids()))); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(8)) goto parse_ids; + if (input->ExpectTag(18)) goto parse_names; + break; + } + + // repeated string names = 2; + case 2: + { + if (tag == 18) + { +parse_names: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_names())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->names(this->names_size() - 1).data(), + this->names(this->names_size() - 1).length(), + ::google::protobuf::internal::WireFormat::PARSE, + "names"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_names; + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.QueryUsers) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.QueryUsers) + return false; +#undef DO_ + } + + void QueryUsers::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.QueryUsers) + // repeated uint32 ids = 1; + for (int i = 0; i < this->ids_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32( + 1, this->ids(i), output); + } + + // repeated string names = 2; + for (int i = 0; i < this->names_size(); i++) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->names(i).data(), this->names(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "names"); + ::google::protobuf::internal::WireFormatLite::WriteString( + 2, this->names(i), output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.QueryUsers) + } + + ::google::protobuf::uint8* QueryUsers::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.QueryUsers) + // repeated uint32 ids = 1; + for (int i = 0; i < this->ids_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteUInt32ToArray(1, this->ids(i), target); + } + + // repeated string names = 2; + for (int i = 0; i < this->names_size(); i++) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->names(i).data(), this->names(i).length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "names"); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(2, this->names(i), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.QueryUsers) + return target; + } + + int QueryUsers::ByteSize() const + { + int total_size = 0; + + // repeated uint32 ids = 1; + { + int data_size = 0; + for (int i = 0; i < this->ids_size(); i++) + { + data_size += ::google::protobuf::internal::WireFormatLite:: + UInt32Size(this->ids(i)); + } + total_size += 1 * this->ids_size() + data_size; + } + + // repeated string names = 2; + total_size += 1 * this->names_size(); + for (int i = 0; i < this->names_size(); i++) + { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->names(i)); + } + + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void QueryUsers::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const QueryUsers* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void QueryUsers::MergeFrom(const QueryUsers& from) + { + GOOGLE_CHECK_NE(&from, this); + ids_.MergeFrom(from.ids_); + names_.MergeFrom(from.names_); + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void QueryUsers::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void QueryUsers::CopyFrom(const QueryUsers& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool QueryUsers::IsInitialized() const + { + + return true; + } + + void QueryUsers::Swap(QueryUsers* other) + { + if (other != this) + { + ids_.Swap(&other->ids_); + names_.Swap(&other->names_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata QueryUsers::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = QueryUsers_descriptor_; + metadata.reflection = QueryUsers_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int CryptSetup::kKeyFieldNumber; + const int CryptSetup::kClientNonceFieldNumber; + const int CryptSetup::kServerNonceFieldNumber; +#endif // !_MSC_VER + + CryptSetup::CryptSetup() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.CryptSetup) + } + + void CryptSetup::InitAsDefaultInstance() + { + } + + CryptSetup::CryptSetup(const CryptSetup& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.CryptSetup) + } + + void CryptSetup::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + key_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + client_nonce_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + server_nonce_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + CryptSetup::~CryptSetup() + { + // @@protoc_insertion_point(destructor:MumbleProto.CryptSetup) + SharedDtor(); + } + + void CryptSetup::SharedDtor() + { + if (key_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete key_; + } + if (client_nonce_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete client_nonce_; + } + if (server_nonce_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete server_nonce_; + } + if (this != default_instance_) + { + } + } + + void CryptSetup::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* CryptSetup::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return CryptSetup_descriptor_; + } + + const CryptSetup& CryptSetup::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + CryptSetup* CryptSetup::default_instance_ = NULL; + + CryptSetup* CryptSetup::New() const + { + return new CryptSetup; + } + + void CryptSetup::Clear() + { + if (_has_bits_[0 / 32] & 7) + { + if (has_key()) + { + if (key_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + key_->clear(); + } + } + if (has_client_nonce()) + { + if (client_nonce_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + client_nonce_->clear(); + } + } + if (has_server_nonce()) + { + if (server_nonce_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + server_nonce_->clear(); + } + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool CryptSetup::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.CryptSetup) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // optional bytes key = 1; + case 1: + { + if (tag == 10) + { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_key())); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_client_nonce; + break; + } + + // optional bytes client_nonce = 2; + case 2: + { + if (tag == 18) + { +parse_client_nonce: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_client_nonce())); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_server_nonce; + break; + } + + // optional bytes server_nonce = 3; + case 3: + { + if (tag == 26) + { +parse_server_nonce: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_server_nonce())); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.CryptSetup) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.CryptSetup) + return false; +#undef DO_ + } + + void CryptSetup::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.CryptSetup) + // optional bytes key = 1; + if (has_key()) + { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 1, this->key(), output); + } + + // optional bytes client_nonce = 2; + if (has_client_nonce()) + { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 2, this->client_nonce(), output); + } + + // optional bytes server_nonce = 3; + if (has_server_nonce()) + { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 3, this->server_nonce(), output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.CryptSetup) + } + + ::google::protobuf::uint8* CryptSetup::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.CryptSetup) + // optional bytes key = 1; + if (has_key()) + { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 1, this->key(), target); + } + + // optional bytes client_nonce = 2; + if (has_client_nonce()) + { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 2, this->client_nonce(), target); + } + + // optional bytes server_nonce = 3; + if (has_server_nonce()) + { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 3, this->server_nonce(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.CryptSetup) + return target; + } + + int CryptSetup::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // optional bytes key = 1; + if (has_key()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->key()); + } + + // optional bytes client_nonce = 2; + if (has_client_nonce()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->client_nonce()); + } + + // optional bytes server_nonce = 3; + if (has_server_nonce()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->server_nonce()); + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void CryptSetup::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const CryptSetup* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void CryptSetup::MergeFrom(const CryptSetup& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_key()) + { + set_key(from.key()); + } + if (from.has_client_nonce()) + { + set_client_nonce(from.client_nonce()); + } + if (from.has_server_nonce()) + { + set_server_nonce(from.server_nonce()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void CryptSetup::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void CryptSetup::CopyFrom(const CryptSetup& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool CryptSetup::IsInitialized() const + { + + return true; + } + + void CryptSetup::Swap(CryptSetup* other) + { + if (other != this) + { + std::swap(key_, other->key_); + std::swap(client_nonce_, other->client_nonce_); + std::swap(server_nonce_, other->server_nonce_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata CryptSetup::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = CryptSetup_descriptor_; + metadata.reflection = CryptSetup_reflection_; + return metadata; + } + + +// =================================================================== + + const ::google::protobuf::EnumDescriptor* + ContextActionModify_Context_descriptor() + { + protobuf_AssignDescriptorsOnce(); + return ContextActionModify_Context_descriptor_; + } + bool ContextActionModify_Context_IsValid(int value) + { + switch(value) + { + case 1: + case 2: + case 4: + return true; + default: + return false; + } + } + +#ifndef _MSC_VER + const ContextActionModify_Context ContextActionModify::Server; + const ContextActionModify_Context ContextActionModify::Channel; + const ContextActionModify_Context ContextActionModify::User; + const ContextActionModify_Context ContextActionModify::Context_MIN; + const ContextActionModify_Context ContextActionModify::Context_MAX; + const int ContextActionModify::Context_ARRAYSIZE; +#endif // _MSC_VER + const ::google::protobuf::EnumDescriptor* + ContextActionModify_Operation_descriptor() + { + protobuf_AssignDescriptorsOnce(); + return ContextActionModify_Operation_descriptor_; + } + bool ContextActionModify_Operation_IsValid(int value) + { + switch(value) + { + case 0: + case 1: + return true; + default: + return false; + } + } + +#ifndef _MSC_VER + const ContextActionModify_Operation ContextActionModify::Add; + const ContextActionModify_Operation ContextActionModify::Remove; + const ContextActionModify_Operation ContextActionModify::Operation_MIN; + const ContextActionModify_Operation ContextActionModify::Operation_MAX; + const int ContextActionModify::Operation_ARRAYSIZE; +#endif // _MSC_VER +#ifndef _MSC_VER + const int ContextActionModify::kActionFieldNumber; + const int ContextActionModify::kTextFieldNumber; + const int ContextActionModify::kContextFieldNumber; + const int ContextActionModify::kOperationFieldNumber; +#endif // !_MSC_VER + + ContextActionModify::ContextActionModify() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.ContextActionModify) + } + + void ContextActionModify::InitAsDefaultInstance() + { + } + + ContextActionModify::ContextActionModify(const ContextActionModify& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.ContextActionModify) + } + + void ContextActionModify::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + action_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + text_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + context_ = 0u; + operation_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + ContextActionModify::~ContextActionModify() + { + // @@protoc_insertion_point(destructor:MumbleProto.ContextActionModify) + SharedDtor(); + } + + void ContextActionModify::SharedDtor() + { + if (action_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete action_; + } + if (text_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete text_; + } + if (this != default_instance_) + { + } + } + + void ContextActionModify::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* ContextActionModify::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return ContextActionModify_descriptor_; + } + + const ContextActionModify& ContextActionModify::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + ContextActionModify* ContextActionModify::default_instance_ = NULL; + + ContextActionModify* ContextActionModify::New() const + { + return new ContextActionModify; + } + + void ContextActionModify::Clear() + { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + if (_has_bits_[0 / 32] & 15) + { + ZR_(context_, operation_); + if (has_action()) + { + if (action_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + action_->clear(); + } + } + if (has_text()) + { + if (text_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + text_->clear(); + } + } + } + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool ContextActionModify::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.ContextActionModify) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // required string action = 1; + case 1: + { + if (tag == 10) + { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_action())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->action().data(), this->action().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "action"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_text; + break; + } + + // optional string text = 2; + case 2: + { + if (tag == 18) + { +parse_text: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_text())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->text().data(), this->text().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "text"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(24)) goto parse_context; + break; + } + + // optional uint32 context = 3; + case 3: + { + if (tag == 24) + { +parse_context: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &context_))); + set_has_context(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(32)) goto parse_operation; + break; + } + + // optional .MumbleProto.ContextActionModify.Operation operation = 4; + case 4: + { + if (tag == 32) + { +parse_operation: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::MumbleProto::ContextActionModify_Operation_IsValid(value)) + { + set_operation(static_cast< ::MumbleProto::ContextActionModify_Operation > + (value)); + } + else + { + mutable_unknown_fields()->AddVarint(4, value); + } + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.ContextActionModify) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.ContextActionModify) + return false; +#undef DO_ + } + + void ContextActionModify::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.ContextActionModify) + // required string action = 1; + if (has_action()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->action().data(), this->action().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "action"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->action(), output); + } + + // optional string text = 2; + if (has_text()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->text().data(), this->text().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "text"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->text(), output); + } + + // optional uint32 context = 3; + if (has_context()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->context(), + output); + } + + // optional .MumbleProto.ContextActionModify.Operation operation = 4; + if (has_operation()) + { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 4, this->operation(), output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.ContextActionModify) + } + + ::google::protobuf::uint8* ContextActionModify::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.ContextActionModify) + // required string action = 1; + if (has_action()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->action().data(), this->action().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "action"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->action(), target); + } + + // optional string text = 2; + if (has_text()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->text().data(), this->text().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "text"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->text(), target); + } + + // optional uint32 context = 3; + if (has_context()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, + this->context(), target); + } + + // optional .MumbleProto.ContextActionModify.Operation operation = 4; + if (has_operation()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 4, this->operation(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.ContextActionModify) + return target; + } + + int ContextActionModify::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // required string action = 1; + if (has_action()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->action()); + } + + // optional string text = 2; + if (has_text()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->text()); + } + + // optional uint32 context = 3; + if (has_context()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->context()); + } + + // optional .MumbleProto.ContextActionModify.Operation operation = 4; + if (has_operation()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->operation()); + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void ContextActionModify::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const ContextActionModify* source = + ::google::protobuf::internal::dynamic_cast_if_available + ( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void ContextActionModify::MergeFrom(const ContextActionModify& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_action()) + { + set_action(from.action()); + } + if (from.has_text()) + { + set_text(from.text()); + } + if (from.has_context()) + { + set_context(from.context()); + } + if (from.has_operation()) + { + set_operation(from.operation()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void ContextActionModify::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void ContextActionModify::CopyFrom(const ContextActionModify& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool ContextActionModify::IsInitialized() const + { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; + } + + void ContextActionModify::Swap(ContextActionModify* other) + { + if (other != this) + { + std::swap(action_, other->action_); + std::swap(text_, other->text_); + std::swap(context_, other->context_); + std::swap(operation_, other->operation_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata ContextActionModify::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ContextActionModify_descriptor_; + metadata.reflection = ContextActionModify_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int ContextAction::kSessionFieldNumber; + const int ContextAction::kChannelIdFieldNumber; + const int ContextAction::kActionFieldNumber; +#endif // !_MSC_VER + + ContextAction::ContextAction() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.ContextAction) + } + + void ContextAction::InitAsDefaultInstance() + { + } + + ContextAction::ContextAction(const ContextAction& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.ContextAction) + } + + void ContextAction::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + session_ = 0u; + channel_id_ = 0u; + action_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + ContextAction::~ContextAction() + { + // @@protoc_insertion_point(destructor:MumbleProto.ContextAction) + SharedDtor(); + } + + void ContextAction::SharedDtor() + { + if (action_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete action_; + } + if (this != default_instance_) + { + } + } + + void ContextAction::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* ContextAction::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return ContextAction_descriptor_; + } + + const ContextAction& ContextAction::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + ContextAction* ContextAction::default_instance_ = NULL; + + ContextAction* ContextAction::New() const + { + return new ContextAction; + } + + void ContextAction::Clear() + { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + if (_has_bits_[0 / 32] & 7) + { + ZR_(session_, channel_id_); + if (has_action()) + { + if (action_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + action_->clear(); + } + } + } + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool ContextAction::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.ContextAction) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // optional uint32 session = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &session_))); + set_has_session(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_channel_id; + break; + } + + // optional uint32 channel_id = 2; + case 2: + { + if (tag == 16) + { +parse_channel_id: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &channel_id_))); + set_has_channel_id(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_action; + break; + } + + // required string action = 3; + case 3: + { + if (tag == 26) + { +parse_action: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_action())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->action().data(), this->action().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "action"); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.ContextAction) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.ContextAction) + return false; +#undef DO_ + } + + void ContextAction::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.ContextAction) + // optional uint32 session = 1; + if (has_session()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->session(), + output); + } + + // optional uint32 channel_id = 2; + if (has_channel_id()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->channel_id(), + output); + } + + // required string action = 3; + if (has_action()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->action().data(), this->action().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "action"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->action(), output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.ContextAction) + } + + ::google::protobuf::uint8* ContextAction::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.ContextAction) + // optional uint32 session = 1; + if (has_session()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, + this->session(), target); + } + + // optional uint32 channel_id = 2; + if (has_channel_id()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, + this->channel_id(), target); + } + + // required string action = 3; + if (has_action()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->action().data(), this->action().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "action"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->action(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.ContextAction) + return target; + } + + int ContextAction::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // optional uint32 session = 1; + if (has_session()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->session()); + } + + // optional uint32 channel_id = 2; + if (has_channel_id()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->channel_id()); + } + + // required string action = 3; + if (has_action()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->action()); + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void ContextAction::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const ContextAction* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void ContextAction::MergeFrom(const ContextAction& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_session()) + { + set_session(from.session()); + } + if (from.has_channel_id()) + { + set_channel_id(from.channel_id()); + } + if (from.has_action()) + { + set_action(from.action()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void ContextAction::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void ContextAction::CopyFrom(const ContextAction& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool ContextAction::IsInitialized() const + { + if ((_has_bits_[0] & 0x00000004) != 0x00000004) return false; + + return true; + } + + void ContextAction::Swap(ContextAction* other) + { + if (other != this) + { + std::swap(session_, other->session_); + std::swap(channel_id_, other->channel_id_); + std::swap(action_, other->action_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata ContextAction::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ContextAction_descriptor_; + metadata.reflection = ContextAction_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int UserList_User::kUserIdFieldNumber; + const int UserList_User::kNameFieldNumber; + const int UserList_User::kLastSeenFieldNumber; + const int UserList_User::kLastChannelFieldNumber; +#endif // !_MSC_VER + + UserList_User::UserList_User() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.UserList.User) + } + + void UserList_User::InitAsDefaultInstance() + { + } + + UserList_User::UserList_User(const UserList_User& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.UserList.User) + } + + void UserList_User::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + user_id_ = 0u; + name_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + last_seen_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + last_channel_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + UserList_User::~UserList_User() + { + // @@protoc_insertion_point(destructor:MumbleProto.UserList.User) + SharedDtor(); + } + + void UserList_User::SharedDtor() + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete name_; + } + if (last_seen_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete last_seen_; + } + if (this != default_instance_) + { + } + } + + void UserList_User::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* UserList_User::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return UserList_User_descriptor_; + } + + const UserList_User& UserList_User::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + UserList_User* UserList_User::default_instance_ = NULL; + + UserList_User* UserList_User::New() const + { + return new UserList_User; + } + + void UserList_User::Clear() + { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + if (_has_bits_[0 / 32] & 15) + { + ZR_(user_id_, last_channel_); + if (has_name()) + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_->clear(); + } + } + if (has_last_seen()) + { + if (last_seen_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + last_seen_->clear(); + } + } + } + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool UserList_User::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.UserList.User) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // required uint32 user_id = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &user_id_))); + set_has_user_id(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_name; + break; + } + + // optional string name = 2; + case 2: + { + if (tag == 18) + { +parse_name: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "name"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_last_seen; + break; + } + + // optional string last_seen = 3; + case 3: + { + if (tag == 26) + { +parse_last_seen: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_last_seen())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->last_seen().data(), this->last_seen().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "last_seen"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(32)) goto parse_last_channel; + break; + } + + // optional uint32 last_channel = 4; + case 4: + { + if (tag == 32) + { +parse_last_channel: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &last_channel_))); + set_has_last_channel(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.UserList.User) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.UserList.User) + return false; +#undef DO_ + } + + void UserList_User::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.UserList.User) + // required uint32 user_id = 1; + if (has_user_id()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->user_id(), + output); + } + + // optional string name = 2; + if (has_name()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->name(), output); + } + + // optional string last_seen = 3; + if (has_last_seen()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->last_seen().data(), this->last_seen().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "last_seen"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->last_seen(), output); + } + + // optional uint32 last_channel = 4; + if (has_last_channel()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(4, + this->last_channel(), output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.UserList.User) + } + + ::google::protobuf::uint8* UserList_User::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.UserList.User) + // required uint32 user_id = 1; + if (has_user_id()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, + this->user_id(), target); + } + + // optional string name = 2; + if (has_name()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->name(), target); + } + + // optional string last_seen = 3; + if (has_last_seen()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->last_seen().data(), this->last_seen().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "last_seen"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->last_seen(), target); + } + + // optional uint32 last_channel = 4; + if (has_last_channel()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, + this->last_channel(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.UserList.User) + return target; + } + + int UserList_User::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // required uint32 user_id = 1; + if (has_user_id()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->user_id()); + } + + // optional string name = 2; + if (has_name()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // optional string last_seen = 3; + if (has_last_seen()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->last_seen()); + } + + // optional uint32 last_channel = 4; + if (has_last_channel()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->last_channel()); + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void UserList_User::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const UserList_User* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void UserList_User::MergeFrom(const UserList_User& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_user_id()) + { + set_user_id(from.user_id()); + } + if (from.has_name()) + { + set_name(from.name()); + } + if (from.has_last_seen()) + { + set_last_seen(from.last_seen()); + } + if (from.has_last_channel()) + { + set_last_channel(from.last_channel()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void UserList_User::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void UserList_User::CopyFrom(const UserList_User& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool UserList_User::IsInitialized() const + { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; + } + + void UserList_User::Swap(UserList_User* other) + { + if (other != this) + { + std::swap(user_id_, other->user_id_); + std::swap(name_, other->name_); + std::swap(last_seen_, other->last_seen_); + std::swap(last_channel_, other->last_channel_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata UserList_User::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = UserList_User_descriptor_; + metadata.reflection = UserList_User_reflection_; + return metadata; + } + + +// ------------------------------------------------------------------- + +#ifndef _MSC_VER + const int UserList::kUsersFieldNumber; +#endif // !_MSC_VER + + UserList::UserList() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.UserList) + } + + void UserList::InitAsDefaultInstance() + { + } + + UserList::UserList(const UserList& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.UserList) + } + + void UserList::SharedCtor() + { + _cached_size_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + UserList::~UserList() + { + // @@protoc_insertion_point(destructor:MumbleProto.UserList) + SharedDtor(); + } + + void UserList::SharedDtor() + { + if (this != default_instance_) + { + } + } + + void UserList::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* UserList::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return UserList_descriptor_; + } + + const UserList& UserList::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + UserList* UserList::default_instance_ = NULL; + + UserList* UserList::New() const + { + return new UserList; + } + + void UserList::Clear() + { + users_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool UserList::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.UserList) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // repeated .MumbleProto.UserList.User users = 1; + case 1: + { + if (tag == 10) + { +parse_users: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_users())); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(10)) goto parse_users; + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.UserList) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.UserList) + return false; +#undef DO_ + } + + void UserList::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.UserList) + // repeated .MumbleProto.UserList.User users = 1; + for (int i = 0; i < this->users_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->users(i), output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.UserList) + } + + ::google::protobuf::uint8* UserList::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.UserList) + // repeated .MumbleProto.UserList.User users = 1; + for (int i = 0; i < this->users_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->users(i), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.UserList) + return target; + } + + int UserList::ByteSize() const + { + int total_size = 0; + + // repeated .MumbleProto.UserList.User users = 1; + total_size += 1 * this->users_size(); + for (int i = 0; i < this->users_size(); i++) + { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->users(i)); + } + + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void UserList::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const UserList* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void UserList::MergeFrom(const UserList& from) + { + GOOGLE_CHECK_NE(&from, this); + users_.MergeFrom(from.users_); + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void UserList::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void UserList::CopyFrom(const UserList& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool UserList::IsInitialized() const + { + + if (!::google::protobuf::internal::AllAreInitialized(this->users())) return + false; + return true; + } + + void UserList::Swap(UserList* other) + { + if (other != this) + { + users_.Swap(&other->users_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata UserList::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = UserList_descriptor_; + metadata.reflection = UserList_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int VoiceTarget_Target::kSessionFieldNumber; + const int VoiceTarget_Target::kChannelIdFieldNumber; + const int VoiceTarget_Target::kGroupFieldNumber; + const int VoiceTarget_Target::kLinksFieldNumber; + const int VoiceTarget_Target::kChildrenFieldNumber; +#endif // !_MSC_VER + + VoiceTarget_Target::VoiceTarget_Target() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.VoiceTarget.Target) + } + + void VoiceTarget_Target::InitAsDefaultInstance() + { + } + + VoiceTarget_Target::VoiceTarget_Target(const VoiceTarget_Target& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.VoiceTarget.Target) + } + + void VoiceTarget_Target::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + channel_id_ = 0u; + group_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + links_ = false; + children_ = false; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + VoiceTarget_Target::~VoiceTarget_Target() + { + // @@protoc_insertion_point(destructor:MumbleProto.VoiceTarget.Target) + SharedDtor(); + } + + void VoiceTarget_Target::SharedDtor() + { + if (group_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete group_; + } + if (this != default_instance_) + { + } + } + + void VoiceTarget_Target::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* VoiceTarget_Target::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return VoiceTarget_Target_descriptor_; + } + + const VoiceTarget_Target& VoiceTarget_Target::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + VoiceTarget_Target* VoiceTarget_Target::default_instance_ = NULL; + + VoiceTarget_Target* VoiceTarget_Target::New() const + { + return new VoiceTarget_Target; + } + + void VoiceTarget_Target::Clear() + { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + if (_has_bits_[0 / 32] & 30) + { + ZR_(channel_id_, children_); + if (has_group()) + { + if (group_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + group_->clear(); + } + } + } + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + session_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool VoiceTarget_Target::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.VoiceTarget.Target) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // repeated uint32 session = 1; + case 1: + { + if (tag == 8) + { +parse_session: + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + 1, 8, input, this->mutable_session()))); + } + else if (tag == 10) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, this->mutable_session()))); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(8)) goto parse_session; + if (input->ExpectTag(16)) goto parse_channel_id; + break; + } + + // optional uint32 channel_id = 2; + case 2: + { + if (tag == 16) + { +parse_channel_id: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &channel_id_))); + set_has_channel_id(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_group; + break; + } + + // optional string group = 3; + case 3: + { + if (tag == 26) + { +parse_group: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_group())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->group().data(), this->group().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "group"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(32)) goto parse_links; + break; + } + + // optional bool links = 4 [default = false]; + case 4: + { + if (tag == 32) + { +parse_links: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &links_))); + set_has_links(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(40)) goto parse_children; + break; + } + + // optional bool children = 5 [default = false]; + case 5: + { + if (tag == 40) + { +parse_children: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &children_))); + set_has_children(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.VoiceTarget.Target) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.VoiceTarget.Target) + return false; +#undef DO_ + } + + void VoiceTarget_Target::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.VoiceTarget.Target) + // repeated uint32 session = 1; + for (int i = 0; i < this->session_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32( + 1, this->session(i), output); + } + + // optional uint32 channel_id = 2; + if (has_channel_id()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->channel_id(), + output); + } + + // optional string group = 3; + if (has_group()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->group().data(), this->group().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "group"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->group(), output); + } + + // optional bool links = 4 [default = false]; + if (has_links()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->links(), + output); + } + + // optional bool children = 5 [default = false]; + if (has_children()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->children(), + output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.VoiceTarget.Target) + } + + ::google::protobuf::uint8* VoiceTarget_Target::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.VoiceTarget.Target) + // repeated uint32 session = 1; + for (int i = 0; i < this->session_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteUInt32ToArray(1, this->session(i), target); + } + + // optional uint32 channel_id = 2; + if (has_channel_id()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, + this->channel_id(), target); + } + + // optional string group = 3; + if (has_group()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->group().data(), this->group().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "group"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->group(), target); + } + + // optional bool links = 4 [default = false]; + if (has_links()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, + this->links(), target); + } + + // optional bool children = 5 [default = false]; + if (has_children()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, + this->children(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.VoiceTarget.Target) + return target; + } + + int VoiceTarget_Target::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) + { + // optional uint32 channel_id = 2; + if (has_channel_id()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->channel_id()); + } + + // optional string group = 3; + if (has_group()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->group()); + } + + // optional bool links = 4 [default = false]; + if (has_links()) + { + total_size += 1 + 1; + } + + // optional bool children = 5 [default = false]; + if (has_children()) + { + total_size += 1 + 1; + } + + } + // repeated uint32 session = 1; + { + int data_size = 0; + for (int i = 0; i < this->session_size(); i++) + { + data_size += ::google::protobuf::internal::WireFormatLite:: + UInt32Size(this->session(i)); + } + total_size += 1 * this->session_size() + data_size; + } + + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void VoiceTarget_Target::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const VoiceTarget_Target* source = + ::google::protobuf::internal::dynamic_cast_if_available + ( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void VoiceTarget_Target::MergeFrom(const VoiceTarget_Target& from) + { + GOOGLE_CHECK_NE(&from, this); + session_.MergeFrom(from.session_); + if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) + { + if (from.has_channel_id()) + { + set_channel_id(from.channel_id()); + } + if (from.has_group()) + { + set_group(from.group()); + } + if (from.has_links()) + { + set_links(from.links()); + } + if (from.has_children()) + { + set_children(from.children()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void VoiceTarget_Target::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void VoiceTarget_Target::CopyFrom(const VoiceTarget_Target& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool VoiceTarget_Target::IsInitialized() const + { + + return true; + } + + void VoiceTarget_Target::Swap(VoiceTarget_Target* other) + { + if (other != this) + { + session_.Swap(&other->session_); + std::swap(channel_id_, other->channel_id_); + std::swap(group_, other->group_); + std::swap(links_, other->links_); + std::swap(children_, other->children_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata VoiceTarget_Target::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = VoiceTarget_Target_descriptor_; + metadata.reflection = VoiceTarget_Target_reflection_; + return metadata; + } + + +// ------------------------------------------------------------------- + +#ifndef _MSC_VER + const int VoiceTarget::kIdFieldNumber; + const int VoiceTarget::kTargetsFieldNumber; +#endif // !_MSC_VER + + VoiceTarget::VoiceTarget() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.VoiceTarget) + } + + void VoiceTarget::InitAsDefaultInstance() + { + } + + VoiceTarget::VoiceTarget(const VoiceTarget& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.VoiceTarget) + } + + void VoiceTarget::SharedCtor() + { + _cached_size_ = 0; + id_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + VoiceTarget::~VoiceTarget() + { + // @@protoc_insertion_point(destructor:MumbleProto.VoiceTarget) + SharedDtor(); + } + + void VoiceTarget::SharedDtor() + { + if (this != default_instance_) + { + } + } + + void VoiceTarget::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* VoiceTarget::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return VoiceTarget_descriptor_; + } + + const VoiceTarget& VoiceTarget::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + VoiceTarget* VoiceTarget::default_instance_ = NULL; + + VoiceTarget* VoiceTarget::New() const + { + return new VoiceTarget; + } + + void VoiceTarget::Clear() + { + id_ = 0u; + targets_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool VoiceTarget::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.VoiceTarget) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // optional uint32 id = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &id_))); + set_has_id(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_targets; + break; + } + + // repeated .MumbleProto.VoiceTarget.Target targets = 2; + case 2: + { + if (tag == 18) + { +parse_targets: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_targets())); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_targets; + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.VoiceTarget) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.VoiceTarget) + return false; +#undef DO_ + } + + void VoiceTarget::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.VoiceTarget) + // optional uint32 id = 1; + if (has_id()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->id(), + output); + } + + // repeated .MumbleProto.VoiceTarget.Target targets = 2; + for (int i = 0; i < this->targets_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->targets(i), output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.VoiceTarget) + } + + ::google::protobuf::uint8* VoiceTarget::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.VoiceTarget) + // optional uint32 id = 1; + if (has_id()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, + this->id(), target); + } + + // repeated .MumbleProto.VoiceTarget.Target targets = 2; + for (int i = 0; i < this->targets_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, this->targets(i), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.VoiceTarget) + return target; + } + + int VoiceTarget::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // optional uint32 id = 1; + if (has_id()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->id()); + } + + } + // repeated .MumbleProto.VoiceTarget.Target targets = 2; + total_size += 1 * this->targets_size(); + for (int i = 0; i < this->targets_size(); i++) + { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->targets(i)); + } + + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void VoiceTarget::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const VoiceTarget* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void VoiceTarget::MergeFrom(const VoiceTarget& from) + { + GOOGLE_CHECK_NE(&from, this); + targets_.MergeFrom(from.targets_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_id()) + { + set_id(from.id()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void VoiceTarget::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void VoiceTarget::CopyFrom(const VoiceTarget& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool VoiceTarget::IsInitialized() const + { + + return true; + } + + void VoiceTarget::Swap(VoiceTarget* other) + { + if (other != this) + { + std::swap(id_, other->id_); + targets_.Swap(&other->targets_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata VoiceTarget::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = VoiceTarget_descriptor_; + metadata.reflection = VoiceTarget_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int PermissionQuery::kChannelIdFieldNumber; + const int PermissionQuery::kPermissionsFieldNumber; + const int PermissionQuery::kFlushFieldNumber; +#endif // !_MSC_VER + + PermissionQuery::PermissionQuery() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.PermissionQuery) + } + + void PermissionQuery::InitAsDefaultInstance() + { + } + + PermissionQuery::PermissionQuery(const PermissionQuery& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.PermissionQuery) + } + + void PermissionQuery::SharedCtor() + { + _cached_size_ = 0; + channel_id_ = 0u; + permissions_ = 0u; + flush_ = false; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + PermissionQuery::~PermissionQuery() + { + // @@protoc_insertion_point(destructor:MumbleProto.PermissionQuery) + SharedDtor(); + } + + void PermissionQuery::SharedDtor() + { + if (this != default_instance_) + { + } + } + + void PermissionQuery::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* PermissionQuery::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return PermissionQuery_descriptor_; + } + + const PermissionQuery& PermissionQuery::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + PermissionQuery* PermissionQuery::default_instance_ = NULL; + + PermissionQuery* PermissionQuery::New() const + { + return new PermissionQuery; + } + + void PermissionQuery::Clear() + { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + ZR_(channel_id_, flush_); + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool PermissionQuery::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.PermissionQuery) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // optional uint32 channel_id = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &channel_id_))); + set_has_channel_id(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_permissions; + break; + } + + // optional uint32 permissions = 2; + case 2: + { + if (tag == 16) + { +parse_permissions: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &permissions_))); + set_has_permissions(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(24)) goto parse_flush; + break; + } + + // optional bool flush = 3 [default = false]; + case 3: + { + if (tag == 24) + { +parse_flush: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &flush_))); + set_has_flush(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.PermissionQuery) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.PermissionQuery) + return false; +#undef DO_ + } + + void PermissionQuery::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.PermissionQuery) + // optional uint32 channel_id = 1; + if (has_channel_id()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->channel_id(), + output); + } + + // optional uint32 permissions = 2; + if (has_permissions()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, + this->permissions(), output); + } + + // optional bool flush = 3 [default = false]; + if (has_flush()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->flush(), + output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.PermissionQuery) + } + + ::google::protobuf::uint8* PermissionQuery::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.PermissionQuery) + // optional uint32 channel_id = 1; + if (has_channel_id()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, + this->channel_id(), target); + } + + // optional uint32 permissions = 2; + if (has_permissions()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, + this->permissions(), target); + } + + // optional bool flush = 3 [default = false]; + if (has_flush()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, + this->flush(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.PermissionQuery) + return target; + } + + int PermissionQuery::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // optional uint32 channel_id = 1; + if (has_channel_id()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->channel_id()); + } + + // optional uint32 permissions = 2; + if (has_permissions()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->permissions()); + } + + // optional bool flush = 3 [default = false]; + if (has_flush()) + { + total_size += 1 + 1; + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void PermissionQuery::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const PermissionQuery* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void PermissionQuery::MergeFrom(const PermissionQuery& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_channel_id()) + { + set_channel_id(from.channel_id()); + } + if (from.has_permissions()) + { + set_permissions(from.permissions()); + } + if (from.has_flush()) + { + set_flush(from.flush()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void PermissionQuery::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void PermissionQuery::CopyFrom(const PermissionQuery& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool PermissionQuery::IsInitialized() const + { + + return true; + } + + void PermissionQuery::Swap(PermissionQuery* other) + { + if (other != this) + { + std::swap(channel_id_, other->channel_id_); + std::swap(permissions_, other->permissions_); + std::swap(flush_, other->flush_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata PermissionQuery::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = PermissionQuery_descriptor_; + metadata.reflection = PermissionQuery_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int CodecVersion::kAlphaFieldNumber; + const int CodecVersion::kBetaFieldNumber; + const int CodecVersion::kPreferAlphaFieldNumber; + const int CodecVersion::kOpusFieldNumber; +#endif // !_MSC_VER + + CodecVersion::CodecVersion() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.CodecVersion) + } + + void CodecVersion::InitAsDefaultInstance() + { + } + + CodecVersion::CodecVersion(const CodecVersion& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.CodecVersion) + } + + void CodecVersion::SharedCtor() + { + _cached_size_ = 0; + alpha_ = 0; + beta_ = 0; + prefer_alpha_ = true; + opus_ = false; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + CodecVersion::~CodecVersion() + { + // @@protoc_insertion_point(destructor:MumbleProto.CodecVersion) + SharedDtor(); + } + + void CodecVersion::SharedDtor() + { + if (this != default_instance_) + { + } + } + + void CodecVersion::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* CodecVersion::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return CodecVersion_descriptor_; + } + + const CodecVersion& CodecVersion::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + CodecVersion* CodecVersion::default_instance_ = NULL; + + CodecVersion* CodecVersion::New() const + { + return new CodecVersion; + } + + void CodecVersion::Clear() + { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + if (_has_bits_[0 / 32] & 15) + { + ZR_(alpha_, beta_); + prefer_alpha_ = true; + opus_ = false; + } + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool CodecVersion::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.CodecVersion) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // required int32 alpha = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &alpha_))); + set_has_alpha(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_beta; + break; + } + + // required int32 beta = 2; + case 2: + { + if (tag == 16) + { +parse_beta: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &beta_))); + set_has_beta(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(24)) goto parse_prefer_alpha; + break; + } + + // required bool prefer_alpha = 3 [default = true]; + case 3: + { + if (tag == 24) + { +parse_prefer_alpha: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &prefer_alpha_))); + set_has_prefer_alpha(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(32)) goto parse_opus; + break; + } + + // optional bool opus = 4 [default = false]; + case 4: + { + if (tag == 32) + { +parse_opus: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &opus_))); + set_has_opus(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.CodecVersion) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.CodecVersion) + return false; +#undef DO_ + } + + void CodecVersion::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.CodecVersion) + // required int32 alpha = 1; + if (has_alpha()) + { + ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->alpha(), + output); + } + + // required int32 beta = 2; + if (has_beta()) + { + ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->beta(), + output); + } + + // required bool prefer_alpha = 3 [default = true]; + if (has_prefer_alpha()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->prefer_alpha(), + output); + } + + // optional bool opus = 4 [default = false]; + if (has_opus()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->opus(), + output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.CodecVersion) + } + + ::google::protobuf::uint8* CodecVersion::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.CodecVersion) + // required int32 alpha = 1; + if (has_alpha()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, + this->alpha(), target); + } + + // required int32 beta = 2; + if (has_beta()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, + this->beta(), target); + } + + // required bool prefer_alpha = 3 [default = true]; + if (has_prefer_alpha()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, + this->prefer_alpha(), target); + } + + // optional bool opus = 4 [default = false]; + if (has_opus()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, + this->opus(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.CodecVersion) + return target; + } + + int CodecVersion::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // required int32 alpha = 1; + if (has_alpha()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->alpha()); + } + + // required int32 beta = 2; + if (has_beta()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->beta()); + } + + // required bool prefer_alpha = 3 [default = true]; + if (has_prefer_alpha()) + { + total_size += 1 + 1; + } + + // optional bool opus = 4 [default = false]; + if (has_opus()) + { + total_size += 1 + 1; + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void CodecVersion::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const CodecVersion* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void CodecVersion::MergeFrom(const CodecVersion& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_alpha()) + { + set_alpha(from.alpha()); + } + if (from.has_beta()) + { + set_beta(from.beta()); + } + if (from.has_prefer_alpha()) + { + set_prefer_alpha(from.prefer_alpha()); + } + if (from.has_opus()) + { + set_opus(from.opus()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void CodecVersion::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void CodecVersion::CopyFrom(const CodecVersion& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool CodecVersion::IsInitialized() const + { + if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; + + return true; + } + + void CodecVersion::Swap(CodecVersion* other) + { + if (other != this) + { + std::swap(alpha_, other->alpha_); + std::swap(beta_, other->beta_); + std::swap(prefer_alpha_, other->prefer_alpha_); + std::swap(opus_, other->opus_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata CodecVersion::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = CodecVersion_descriptor_; + metadata.reflection = CodecVersion_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int UserStats_Stats::kGoodFieldNumber; + const int UserStats_Stats::kLateFieldNumber; + const int UserStats_Stats::kLostFieldNumber; + const int UserStats_Stats::kResyncFieldNumber; +#endif // !_MSC_VER + + UserStats_Stats::UserStats_Stats() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.UserStats.Stats) + } + + void UserStats_Stats::InitAsDefaultInstance() + { + } + + UserStats_Stats::UserStats_Stats(const UserStats_Stats& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.UserStats.Stats) + } + + void UserStats_Stats::SharedCtor() + { + _cached_size_ = 0; + good_ = 0u; + late_ = 0u; + lost_ = 0u; + resync_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + UserStats_Stats::~UserStats_Stats() + { + // @@protoc_insertion_point(destructor:MumbleProto.UserStats.Stats) + SharedDtor(); + } + + void UserStats_Stats::SharedDtor() + { + if (this != default_instance_) + { + } + } + + void UserStats_Stats::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* UserStats_Stats::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return UserStats_Stats_descriptor_; + } + + const UserStats_Stats& UserStats_Stats::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + UserStats_Stats* UserStats_Stats::default_instance_ = NULL; + + UserStats_Stats* UserStats_Stats::New() const + { + return new UserStats_Stats; + } + + void UserStats_Stats::Clear() + { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + ZR_(good_, resync_); + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool UserStats_Stats::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.UserStats.Stats) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // optional uint32 good = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &good_))); + set_has_good(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_late; + break; + } + + // optional uint32 late = 2; + case 2: + { + if (tag == 16) + { +parse_late: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &late_))); + set_has_late(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(24)) goto parse_lost; + break; + } + + // optional uint32 lost = 3; + case 3: + { + if (tag == 24) + { +parse_lost: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &lost_))); + set_has_lost(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(32)) goto parse_resync; + break; + } + + // optional uint32 resync = 4; + case 4: + { + if (tag == 32) + { +parse_resync: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &resync_))); + set_has_resync(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.UserStats.Stats) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.UserStats.Stats) + return false; +#undef DO_ + } + + void UserStats_Stats::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.UserStats.Stats) + // optional uint32 good = 1; + if (has_good()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->good(), + output); + } + + // optional uint32 late = 2; + if (has_late()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->late(), + output); + } + + // optional uint32 lost = 3; + if (has_lost()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->lost(), + output); + } + + // optional uint32 resync = 4; + if (has_resync()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->resync(), + output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.UserStats.Stats) + } + + ::google::protobuf::uint8* UserStats_Stats::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.UserStats.Stats) + // optional uint32 good = 1; + if (has_good()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, + this->good(), target); + } + + // optional uint32 late = 2; + if (has_late()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, + this->late(), target); + } + + // optional uint32 lost = 3; + if (has_lost()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, + this->lost(), target); + } + + // optional uint32 resync = 4; + if (has_resync()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, + this->resync(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.UserStats.Stats) + return target; + } + + int UserStats_Stats::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // optional uint32 good = 1; + if (has_good()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->good()); + } + + // optional uint32 late = 2; + if (has_late()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->late()); + } + + // optional uint32 lost = 3; + if (has_lost()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->lost()); + } + + // optional uint32 resync = 4; + if (has_resync()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->resync()); + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void UserStats_Stats::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const UserStats_Stats* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void UserStats_Stats::MergeFrom(const UserStats_Stats& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_good()) + { + set_good(from.good()); + } + if (from.has_late()) + { + set_late(from.late()); + } + if (from.has_lost()) + { + set_lost(from.lost()); + } + if (from.has_resync()) + { + set_resync(from.resync()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void UserStats_Stats::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void UserStats_Stats::CopyFrom(const UserStats_Stats& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool UserStats_Stats::IsInitialized() const + { + + return true; + } + + void UserStats_Stats::Swap(UserStats_Stats* other) + { + if (other != this) + { + std::swap(good_, other->good_); + std::swap(late_, other->late_); + std::swap(lost_, other->lost_); + std::swap(resync_, other->resync_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata UserStats_Stats::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = UserStats_Stats_descriptor_; + metadata.reflection = UserStats_Stats_reflection_; + return metadata; + } + + +// ------------------------------------------------------------------- + +#ifndef _MSC_VER + const int UserStats::kSessionFieldNumber; + const int UserStats::kStatsOnlyFieldNumber; + const int UserStats::kCertificatesFieldNumber; + const int UserStats::kFromClientFieldNumber; + const int UserStats::kFromServerFieldNumber; + const int UserStats::kUdpPacketsFieldNumber; + const int UserStats::kTcpPacketsFieldNumber; + const int UserStats::kUdpPingAvgFieldNumber; + const int UserStats::kUdpPingVarFieldNumber; + const int UserStats::kTcpPingAvgFieldNumber; + const int UserStats::kTcpPingVarFieldNumber; + const int UserStats::kVersionFieldNumber; + const int UserStats::kCeltVersionsFieldNumber; + const int UserStats::kAddressFieldNumber; + const int UserStats::kBandwidthFieldNumber; + const int UserStats::kOnlinesecsFieldNumber; + const int UserStats::kIdlesecsFieldNumber; + const int UserStats::kStrongCertificateFieldNumber; + const int UserStats::kOpusFieldNumber; +#endif // !_MSC_VER + + UserStats::UserStats() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.UserStats) + } + + void UserStats::InitAsDefaultInstance() + { + from_client_ = const_cast< ::MumbleProto::UserStats_Stats*> + (&::MumbleProto::UserStats_Stats::default_instance()); + from_server_ = const_cast< ::MumbleProto::UserStats_Stats*> + (&::MumbleProto::UserStats_Stats::default_instance()); + version_ = const_cast< ::MumbleProto::Version*> + (&::MumbleProto::Version::default_instance()); + } + + UserStats::UserStats(const UserStats& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.UserStats) + } + + void UserStats::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + session_ = 0u; + stats_only_ = false; + from_client_ = NULL; + from_server_ = NULL; + udp_packets_ = 0u; + tcp_packets_ = 0u; + udp_ping_avg_ = 0; + udp_ping_var_ = 0; + tcp_ping_avg_ = 0; + tcp_ping_var_ = 0; + version_ = NULL; + address_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + bandwidth_ = 0u; + onlinesecs_ = 0u; + idlesecs_ = 0u; + strong_certificate_ = false; + opus_ = false; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + UserStats::~UserStats() + { + // @@protoc_insertion_point(destructor:MumbleProto.UserStats) + SharedDtor(); + } + + void UserStats::SharedDtor() + { + if (address_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete address_; + } + if (this != default_instance_) + { + delete from_client_; + delete from_server_; + delete version_; + } + } + + void UserStats::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* UserStats::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return UserStats_descriptor_; + } + + const UserStats& UserStats::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + UserStats* UserStats::default_instance_ = NULL; + + UserStats* UserStats::New() const + { + return new UserStats; + } + + void UserStats::Clear() + { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + if (_has_bits_[0 / 32] & 251) + { + ZR_(session_, udp_packets_); + ZR_(tcp_packets_, udp_ping_avg_); + stats_only_ = false; + if (has_from_client()) + { + if (from_client_ != NULL) from_client_->::MumbleProto::UserStats_Stats::Clear(); + } + if (has_from_server()) + { + if (from_server_ != NULL) from_server_->::MumbleProto::UserStats_Stats::Clear(); + } + } + if (_has_bits_[8 / 32] & 61184) + { + ZR_(udp_ping_var_, tcp_ping_avg_); + ZR_(bandwidth_, onlinesecs_); + tcp_ping_var_ = 0; + if (has_version()) + { + if (version_ != NULL) version_->::MumbleProto::Version::Clear(); + } + if (has_address()) + { + if (address_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + address_->clear(); + } + } + } + if (_has_bits_[16 / 32] & 458752) + { + ZR_(strong_certificate_, opus_); + idlesecs_ = 0u; + } + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + certificates_.Clear(); + celt_versions_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool UserStats::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.UserStats) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 16383); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // optional uint32 session = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &session_))); + set_has_session(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_stats_only; + break; + } + + // optional bool stats_only = 2 [default = false]; + case 2: + { + if (tag == 16) + { +parse_stats_only: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &stats_only_))); + set_has_stats_only(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_certificates; + break; + } + + // repeated bytes certificates = 3; + case 3: + { + if (tag == 26) + { +parse_certificates: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->add_certificates())); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_certificates; + if (input->ExpectTag(34)) goto parse_from_client; + break; + } + + // optional .MumbleProto.UserStats.Stats from_client = 4; + case 4: + { + if (tag == 34) + { +parse_from_client: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_from_client())); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(42)) goto parse_from_server; + break; + } + + // optional .MumbleProto.UserStats.Stats from_server = 5; + case 5: + { + if (tag == 42) + { +parse_from_server: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_from_server())); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(48)) goto parse_udp_packets; + break; + } + + // optional uint32 udp_packets = 6; + case 6: + { + if (tag == 48) + { +parse_udp_packets: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &udp_packets_))); + set_has_udp_packets(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(56)) goto parse_tcp_packets; + break; + } + + // optional uint32 tcp_packets = 7; + case 7: + { + if (tag == 56) + { +parse_tcp_packets: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &tcp_packets_))); + set_has_tcp_packets(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(69)) goto parse_udp_ping_avg; + break; + } + + // optional float udp_ping_avg = 8; + case 8: + { + if (tag == 69) + { +parse_udp_ping_avg: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, &udp_ping_avg_))); + set_has_udp_ping_avg(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(77)) goto parse_udp_ping_var; + break; + } + + // optional float udp_ping_var = 9; + case 9: + { + if (tag == 77) + { +parse_udp_ping_var: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, &udp_ping_var_))); + set_has_udp_ping_var(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(85)) goto parse_tcp_ping_avg; + break; + } + + // optional float tcp_ping_avg = 10; + case 10: + { + if (tag == 85) + { +parse_tcp_ping_avg: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, &tcp_ping_avg_))); + set_has_tcp_ping_avg(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(93)) goto parse_tcp_ping_var; + break; + } + + // optional float tcp_ping_var = 11; + case 11: + { + if (tag == 93) + { +parse_tcp_ping_var: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, &tcp_ping_var_))); + set_has_tcp_ping_var(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(98)) goto parse_version; + break; + } + + // optional .MumbleProto.Version version = 12; + case 12: + { + if (tag == 98) + { +parse_version: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_version())); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(104)) goto parse_celt_versions; + break; + } + + // repeated int32 celt_versions = 13; + case 13: + { + if (tag == 104) + { +parse_celt_versions: + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + 1, 104, input, this->mutable_celt_versions()))); + } + else if (tag == 106) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_celt_versions()))); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(104)) goto parse_celt_versions; + if (input->ExpectTag(114)) goto parse_address; + break; + } + + // optional bytes address = 14; + case 14: + { + if (tag == 114) + { +parse_address: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_address())); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(120)) goto parse_bandwidth; + break; + } + + // optional uint32 bandwidth = 15; + case 15: + { + if (tag == 120) + { +parse_bandwidth: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &bandwidth_))); + set_has_bandwidth(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(128)) goto parse_onlinesecs; + break; + } + + // optional uint32 onlinesecs = 16; + case 16: + { + if (tag == 128) + { +parse_onlinesecs: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &onlinesecs_))); + set_has_onlinesecs(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(136)) goto parse_idlesecs; + break; + } + + // optional uint32 idlesecs = 17; + case 17: + { + if (tag == 136) + { +parse_idlesecs: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &idlesecs_))); + set_has_idlesecs(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(144)) goto parse_strong_certificate; + break; + } + + // optional bool strong_certificate = 18 [default = false]; + case 18: + { + if (tag == 144) + { +parse_strong_certificate: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &strong_certificate_))); + set_has_strong_certificate(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(152)) goto parse_opus; + break; + } + + // optional bool opus = 19 [default = false]; + case 19: + { + if (tag == 152) + { +parse_opus: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &opus_))); + set_has_opus(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.UserStats) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.UserStats) + return false; +#undef DO_ + } + + void UserStats::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.UserStats) + // optional uint32 session = 1; + if (has_session()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->session(), + output); + } + + // optional bool stats_only = 2 [default = false]; + if (has_stats_only()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->stats_only(), + output); + } + + // repeated bytes certificates = 3; + for (int i = 0; i < this->certificates_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteBytes( + 3, this->certificates(i), output); + } + + // optional .MumbleProto.UserStats.Stats from_client = 4; + if (has_from_client()) + { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, this->from_client(), output); + } + + // optional .MumbleProto.UserStats.Stats from_server = 5; + if (has_from_server()) + { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, this->from_server(), output); + } + + // optional uint32 udp_packets = 6; + if (has_udp_packets()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(6, + this->udp_packets(), output); + } + + // optional uint32 tcp_packets = 7; + if (has_tcp_packets()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(7, + this->tcp_packets(), output); + } + + // optional float udp_ping_avg = 8; + if (has_udp_ping_avg()) + { + ::google::protobuf::internal::WireFormatLite::WriteFloat(8, + this->udp_ping_avg(), output); + } + + // optional float udp_ping_var = 9; + if (has_udp_ping_var()) + { + ::google::protobuf::internal::WireFormatLite::WriteFloat(9, + this->udp_ping_var(), output); + } + + // optional float tcp_ping_avg = 10; + if (has_tcp_ping_avg()) + { + ::google::protobuf::internal::WireFormatLite::WriteFloat(10, + this->tcp_ping_avg(), output); + } + + // optional float tcp_ping_var = 11; + if (has_tcp_ping_var()) + { + ::google::protobuf::internal::WireFormatLite::WriteFloat(11, + this->tcp_ping_var(), output); + } + + // optional .MumbleProto.Version version = 12; + if (has_version()) + { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 12, this->version(), output); + } + + // repeated int32 celt_versions = 13; + for (int i = 0; i < this->celt_versions_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteInt32( + 13, this->celt_versions(i), output); + } + + // optional bytes address = 14; + if (has_address()) + { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 14, this->address(), output); + } + + // optional uint32 bandwidth = 15; + if (has_bandwidth()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(15, this->bandwidth(), + output); + } + + // optional uint32 onlinesecs = 16; + if (has_onlinesecs()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(16, + this->onlinesecs(), output); + } + + // optional uint32 idlesecs = 17; + if (has_idlesecs()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(17, this->idlesecs(), + output); + } + + // optional bool strong_certificate = 18 [default = false]; + if (has_strong_certificate()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(18, + this->strong_certificate(), output); + } + + // optional bool opus = 19 [default = false]; + if (has_opus()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(19, this->opus(), + output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.UserStats) + } + + ::google::protobuf::uint8* UserStats::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.UserStats) + // optional uint32 session = 1; + if (has_session()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, + this->session(), target); + } + + // optional bool stats_only = 2 [default = false]; + if (has_stats_only()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, + this->stats_only(), target); + } + + // repeated bytes certificates = 3; + for (int i = 0; i < this->certificates_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteBytesToArray(3, this->certificates(i), target); + } + + // optional .MumbleProto.UserStats.Stats from_client = 4; + if (has_from_client()) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 4, this->from_client(), target); + } + + // optional .MumbleProto.UserStats.Stats from_server = 5; + if (has_from_server()) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 5, this->from_server(), target); + } + + // optional uint32 udp_packets = 6; + if (has_udp_packets()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(6, + this->udp_packets(), target); + } + + // optional uint32 tcp_packets = 7; + if (has_tcp_packets()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(7, + this->tcp_packets(), target); + } + + // optional float udp_ping_avg = 8; + if (has_udp_ping_avg()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(8, + this->udp_ping_avg(), target); + } + + // optional float udp_ping_var = 9; + if (has_udp_ping_var()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(9, + this->udp_ping_var(), target); + } + + // optional float tcp_ping_avg = 10; + if (has_tcp_ping_avg()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(10, + this->tcp_ping_avg(), target); + } + + // optional float tcp_ping_var = 11; + if (has_tcp_ping_var()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(11, + this->tcp_ping_var(), target); + } + + // optional .MumbleProto.Version version = 12; + if (has_version()) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 12, this->version(), target); + } + + // repeated int32 celt_versions = 13; + for (int i = 0; i < this->celt_versions_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArray(13, this->celt_versions(i), target); + } + + // optional bytes address = 14; + if (has_address()) + { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 14, this->address(), target); + } + + // optional uint32 bandwidth = 15; + if (has_bandwidth()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(15, + this->bandwidth(), target); + } + + // optional uint32 onlinesecs = 16; + if (has_onlinesecs()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(16, + this->onlinesecs(), target); + } + + // optional uint32 idlesecs = 17; + if (has_idlesecs()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(17, + this->idlesecs(), target); + } + + // optional bool strong_certificate = 18 [default = false]; + if (has_strong_certificate()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(18, + this->strong_certificate(), target); + } + + // optional bool opus = 19 [default = false]; + if (has_opus()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(19, + this->opus(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.UserStats) + return target; + } + + int UserStats::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // optional uint32 session = 1; + if (has_session()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->session()); + } + + // optional bool stats_only = 2 [default = false]; + if (has_stats_only()) + { + total_size += 1 + 1; + } + + // optional .MumbleProto.UserStats.Stats from_client = 4; + if (has_from_client()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->from_client()); + } + + // optional .MumbleProto.UserStats.Stats from_server = 5; + if (has_from_server()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->from_server()); + } + + // optional uint32 udp_packets = 6; + if (has_udp_packets()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->udp_packets()); + } + + // optional uint32 tcp_packets = 7; + if (has_tcp_packets()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->tcp_packets()); + } + + // optional float udp_ping_avg = 8; + if (has_udp_ping_avg()) + { + total_size += 1 + 4; + } + + } + if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) + { + // optional float udp_ping_var = 9; + if (has_udp_ping_var()) + { + total_size += 1 + 4; + } + + // optional float tcp_ping_avg = 10; + if (has_tcp_ping_avg()) + { + total_size += 1 + 4; + } + + // optional float tcp_ping_var = 11; + if (has_tcp_ping_var()) + { + total_size += 1 + 4; + } + + // optional .MumbleProto.Version version = 12; + if (has_version()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->version()); + } + + // optional bytes address = 14; + if (has_address()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->address()); + } + + // optional uint32 bandwidth = 15; + if (has_bandwidth()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->bandwidth()); + } + + // optional uint32 onlinesecs = 16; + if (has_onlinesecs()) + { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->onlinesecs()); + } + + } + if (_has_bits_[16 / 32] & (0xffu << (16 % 32))) + { + // optional uint32 idlesecs = 17; + if (has_idlesecs()) + { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->idlesecs()); + } + + // optional bool strong_certificate = 18 [default = false]; + if (has_strong_certificate()) + { + total_size += 2 + 1; + } + + // optional bool opus = 19 [default = false]; + if (has_opus()) + { + total_size += 2 + 1; + } + + } + // repeated bytes certificates = 3; + total_size += 1 * this->certificates_size(); + for (int i = 0; i < this->certificates_size(); i++) + { + total_size += ::google::protobuf::internal::WireFormatLite::BytesSize( + this->certificates(i)); + } + + // repeated int32 celt_versions = 13; + { + int data_size = 0; + for (int i = 0; i < this->celt_versions_size(); i++) + { + data_size += ::google::protobuf::internal::WireFormatLite:: + Int32Size(this->celt_versions(i)); + } + total_size += 1 * this->celt_versions_size() + data_size; + } + + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void UserStats::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const UserStats* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void UserStats::MergeFrom(const UserStats& from) + { + GOOGLE_CHECK_NE(&from, this); + certificates_.MergeFrom(from.certificates_); + celt_versions_.MergeFrom(from.celt_versions_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_session()) + { + set_session(from.session()); + } + if (from.has_stats_only()) + { + set_stats_only(from.stats_only()); + } + if (from.has_from_client()) + { + mutable_from_client()->::MumbleProto::UserStats_Stats::MergeFrom( + from.from_client()); + } + if (from.has_from_server()) + { + mutable_from_server()->::MumbleProto::UserStats_Stats::MergeFrom( + from.from_server()); + } + if (from.has_udp_packets()) + { + set_udp_packets(from.udp_packets()); + } + if (from.has_tcp_packets()) + { + set_tcp_packets(from.tcp_packets()); + } + if (from.has_udp_ping_avg()) + { + set_udp_ping_avg(from.udp_ping_avg()); + } + } + if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) + { + if (from.has_udp_ping_var()) + { + set_udp_ping_var(from.udp_ping_var()); + } + if (from.has_tcp_ping_avg()) + { + set_tcp_ping_avg(from.tcp_ping_avg()); + } + if (from.has_tcp_ping_var()) + { + set_tcp_ping_var(from.tcp_ping_var()); + } + if (from.has_version()) + { + mutable_version()->::MumbleProto::Version::MergeFrom(from.version()); + } + if (from.has_address()) + { + set_address(from.address()); + } + if (from.has_bandwidth()) + { + set_bandwidth(from.bandwidth()); + } + if (from.has_onlinesecs()) + { + set_onlinesecs(from.onlinesecs()); + } + } + if (from._has_bits_[16 / 32] & (0xffu << (16 % 32))) + { + if (from.has_idlesecs()) + { + set_idlesecs(from.idlesecs()); + } + if (from.has_strong_certificate()) + { + set_strong_certificate(from.strong_certificate()); + } + if (from.has_opus()) + { + set_opus(from.opus()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void UserStats::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void UserStats::CopyFrom(const UserStats& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool UserStats::IsInitialized() const + { + + return true; + } + + void UserStats::Swap(UserStats* other) + { + if (other != this) + { + std::swap(session_, other->session_); + std::swap(stats_only_, other->stats_only_); + certificates_.Swap(&other->certificates_); + std::swap(from_client_, other->from_client_); + std::swap(from_server_, other->from_server_); + std::swap(udp_packets_, other->udp_packets_); + std::swap(tcp_packets_, other->tcp_packets_); + std::swap(udp_ping_avg_, other->udp_ping_avg_); + std::swap(udp_ping_var_, other->udp_ping_var_); + std::swap(tcp_ping_avg_, other->tcp_ping_avg_); + std::swap(tcp_ping_var_, other->tcp_ping_var_); + std::swap(version_, other->version_); + celt_versions_.Swap(&other->celt_versions_); + std::swap(address_, other->address_); + std::swap(bandwidth_, other->bandwidth_); + std::swap(onlinesecs_, other->onlinesecs_); + std::swap(idlesecs_, other->idlesecs_); + std::swap(strong_certificate_, other->strong_certificate_); + std::swap(opus_, other->opus_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata UserStats::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = UserStats_descriptor_; + metadata.reflection = UserStats_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int RequestBlob::kSessionTextureFieldNumber; + const int RequestBlob::kSessionCommentFieldNumber; + const int RequestBlob::kChannelDescriptionFieldNumber; +#endif // !_MSC_VER + + RequestBlob::RequestBlob() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.RequestBlob) + } + + void RequestBlob::InitAsDefaultInstance() + { + } + + RequestBlob::RequestBlob(const RequestBlob& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.RequestBlob) + } + + void RequestBlob::SharedCtor() + { + _cached_size_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + RequestBlob::~RequestBlob() + { + // @@protoc_insertion_point(destructor:MumbleProto.RequestBlob) + SharedDtor(); + } + + void RequestBlob::SharedDtor() + { + if (this != default_instance_) + { + } + } + + void RequestBlob::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* RequestBlob::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return RequestBlob_descriptor_; + } + + const RequestBlob& RequestBlob::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + RequestBlob* RequestBlob::default_instance_ = NULL; + + RequestBlob* RequestBlob::New() const + { + return new RequestBlob; + } + + void RequestBlob::Clear() + { + session_texture_.Clear(); + session_comment_.Clear(); + channel_description_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool RequestBlob::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.RequestBlob) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // repeated uint32 session_texture = 1; + case 1: + { + if (tag == 8) + { +parse_session_texture: + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + 1, 8, input, this->mutable_session_texture()))); + } + else if (tag == 10) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, this->mutable_session_texture()))); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(8)) goto parse_session_texture; + if (input->ExpectTag(16)) goto parse_session_comment; + break; + } + + // repeated uint32 session_comment = 2; + case 2: + { + if (tag == 16) + { +parse_session_comment: + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + 1, 16, input, this->mutable_session_comment()))); + } + else if (tag == 18) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, this->mutable_session_comment()))); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_session_comment; + if (input->ExpectTag(24)) goto parse_channel_description; + break; + } + + // repeated uint32 channel_description = 3; + case 3: + { + if (tag == 24) + { +parse_channel_description: + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + 1, 24, input, this->mutable_channel_description()))); + } + else if (tag == 26) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, this->mutable_channel_description()))); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(24)) goto parse_channel_description; + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.RequestBlob) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.RequestBlob) + return false; +#undef DO_ + } + + void RequestBlob::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.RequestBlob) + // repeated uint32 session_texture = 1; + for (int i = 0; i < this->session_texture_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32( + 1, this->session_texture(i), output); + } + + // repeated uint32 session_comment = 2; + for (int i = 0; i < this->session_comment_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32( + 2, this->session_comment(i), output); + } + + // repeated uint32 channel_description = 3; + for (int i = 0; i < this->channel_description_size(); i++) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32( + 3, this->channel_description(i), output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.RequestBlob) + } + + ::google::protobuf::uint8* RequestBlob::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.RequestBlob) + // repeated uint32 session_texture = 1; + for (int i = 0; i < this->session_texture_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteUInt32ToArray(1, this->session_texture(i), target); + } + + // repeated uint32 session_comment = 2; + for (int i = 0; i < this->session_comment_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteUInt32ToArray(2, this->session_comment(i), target); + } + + // repeated uint32 channel_description = 3; + for (int i = 0; i < this->channel_description_size(); i++) + { + target = ::google::protobuf::internal::WireFormatLite:: + WriteUInt32ToArray(3, this->channel_description(i), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.RequestBlob) + return target; + } + + int RequestBlob::ByteSize() const + { + int total_size = 0; + + // repeated uint32 session_texture = 1; + { + int data_size = 0; + for (int i = 0; i < this->session_texture_size(); i++) + { + data_size += ::google::protobuf::internal::WireFormatLite:: + UInt32Size(this->session_texture(i)); + } + total_size += 1 * this->session_texture_size() + data_size; + } + + // repeated uint32 session_comment = 2; + { + int data_size = 0; + for (int i = 0; i < this->session_comment_size(); i++) + { + data_size += ::google::protobuf::internal::WireFormatLite:: + UInt32Size(this->session_comment(i)); + } + total_size += 1 * this->session_comment_size() + data_size; + } + + // repeated uint32 channel_description = 3; + { + int data_size = 0; + for (int i = 0; i < this->channel_description_size(); i++) + { + data_size += ::google::protobuf::internal::WireFormatLite:: + UInt32Size(this->channel_description(i)); + } + total_size += 1 * this->channel_description_size() + data_size; + } + + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void RequestBlob::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const RequestBlob* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void RequestBlob::MergeFrom(const RequestBlob& from) + { + GOOGLE_CHECK_NE(&from, this); + session_texture_.MergeFrom(from.session_texture_); + session_comment_.MergeFrom(from.session_comment_); + channel_description_.MergeFrom(from.channel_description_); + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void RequestBlob::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void RequestBlob::CopyFrom(const RequestBlob& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool RequestBlob::IsInitialized() const + { + + return true; + } + + void RequestBlob::Swap(RequestBlob* other) + { + if (other != this) + { + session_texture_.Swap(&other->session_texture_); + session_comment_.Swap(&other->session_comment_); + channel_description_.Swap(&other->channel_description_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata RequestBlob::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = RequestBlob_descriptor_; + metadata.reflection = RequestBlob_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int ServerConfig::kMaxBandwidthFieldNumber; + const int ServerConfig::kWelcomeTextFieldNumber; + const int ServerConfig::kAllowHtmlFieldNumber; + const int ServerConfig::kMessageLengthFieldNumber; + const int ServerConfig::kImageMessageLengthFieldNumber; + const int ServerConfig::kMaxUsersFieldNumber; +#endif // !_MSC_VER + + ServerConfig::ServerConfig() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.ServerConfig) + } + + void ServerConfig::InitAsDefaultInstance() + { + } + + ServerConfig::ServerConfig(const ServerConfig& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.ServerConfig) + } + + void ServerConfig::SharedCtor() + { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + max_bandwidth_ = 0u; + welcome_text_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + allow_html_ = false; + message_length_ = 0u; + image_message_length_ = 0u; + max_users_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + ServerConfig::~ServerConfig() + { + // @@protoc_insertion_point(destructor:MumbleProto.ServerConfig) + SharedDtor(); + } + + void ServerConfig::SharedDtor() + { + if (welcome_text_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete welcome_text_; + } + if (this != default_instance_) + { + } + } + + void ServerConfig::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* ServerConfig::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return ServerConfig_descriptor_; + } + + const ServerConfig& ServerConfig::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + ServerConfig* ServerConfig::default_instance_ = NULL; + + ServerConfig* ServerConfig::New() const + { + return new ServerConfig; + } + + void ServerConfig::Clear() + { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + if (_has_bits_[0 / 32] & 63) + { + ZR_(max_bandwidth_, max_users_); + if (has_welcome_text()) + { + if (welcome_text_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + welcome_text_->clear(); + } + } + } + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool ServerConfig::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.ServerConfig) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // optional uint32 max_bandwidth = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &max_bandwidth_))); + set_has_max_bandwidth(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_welcome_text; + break; + } + + // optional string welcome_text = 2; + case 2: + { + if (tag == 18) + { +parse_welcome_text: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_welcome_text())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->welcome_text().data(), this->welcome_text().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "welcome_text"); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(24)) goto parse_allow_html; + break; + } + + // optional bool allow_html = 3; + case 3: + { + if (tag == 24) + { +parse_allow_html: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &allow_html_))); + set_has_allow_html(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(32)) goto parse_message_length; + break; + } + + // optional uint32 message_length = 4; + case 4: + { + if (tag == 32) + { +parse_message_length: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &message_length_))); + set_has_message_length(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(40)) goto parse_image_message_length; + break; + } + + // optional uint32 image_message_length = 5; + case 5: + { + if (tag == 40) + { +parse_image_message_length: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &image_message_length_))); + set_has_image_message_length(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(48)) goto parse_max_users; + break; + } + + // optional uint32 max_users = 6; + case 6: + { + if (tag == 48) + { +parse_max_users: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &max_users_))); + set_has_max_users(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.ServerConfig) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.ServerConfig) + return false; +#undef DO_ + } + + void ServerConfig::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.ServerConfig) + // optional uint32 max_bandwidth = 1; + if (has_max_bandwidth()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, + this->max_bandwidth(), output); + } + + // optional string welcome_text = 2; + if (has_welcome_text()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->welcome_text().data(), this->welcome_text().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "welcome_text"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->welcome_text(), output); + } + + // optional bool allow_html = 3; + if (has_allow_html()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->allow_html(), + output); + } + + // optional uint32 message_length = 4; + if (has_message_length()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(4, + this->message_length(), output); + } + + // optional uint32 image_message_length = 5; + if (has_image_message_length()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, + this->image_message_length(), output); + } + + // optional uint32 max_users = 6; + if (has_max_users()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(6, this->max_users(), + output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.ServerConfig) + } + + ::google::protobuf::uint8* ServerConfig::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.ServerConfig) + // optional uint32 max_bandwidth = 1; + if (has_max_bandwidth()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, + this->max_bandwidth(), target); + } + + // optional string welcome_text = 2; + if (has_welcome_text()) + { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->welcome_text().data(), this->welcome_text().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "welcome_text"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->welcome_text(), target); + } + + // optional bool allow_html = 3; + if (has_allow_html()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, + this->allow_html(), target); + } + + // optional uint32 message_length = 4; + if (has_message_length()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, + this->message_length(), target); + } + + // optional uint32 image_message_length = 5; + if (has_image_message_length()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, + this->image_message_length(), target); + } + + // optional uint32 max_users = 6; + if (has_max_users()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(6, + this->max_users(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.ServerConfig) + return target; + } + + int ServerConfig::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // optional uint32 max_bandwidth = 1; + if (has_max_bandwidth()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->max_bandwidth()); + } + + // optional string welcome_text = 2; + if (has_welcome_text()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->welcome_text()); + } + + // optional bool allow_html = 3; + if (has_allow_html()) + { + total_size += 1 + 1; + } + + // optional uint32 message_length = 4; + if (has_message_length()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->message_length()); + } + + // optional uint32 image_message_length = 5; + if (has_image_message_length()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->image_message_length()); + } + + // optional uint32 max_users = 6; + if (has_max_users()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->max_users()); + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void ServerConfig::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const ServerConfig* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void ServerConfig::MergeFrom(const ServerConfig& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_max_bandwidth()) + { + set_max_bandwidth(from.max_bandwidth()); + } + if (from.has_welcome_text()) + { + set_welcome_text(from.welcome_text()); + } + if (from.has_allow_html()) + { + set_allow_html(from.allow_html()); + } + if (from.has_message_length()) + { + set_message_length(from.message_length()); + } + if (from.has_image_message_length()) + { + set_image_message_length(from.image_message_length()); + } + if (from.has_max_users()) + { + set_max_users(from.max_users()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void ServerConfig::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void ServerConfig::CopyFrom(const ServerConfig& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool ServerConfig::IsInitialized() const + { + + return true; + } + + void ServerConfig::Swap(ServerConfig* other) + { + if (other != this) + { + std::swap(max_bandwidth_, other->max_bandwidth_); + std::swap(welcome_text_, other->welcome_text_); + std::swap(allow_html_, other->allow_html_); + std::swap(message_length_, other->message_length_); + std::swap(image_message_length_, other->image_message_length_); + std::swap(max_users_, other->max_users_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata ServerConfig::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ServerConfig_descriptor_; + metadata.reflection = ServerConfig_reflection_; + return metadata; + } + + +// =================================================================== + +#ifndef _MSC_VER + const int SuggestConfig::kVersionFieldNumber; + const int SuggestConfig::kPositionalFieldNumber; + const int SuggestConfig::kPushToTalkFieldNumber; +#endif // !_MSC_VER + + SuggestConfig::SuggestConfig() + : ::google::protobuf::Message() + { + SharedCtor(); + // @@protoc_insertion_point(constructor:MumbleProto.SuggestConfig) + } + + void SuggestConfig::InitAsDefaultInstance() + { + } + + SuggestConfig::SuggestConfig(const SuggestConfig& from) + : ::google::protobuf::Message() + { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:MumbleProto.SuggestConfig) + } + + void SuggestConfig::SharedCtor() + { + _cached_size_ = 0; + version_ = 0u; + positional_ = false; + push_to_talk_ = false; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + } + + SuggestConfig::~SuggestConfig() + { + // @@protoc_insertion_point(destructor:MumbleProto.SuggestConfig) + SharedDtor(); + } + + void SuggestConfig::SharedDtor() + { + if (this != default_instance_) + { + } + } + + void SuggestConfig::SetCachedSize(int size) const + { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + } + const ::google::protobuf::Descriptor* SuggestConfig::descriptor() + { + protobuf_AssignDescriptorsOnce(); + return SuggestConfig_descriptor_; + } + + const SuggestConfig& SuggestConfig::default_instance() + { + if (default_instance_ == NULL) protobuf_AddDesc_Mumble_2eproto(); + return *default_instance_; + } + + SuggestConfig* SuggestConfig::default_instance_ = NULL; + + SuggestConfig* SuggestConfig::New() const + { + return new SuggestConfig; + } + + void SuggestConfig::Clear() + { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast( \ + &reinterpret_cast(16)->f) - \ + reinterpret_cast(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + ZR_(version_, push_to_talk_); + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); + } + + bool SuggestConfig::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) + { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:MumbleProto.SuggestConfig) + for (;;) + { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff( + 127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) + { + // optional uint32 version = 1; + case 1: + { + if (tag == 8) + { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &version_))); + set_has_version(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_positional; + break; + } + + // optional bool positional = 2; + case 2: + { + if (tag == 16) + { +parse_positional: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &positional_))); + set_has_positional(); + } + else + { + goto handle_unusual; + } + if (input->ExpectTag(24)) goto parse_push_to_talk; + break; + } + + // optional bool push_to_talk = 3; + case 3: + { + if (tag == 24) + { +parse_push_to_talk: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( + input, &push_to_talk_))); + set_has_push_to_talk(); + } + else + { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: + { +handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) + { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:MumbleProto.SuggestConfig) + return true; +failure: + // @@protoc_insertion_point(parse_failure:MumbleProto.SuggestConfig) + return false; +#undef DO_ + } + + void SuggestConfig::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const + { + // @@protoc_insertion_point(serialize_start:MumbleProto.SuggestConfig) + // optional uint32 version = 1; + if (has_version()) + { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->version(), + output); + } + + // optional bool positional = 2; + if (has_positional()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->positional(), + output); + } + + // optional bool push_to_talk = 3; + if (has_push_to_talk()) + { + ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->push_to_talk(), + output); + } + + if (!unknown_fields().empty()) + { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:MumbleProto.SuggestConfig) + } + + ::google::protobuf::uint8* SuggestConfig::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const + { + // @@protoc_insertion_point(serialize_to_array_start:MumbleProto.SuggestConfig) + // optional uint32 version = 1; + if (has_version()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, + this->version(), target); + } + + // optional bool positional = 2; + if (has_positional()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, + this->positional(), target); + } + + // optional bool push_to_talk = 3; + if (has_push_to_talk()) + { + target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, + this->push_to_talk(), target); + } + + if (!unknown_fields().empty()) + { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:MumbleProto.SuggestConfig) + return target; + } + + int SuggestConfig::ByteSize() const + { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + // optional uint32 version = 1; + if (has_version()) + { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->version()); + } + + // optional bool positional = 2; + if (has_positional()) + { + total_size += 1 + 1; + } + + // optional bool push_to_talk = 3; + if (has_push_to_talk()) + { + total_size += 1 + 1; + } + + } + if (!unknown_fields().empty()) + { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; + } + + void SuggestConfig::MergeFrom(const ::google::protobuf::Message& from) + { + GOOGLE_CHECK_NE(&from, this); + const SuggestConfig* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) + { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } + else + { + MergeFrom(*source); + } + } + + void SuggestConfig::MergeFrom(const SuggestConfig& from) + { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) + { + if (from.has_version()) + { + set_version(from.version()); + } + if (from.has_positional()) + { + set_positional(from.positional()); + } + if (from.has_push_to_talk()) + { + set_push_to_talk(from.push_to_talk()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); + } + + void SuggestConfig::CopyFrom(const ::google::protobuf::Message& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + void SuggestConfig::CopyFrom(const SuggestConfig& from) + { + if (&from == this) return; + Clear(); + MergeFrom(from); + } + + bool SuggestConfig::IsInitialized() const + { + + return true; + } + + void SuggestConfig::Swap(SuggestConfig* other) + { + if (other != this) + { + std::swap(version_, other->version_); + std::swap(positional_, other->positional_); + std::swap(push_to_talk_, other->push_to_talk_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } + } + + ::google::protobuf::Metadata SuggestConfig::GetMetadata() const + { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = SuggestConfig_descriptor_; + metadata.reflection = SuggestConfig_reflection_; + return metadata; + } + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace MumbleProto + +// @@protoc_insertion_point(global_scope) diff --git a/src/mumble/Mumble.pb.h b/src/mumble/Mumble.pb.h new file mode 100644 index 0000000..74a7bf3 --- /dev/null +++ b/src/mumble/Mumble.pb.h @@ -0,0 +1,13317 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Mumble.proto + +#ifndef PROTOBUF_Mumble_2eproto__INCLUDED +#define PROTOBUF_Mumble_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 2006000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 2006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace MumbleProto +{ + +// Internal implementation detail -- do not call these. + void protobuf_AddDesc_Mumble_2eproto(); + void protobuf_AssignDesc_Mumble_2eproto(); + void protobuf_ShutdownFile_Mumble_2eproto(); + + class Version; + class UDPTunnel; + class Authenticate; + class Ping; + class Reject; + class ServerSync; + class ChannelRemove; + class ChannelState; + class UserRemove; + class UserState; + class BanList; + class BanList_BanEntry; + class TextMessage; + class PermissionDenied; + class ACL; + class ACL_ChanGroup; + class ACL_ChanACL; + class QueryUsers; + class CryptSetup; + class ContextActionModify; + class ContextAction; + class UserList; + class UserList_User; + class VoiceTarget; + class VoiceTarget_Target; + class PermissionQuery; + class CodecVersion; + class UserStats; + class UserStats_Stats; + class RequestBlob; + class ServerConfig; + class SuggestConfig; + + enum Reject_RejectType + { + Reject_RejectType_None = 0, + Reject_RejectType_WrongVersion = 1, + Reject_RejectType_InvalidUsername = 2, + Reject_RejectType_WrongUserPW = 3, + Reject_RejectType_WrongServerPW = 4, + Reject_RejectType_UsernameInUse = 5, + Reject_RejectType_ServerFull = 6, + Reject_RejectType_NoCertificate = 7, + Reject_RejectType_AuthenticatorFail = 8 + }; + bool Reject_RejectType_IsValid(int value); + const Reject_RejectType Reject_RejectType_RejectType_MIN = + Reject_RejectType_None; + const Reject_RejectType Reject_RejectType_RejectType_MAX = + Reject_RejectType_AuthenticatorFail; + const int Reject_RejectType_RejectType_ARRAYSIZE = + Reject_RejectType_RejectType_MAX + 1; + + const ::google::protobuf::EnumDescriptor* Reject_RejectType_descriptor(); + inline const ::std::string& Reject_RejectType_Name(Reject_RejectType value) + { + return ::google::protobuf::internal::NameOfEnum( + Reject_RejectType_descriptor(), value); + } + inline bool Reject_RejectType_Parse( + const ::std::string& name, Reject_RejectType* value) + { + return ::google::protobuf::internal::ParseNamedEnum( + Reject_RejectType_descriptor(), name, value); + } + enum PermissionDenied_DenyType + { + PermissionDenied_DenyType_Text = 0, + PermissionDenied_DenyType_Permission = 1, + PermissionDenied_DenyType_SuperUser = 2, + PermissionDenied_DenyType_ChannelName = 3, + PermissionDenied_DenyType_TextTooLong = 4, + PermissionDenied_DenyType_H9K = 5, + PermissionDenied_DenyType_TemporaryChannel = 6, + PermissionDenied_DenyType_MissingCertificate = 7, + PermissionDenied_DenyType_UserName = 8, + PermissionDenied_DenyType_ChannelFull = 9, + PermissionDenied_DenyType_NestingLimit = 10 + }; + bool PermissionDenied_DenyType_IsValid(int value); + const PermissionDenied_DenyType PermissionDenied_DenyType_DenyType_MIN = + PermissionDenied_DenyType_Text; + const PermissionDenied_DenyType PermissionDenied_DenyType_DenyType_MAX = + PermissionDenied_DenyType_NestingLimit; + const int PermissionDenied_DenyType_DenyType_ARRAYSIZE = + PermissionDenied_DenyType_DenyType_MAX + 1; + + const ::google::protobuf::EnumDescriptor* + PermissionDenied_DenyType_descriptor(); + inline const ::std::string& PermissionDenied_DenyType_Name( + PermissionDenied_DenyType value) + { + return ::google::protobuf::internal::NameOfEnum( + PermissionDenied_DenyType_descriptor(), value); + } + inline bool PermissionDenied_DenyType_Parse( + const ::std::string& name, PermissionDenied_DenyType* value) + { + return ::google::protobuf::internal::ParseNamedEnum( + PermissionDenied_DenyType_descriptor(), name, value); + } + enum ContextActionModify_Context + { + ContextActionModify_Context_Server = 1, + ContextActionModify_Context_Channel = 2, + ContextActionModify_Context_User = 4 + }; + bool ContextActionModify_Context_IsValid(int value); + const ContextActionModify_Context ContextActionModify_Context_Context_MIN = + ContextActionModify_Context_Server; + const ContextActionModify_Context ContextActionModify_Context_Context_MAX = + ContextActionModify_Context_User; + const int ContextActionModify_Context_Context_ARRAYSIZE = + ContextActionModify_Context_Context_MAX + 1; + + const ::google::protobuf::EnumDescriptor* + ContextActionModify_Context_descriptor(); + inline const ::std::string& ContextActionModify_Context_Name( + ContextActionModify_Context value) + { + return ::google::protobuf::internal::NameOfEnum( + ContextActionModify_Context_descriptor(), value); + } + inline bool ContextActionModify_Context_Parse( + const ::std::string& name, ContextActionModify_Context* value) + { + return ::google::protobuf::internal::ParseNamedEnum + ( + ContextActionModify_Context_descriptor(), name, value); + } + enum ContextActionModify_Operation + { + ContextActionModify_Operation_Add = 0, + ContextActionModify_Operation_Remove = 1 + }; + bool ContextActionModify_Operation_IsValid(int value); + const ContextActionModify_Operation ContextActionModify_Operation_Operation_MIN + = ContextActionModify_Operation_Add; + const ContextActionModify_Operation ContextActionModify_Operation_Operation_MAX + = ContextActionModify_Operation_Remove; + const int ContextActionModify_Operation_Operation_ARRAYSIZE = + ContextActionModify_Operation_Operation_MAX + 1; + + const ::google::protobuf::EnumDescriptor* + ContextActionModify_Operation_descriptor(); + inline const ::std::string& ContextActionModify_Operation_Name( + ContextActionModify_Operation value) + { + return ::google::protobuf::internal::NameOfEnum( + ContextActionModify_Operation_descriptor(), value); + } + inline bool ContextActionModify_Operation_Parse( + const ::std::string& name, ContextActionModify_Operation* value) + { + return ::google::protobuf::internal::ParseNamedEnum + ( + ContextActionModify_Operation_descriptor(), name, value); + } +// =================================================================== + + class Version : public ::google::protobuf::Message + { + public: + Version(); + virtual ~Version(); + + Version(const Version& from); + + inline Version& operator=(const Version& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const Version& default_instance(); + + void Swap(Version* other); + + // implements Message ---------------------------------------------- + + Version* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Version& from); + void MergeFrom(const Version& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional uint32 version = 1; + inline bool has_version() const; + inline void clear_version(); + static const int kVersionFieldNumber = 1; + inline ::google::protobuf::uint32 version() const; + inline void set_version(::google::protobuf::uint32 value); + + // optional string release = 2; + inline bool has_release() const; + inline void clear_release(); + static const int kReleaseFieldNumber = 2; + inline const ::std::string& release() const; + inline void set_release(const ::std::string& value); + inline void set_release(const char* value); + inline void set_release(const char* value, size_t size); + inline ::std::string* mutable_release(); + inline ::std::string* release_release(); + inline void set_allocated_release(::std::string* release); + + // optional string os = 3; + inline bool has_os() const; + inline void clear_os(); + static const int kOsFieldNumber = 3; + inline const ::std::string& os() const; + inline void set_os(const ::std::string& value); + inline void set_os(const char* value); + inline void set_os(const char* value, size_t size); + inline ::std::string* mutable_os(); + inline ::std::string* release_os(); + inline void set_allocated_os(::std::string* os); + + // optional string os_version = 4; + inline bool has_os_version() const; + inline void clear_os_version(); + static const int kOsVersionFieldNumber = 4; + inline const ::std::string& os_version() const; + inline void set_os_version(const ::std::string& value); + inline void set_os_version(const char* value); + inline void set_os_version(const char* value, size_t size); + inline ::std::string* mutable_os_version(); + inline ::std::string* release_os_version(); + inline void set_allocated_os_version(::std::string* os_version); + + // @@protoc_insertion_point(class_scope:MumbleProto.Version) + private: + inline void set_has_version(); + inline void clear_has_version(); + inline void set_has_release(); + inline void clear_has_release(); + inline void set_has_os(); + inline void clear_has_os(); + inline void set_has_os_version(); + inline void clear_has_os_version(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::std::string* release_; + ::std::string* os_; + ::std::string* os_version_; + ::google::protobuf::uint32 version_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static Version* default_instance_; + }; +// ------------------------------------------------------------------- + + class UDPTunnel : public ::google::protobuf::Message + { + public: + UDPTunnel(); + virtual ~UDPTunnel(); + + UDPTunnel(const UDPTunnel& from); + + inline UDPTunnel& operator=(const UDPTunnel& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const UDPTunnel& default_instance(); + + void Swap(UDPTunnel* other); + + // implements Message ---------------------------------------------- + + UDPTunnel* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const UDPTunnel& from); + void MergeFrom(const UDPTunnel& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required bytes packet = 1; + inline bool has_packet() const; + inline void clear_packet(); + static const int kPacketFieldNumber = 1; + inline const ::std::string& packet() const; + inline void set_packet(const ::std::string& value); + inline void set_packet(const char* value); + inline void set_packet(const void* value, size_t size); + inline ::std::string* mutable_packet(); + inline ::std::string* release_packet(); + inline void set_allocated_packet(::std::string* packet); + + // @@protoc_insertion_point(class_scope:MumbleProto.UDPTunnel) + private: + inline void set_has_packet(); + inline void clear_has_packet(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::std::string* packet_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static UDPTunnel* default_instance_; + }; +// ------------------------------------------------------------------- + + class Authenticate : public ::google::protobuf::Message + { + public: + Authenticate(); + virtual ~Authenticate(); + + Authenticate(const Authenticate& from); + + inline Authenticate& operator=(const Authenticate& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const Authenticate& default_instance(); + + void Swap(Authenticate* other); + + // implements Message ---------------------------------------------- + + Authenticate* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Authenticate& from); + void MergeFrom(const Authenticate& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string username = 1; + inline bool has_username() const; + inline void clear_username(); + static const int kUsernameFieldNumber = 1; + inline const ::std::string& username() const; + inline void set_username(const ::std::string& value); + inline void set_username(const char* value); + inline void set_username(const char* value, size_t size); + inline ::std::string* mutable_username(); + inline ::std::string* release_username(); + inline void set_allocated_username(::std::string* username); + + // optional string password = 2; + inline bool has_password() const; + inline void clear_password(); + static const int kPasswordFieldNumber = 2; + inline const ::std::string& password() const; + inline void set_password(const ::std::string& value); + inline void set_password(const char* value); + inline void set_password(const char* value, size_t size); + inline ::std::string* mutable_password(); + inline ::std::string* release_password(); + inline void set_allocated_password(::std::string* password); + + // repeated string tokens = 3; + inline int tokens_size() const; + inline void clear_tokens(); + static const int kTokensFieldNumber = 3; + inline const ::std::string& tokens(int index) const; + inline ::std::string* mutable_tokens(int index); + inline void set_tokens(int index, const ::std::string& value); + inline void set_tokens(int index, const char* value); + inline void set_tokens(int index, const char* value, size_t size); + inline ::std::string* add_tokens(); + inline void add_tokens(const ::std::string& value); + inline void add_tokens(const char* value); + inline void add_tokens(const char* value, size_t size); + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& tokens() + const; + inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_tokens(); + + // repeated int32 celt_versions = 4; + inline int celt_versions_size() const; + inline void clear_celt_versions(); + static const int kCeltVersionsFieldNumber = 4; + inline ::google::protobuf::int32 celt_versions(int index) const; + inline void set_celt_versions(int index, ::google::protobuf::int32 value); + inline void add_celt_versions(::google::protobuf::int32 value); + inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + celt_versions() const; + inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + mutable_celt_versions(); + + // optional bool opus = 5 [default = false]; + inline bool has_opus() const; + inline void clear_opus(); + static const int kOpusFieldNumber = 5; + inline bool opus() const; + inline void set_opus(bool value); + + // @@protoc_insertion_point(class_scope:MumbleProto.Authenticate) + private: + inline void set_has_username(); + inline void clear_has_username(); + inline void set_has_password(); + inline void clear_has_password(); + inline void set_has_opus(); + inline void clear_has_opus(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::std::string* username_; + ::std::string* password_; + ::google::protobuf::RepeatedPtrField< ::std::string> tokens_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 > celt_versions_; + bool opus_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static Authenticate* default_instance_; + }; +// ------------------------------------------------------------------- + + class Ping : public ::google::protobuf::Message + { + public: + Ping(); + virtual ~Ping(); + + Ping(const Ping& from); + + inline Ping& operator=(const Ping& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const Ping& default_instance(); + + void Swap(Ping* other); + + // implements Message ---------------------------------------------- + + Ping* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Ping& from); + void MergeFrom(const Ping& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional uint64 timestamp = 1; + inline bool has_timestamp() const; + inline void clear_timestamp(); + static const int kTimestampFieldNumber = 1; + inline ::google::protobuf::uint64 timestamp() const; + inline void set_timestamp(::google::protobuf::uint64 value); + + // optional uint32 good = 2; + inline bool has_good() const; + inline void clear_good(); + static const int kGoodFieldNumber = 2; + inline ::google::protobuf::uint32 good() const; + inline void set_good(::google::protobuf::uint32 value); + + // optional uint32 late = 3; + inline bool has_late() const; + inline void clear_late(); + static const int kLateFieldNumber = 3; + inline ::google::protobuf::uint32 late() const; + inline void set_late(::google::protobuf::uint32 value); + + // optional uint32 lost = 4; + inline bool has_lost() const; + inline void clear_lost(); + static const int kLostFieldNumber = 4; + inline ::google::protobuf::uint32 lost() const; + inline void set_lost(::google::protobuf::uint32 value); + + // optional uint32 resync = 5; + inline bool has_resync() const; + inline void clear_resync(); + static const int kResyncFieldNumber = 5; + inline ::google::protobuf::uint32 resync() const; + inline void set_resync(::google::protobuf::uint32 value); + + // optional uint32 udp_packets = 6; + inline bool has_udp_packets() const; + inline void clear_udp_packets(); + static const int kUdpPacketsFieldNumber = 6; + inline ::google::protobuf::uint32 udp_packets() const; + inline void set_udp_packets(::google::protobuf::uint32 value); + + // optional uint32 tcp_packets = 7; + inline bool has_tcp_packets() const; + inline void clear_tcp_packets(); + static const int kTcpPacketsFieldNumber = 7; + inline ::google::protobuf::uint32 tcp_packets() const; + inline void set_tcp_packets(::google::protobuf::uint32 value); + + // optional float udp_ping_avg = 8; + inline bool has_udp_ping_avg() const; + inline void clear_udp_ping_avg(); + static const int kUdpPingAvgFieldNumber = 8; + inline float udp_ping_avg() const; + inline void set_udp_ping_avg(float value); + + // optional float udp_ping_var = 9; + inline bool has_udp_ping_var() const; + inline void clear_udp_ping_var(); + static const int kUdpPingVarFieldNumber = 9; + inline float udp_ping_var() const; + inline void set_udp_ping_var(float value); + + // optional float tcp_ping_avg = 10; + inline bool has_tcp_ping_avg() const; + inline void clear_tcp_ping_avg(); + static const int kTcpPingAvgFieldNumber = 10; + inline float tcp_ping_avg() const; + inline void set_tcp_ping_avg(float value); + + // optional float tcp_ping_var = 11; + inline bool has_tcp_ping_var() const; + inline void clear_tcp_ping_var(); + static const int kTcpPingVarFieldNumber = 11; + inline float tcp_ping_var() const; + inline void set_tcp_ping_var(float value); + + // @@protoc_insertion_point(class_scope:MumbleProto.Ping) + private: + inline void set_has_timestamp(); + inline void clear_has_timestamp(); + inline void set_has_good(); + inline void clear_has_good(); + inline void set_has_late(); + inline void clear_has_late(); + inline void set_has_lost(); + inline void clear_has_lost(); + inline void set_has_resync(); + inline void clear_has_resync(); + inline void set_has_udp_packets(); + inline void clear_has_udp_packets(); + inline void set_has_tcp_packets(); + inline void clear_has_tcp_packets(); + inline void set_has_udp_ping_avg(); + inline void clear_has_udp_ping_avg(); + inline void set_has_udp_ping_var(); + inline void clear_has_udp_ping_var(); + inline void set_has_tcp_ping_avg(); + inline void clear_has_tcp_ping_avg(); + inline void set_has_tcp_ping_var(); + inline void clear_has_tcp_ping_var(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::uint64 timestamp_; + ::google::protobuf::uint32 good_; + ::google::protobuf::uint32 late_; + ::google::protobuf::uint32 lost_; + ::google::protobuf::uint32 resync_; + ::google::protobuf::uint32 udp_packets_; + ::google::protobuf::uint32 tcp_packets_; + float udp_ping_avg_; + float udp_ping_var_; + float tcp_ping_avg_; + float tcp_ping_var_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static Ping* default_instance_; + }; +// ------------------------------------------------------------------- + + class Reject : public ::google::protobuf::Message + { + public: + Reject(); + virtual ~Reject(); + + Reject(const Reject& from); + + inline Reject& operator=(const Reject& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const Reject& default_instance(); + + void Swap(Reject* other); + + // implements Message ---------------------------------------------- + + Reject* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Reject& from); + void MergeFrom(const Reject& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef Reject_RejectType RejectType; + static const RejectType None = Reject_RejectType_None; + static const RejectType WrongVersion = Reject_RejectType_WrongVersion; + static const RejectType InvalidUsername = Reject_RejectType_InvalidUsername; + static const RejectType WrongUserPW = Reject_RejectType_WrongUserPW; + static const RejectType WrongServerPW = Reject_RejectType_WrongServerPW; + static const RejectType UsernameInUse = Reject_RejectType_UsernameInUse; + static const RejectType ServerFull = Reject_RejectType_ServerFull; + static const RejectType NoCertificate = Reject_RejectType_NoCertificate; + static const RejectType AuthenticatorFail = Reject_RejectType_AuthenticatorFail; + static inline bool RejectType_IsValid(int value) + { + return Reject_RejectType_IsValid(value); + } + static const RejectType RejectType_MIN = + Reject_RejectType_RejectType_MIN; + static const RejectType RejectType_MAX = + Reject_RejectType_RejectType_MAX; + static const int RejectType_ARRAYSIZE = + Reject_RejectType_RejectType_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + RejectType_descriptor() + { + return Reject_RejectType_descriptor(); + } + static inline const ::std::string& RejectType_Name(RejectType value) + { + return Reject_RejectType_Name(value); + } + static inline bool RejectType_Parse(const ::std::string& name, + RejectType* value) + { + return Reject_RejectType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // optional .MumbleProto.Reject.RejectType type = 1; + inline bool has_type() const; + inline void clear_type(); + static const int kTypeFieldNumber = 1; + inline ::MumbleProto::Reject_RejectType type() const; + inline void set_type(::MumbleProto::Reject_RejectType value); + + // optional string reason = 2; + inline bool has_reason() const; + inline void clear_reason(); + static const int kReasonFieldNumber = 2; + inline const ::std::string& reason() const; + inline void set_reason(const ::std::string& value); + inline void set_reason(const char* value); + inline void set_reason(const char* value, size_t size); + inline ::std::string* mutable_reason(); + inline ::std::string* release_reason(); + inline void set_allocated_reason(::std::string* reason); + + // @@protoc_insertion_point(class_scope:MumbleProto.Reject) + private: + inline void set_has_type(); + inline void clear_has_type(); + inline void set_has_reason(); + inline void clear_has_reason(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::std::string* reason_; + int type_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static Reject* default_instance_; + }; +// ------------------------------------------------------------------- + + class ServerSync : public ::google::protobuf::Message + { + public: + ServerSync(); + virtual ~ServerSync(); + + ServerSync(const ServerSync& from); + + inline ServerSync& operator=(const ServerSync& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ServerSync& default_instance(); + + void Swap(ServerSync* other); + + // implements Message ---------------------------------------------- + + ServerSync* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ServerSync& from); + void MergeFrom(const ServerSync& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional uint32 session = 1; + inline bool has_session() const; + inline void clear_session(); + static const int kSessionFieldNumber = 1; + inline ::google::protobuf::uint32 session() const; + inline void set_session(::google::protobuf::uint32 value); + + // optional uint32 max_bandwidth = 2; + inline bool has_max_bandwidth() const; + inline void clear_max_bandwidth(); + static const int kMaxBandwidthFieldNumber = 2; + inline ::google::protobuf::uint32 max_bandwidth() const; + inline void set_max_bandwidth(::google::protobuf::uint32 value); + + // optional string welcome_text = 3; + inline bool has_welcome_text() const; + inline void clear_welcome_text(); + static const int kWelcomeTextFieldNumber = 3; + inline const ::std::string& welcome_text() const; + inline void set_welcome_text(const ::std::string& value); + inline void set_welcome_text(const char* value); + inline void set_welcome_text(const char* value, size_t size); + inline ::std::string* mutable_welcome_text(); + inline ::std::string* release_welcome_text(); + inline void set_allocated_welcome_text(::std::string* welcome_text); + + // optional uint64 permissions = 4; + inline bool has_permissions() const; + inline void clear_permissions(); + static const int kPermissionsFieldNumber = 4; + inline ::google::protobuf::uint64 permissions() const; + inline void set_permissions(::google::protobuf::uint64 value); + + // @@protoc_insertion_point(class_scope:MumbleProto.ServerSync) + private: + inline void set_has_session(); + inline void clear_has_session(); + inline void set_has_max_bandwidth(); + inline void clear_has_max_bandwidth(); + inline void set_has_welcome_text(); + inline void clear_has_welcome_text(); + inline void set_has_permissions(); + inline void clear_has_permissions(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::uint32 session_; + ::google::protobuf::uint32 max_bandwidth_; + ::std::string* welcome_text_; + ::google::protobuf::uint64 permissions_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static ServerSync* default_instance_; + }; +// ------------------------------------------------------------------- + + class ChannelRemove : public ::google::protobuf::Message + { + public: + ChannelRemove(); + virtual ~ChannelRemove(); + + ChannelRemove(const ChannelRemove& from); + + inline ChannelRemove& operator=(const ChannelRemove& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ChannelRemove& default_instance(); + + void Swap(ChannelRemove* other); + + // implements Message ---------------------------------------------- + + ChannelRemove* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ChannelRemove& from); + void MergeFrom(const ChannelRemove& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required uint32 channel_id = 1; + inline bool has_channel_id() const; + inline void clear_channel_id(); + static const int kChannelIdFieldNumber = 1; + inline ::google::protobuf::uint32 channel_id() const; + inline void set_channel_id(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:MumbleProto.ChannelRemove) + private: + inline void set_has_channel_id(); + inline void clear_has_channel_id(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::uint32 channel_id_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static ChannelRemove* default_instance_; + }; +// ------------------------------------------------------------------- + + class ChannelState : public ::google::protobuf::Message + { + public: + ChannelState(); + virtual ~ChannelState(); + + ChannelState(const ChannelState& from); + + inline ChannelState& operator=(const ChannelState& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ChannelState& default_instance(); + + void Swap(ChannelState* other); + + // implements Message ---------------------------------------------- + + ChannelState* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ChannelState& from); + void MergeFrom(const ChannelState& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional uint32 channel_id = 1; + inline bool has_channel_id() const; + inline void clear_channel_id(); + static const int kChannelIdFieldNumber = 1; + inline ::google::protobuf::uint32 channel_id() const; + inline void set_channel_id(::google::protobuf::uint32 value); + + // optional uint32 parent = 2; + inline bool has_parent() const; + inline void clear_parent(); + static const int kParentFieldNumber = 2; + inline ::google::protobuf::uint32 parent() const; + inline void set_parent(::google::protobuf::uint32 value); + + // optional string name = 3; + inline bool has_name() const; + inline void clear_name(); + static const int kNameFieldNumber = 3; + inline const ::std::string& name() const; + inline void set_name(const ::std::string& value); + inline void set_name(const char* value); + inline void set_name(const char* value, size_t size); + inline ::std::string* mutable_name(); + inline ::std::string* release_name(); + inline void set_allocated_name(::std::string* name); + + // repeated uint32 links = 4; + inline int links_size() const; + inline void clear_links(); + static const int kLinksFieldNumber = 4; + inline ::google::protobuf::uint32 links(int index) const; + inline void set_links(int index, ::google::protobuf::uint32 value); + inline void add_links(::google::protobuf::uint32 value); + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + links() const; + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + mutable_links(); + + // optional string description = 5; + inline bool has_description() const; + inline void clear_description(); + static const int kDescriptionFieldNumber = 5; + inline const ::std::string& description() const; + inline void set_description(const ::std::string& value); + inline void set_description(const char* value); + inline void set_description(const char* value, size_t size); + inline ::std::string* mutable_description(); + inline ::std::string* release_description(); + inline void set_allocated_description(::std::string* description); + + // repeated uint32 links_add = 6; + inline int links_add_size() const; + inline void clear_links_add(); + static const int kLinksAddFieldNumber = 6; + inline ::google::protobuf::uint32 links_add(int index) const; + inline void set_links_add(int index, ::google::protobuf::uint32 value); + inline void add_links_add(::google::protobuf::uint32 value); + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + links_add() const; + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + mutable_links_add(); + + // repeated uint32 links_remove = 7; + inline int links_remove_size() const; + inline void clear_links_remove(); + static const int kLinksRemoveFieldNumber = 7; + inline ::google::protobuf::uint32 links_remove(int index) const; + inline void set_links_remove(int index, ::google::protobuf::uint32 value); + inline void add_links_remove(::google::protobuf::uint32 value); + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + links_remove() const; + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + mutable_links_remove(); + + // optional bool temporary = 8 [default = false]; + inline bool has_temporary() const; + inline void clear_temporary(); + static const int kTemporaryFieldNumber = 8; + inline bool temporary() const; + inline void set_temporary(bool value); + + // optional int32 position = 9 [default = 0]; + inline bool has_position() const; + inline void clear_position(); + static const int kPositionFieldNumber = 9; + inline ::google::protobuf::int32 position() const; + inline void set_position(::google::protobuf::int32 value); + + // optional bytes description_hash = 10; + inline bool has_description_hash() const; + inline void clear_description_hash(); + static const int kDescriptionHashFieldNumber = 10; + inline const ::std::string& description_hash() const; + inline void set_description_hash(const ::std::string& value); + inline void set_description_hash(const char* value); + inline void set_description_hash(const void* value, size_t size); + inline ::std::string* mutable_description_hash(); + inline ::std::string* release_description_hash(); + inline void set_allocated_description_hash(::std::string* description_hash); + + // optional uint32 max_users = 11; + inline bool has_max_users() const; + inline void clear_max_users(); + static const int kMaxUsersFieldNumber = 11; + inline ::google::protobuf::uint32 max_users() const; + inline void set_max_users(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:MumbleProto.ChannelState) + private: + inline void set_has_channel_id(); + inline void clear_has_channel_id(); + inline void set_has_parent(); + inline void clear_has_parent(); + inline void set_has_name(); + inline void clear_has_name(); + inline void set_has_description(); + inline void clear_has_description(); + inline void set_has_temporary(); + inline void clear_has_temporary(); + inline void set_has_position(); + inline void clear_has_position(); + inline void set_has_description_hash(); + inline void clear_has_description_hash(); + inline void set_has_max_users(); + inline void clear_has_max_users(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::uint32 channel_id_; + ::google::protobuf::uint32 parent_; + ::std::string* name_; + ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > links_; + ::std::string* description_; + ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > links_add_; + ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > links_remove_; + bool temporary_; + ::google::protobuf::int32 position_; + ::std::string* description_hash_; + ::google::protobuf::uint32 max_users_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static ChannelState* default_instance_; + }; +// ------------------------------------------------------------------- + + class UserRemove : public ::google::protobuf::Message + { + public: + UserRemove(); + virtual ~UserRemove(); + + UserRemove(const UserRemove& from); + + inline UserRemove& operator=(const UserRemove& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const UserRemove& default_instance(); + + void Swap(UserRemove* other); + + // implements Message ---------------------------------------------- + + UserRemove* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const UserRemove& from); + void MergeFrom(const UserRemove& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required uint32 session = 1; + inline bool has_session() const; + inline void clear_session(); + static const int kSessionFieldNumber = 1; + inline ::google::protobuf::uint32 session() const; + inline void set_session(::google::protobuf::uint32 value); + + // optional uint32 actor = 2; + inline bool has_actor() const; + inline void clear_actor(); + static const int kActorFieldNumber = 2; + inline ::google::protobuf::uint32 actor() const; + inline void set_actor(::google::protobuf::uint32 value); + + // optional string reason = 3; + inline bool has_reason() const; + inline void clear_reason(); + static const int kReasonFieldNumber = 3; + inline const ::std::string& reason() const; + inline void set_reason(const ::std::string& value); + inline void set_reason(const char* value); + inline void set_reason(const char* value, size_t size); + inline ::std::string* mutable_reason(); + inline ::std::string* release_reason(); + inline void set_allocated_reason(::std::string* reason); + + // optional bool ban = 4; + inline bool has_ban() const; + inline void clear_ban(); + static const int kBanFieldNumber = 4; + inline bool ban() const; + inline void set_ban(bool value); + + // @@protoc_insertion_point(class_scope:MumbleProto.UserRemove) + private: + inline void set_has_session(); + inline void clear_has_session(); + inline void set_has_actor(); + inline void clear_has_actor(); + inline void set_has_reason(); + inline void clear_has_reason(); + inline void set_has_ban(); + inline void clear_has_ban(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::uint32 session_; + ::google::protobuf::uint32 actor_; + ::std::string* reason_; + bool ban_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static UserRemove* default_instance_; + }; +// ------------------------------------------------------------------- + + class UserState : public ::google::protobuf::Message + { + public: + UserState(); + virtual ~UserState(); + + UserState(const UserState& from); + + inline UserState& operator=(const UserState& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const UserState& default_instance(); + + void Swap(UserState* other); + + // implements Message ---------------------------------------------- + + UserState* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const UserState& from); + void MergeFrom(const UserState& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional uint32 session = 1; + inline bool has_session() const; + inline void clear_session(); + static const int kSessionFieldNumber = 1; + inline ::google::protobuf::uint32 session() const; + inline void set_session(::google::protobuf::uint32 value); + + // optional uint32 actor = 2; + inline bool has_actor() const; + inline void clear_actor(); + static const int kActorFieldNumber = 2; + inline ::google::protobuf::uint32 actor() const; + inline void set_actor(::google::protobuf::uint32 value); + + // optional string name = 3; + inline bool has_name() const; + inline void clear_name(); + static const int kNameFieldNumber = 3; + inline const ::std::string& name() const; + inline void set_name(const ::std::string& value); + inline void set_name(const char* value); + inline void set_name(const char* value, size_t size); + inline ::std::string* mutable_name(); + inline ::std::string* release_name(); + inline void set_allocated_name(::std::string* name); + + // optional uint32 user_id = 4; + inline bool has_user_id() const; + inline void clear_user_id(); + static const int kUserIdFieldNumber = 4; + inline ::google::protobuf::uint32 user_id() const; + inline void set_user_id(::google::protobuf::uint32 value); + + // optional uint32 channel_id = 5; + inline bool has_channel_id() const; + inline void clear_channel_id(); + static const int kChannelIdFieldNumber = 5; + inline ::google::protobuf::uint32 channel_id() const; + inline void set_channel_id(::google::protobuf::uint32 value); + + // optional bool mute = 6; + inline bool has_mute() const; + inline void clear_mute(); + static const int kMuteFieldNumber = 6; + inline bool mute() const; + inline void set_mute(bool value); + + // optional bool deaf = 7; + inline bool has_deaf() const; + inline void clear_deaf(); + static const int kDeafFieldNumber = 7; + inline bool deaf() const; + inline void set_deaf(bool value); + + // optional bool suppress = 8; + inline bool has_suppress() const; + inline void clear_suppress(); + static const int kSuppressFieldNumber = 8; + inline bool suppress() const; + inline void set_suppress(bool value); + + // optional bool self_mute = 9; + inline bool has_self_mute() const; + inline void clear_self_mute(); + static const int kSelfMuteFieldNumber = 9; + inline bool self_mute() const; + inline void set_self_mute(bool value); + + // optional bool self_deaf = 10; + inline bool has_self_deaf() const; + inline void clear_self_deaf(); + static const int kSelfDeafFieldNumber = 10; + inline bool self_deaf() const; + inline void set_self_deaf(bool value); + + // optional bytes texture = 11; + inline bool has_texture() const; + inline void clear_texture(); + static const int kTextureFieldNumber = 11; + inline const ::std::string& texture() const; + inline void set_texture(const ::std::string& value); + inline void set_texture(const char* value); + inline void set_texture(const void* value, size_t size); + inline ::std::string* mutable_texture(); + inline ::std::string* release_texture(); + inline void set_allocated_texture(::std::string* texture); + + // optional bytes plugin_context = 12; + inline bool has_plugin_context() const; + inline void clear_plugin_context(); + static const int kPluginContextFieldNumber = 12; + inline const ::std::string& plugin_context() const; + inline void set_plugin_context(const ::std::string& value); + inline void set_plugin_context(const char* value); + inline void set_plugin_context(const void* value, size_t size); + inline ::std::string* mutable_plugin_context(); + inline ::std::string* release_plugin_context(); + inline void set_allocated_plugin_context(::std::string* plugin_context); + + // optional string plugin_identity = 13; + inline bool has_plugin_identity() const; + inline void clear_plugin_identity(); + static const int kPluginIdentityFieldNumber = 13; + inline const ::std::string& plugin_identity() const; + inline void set_plugin_identity(const ::std::string& value); + inline void set_plugin_identity(const char* value); + inline void set_plugin_identity(const char* value, size_t size); + inline ::std::string* mutable_plugin_identity(); + inline ::std::string* release_plugin_identity(); + inline void set_allocated_plugin_identity(::std::string* plugin_identity); + + // optional string comment = 14; + inline bool has_comment() const; + inline void clear_comment(); + static const int kCommentFieldNumber = 14; + inline const ::std::string& comment() const; + inline void set_comment(const ::std::string& value); + inline void set_comment(const char* value); + inline void set_comment(const char* value, size_t size); + inline ::std::string* mutable_comment(); + inline ::std::string* release_comment(); + inline void set_allocated_comment(::std::string* comment); + + // optional string hash = 15; + inline bool has_hash() const; + inline void clear_hash(); + static const int kHashFieldNumber = 15; + inline const ::std::string& hash() const; + inline void set_hash(const ::std::string& value); + inline void set_hash(const char* value); + inline void set_hash(const char* value, size_t size); + inline ::std::string* mutable_hash(); + inline ::std::string* release_hash(); + inline void set_allocated_hash(::std::string* hash); + + // optional bytes comment_hash = 16; + inline bool has_comment_hash() const; + inline void clear_comment_hash(); + static const int kCommentHashFieldNumber = 16; + inline const ::std::string& comment_hash() const; + inline void set_comment_hash(const ::std::string& value); + inline void set_comment_hash(const char* value); + inline void set_comment_hash(const void* value, size_t size); + inline ::std::string* mutable_comment_hash(); + inline ::std::string* release_comment_hash(); + inline void set_allocated_comment_hash(::std::string* comment_hash); + + // optional bytes texture_hash = 17; + inline bool has_texture_hash() const; + inline void clear_texture_hash(); + static const int kTextureHashFieldNumber = 17; + inline const ::std::string& texture_hash() const; + inline void set_texture_hash(const ::std::string& value); + inline void set_texture_hash(const char* value); + inline void set_texture_hash(const void* value, size_t size); + inline ::std::string* mutable_texture_hash(); + inline ::std::string* release_texture_hash(); + inline void set_allocated_texture_hash(::std::string* texture_hash); + + // optional bool priority_speaker = 18; + inline bool has_priority_speaker() const; + inline void clear_priority_speaker(); + static const int kPrioritySpeakerFieldNumber = 18; + inline bool priority_speaker() const; + inline void set_priority_speaker(bool value); + + // optional bool recording = 19; + inline bool has_recording() const; + inline void clear_recording(); + static const int kRecordingFieldNumber = 19; + inline bool recording() const; + inline void set_recording(bool value); + + // @@protoc_insertion_point(class_scope:MumbleProto.UserState) + private: + inline void set_has_session(); + inline void clear_has_session(); + inline void set_has_actor(); + inline void clear_has_actor(); + inline void set_has_name(); + inline void clear_has_name(); + inline void set_has_user_id(); + inline void clear_has_user_id(); + inline void set_has_channel_id(); + inline void clear_has_channel_id(); + inline void set_has_mute(); + inline void clear_has_mute(); + inline void set_has_deaf(); + inline void clear_has_deaf(); + inline void set_has_suppress(); + inline void clear_has_suppress(); + inline void set_has_self_mute(); + inline void clear_has_self_mute(); + inline void set_has_self_deaf(); + inline void clear_has_self_deaf(); + inline void set_has_texture(); + inline void clear_has_texture(); + inline void set_has_plugin_context(); + inline void clear_has_plugin_context(); + inline void set_has_plugin_identity(); + inline void clear_has_plugin_identity(); + inline void set_has_comment(); + inline void clear_has_comment(); + inline void set_has_hash(); + inline void clear_has_hash(); + inline void set_has_comment_hash(); + inline void clear_has_comment_hash(); + inline void set_has_texture_hash(); + inline void clear_has_texture_hash(); + inline void set_has_priority_speaker(); + inline void clear_has_priority_speaker(); + inline void set_has_recording(); + inline void clear_has_recording(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::uint32 session_; + ::google::protobuf::uint32 actor_; + ::std::string* name_; + ::google::protobuf::uint32 user_id_; + ::google::protobuf::uint32 channel_id_; + ::std::string* texture_; + bool mute_; + bool deaf_; + bool suppress_; + bool self_mute_; + bool self_deaf_; + bool priority_speaker_; + bool recording_; + ::std::string* plugin_context_; + ::std::string* plugin_identity_; + ::std::string* comment_; + ::std::string* hash_; + ::std::string* comment_hash_; + ::std::string* texture_hash_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static UserState* default_instance_; + }; +// ------------------------------------------------------------------- + + class BanList_BanEntry : public ::google::protobuf::Message + { + public: + BanList_BanEntry(); + virtual ~BanList_BanEntry(); + + BanList_BanEntry(const BanList_BanEntry& from); + + inline BanList_BanEntry& operator=(const BanList_BanEntry& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const BanList_BanEntry& default_instance(); + + void Swap(BanList_BanEntry* other); + + // implements Message ---------------------------------------------- + + BanList_BanEntry* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const BanList_BanEntry& from); + void MergeFrom(const BanList_BanEntry& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required bytes address = 1; + inline bool has_address() const; + inline void clear_address(); + static const int kAddressFieldNumber = 1; + inline const ::std::string& address() const; + inline void set_address(const ::std::string& value); + inline void set_address(const char* value); + inline void set_address(const void* value, size_t size); + inline ::std::string* mutable_address(); + inline ::std::string* release_address(); + inline void set_allocated_address(::std::string* address); + + // required uint32 mask = 2; + inline bool has_mask() const; + inline void clear_mask(); + static const int kMaskFieldNumber = 2; + inline ::google::protobuf::uint32 mask() const; + inline void set_mask(::google::protobuf::uint32 value); + + // optional string name = 3; + inline bool has_name() const; + inline void clear_name(); + static const int kNameFieldNumber = 3; + inline const ::std::string& name() const; + inline void set_name(const ::std::string& value); + inline void set_name(const char* value); + inline void set_name(const char* value, size_t size); + inline ::std::string* mutable_name(); + inline ::std::string* release_name(); + inline void set_allocated_name(::std::string* name); + + // optional string hash = 4; + inline bool has_hash() const; + inline void clear_hash(); + static const int kHashFieldNumber = 4; + inline const ::std::string& hash() const; + inline void set_hash(const ::std::string& value); + inline void set_hash(const char* value); + inline void set_hash(const char* value, size_t size); + inline ::std::string* mutable_hash(); + inline ::std::string* release_hash(); + inline void set_allocated_hash(::std::string* hash); + + // optional string reason = 5; + inline bool has_reason() const; + inline void clear_reason(); + static const int kReasonFieldNumber = 5; + inline const ::std::string& reason() const; + inline void set_reason(const ::std::string& value); + inline void set_reason(const char* value); + inline void set_reason(const char* value, size_t size); + inline ::std::string* mutable_reason(); + inline ::std::string* release_reason(); + inline void set_allocated_reason(::std::string* reason); + + // optional string start = 6; + inline bool has_start() const; + inline void clear_start(); + static const int kStartFieldNumber = 6; + inline const ::std::string& start() const; + inline void set_start(const ::std::string& value); + inline void set_start(const char* value); + inline void set_start(const char* value, size_t size); + inline ::std::string* mutable_start(); + inline ::std::string* release_start(); + inline void set_allocated_start(::std::string* start); + + // optional uint32 duration = 7; + inline bool has_duration() const; + inline void clear_duration(); + static const int kDurationFieldNumber = 7; + inline ::google::protobuf::uint32 duration() const; + inline void set_duration(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:MumbleProto.BanList.BanEntry) + private: + inline void set_has_address(); + inline void clear_has_address(); + inline void set_has_mask(); + inline void clear_has_mask(); + inline void set_has_name(); + inline void clear_has_name(); + inline void set_has_hash(); + inline void clear_has_hash(); + inline void set_has_reason(); + inline void clear_has_reason(); + inline void set_has_start(); + inline void clear_has_start(); + inline void set_has_duration(); + inline void clear_has_duration(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::std::string* address_; + ::std::string* name_; + ::std::string* hash_; + ::google::protobuf::uint32 mask_; + ::google::protobuf::uint32 duration_; + ::std::string* reason_; + ::std::string* start_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static BanList_BanEntry* default_instance_; + }; +// ------------------------------------------------------------------- + + class BanList : public ::google::protobuf::Message + { + public: + BanList(); + virtual ~BanList(); + + BanList(const BanList& from); + + inline BanList& operator=(const BanList& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const BanList& default_instance(); + + void Swap(BanList* other); + + // implements Message ---------------------------------------------- + + BanList* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const BanList& from); + void MergeFrom(const BanList& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef BanList_BanEntry BanEntry; + + // accessors ------------------------------------------------------- + + // repeated .MumbleProto.BanList.BanEntry bans = 1; + inline int bans_size() const; + inline void clear_bans(); + static const int kBansFieldNumber = 1; + inline const ::MumbleProto::BanList_BanEntry& bans(int index) const; + inline ::MumbleProto::BanList_BanEntry* mutable_bans(int index); + inline ::MumbleProto::BanList_BanEntry* add_bans(); + inline const ::google::protobuf::RepeatedPtrField< ::MumbleProto::BanList_BanEntry >& + bans() const; + inline ::google::protobuf::RepeatedPtrField< ::MumbleProto::BanList_BanEntry >* + mutable_bans(); + + // optional bool query = 2 [default = false]; + inline bool has_query() const; + inline void clear_query(); + static const int kQueryFieldNumber = 2; + inline bool query() const; + inline void set_query(bool value); + + // @@protoc_insertion_point(class_scope:MumbleProto.BanList) + private: + inline void set_has_query(); + inline void clear_has_query(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::RepeatedPtrField< ::MumbleProto::BanList_BanEntry > bans_; + bool query_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static BanList* default_instance_; + }; +// ------------------------------------------------------------------- + + class TextMessage : public ::google::protobuf::Message + { + public: + TextMessage(); + virtual ~TextMessage(); + + TextMessage(const TextMessage& from); + + inline TextMessage& operator=(const TextMessage& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const TextMessage& default_instance(); + + void Swap(TextMessage* other); + + // implements Message ---------------------------------------------- + + TextMessage* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const TextMessage& from); + void MergeFrom(const TextMessage& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional uint32 actor = 1; + inline bool has_actor() const; + inline void clear_actor(); + static const int kActorFieldNumber = 1; + inline ::google::protobuf::uint32 actor() const; + inline void set_actor(::google::protobuf::uint32 value); + + // repeated uint32 session = 2; + inline int session_size() const; + inline void clear_session(); + static const int kSessionFieldNumber = 2; + inline ::google::protobuf::uint32 session(int index) const; + inline void set_session(int index, ::google::protobuf::uint32 value); + inline void add_session(::google::protobuf::uint32 value); + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + session() const; + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + mutable_session(); + + // repeated uint32 channel_id = 3; + inline int channel_id_size() const; + inline void clear_channel_id(); + static const int kChannelIdFieldNumber = 3; + inline ::google::protobuf::uint32 channel_id(int index) const; + inline void set_channel_id(int index, ::google::protobuf::uint32 value); + inline void add_channel_id(::google::protobuf::uint32 value); + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + channel_id() const; + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + mutable_channel_id(); + + // repeated uint32 tree_id = 4; + inline int tree_id_size() const; + inline void clear_tree_id(); + static const int kTreeIdFieldNumber = 4; + inline ::google::protobuf::uint32 tree_id(int index) const; + inline void set_tree_id(int index, ::google::protobuf::uint32 value); + inline void add_tree_id(::google::protobuf::uint32 value); + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + tree_id() const; + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + mutable_tree_id(); + + // required string message = 5; + inline bool has_message() const; + inline void clear_message(); + static const int kMessageFieldNumber = 5; + inline const ::std::string& message() const; + inline void set_message(const ::std::string& value); + inline void set_message(const char* value); + inline void set_message(const char* value, size_t size); + inline ::std::string* mutable_message(); + inline ::std::string* release_message(); + inline void set_allocated_message(::std::string* message); + + // @@protoc_insertion_point(class_scope:MumbleProto.TextMessage) + private: + inline void set_has_actor(); + inline void clear_has_actor(); + inline void set_has_message(); + inline void clear_has_message(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > session_; + ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > channel_id_; + ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > tree_id_; + ::std::string* message_; + ::google::protobuf::uint32 actor_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static TextMessage* default_instance_; + }; +// ------------------------------------------------------------------- + + class PermissionDenied : public ::google::protobuf::Message + { + public: + PermissionDenied(); + virtual ~PermissionDenied(); + + PermissionDenied(const PermissionDenied& from); + + inline PermissionDenied& operator=(const PermissionDenied& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const PermissionDenied& default_instance(); + + void Swap(PermissionDenied* other); + + // implements Message ---------------------------------------------- + + PermissionDenied* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const PermissionDenied& from); + void MergeFrom(const PermissionDenied& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef PermissionDenied_DenyType DenyType; + static const DenyType Text = PermissionDenied_DenyType_Text; + static const DenyType Permission = PermissionDenied_DenyType_Permission; + static const DenyType SuperUser = PermissionDenied_DenyType_SuperUser; + static const DenyType ChannelName = PermissionDenied_DenyType_ChannelName; + static const DenyType TextTooLong = PermissionDenied_DenyType_TextTooLong; + static const DenyType H9K = PermissionDenied_DenyType_H9K; + static const DenyType TemporaryChannel = + PermissionDenied_DenyType_TemporaryChannel; + static const DenyType MissingCertificate = + PermissionDenied_DenyType_MissingCertificate; + static const DenyType UserName = PermissionDenied_DenyType_UserName; + static const DenyType ChannelFull = PermissionDenied_DenyType_ChannelFull; + static const DenyType NestingLimit = PermissionDenied_DenyType_NestingLimit; + static inline bool DenyType_IsValid(int value) + { + return PermissionDenied_DenyType_IsValid(value); + } + static const DenyType DenyType_MIN = + PermissionDenied_DenyType_DenyType_MIN; + static const DenyType DenyType_MAX = + PermissionDenied_DenyType_DenyType_MAX; + static const int DenyType_ARRAYSIZE = + PermissionDenied_DenyType_DenyType_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + DenyType_descriptor() + { + return PermissionDenied_DenyType_descriptor(); + } + static inline const ::std::string& DenyType_Name(DenyType value) + { + return PermissionDenied_DenyType_Name(value); + } + static inline bool DenyType_Parse(const ::std::string& name, + DenyType* value) + { + return PermissionDenied_DenyType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // optional uint32 permission = 1; + inline bool has_permission() const; + inline void clear_permission(); + static const int kPermissionFieldNumber = 1; + inline ::google::protobuf::uint32 permission() const; + inline void set_permission(::google::protobuf::uint32 value); + + // optional uint32 channel_id = 2; + inline bool has_channel_id() const; + inline void clear_channel_id(); + static const int kChannelIdFieldNumber = 2; + inline ::google::protobuf::uint32 channel_id() const; + inline void set_channel_id(::google::protobuf::uint32 value); + + // optional uint32 session = 3; + inline bool has_session() const; + inline void clear_session(); + static const int kSessionFieldNumber = 3; + inline ::google::protobuf::uint32 session() const; + inline void set_session(::google::protobuf::uint32 value); + + // optional string reason = 4; + inline bool has_reason() const; + inline void clear_reason(); + static const int kReasonFieldNumber = 4; + inline const ::std::string& reason() const; + inline void set_reason(const ::std::string& value); + inline void set_reason(const char* value); + inline void set_reason(const char* value, size_t size); + inline ::std::string* mutable_reason(); + inline ::std::string* release_reason(); + inline void set_allocated_reason(::std::string* reason); + + // optional .MumbleProto.PermissionDenied.DenyType type = 5; + inline bool has_type() const; + inline void clear_type(); + static const int kTypeFieldNumber = 5; + inline ::MumbleProto::PermissionDenied_DenyType type() const; + inline void set_type(::MumbleProto::PermissionDenied_DenyType value); + + // optional string name = 6; + inline bool has_name() const; + inline void clear_name(); + static const int kNameFieldNumber = 6; + inline const ::std::string& name() const; + inline void set_name(const ::std::string& value); + inline void set_name(const char* value); + inline void set_name(const char* value, size_t size); + inline ::std::string* mutable_name(); + inline ::std::string* release_name(); + inline void set_allocated_name(::std::string* name); + + // @@protoc_insertion_point(class_scope:MumbleProto.PermissionDenied) + private: + inline void set_has_permission(); + inline void clear_has_permission(); + inline void set_has_channel_id(); + inline void clear_has_channel_id(); + inline void set_has_session(); + inline void clear_has_session(); + inline void set_has_reason(); + inline void clear_has_reason(); + inline void set_has_type(); + inline void clear_has_type(); + inline void set_has_name(); + inline void clear_has_name(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::uint32 permission_; + ::google::protobuf::uint32 channel_id_; + ::std::string* reason_; + ::google::protobuf::uint32 session_; + int type_; + ::std::string* name_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static PermissionDenied* default_instance_; + }; +// ------------------------------------------------------------------- + + class ACL_ChanGroup : public ::google::protobuf::Message + { + public: + ACL_ChanGroup(); + virtual ~ACL_ChanGroup(); + + ACL_ChanGroup(const ACL_ChanGroup& from); + + inline ACL_ChanGroup& operator=(const ACL_ChanGroup& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ACL_ChanGroup& default_instance(); + + void Swap(ACL_ChanGroup* other); + + // implements Message ---------------------------------------------- + + ACL_ChanGroup* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ACL_ChanGroup& from); + void MergeFrom(const ACL_ChanGroup& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required string name = 1; + inline bool has_name() const; + inline void clear_name(); + static const int kNameFieldNumber = 1; + inline const ::std::string& name() const; + inline void set_name(const ::std::string& value); + inline void set_name(const char* value); + inline void set_name(const char* value, size_t size); + inline ::std::string* mutable_name(); + inline ::std::string* release_name(); + inline void set_allocated_name(::std::string* name); + + // optional bool inherited = 2 [default = true]; + inline bool has_inherited() const; + inline void clear_inherited(); + static const int kInheritedFieldNumber = 2; + inline bool inherited() const; + inline void set_inherited(bool value); + + // optional bool inherit = 3 [default = true]; + inline bool has_inherit() const; + inline void clear_inherit(); + static const int kInheritFieldNumber = 3; + inline bool inherit() const; + inline void set_inherit(bool value); + + // optional bool inheritable = 4 [default = true]; + inline bool has_inheritable() const; + inline void clear_inheritable(); + static const int kInheritableFieldNumber = 4; + inline bool inheritable() const; + inline void set_inheritable(bool value); + + // repeated uint32 add = 5; + inline int add_size() const; + inline void clear_add(); + static const int kAddFieldNumber = 5; + inline ::google::protobuf::uint32 add(int index) const; + inline void set_add(int index, ::google::protobuf::uint32 value); + inline void add_add(::google::protobuf::uint32 value); + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + add() const; + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + mutable_add(); + + // repeated uint32 remove = 6; + inline int remove_size() const; + inline void clear_remove(); + static const int kRemoveFieldNumber = 6; + inline ::google::protobuf::uint32 remove(int index) const; + inline void set_remove(int index, ::google::protobuf::uint32 value); + inline void add_remove(::google::protobuf::uint32 value); + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + remove() const; + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + mutable_remove(); + + // repeated uint32 inherited_members = 7; + inline int inherited_members_size() const; + inline void clear_inherited_members(); + static const int kInheritedMembersFieldNumber = 7; + inline ::google::protobuf::uint32 inherited_members(int index) const; + inline void set_inherited_members(int index, ::google::protobuf::uint32 value); + inline void add_inherited_members(::google::protobuf::uint32 value); + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + inherited_members() const; + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + mutable_inherited_members(); + + // @@protoc_insertion_point(class_scope:MumbleProto.ACL.ChanGroup) + private: + inline void set_has_name(); + inline void clear_has_name(); + inline void set_has_inherited(); + inline void clear_has_inherited(); + inline void set_has_inherit(); + inline void clear_has_inherit(); + inline void set_has_inheritable(); + inline void clear_has_inheritable(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::std::string* name_; + ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > add_; + ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > remove_; + ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > + inherited_members_; + bool inherited_; + bool inherit_; + bool inheritable_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static ACL_ChanGroup* default_instance_; + }; +// ------------------------------------------------------------------- + + class ACL_ChanACL : public ::google::protobuf::Message + { + public: + ACL_ChanACL(); + virtual ~ACL_ChanACL(); + + ACL_ChanACL(const ACL_ChanACL& from); + + inline ACL_ChanACL& operator=(const ACL_ChanACL& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ACL_ChanACL& default_instance(); + + void Swap(ACL_ChanACL* other); + + // implements Message ---------------------------------------------- + + ACL_ChanACL* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ACL_ChanACL& from); + void MergeFrom(const ACL_ChanACL& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional bool apply_here = 1 [default = true]; + inline bool has_apply_here() const; + inline void clear_apply_here(); + static const int kApplyHereFieldNumber = 1; + inline bool apply_here() const; + inline void set_apply_here(bool value); + + // optional bool apply_subs = 2 [default = true]; + inline bool has_apply_subs() const; + inline void clear_apply_subs(); + static const int kApplySubsFieldNumber = 2; + inline bool apply_subs() const; + inline void set_apply_subs(bool value); + + // optional bool inherited = 3 [default = true]; + inline bool has_inherited() const; + inline void clear_inherited(); + static const int kInheritedFieldNumber = 3; + inline bool inherited() const; + inline void set_inherited(bool value); + + // optional uint32 user_id = 4; + inline bool has_user_id() const; + inline void clear_user_id(); + static const int kUserIdFieldNumber = 4; + inline ::google::protobuf::uint32 user_id() const; + inline void set_user_id(::google::protobuf::uint32 value); + + // optional string group = 5; + inline bool has_group() const; + inline void clear_group(); + static const int kGroupFieldNumber = 5; + inline const ::std::string& group() const; + inline void set_group(const ::std::string& value); + inline void set_group(const char* value); + inline void set_group(const char* value, size_t size); + inline ::std::string* mutable_group(); + inline ::std::string* release_group(); + inline void set_allocated_group(::std::string* group); + + // optional uint32 grant = 6; + inline bool has_grant() const; + inline void clear_grant(); + static const int kGrantFieldNumber = 6; + inline ::google::protobuf::uint32 grant() const; + inline void set_grant(::google::protobuf::uint32 value); + + // optional uint32 deny = 7; + inline bool has_deny() const; + inline void clear_deny(); + static const int kDenyFieldNumber = 7; + inline ::google::protobuf::uint32 deny() const; + inline void set_deny(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:MumbleProto.ACL.ChanACL) + private: + inline void set_has_apply_here(); + inline void clear_has_apply_here(); + inline void set_has_apply_subs(); + inline void clear_has_apply_subs(); + inline void set_has_inherited(); + inline void clear_has_inherited(); + inline void set_has_user_id(); + inline void clear_has_user_id(); + inline void set_has_group(); + inline void clear_has_group(); + inline void set_has_grant(); + inline void clear_has_grant(); + inline void set_has_deny(); + inline void clear_has_deny(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + bool apply_here_; + bool apply_subs_; + bool inherited_; + ::google::protobuf::uint32 user_id_; + ::std::string* group_; + ::google::protobuf::uint32 grant_; + ::google::protobuf::uint32 deny_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static ACL_ChanACL* default_instance_; + }; +// ------------------------------------------------------------------- + + class ACL : public ::google::protobuf::Message + { + public: + ACL(); + virtual ~ACL(); + + ACL(const ACL& from); + + inline ACL& operator=(const ACL& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ACL& default_instance(); + + void Swap(ACL* other); + + // implements Message ---------------------------------------------- + + ACL* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ACL& from); + void MergeFrom(const ACL& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef ACL_ChanGroup ChanGroup; + typedef ACL_ChanACL ChanACL; + + // accessors ------------------------------------------------------- + + // required uint32 channel_id = 1; + inline bool has_channel_id() const; + inline void clear_channel_id(); + static const int kChannelIdFieldNumber = 1; + inline ::google::protobuf::uint32 channel_id() const; + inline void set_channel_id(::google::protobuf::uint32 value); + + // optional bool inherit_acls = 2 [default = true]; + inline bool has_inherit_acls() const; + inline void clear_inherit_acls(); + static const int kInheritAclsFieldNumber = 2; + inline bool inherit_acls() const; + inline void set_inherit_acls(bool value); + + // repeated .MumbleProto.ACL.ChanGroup groups = 3; + inline int groups_size() const; + inline void clear_groups(); + static const int kGroupsFieldNumber = 3; + inline const ::MumbleProto::ACL_ChanGroup& groups(int index) const; + inline ::MumbleProto::ACL_ChanGroup* mutable_groups(int index); + inline ::MumbleProto::ACL_ChanGroup* add_groups(); + inline const ::google::protobuf::RepeatedPtrField< ::MumbleProto::ACL_ChanGroup >& + groups() const; + inline ::google::protobuf::RepeatedPtrField< ::MumbleProto::ACL_ChanGroup >* + mutable_groups(); + + // repeated .MumbleProto.ACL.ChanACL acls = 4; + inline int acls_size() const; + inline void clear_acls(); + static const int kAclsFieldNumber = 4; + inline const ::MumbleProto::ACL_ChanACL& acls(int index) const; + inline ::MumbleProto::ACL_ChanACL* mutable_acls(int index); + inline ::MumbleProto::ACL_ChanACL* add_acls(); + inline const ::google::protobuf::RepeatedPtrField< ::MumbleProto::ACL_ChanACL >& + acls() const; + inline ::google::protobuf::RepeatedPtrField< ::MumbleProto::ACL_ChanACL >* + mutable_acls(); + + // optional bool query = 5 [default = false]; + inline bool has_query() const; + inline void clear_query(); + static const int kQueryFieldNumber = 5; + inline bool query() const; + inline void set_query(bool value); + + // @@protoc_insertion_point(class_scope:MumbleProto.ACL) + private: + inline void set_has_channel_id(); + inline void clear_has_channel_id(); + inline void set_has_inherit_acls(); + inline void clear_has_inherit_acls(); + inline void set_has_query(); + inline void clear_has_query(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::uint32 channel_id_; + bool inherit_acls_; + bool query_; + ::google::protobuf::RepeatedPtrField< ::MumbleProto::ACL_ChanGroup > groups_; + ::google::protobuf::RepeatedPtrField< ::MumbleProto::ACL_ChanACL > acls_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static ACL* default_instance_; + }; +// ------------------------------------------------------------------- + + class QueryUsers : public ::google::protobuf::Message + { + public: + QueryUsers(); + virtual ~QueryUsers(); + + QueryUsers(const QueryUsers& from); + + inline QueryUsers& operator=(const QueryUsers& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const QueryUsers& default_instance(); + + void Swap(QueryUsers* other); + + // implements Message ---------------------------------------------- + + QueryUsers* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const QueryUsers& from); + void MergeFrom(const QueryUsers& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated uint32 ids = 1; + inline int ids_size() const; + inline void clear_ids(); + static const int kIdsFieldNumber = 1; + inline ::google::protobuf::uint32 ids(int index) const; + inline void set_ids(int index, ::google::protobuf::uint32 value); + inline void add_ids(::google::protobuf::uint32 value); + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + ids() const; + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + mutable_ids(); + + // repeated string names = 2; + inline int names_size() const; + inline void clear_names(); + static const int kNamesFieldNumber = 2; + inline const ::std::string& names(int index) const; + inline ::std::string* mutable_names(int index); + inline void set_names(int index, const ::std::string& value); + inline void set_names(int index, const char* value); + inline void set_names(int index, const char* value, size_t size); + inline ::std::string* add_names(); + inline void add_names(const ::std::string& value); + inline void add_names(const char* value); + inline void add_names(const char* value, size_t size); + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& names() + const; + inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_names(); + + // @@protoc_insertion_point(class_scope:MumbleProto.QueryUsers) + private: + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > ids_; + ::google::protobuf::RepeatedPtrField< ::std::string> names_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static QueryUsers* default_instance_; + }; +// ------------------------------------------------------------------- + + class CryptSetup : public ::google::protobuf::Message + { + public: + CryptSetup(); + virtual ~CryptSetup(); + + CryptSetup(const CryptSetup& from); + + inline CryptSetup& operator=(const CryptSetup& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const CryptSetup& default_instance(); + + void Swap(CryptSetup* other); + + // implements Message ---------------------------------------------- + + CryptSetup* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const CryptSetup& from); + void MergeFrom(const CryptSetup& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional bytes key = 1; + inline bool has_key() const; + inline void clear_key(); + static const int kKeyFieldNumber = 1; + inline const ::std::string& key() const; + inline void set_key(const ::std::string& value); + inline void set_key(const char* value); + inline void set_key(const void* value, size_t size); + inline ::std::string* mutable_key(); + inline ::std::string* release_key(); + inline void set_allocated_key(::std::string* key); + + // optional bytes client_nonce = 2; + inline bool has_client_nonce() const; + inline void clear_client_nonce(); + static const int kClientNonceFieldNumber = 2; + inline const ::std::string& client_nonce() const; + inline void set_client_nonce(const ::std::string& value); + inline void set_client_nonce(const char* value); + inline void set_client_nonce(const void* value, size_t size); + inline ::std::string* mutable_client_nonce(); + inline ::std::string* release_client_nonce(); + inline void set_allocated_client_nonce(::std::string* client_nonce); + + // optional bytes server_nonce = 3; + inline bool has_server_nonce() const; + inline void clear_server_nonce(); + static const int kServerNonceFieldNumber = 3; + inline const ::std::string& server_nonce() const; + inline void set_server_nonce(const ::std::string& value); + inline void set_server_nonce(const char* value); + inline void set_server_nonce(const void* value, size_t size); + inline ::std::string* mutable_server_nonce(); + inline ::std::string* release_server_nonce(); + inline void set_allocated_server_nonce(::std::string* server_nonce); + + // @@protoc_insertion_point(class_scope:MumbleProto.CryptSetup) + private: + inline void set_has_key(); + inline void clear_has_key(); + inline void set_has_client_nonce(); + inline void clear_has_client_nonce(); + inline void set_has_server_nonce(); + inline void clear_has_server_nonce(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::std::string* key_; + ::std::string* client_nonce_; + ::std::string* server_nonce_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static CryptSetup* default_instance_; + }; +// ------------------------------------------------------------------- + + class ContextActionModify : public ::google::protobuf::Message + { + public: + ContextActionModify(); + virtual ~ContextActionModify(); + + ContextActionModify(const ContextActionModify& from); + + inline ContextActionModify& operator=(const ContextActionModify& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ContextActionModify& default_instance(); + + void Swap(ContextActionModify* other); + + // implements Message ---------------------------------------------- + + ContextActionModify* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ContextActionModify& from); + void MergeFrom(const ContextActionModify& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef ContextActionModify_Context Context; + static const Context Server = ContextActionModify_Context_Server; + static const Context Channel = ContextActionModify_Context_Channel; + static const Context User = ContextActionModify_Context_User; + static inline bool Context_IsValid(int value) + { + return ContextActionModify_Context_IsValid(value); + } + static const Context Context_MIN = + ContextActionModify_Context_Context_MIN; + static const Context Context_MAX = + ContextActionModify_Context_Context_MAX; + static const int Context_ARRAYSIZE = + ContextActionModify_Context_Context_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + Context_descriptor() + { + return ContextActionModify_Context_descriptor(); + } + static inline const ::std::string& Context_Name(Context value) + { + return ContextActionModify_Context_Name(value); + } + static inline bool Context_Parse(const ::std::string& name, + Context* value) + { + return ContextActionModify_Context_Parse(name, value); + } + + typedef ContextActionModify_Operation Operation; + static const Operation Add = ContextActionModify_Operation_Add; + static const Operation Remove = ContextActionModify_Operation_Remove; + static inline bool Operation_IsValid(int value) + { + return ContextActionModify_Operation_IsValid(value); + } + static const Operation Operation_MIN = + ContextActionModify_Operation_Operation_MIN; + static const Operation Operation_MAX = + ContextActionModify_Operation_Operation_MAX; + static const int Operation_ARRAYSIZE = + ContextActionModify_Operation_Operation_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + Operation_descriptor() + { + return ContextActionModify_Operation_descriptor(); + } + static inline const ::std::string& Operation_Name(Operation value) + { + return ContextActionModify_Operation_Name(value); + } + static inline bool Operation_Parse(const ::std::string& name, + Operation* value) + { + return ContextActionModify_Operation_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // required string action = 1; + inline bool has_action() const; + inline void clear_action(); + static const int kActionFieldNumber = 1; + inline const ::std::string& action() const; + inline void set_action(const ::std::string& value); + inline void set_action(const char* value); + inline void set_action(const char* value, size_t size); + inline ::std::string* mutable_action(); + inline ::std::string* release_action(); + inline void set_allocated_action(::std::string* action); + + // optional string text = 2; + inline bool has_text() const; + inline void clear_text(); + static const int kTextFieldNumber = 2; + inline const ::std::string& text() const; + inline void set_text(const ::std::string& value); + inline void set_text(const char* value); + inline void set_text(const char* value, size_t size); + inline ::std::string* mutable_text(); + inline ::std::string* release_text(); + inline void set_allocated_text(::std::string* text); + + // optional uint32 context = 3; + inline bool has_context() const; + inline void clear_context(); + static const int kContextFieldNumber = 3; + inline ::google::protobuf::uint32 context() const; + inline void set_context(::google::protobuf::uint32 value); + + // optional .MumbleProto.ContextActionModify.Operation operation = 4; + inline bool has_operation() const; + inline void clear_operation(); + static const int kOperationFieldNumber = 4; + inline ::MumbleProto::ContextActionModify_Operation operation() const; + inline void set_operation(::MumbleProto::ContextActionModify_Operation value); + + // @@protoc_insertion_point(class_scope:MumbleProto.ContextActionModify) + private: + inline void set_has_action(); + inline void clear_has_action(); + inline void set_has_text(); + inline void clear_has_text(); + inline void set_has_context(); + inline void clear_has_context(); + inline void set_has_operation(); + inline void clear_has_operation(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::std::string* action_; + ::std::string* text_; + ::google::protobuf::uint32 context_; + int operation_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static ContextActionModify* default_instance_; + }; +// ------------------------------------------------------------------- + + class ContextAction : public ::google::protobuf::Message + { + public: + ContextAction(); + virtual ~ContextAction(); + + ContextAction(const ContextAction& from); + + inline ContextAction& operator=(const ContextAction& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ContextAction& default_instance(); + + void Swap(ContextAction* other); + + // implements Message ---------------------------------------------- + + ContextAction* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ContextAction& from); + void MergeFrom(const ContextAction& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional uint32 session = 1; + inline bool has_session() const; + inline void clear_session(); + static const int kSessionFieldNumber = 1; + inline ::google::protobuf::uint32 session() const; + inline void set_session(::google::protobuf::uint32 value); + + // optional uint32 channel_id = 2; + inline bool has_channel_id() const; + inline void clear_channel_id(); + static const int kChannelIdFieldNumber = 2; + inline ::google::protobuf::uint32 channel_id() const; + inline void set_channel_id(::google::protobuf::uint32 value); + + // required string action = 3; + inline bool has_action() const; + inline void clear_action(); + static const int kActionFieldNumber = 3; + inline const ::std::string& action() const; + inline void set_action(const ::std::string& value); + inline void set_action(const char* value); + inline void set_action(const char* value, size_t size); + inline ::std::string* mutable_action(); + inline ::std::string* release_action(); + inline void set_allocated_action(::std::string* action); + + // @@protoc_insertion_point(class_scope:MumbleProto.ContextAction) + private: + inline void set_has_session(); + inline void clear_has_session(); + inline void set_has_channel_id(); + inline void clear_has_channel_id(); + inline void set_has_action(); + inline void clear_has_action(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::uint32 session_; + ::google::protobuf::uint32 channel_id_; + ::std::string* action_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static ContextAction* default_instance_; + }; +// ------------------------------------------------------------------- + + class UserList_User : public ::google::protobuf::Message + { + public: + UserList_User(); + virtual ~UserList_User(); + + UserList_User(const UserList_User& from); + + inline UserList_User& operator=(const UserList_User& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const UserList_User& default_instance(); + + void Swap(UserList_User* other); + + // implements Message ---------------------------------------------- + + UserList_User* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const UserList_User& from); + void MergeFrom(const UserList_User& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required uint32 user_id = 1; + inline bool has_user_id() const; + inline void clear_user_id(); + static const int kUserIdFieldNumber = 1; + inline ::google::protobuf::uint32 user_id() const; + inline void set_user_id(::google::protobuf::uint32 value); + + // optional string name = 2; + inline bool has_name() const; + inline void clear_name(); + static const int kNameFieldNumber = 2; + inline const ::std::string& name() const; + inline void set_name(const ::std::string& value); + inline void set_name(const char* value); + inline void set_name(const char* value, size_t size); + inline ::std::string* mutable_name(); + inline ::std::string* release_name(); + inline void set_allocated_name(::std::string* name); + + // optional string last_seen = 3; + inline bool has_last_seen() const; + inline void clear_last_seen(); + static const int kLastSeenFieldNumber = 3; + inline const ::std::string& last_seen() const; + inline void set_last_seen(const ::std::string& value); + inline void set_last_seen(const char* value); + inline void set_last_seen(const char* value, size_t size); + inline ::std::string* mutable_last_seen(); + inline ::std::string* release_last_seen(); + inline void set_allocated_last_seen(::std::string* last_seen); + + // optional uint32 last_channel = 4; + inline bool has_last_channel() const; + inline void clear_last_channel(); + static const int kLastChannelFieldNumber = 4; + inline ::google::protobuf::uint32 last_channel() const; + inline void set_last_channel(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:MumbleProto.UserList.User) + private: + inline void set_has_user_id(); + inline void clear_has_user_id(); + inline void set_has_name(); + inline void clear_has_name(); + inline void set_has_last_seen(); + inline void clear_has_last_seen(); + inline void set_has_last_channel(); + inline void clear_has_last_channel(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::std::string* name_; + ::google::protobuf::uint32 user_id_; + ::google::protobuf::uint32 last_channel_; + ::std::string* last_seen_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static UserList_User* default_instance_; + }; +// ------------------------------------------------------------------- + + class UserList : public ::google::protobuf::Message + { + public: + UserList(); + virtual ~UserList(); + + UserList(const UserList& from); + + inline UserList& operator=(const UserList& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const UserList& default_instance(); + + void Swap(UserList* other); + + // implements Message ---------------------------------------------- + + UserList* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const UserList& from); + void MergeFrom(const UserList& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef UserList_User User; + + // accessors ------------------------------------------------------- + + // repeated .MumbleProto.UserList.User users = 1; + inline int users_size() const; + inline void clear_users(); + static const int kUsersFieldNumber = 1; + inline const ::MumbleProto::UserList_User& users(int index) const; + inline ::MumbleProto::UserList_User* mutable_users(int index); + inline ::MumbleProto::UserList_User* add_users(); + inline const ::google::protobuf::RepeatedPtrField< ::MumbleProto::UserList_User >& + users() const; + inline ::google::protobuf::RepeatedPtrField< ::MumbleProto::UserList_User >* + mutable_users(); + + // @@protoc_insertion_point(class_scope:MumbleProto.UserList) + private: + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::RepeatedPtrField< ::MumbleProto::UserList_User > users_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static UserList* default_instance_; + }; +// ------------------------------------------------------------------- + + class VoiceTarget_Target : public ::google::protobuf::Message + { + public: + VoiceTarget_Target(); + virtual ~VoiceTarget_Target(); + + VoiceTarget_Target(const VoiceTarget_Target& from); + + inline VoiceTarget_Target& operator=(const VoiceTarget_Target& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const VoiceTarget_Target& default_instance(); + + void Swap(VoiceTarget_Target* other); + + // implements Message ---------------------------------------------- + + VoiceTarget_Target* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const VoiceTarget_Target& from); + void MergeFrom(const VoiceTarget_Target& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated uint32 session = 1; + inline int session_size() const; + inline void clear_session(); + static const int kSessionFieldNumber = 1; + inline ::google::protobuf::uint32 session(int index) const; + inline void set_session(int index, ::google::protobuf::uint32 value); + inline void add_session(::google::protobuf::uint32 value); + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + session() const; + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + mutable_session(); + + // optional uint32 channel_id = 2; + inline bool has_channel_id() const; + inline void clear_channel_id(); + static const int kChannelIdFieldNumber = 2; + inline ::google::protobuf::uint32 channel_id() const; + inline void set_channel_id(::google::protobuf::uint32 value); + + // optional string group = 3; + inline bool has_group() const; + inline void clear_group(); + static const int kGroupFieldNumber = 3; + inline const ::std::string& group() const; + inline void set_group(const ::std::string& value); + inline void set_group(const char* value); + inline void set_group(const char* value, size_t size); + inline ::std::string* mutable_group(); + inline ::std::string* release_group(); + inline void set_allocated_group(::std::string* group); + + // optional bool links = 4 [default = false]; + inline bool has_links() const; + inline void clear_links(); + static const int kLinksFieldNumber = 4; + inline bool links() const; + inline void set_links(bool value); + + // optional bool children = 5 [default = false]; + inline bool has_children() const; + inline void clear_children(); + static const int kChildrenFieldNumber = 5; + inline bool children() const; + inline void set_children(bool value); + + // @@protoc_insertion_point(class_scope:MumbleProto.VoiceTarget.Target) + private: + inline void set_has_channel_id(); + inline void clear_has_channel_id(); + inline void set_has_group(); + inline void clear_has_group(); + inline void set_has_links(); + inline void clear_has_links(); + inline void set_has_children(); + inline void clear_has_children(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > session_; + ::std::string* group_; + ::google::protobuf::uint32 channel_id_; + bool links_; + bool children_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static VoiceTarget_Target* default_instance_; + }; +// ------------------------------------------------------------------- + + class VoiceTarget : public ::google::protobuf::Message + { + public: + VoiceTarget(); + virtual ~VoiceTarget(); + + VoiceTarget(const VoiceTarget& from); + + inline VoiceTarget& operator=(const VoiceTarget& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const VoiceTarget& default_instance(); + + void Swap(VoiceTarget* other); + + // implements Message ---------------------------------------------- + + VoiceTarget* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const VoiceTarget& from); + void MergeFrom(const VoiceTarget& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef VoiceTarget_Target Target; + + // accessors ------------------------------------------------------- + + // optional uint32 id = 1; + inline bool has_id() const; + inline void clear_id(); + static const int kIdFieldNumber = 1; + inline ::google::protobuf::uint32 id() const; + inline void set_id(::google::protobuf::uint32 value); + + // repeated .MumbleProto.VoiceTarget.Target targets = 2; + inline int targets_size() const; + inline void clear_targets(); + static const int kTargetsFieldNumber = 2; + inline const ::MumbleProto::VoiceTarget_Target& targets(int index) const; + inline ::MumbleProto::VoiceTarget_Target* mutable_targets(int index); + inline ::MumbleProto::VoiceTarget_Target* add_targets(); + inline const ::google::protobuf::RepeatedPtrField< ::MumbleProto::VoiceTarget_Target >& + targets() const; + inline ::google::protobuf::RepeatedPtrField< ::MumbleProto::VoiceTarget_Target >* + mutable_targets(); + + // @@protoc_insertion_point(class_scope:MumbleProto.VoiceTarget) + private: + inline void set_has_id(); + inline void clear_has_id(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::RepeatedPtrField< ::MumbleProto::VoiceTarget_Target > + targets_; + ::google::protobuf::uint32 id_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static VoiceTarget* default_instance_; + }; +// ------------------------------------------------------------------- + + class PermissionQuery : public ::google::protobuf::Message + { + public: + PermissionQuery(); + virtual ~PermissionQuery(); + + PermissionQuery(const PermissionQuery& from); + + inline PermissionQuery& operator=(const PermissionQuery& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const PermissionQuery& default_instance(); + + void Swap(PermissionQuery* other); + + // implements Message ---------------------------------------------- + + PermissionQuery* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const PermissionQuery& from); + void MergeFrom(const PermissionQuery& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional uint32 channel_id = 1; + inline bool has_channel_id() const; + inline void clear_channel_id(); + static const int kChannelIdFieldNumber = 1; + inline ::google::protobuf::uint32 channel_id() const; + inline void set_channel_id(::google::protobuf::uint32 value); + + // optional uint32 permissions = 2; + inline bool has_permissions() const; + inline void clear_permissions(); + static const int kPermissionsFieldNumber = 2; + inline ::google::protobuf::uint32 permissions() const; + inline void set_permissions(::google::protobuf::uint32 value); + + // optional bool flush = 3 [default = false]; + inline bool has_flush() const; + inline void clear_flush(); + static const int kFlushFieldNumber = 3; + inline bool flush() const; + inline void set_flush(bool value); + + // @@protoc_insertion_point(class_scope:MumbleProto.PermissionQuery) + private: + inline void set_has_channel_id(); + inline void clear_has_channel_id(); + inline void set_has_permissions(); + inline void clear_has_permissions(); + inline void set_has_flush(); + inline void clear_has_flush(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::uint32 channel_id_; + ::google::protobuf::uint32 permissions_; + bool flush_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static PermissionQuery* default_instance_; + }; +// ------------------------------------------------------------------- + + class CodecVersion : public ::google::protobuf::Message + { + public: + CodecVersion(); + virtual ~CodecVersion(); + + CodecVersion(const CodecVersion& from); + + inline CodecVersion& operator=(const CodecVersion& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const CodecVersion& default_instance(); + + void Swap(CodecVersion* other); + + // implements Message ---------------------------------------------- + + CodecVersion* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const CodecVersion& from); + void MergeFrom(const CodecVersion& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // required int32 alpha = 1; + inline bool has_alpha() const; + inline void clear_alpha(); + static const int kAlphaFieldNumber = 1; + inline ::google::protobuf::int32 alpha() const; + inline void set_alpha(::google::protobuf::int32 value); + + // required int32 beta = 2; + inline bool has_beta() const; + inline void clear_beta(); + static const int kBetaFieldNumber = 2; + inline ::google::protobuf::int32 beta() const; + inline void set_beta(::google::protobuf::int32 value); + + // required bool prefer_alpha = 3 [default = true]; + inline bool has_prefer_alpha() const; + inline void clear_prefer_alpha(); + static const int kPreferAlphaFieldNumber = 3; + inline bool prefer_alpha() const; + inline void set_prefer_alpha(bool value); + + // optional bool opus = 4 [default = false]; + inline bool has_opus() const; + inline void clear_opus(); + static const int kOpusFieldNumber = 4; + inline bool opus() const; + inline void set_opus(bool value); + + // @@protoc_insertion_point(class_scope:MumbleProto.CodecVersion) + private: + inline void set_has_alpha(); + inline void clear_has_alpha(); + inline void set_has_beta(); + inline void clear_has_beta(); + inline void set_has_prefer_alpha(); + inline void clear_has_prefer_alpha(); + inline void set_has_opus(); + inline void clear_has_opus(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::int32 alpha_; + ::google::protobuf::int32 beta_; + bool prefer_alpha_; + bool opus_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static CodecVersion* default_instance_; + }; +// ------------------------------------------------------------------- + + class UserStats_Stats : public ::google::protobuf::Message + { + public: + UserStats_Stats(); + virtual ~UserStats_Stats(); + + UserStats_Stats(const UserStats_Stats& from); + + inline UserStats_Stats& operator=(const UserStats_Stats& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const UserStats_Stats& default_instance(); + + void Swap(UserStats_Stats* other); + + // implements Message ---------------------------------------------- + + UserStats_Stats* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const UserStats_Stats& from); + void MergeFrom(const UserStats_Stats& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional uint32 good = 1; + inline bool has_good() const; + inline void clear_good(); + static const int kGoodFieldNumber = 1; + inline ::google::protobuf::uint32 good() const; + inline void set_good(::google::protobuf::uint32 value); + + // optional uint32 late = 2; + inline bool has_late() const; + inline void clear_late(); + static const int kLateFieldNumber = 2; + inline ::google::protobuf::uint32 late() const; + inline void set_late(::google::protobuf::uint32 value); + + // optional uint32 lost = 3; + inline bool has_lost() const; + inline void clear_lost(); + static const int kLostFieldNumber = 3; + inline ::google::protobuf::uint32 lost() const; + inline void set_lost(::google::protobuf::uint32 value); + + // optional uint32 resync = 4; + inline bool has_resync() const; + inline void clear_resync(); + static const int kResyncFieldNumber = 4; + inline ::google::protobuf::uint32 resync() const; + inline void set_resync(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:MumbleProto.UserStats.Stats) + private: + inline void set_has_good(); + inline void clear_has_good(); + inline void set_has_late(); + inline void clear_has_late(); + inline void set_has_lost(); + inline void clear_has_lost(); + inline void set_has_resync(); + inline void clear_has_resync(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::uint32 good_; + ::google::protobuf::uint32 late_; + ::google::protobuf::uint32 lost_; + ::google::protobuf::uint32 resync_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static UserStats_Stats* default_instance_; + }; +// ------------------------------------------------------------------- + + class UserStats : public ::google::protobuf::Message + { + public: + UserStats(); + virtual ~UserStats(); + + UserStats(const UserStats& from); + + inline UserStats& operator=(const UserStats& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const UserStats& default_instance(); + + void Swap(UserStats* other); + + // implements Message ---------------------------------------------- + + UserStats* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const UserStats& from); + void MergeFrom(const UserStats& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + typedef UserStats_Stats Stats; + + // accessors ------------------------------------------------------- + + // optional uint32 session = 1; + inline bool has_session() const; + inline void clear_session(); + static const int kSessionFieldNumber = 1; + inline ::google::protobuf::uint32 session() const; + inline void set_session(::google::protobuf::uint32 value); + + // optional bool stats_only = 2 [default = false]; + inline bool has_stats_only() const; + inline void clear_stats_only(); + static const int kStatsOnlyFieldNumber = 2; + inline bool stats_only() const; + inline void set_stats_only(bool value); + + // repeated bytes certificates = 3; + inline int certificates_size() const; + inline void clear_certificates(); + static const int kCertificatesFieldNumber = 3; + inline const ::std::string& certificates(int index) const; + inline ::std::string* mutable_certificates(int index); + inline void set_certificates(int index, const ::std::string& value); + inline void set_certificates(int index, const char* value); + inline void set_certificates(int index, const void* value, size_t size); + inline ::std::string* add_certificates(); + inline void add_certificates(const ::std::string& value); + inline void add_certificates(const char* value); + inline void add_certificates(const void* value, size_t size); + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& + certificates() const; + inline ::google::protobuf::RepeatedPtrField< ::std::string>* + mutable_certificates(); + + // optional .MumbleProto.UserStats.Stats from_client = 4; + inline bool has_from_client() const; + inline void clear_from_client(); + static const int kFromClientFieldNumber = 4; + inline const ::MumbleProto::UserStats_Stats& from_client() const; + inline ::MumbleProto::UserStats_Stats* mutable_from_client(); + inline ::MumbleProto::UserStats_Stats* release_from_client(); + inline void set_allocated_from_client(::MumbleProto::UserStats_Stats* + from_client); + + // optional .MumbleProto.UserStats.Stats from_server = 5; + inline bool has_from_server() const; + inline void clear_from_server(); + static const int kFromServerFieldNumber = 5; + inline const ::MumbleProto::UserStats_Stats& from_server() const; + inline ::MumbleProto::UserStats_Stats* mutable_from_server(); + inline ::MumbleProto::UserStats_Stats* release_from_server(); + inline void set_allocated_from_server(::MumbleProto::UserStats_Stats* + from_server); + + // optional uint32 udp_packets = 6; + inline bool has_udp_packets() const; + inline void clear_udp_packets(); + static const int kUdpPacketsFieldNumber = 6; + inline ::google::protobuf::uint32 udp_packets() const; + inline void set_udp_packets(::google::protobuf::uint32 value); + + // optional uint32 tcp_packets = 7; + inline bool has_tcp_packets() const; + inline void clear_tcp_packets(); + static const int kTcpPacketsFieldNumber = 7; + inline ::google::protobuf::uint32 tcp_packets() const; + inline void set_tcp_packets(::google::protobuf::uint32 value); + + // optional float udp_ping_avg = 8; + inline bool has_udp_ping_avg() const; + inline void clear_udp_ping_avg(); + static const int kUdpPingAvgFieldNumber = 8; + inline float udp_ping_avg() const; + inline void set_udp_ping_avg(float value); + + // optional float udp_ping_var = 9; + inline bool has_udp_ping_var() const; + inline void clear_udp_ping_var(); + static const int kUdpPingVarFieldNumber = 9; + inline float udp_ping_var() const; + inline void set_udp_ping_var(float value); + + // optional float tcp_ping_avg = 10; + inline bool has_tcp_ping_avg() const; + inline void clear_tcp_ping_avg(); + static const int kTcpPingAvgFieldNumber = 10; + inline float tcp_ping_avg() const; + inline void set_tcp_ping_avg(float value); + + // optional float tcp_ping_var = 11; + inline bool has_tcp_ping_var() const; + inline void clear_tcp_ping_var(); + static const int kTcpPingVarFieldNumber = 11; + inline float tcp_ping_var() const; + inline void set_tcp_ping_var(float value); + + // optional .MumbleProto.Version version = 12; + inline bool has_version() const; + inline void clear_version(); + static const int kVersionFieldNumber = 12; + inline const ::MumbleProto::Version& version() const; + inline ::MumbleProto::Version* mutable_version(); + inline ::MumbleProto::Version* release_version(); + inline void set_allocated_version(::MumbleProto::Version* version); + + // repeated int32 celt_versions = 13; + inline int celt_versions_size() const; + inline void clear_celt_versions(); + static const int kCeltVersionsFieldNumber = 13; + inline ::google::protobuf::int32 celt_versions(int index) const; + inline void set_celt_versions(int index, ::google::protobuf::int32 value); + inline void add_celt_versions(::google::protobuf::int32 value); + inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + celt_versions() const; + inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + mutable_celt_versions(); + + // optional bytes address = 14; + inline bool has_address() const; + inline void clear_address(); + static const int kAddressFieldNumber = 14; + inline const ::std::string& address() const; + inline void set_address(const ::std::string& value); + inline void set_address(const char* value); + inline void set_address(const void* value, size_t size); + inline ::std::string* mutable_address(); + inline ::std::string* release_address(); + inline void set_allocated_address(::std::string* address); + + // optional uint32 bandwidth = 15; + inline bool has_bandwidth() const; + inline void clear_bandwidth(); + static const int kBandwidthFieldNumber = 15; + inline ::google::protobuf::uint32 bandwidth() const; + inline void set_bandwidth(::google::protobuf::uint32 value); + + // optional uint32 onlinesecs = 16; + inline bool has_onlinesecs() const; + inline void clear_onlinesecs(); + static const int kOnlinesecsFieldNumber = 16; + inline ::google::protobuf::uint32 onlinesecs() const; + inline void set_onlinesecs(::google::protobuf::uint32 value); + + // optional uint32 idlesecs = 17; + inline bool has_idlesecs() const; + inline void clear_idlesecs(); + static const int kIdlesecsFieldNumber = 17; + inline ::google::protobuf::uint32 idlesecs() const; + inline void set_idlesecs(::google::protobuf::uint32 value); + + // optional bool strong_certificate = 18 [default = false]; + inline bool has_strong_certificate() const; + inline void clear_strong_certificate(); + static const int kStrongCertificateFieldNumber = 18; + inline bool strong_certificate() const; + inline void set_strong_certificate(bool value); + + // optional bool opus = 19 [default = false]; + inline bool has_opus() const; + inline void clear_opus(); + static const int kOpusFieldNumber = 19; + inline bool opus() const; + inline void set_opus(bool value); + + // @@protoc_insertion_point(class_scope:MumbleProto.UserStats) + private: + inline void set_has_session(); + inline void clear_has_session(); + inline void set_has_stats_only(); + inline void clear_has_stats_only(); + inline void set_has_from_client(); + inline void clear_has_from_client(); + inline void set_has_from_server(); + inline void clear_has_from_server(); + inline void set_has_udp_packets(); + inline void clear_has_udp_packets(); + inline void set_has_tcp_packets(); + inline void clear_has_tcp_packets(); + inline void set_has_udp_ping_avg(); + inline void clear_has_udp_ping_avg(); + inline void set_has_udp_ping_var(); + inline void clear_has_udp_ping_var(); + inline void set_has_tcp_ping_avg(); + inline void clear_has_tcp_ping_avg(); + inline void set_has_tcp_ping_var(); + inline void clear_has_tcp_ping_var(); + inline void set_has_version(); + inline void clear_has_version(); + inline void set_has_address(); + inline void clear_has_address(); + inline void set_has_bandwidth(); + inline void clear_has_bandwidth(); + inline void set_has_onlinesecs(); + inline void clear_has_onlinesecs(); + inline void set_has_idlesecs(); + inline void clear_has_idlesecs(); + inline void set_has_strong_certificate(); + inline void clear_has_strong_certificate(); + inline void set_has_opus(); + inline void clear_has_opus(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::RepeatedPtrField< ::std::string> certificates_; + ::google::protobuf::uint32 session_; + ::google::protobuf::uint32 udp_packets_; + ::MumbleProto::UserStats_Stats* from_client_; + ::MumbleProto::UserStats_Stats* from_server_; + ::google::protobuf::uint32 tcp_packets_; + float udp_ping_avg_; + float udp_ping_var_; + float tcp_ping_avg_; + ::MumbleProto::Version* version_; + float tcp_ping_var_; + bool stats_only_; + bool strong_certificate_; + bool opus_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 > celt_versions_; + ::std::string* address_; + ::google::protobuf::uint32 bandwidth_; + ::google::protobuf::uint32 onlinesecs_; + ::google::protobuf::uint32 idlesecs_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static UserStats* default_instance_; + }; +// ------------------------------------------------------------------- + + class RequestBlob : public ::google::protobuf::Message + { + public: + RequestBlob(); + virtual ~RequestBlob(); + + RequestBlob(const RequestBlob& from); + + inline RequestBlob& operator=(const RequestBlob& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const RequestBlob& default_instance(); + + void Swap(RequestBlob* other); + + // implements Message ---------------------------------------------- + + RequestBlob* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const RequestBlob& from); + void MergeFrom(const RequestBlob& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated uint32 session_texture = 1; + inline int session_texture_size() const; + inline void clear_session_texture(); + static const int kSessionTextureFieldNumber = 1; + inline ::google::protobuf::uint32 session_texture(int index) const; + inline void set_session_texture(int index, ::google::protobuf::uint32 value); + inline void add_session_texture(::google::protobuf::uint32 value); + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + session_texture() const; + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + mutable_session_texture(); + + // repeated uint32 session_comment = 2; + inline int session_comment_size() const; + inline void clear_session_comment(); + static const int kSessionCommentFieldNumber = 2; + inline ::google::protobuf::uint32 session_comment(int index) const; + inline void set_session_comment(int index, ::google::protobuf::uint32 value); + inline void add_session_comment(::google::protobuf::uint32 value); + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + session_comment() const; + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + mutable_session_comment(); + + // repeated uint32 channel_description = 3; + inline int channel_description_size() const; + inline void clear_channel_description(); + static const int kChannelDescriptionFieldNumber = 3; + inline ::google::protobuf::uint32 channel_description(int index) const; + inline void set_channel_description(int index, + ::google::protobuf::uint32 value); + inline void add_channel_description(::google::protobuf::uint32 value); + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + channel_description() const; + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + mutable_channel_description(); + + // @@protoc_insertion_point(class_scope:MumbleProto.RequestBlob) + private: + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > + session_texture_; + ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > + session_comment_; + ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > + channel_description_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static RequestBlob* default_instance_; + }; +// ------------------------------------------------------------------- + + class ServerConfig : public ::google::protobuf::Message + { + public: + ServerConfig(); + virtual ~ServerConfig(); + + ServerConfig(const ServerConfig& from); + + inline ServerConfig& operator=(const ServerConfig& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ServerConfig& default_instance(); + + void Swap(ServerConfig* other); + + // implements Message ---------------------------------------------- + + ServerConfig* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ServerConfig& from); + void MergeFrom(const ServerConfig& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional uint32 max_bandwidth = 1; + inline bool has_max_bandwidth() const; + inline void clear_max_bandwidth(); + static const int kMaxBandwidthFieldNumber = 1; + inline ::google::protobuf::uint32 max_bandwidth() const; + inline void set_max_bandwidth(::google::protobuf::uint32 value); + + // optional string welcome_text = 2; + inline bool has_welcome_text() const; + inline void clear_welcome_text(); + static const int kWelcomeTextFieldNumber = 2; + inline const ::std::string& welcome_text() const; + inline void set_welcome_text(const ::std::string& value); + inline void set_welcome_text(const char* value); + inline void set_welcome_text(const char* value, size_t size); + inline ::std::string* mutable_welcome_text(); + inline ::std::string* release_welcome_text(); + inline void set_allocated_welcome_text(::std::string* welcome_text); + + // optional bool allow_html = 3; + inline bool has_allow_html() const; + inline void clear_allow_html(); + static const int kAllowHtmlFieldNumber = 3; + inline bool allow_html() const; + inline void set_allow_html(bool value); + + // optional uint32 message_length = 4; + inline bool has_message_length() const; + inline void clear_message_length(); + static const int kMessageLengthFieldNumber = 4; + inline ::google::protobuf::uint32 message_length() const; + inline void set_message_length(::google::protobuf::uint32 value); + + // optional uint32 image_message_length = 5; + inline bool has_image_message_length() const; + inline void clear_image_message_length(); + static const int kImageMessageLengthFieldNumber = 5; + inline ::google::protobuf::uint32 image_message_length() const; + inline void set_image_message_length(::google::protobuf::uint32 value); + + // optional uint32 max_users = 6; + inline bool has_max_users() const; + inline void clear_max_users(); + static const int kMaxUsersFieldNumber = 6; + inline ::google::protobuf::uint32 max_users() const; + inline void set_max_users(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:MumbleProto.ServerConfig) + private: + inline void set_has_max_bandwidth(); + inline void clear_has_max_bandwidth(); + inline void set_has_welcome_text(); + inline void clear_has_welcome_text(); + inline void set_has_allow_html(); + inline void clear_has_allow_html(); + inline void set_has_message_length(); + inline void clear_has_message_length(); + inline void set_has_image_message_length(); + inline void clear_has_image_message_length(); + inline void set_has_max_users(); + inline void clear_has_max_users(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::std::string* welcome_text_; + ::google::protobuf::uint32 max_bandwidth_; + bool allow_html_; + ::google::protobuf::uint32 message_length_; + ::google::protobuf::uint32 image_message_length_; + ::google::protobuf::uint32 max_users_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static ServerConfig* default_instance_; + }; +// ------------------------------------------------------------------- + + class SuggestConfig : public ::google::protobuf::Message + { + public: + SuggestConfig(); + virtual ~SuggestConfig(); + + SuggestConfig(const SuggestConfig& from); + + inline SuggestConfig& operator=(const SuggestConfig& from) + { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const SuggestConfig& default_instance(); + + void Swap(SuggestConfig* other); + + // implements Message ---------------------------------------------- + + SuggestConfig* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const SuggestConfig& from); + void MergeFrom(const SuggestConfig& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const + { + return _cached_size_; + } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional uint32 version = 1; + inline bool has_version() const; + inline void clear_version(); + static const int kVersionFieldNumber = 1; + inline ::google::protobuf::uint32 version() const; + inline void set_version(::google::protobuf::uint32 value); + + // optional bool positional = 2; + inline bool has_positional() const; + inline void clear_positional(); + static const int kPositionalFieldNumber = 2; + inline bool positional() const; + inline void set_positional(bool value); + + // optional bool push_to_talk = 3; + inline bool has_push_to_talk() const; + inline void clear_push_to_talk(); + static const int kPushToTalkFieldNumber = 3; + inline bool push_to_talk() const; + inline void set_push_to_talk(bool value); + + // @@protoc_insertion_point(class_scope:MumbleProto.SuggestConfig) + private: + inline void set_has_version(); + inline void clear_has_version(); + inline void set_has_positional(); + inline void clear_has_positional(); + inline void set_has_push_to_talk(); + inline void clear_has_push_to_talk(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::uint32 version_; + bool positional_; + bool push_to_talk_; + friend void protobuf_AddDesc_Mumble_2eproto(); + friend void protobuf_AssignDesc_Mumble_2eproto(); + friend void protobuf_ShutdownFile_Mumble_2eproto(); + + void InitAsDefaultInstance(); + static SuggestConfig* default_instance_; + }; +// =================================================================== + + +// =================================================================== + +// Version + +// optional uint32 version = 1; + inline bool Version::has_version() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void Version::set_has_version() + { + _has_bits_[0] |= 0x00000001u; + } + inline void Version::clear_has_version() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void Version::clear_version() + { + version_ = 0u; + clear_has_version(); + } + inline ::google::protobuf::uint32 Version::version() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Version.version) + return version_; + } + inline void Version::set_version(::google::protobuf::uint32 value) + { + set_has_version(); + version_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.Version.version) + } + +// optional string release = 2; + inline bool Version::has_release() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void Version::set_has_release() + { + _has_bits_[0] |= 0x00000002u; + } + inline void Version::clear_has_release() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void Version::clear_release() + { + if (release_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + release_->clear(); + } + clear_has_release(); + } + inline const ::std::string& Version::release() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Version.release) + return *release_; + } + inline void Version::set_release(const ::std::string& value) + { + set_has_release(); + if (release_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + release_ = new ::std::string; + } + release_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.Version.release) + } + inline void Version::set_release(const char* value) + { + set_has_release(); + if (release_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + release_ = new ::std::string; + } + release_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.Version.release) + } + inline void Version::set_release(const char* value, size_t size) + { + set_has_release(); + if (release_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + release_ = new ::std::string; + } + release_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.Version.release) + } + inline ::std::string* Version::mutable_release() + { + set_has_release(); + if (release_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + release_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.Version.release) + return release_; + } + inline ::std::string* Version::release_release() + { + clear_has_release(); + if (release_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = release_; + release_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void Version::set_allocated_release(::std::string* release) + { + if (release_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete release_; + } + if (release) + { + set_has_release(); + release_ = release; + } + else + { + clear_has_release(); + release_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.Version.release) + } + +// optional string os = 3; + inline bool Version::has_os() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void Version::set_has_os() + { + _has_bits_[0] |= 0x00000004u; + } + inline void Version::clear_has_os() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void Version::clear_os() + { + if (os_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + os_->clear(); + } + clear_has_os(); + } + inline const ::std::string& Version::os() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Version.os) + return *os_; + } + inline void Version::set_os(const ::std::string& value) + { + set_has_os(); + if (os_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + os_ = new ::std::string; + } + os_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.Version.os) + } + inline void Version::set_os(const char* value) + { + set_has_os(); + if (os_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + os_ = new ::std::string; + } + os_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.Version.os) + } + inline void Version::set_os(const char* value, size_t size) + { + set_has_os(); + if (os_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + os_ = new ::std::string; + } + os_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.Version.os) + } + inline ::std::string* Version::mutable_os() + { + set_has_os(); + if (os_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + os_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.Version.os) + return os_; + } + inline ::std::string* Version::release_os() + { + clear_has_os(); + if (os_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = os_; + os_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void Version::set_allocated_os(::std::string* os) + { + if (os_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete os_; + } + if (os) + { + set_has_os(); + os_ = os; + } + else + { + clear_has_os(); + os_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.Version.os) + } + +// optional string os_version = 4; + inline bool Version::has_os_version() const + { + return (_has_bits_[0] & 0x00000008u) != 0; + } + inline void Version::set_has_os_version() + { + _has_bits_[0] |= 0x00000008u; + } + inline void Version::clear_has_os_version() + { + _has_bits_[0] &= ~0x00000008u; + } + inline void Version::clear_os_version() + { + if (os_version_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + os_version_->clear(); + } + clear_has_os_version(); + } + inline const ::std::string& Version::os_version() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Version.os_version) + return *os_version_; + } + inline void Version::set_os_version(const ::std::string& value) + { + set_has_os_version(); + if (os_version_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + os_version_ = new ::std::string; + } + os_version_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.Version.os_version) + } + inline void Version::set_os_version(const char* value) + { + set_has_os_version(); + if (os_version_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + os_version_ = new ::std::string; + } + os_version_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.Version.os_version) + } + inline void Version::set_os_version(const char* value, size_t size) + { + set_has_os_version(); + if (os_version_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + os_version_ = new ::std::string; + } + os_version_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.Version.os_version) + } + inline ::std::string* Version::mutable_os_version() + { + set_has_os_version(); + if (os_version_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + os_version_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.Version.os_version) + return os_version_; + } + inline ::std::string* Version::release_os_version() + { + clear_has_os_version(); + if (os_version_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = os_version_; + os_version_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void Version::set_allocated_os_version(::std::string* os_version) + { + if (os_version_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete os_version_; + } + if (os_version) + { + set_has_os_version(); + os_version_ = os_version; + } + else + { + clear_has_os_version(); + os_version_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.Version.os_version) + } + +// ------------------------------------------------------------------- + +// UDPTunnel + +// required bytes packet = 1; + inline bool UDPTunnel::has_packet() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void UDPTunnel::set_has_packet() + { + _has_bits_[0] |= 0x00000001u; + } + inline void UDPTunnel::clear_has_packet() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void UDPTunnel::clear_packet() + { + if (packet_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + packet_->clear(); + } + clear_has_packet(); + } + inline const ::std::string& UDPTunnel::packet() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UDPTunnel.packet) + return *packet_; + } + inline void UDPTunnel::set_packet(const ::std::string& value) + { + set_has_packet(); + if (packet_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + packet_ = new ::std::string; + } + packet_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.UDPTunnel.packet) + } + inline void UDPTunnel::set_packet(const char* value) + { + set_has_packet(); + if (packet_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + packet_ = new ::std::string; + } + packet_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.UDPTunnel.packet) + } + inline void UDPTunnel::set_packet(const void* value, size_t size) + { + set_has_packet(); + if (packet_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + packet_ = new ::std::string; + } + packet_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.UDPTunnel.packet) + } + inline ::std::string* UDPTunnel::mutable_packet() + { + set_has_packet(); + if (packet_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + packet_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.UDPTunnel.packet) + return packet_; + } + inline ::std::string* UDPTunnel::release_packet() + { + clear_has_packet(); + if (packet_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = packet_; + packet_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void UDPTunnel::set_allocated_packet(::std::string* packet) + { + if (packet_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete packet_; + } + if (packet) + { + set_has_packet(); + packet_ = packet; + } + else + { + clear_has_packet(); + packet_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.UDPTunnel.packet) + } + +// ------------------------------------------------------------------- + +// Authenticate + +// optional string username = 1; + inline bool Authenticate::has_username() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void Authenticate::set_has_username() + { + _has_bits_[0] |= 0x00000001u; + } + inline void Authenticate::clear_has_username() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void Authenticate::clear_username() + { + if (username_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + username_->clear(); + } + clear_has_username(); + } + inline const ::std::string& Authenticate::username() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Authenticate.username) + return *username_; + } + inline void Authenticate::set_username(const ::std::string& value) + { + set_has_username(); + if (username_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + username_ = new ::std::string; + } + username_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.Authenticate.username) + } + inline void Authenticate::set_username(const char* value) + { + set_has_username(); + if (username_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + username_ = new ::std::string; + } + username_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.Authenticate.username) + } + inline void Authenticate::set_username(const char* value, size_t size) + { + set_has_username(); + if (username_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + username_ = new ::std::string; + } + username_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.Authenticate.username) + } + inline ::std::string* Authenticate::mutable_username() + { + set_has_username(); + if (username_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + username_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.Authenticate.username) + return username_; + } + inline ::std::string* Authenticate::release_username() + { + clear_has_username(); + if (username_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = username_; + username_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void Authenticate::set_allocated_username(::std::string* username) + { + if (username_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete username_; + } + if (username) + { + set_has_username(); + username_ = username; + } + else + { + clear_has_username(); + username_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.Authenticate.username) + } + +// optional string password = 2; + inline bool Authenticate::has_password() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void Authenticate::set_has_password() + { + _has_bits_[0] |= 0x00000002u; + } + inline void Authenticate::clear_has_password() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void Authenticate::clear_password() + { + if (password_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + password_->clear(); + } + clear_has_password(); + } + inline const ::std::string& Authenticate::password() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Authenticate.password) + return *password_; + } + inline void Authenticate::set_password(const ::std::string& value) + { + set_has_password(); + if (password_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + password_ = new ::std::string; + } + password_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.Authenticate.password) + } + inline void Authenticate::set_password(const char* value) + { + set_has_password(); + if (password_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + password_ = new ::std::string; + } + password_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.Authenticate.password) + } + inline void Authenticate::set_password(const char* value, size_t size) + { + set_has_password(); + if (password_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + password_ = new ::std::string; + } + password_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.Authenticate.password) + } + inline ::std::string* Authenticate::mutable_password() + { + set_has_password(); + if (password_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + password_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.Authenticate.password) + return password_; + } + inline ::std::string* Authenticate::release_password() + { + clear_has_password(); + if (password_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = password_; + password_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void Authenticate::set_allocated_password(::std::string* password) + { + if (password_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete password_; + } + if (password) + { + set_has_password(); + password_ = password; + } + else + { + clear_has_password(); + password_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.Authenticate.password) + } + +// repeated string tokens = 3; + inline int Authenticate::tokens_size() const + { + return tokens_.size(); + } + inline void Authenticate::clear_tokens() + { + tokens_.Clear(); + } + inline const ::std::string& Authenticate::tokens(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.Authenticate.tokens) + return tokens_.Get(index); + } + inline ::std::string* Authenticate::mutable_tokens(int index) + { + // @@protoc_insertion_point(field_mutable:MumbleProto.Authenticate.tokens) + return tokens_.Mutable(index); + } + inline void Authenticate::set_tokens(int index, const ::std::string& value) + { + // @@protoc_insertion_point(field_set:MumbleProto.Authenticate.tokens) + tokens_.Mutable(index)->assign(value); + } + inline void Authenticate::set_tokens(int index, const char* value) + { + tokens_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.Authenticate.tokens) + } + inline void Authenticate::set_tokens(int index, const char* value, size_t size) + { + tokens_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.Authenticate.tokens) + } + inline ::std::string* Authenticate::add_tokens() + { + return tokens_.Add(); + } + inline void Authenticate::add_tokens(const ::std::string& value) + { + tokens_.Add()->assign(value); + // @@protoc_insertion_point(field_add:MumbleProto.Authenticate.tokens) + } + inline void Authenticate::add_tokens(const char* value) + { + tokens_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:MumbleProto.Authenticate.tokens) + } + inline void Authenticate::add_tokens(const char* value, size_t size) + { + tokens_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:MumbleProto.Authenticate.tokens) + } + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& + Authenticate::tokens() const + { + // @@protoc_insertion_point(field_list:MumbleProto.Authenticate.tokens) + return tokens_; + } + inline ::google::protobuf::RepeatedPtrField< ::std::string>* + Authenticate::mutable_tokens() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.Authenticate.tokens) + return &tokens_; + } + +// repeated int32 celt_versions = 4; + inline int Authenticate::celt_versions_size() const + { + return celt_versions_.size(); + } + inline void Authenticate::clear_celt_versions() + { + celt_versions_.Clear(); + } + inline ::google::protobuf::int32 Authenticate::celt_versions(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.Authenticate.celt_versions) + return celt_versions_.Get(index); + } + inline void Authenticate::set_celt_versions(int index, + ::google::protobuf::int32 value) + { + celt_versions_.Set(index, value); + // @@protoc_insertion_point(field_set:MumbleProto.Authenticate.celt_versions) + } + inline void Authenticate::add_celt_versions(::google::protobuf::int32 value) + { + celt_versions_.Add(value); + // @@protoc_insertion_point(field_add:MumbleProto.Authenticate.celt_versions) + } + inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + Authenticate::celt_versions() const + { + // @@protoc_insertion_point(field_list:MumbleProto.Authenticate.celt_versions) + return celt_versions_; + } + inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + Authenticate::mutable_celt_versions() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.Authenticate.celt_versions) + return &celt_versions_; + } + +// optional bool opus = 5 [default = false]; + inline bool Authenticate::has_opus() const + { + return (_has_bits_[0] & 0x00000010u) != 0; + } + inline void Authenticate::set_has_opus() + { + _has_bits_[0] |= 0x00000010u; + } + inline void Authenticate::clear_has_opus() + { + _has_bits_[0] &= ~0x00000010u; + } + inline void Authenticate::clear_opus() + { + opus_ = false; + clear_has_opus(); + } + inline bool Authenticate::opus() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Authenticate.opus) + return opus_; + } + inline void Authenticate::set_opus(bool value) + { + set_has_opus(); + opus_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.Authenticate.opus) + } + +// ------------------------------------------------------------------- + +// Ping + +// optional uint64 timestamp = 1; + inline bool Ping::has_timestamp() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void Ping::set_has_timestamp() + { + _has_bits_[0] |= 0x00000001u; + } + inline void Ping::clear_has_timestamp() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void Ping::clear_timestamp() + { + timestamp_ = GOOGLE_ULONGLONG(0); + clear_has_timestamp(); + } + inline ::google::protobuf::uint64 Ping::timestamp() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Ping.timestamp) + return timestamp_; + } + inline void Ping::set_timestamp(::google::protobuf::uint64 value) + { + set_has_timestamp(); + timestamp_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.Ping.timestamp) + } + +// optional uint32 good = 2; + inline bool Ping::has_good() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void Ping::set_has_good() + { + _has_bits_[0] |= 0x00000002u; + } + inline void Ping::clear_has_good() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void Ping::clear_good() + { + good_ = 0u; + clear_has_good(); + } + inline ::google::protobuf::uint32 Ping::good() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Ping.good) + return good_; + } + inline void Ping::set_good(::google::protobuf::uint32 value) + { + set_has_good(); + good_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.Ping.good) + } + +// optional uint32 late = 3; + inline bool Ping::has_late() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void Ping::set_has_late() + { + _has_bits_[0] |= 0x00000004u; + } + inline void Ping::clear_has_late() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void Ping::clear_late() + { + late_ = 0u; + clear_has_late(); + } + inline ::google::protobuf::uint32 Ping::late() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Ping.late) + return late_; + } + inline void Ping::set_late(::google::protobuf::uint32 value) + { + set_has_late(); + late_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.Ping.late) + } + +// optional uint32 lost = 4; + inline bool Ping::has_lost() const + { + return (_has_bits_[0] & 0x00000008u) != 0; + } + inline void Ping::set_has_lost() + { + _has_bits_[0] |= 0x00000008u; + } + inline void Ping::clear_has_lost() + { + _has_bits_[0] &= ~0x00000008u; + } + inline void Ping::clear_lost() + { + lost_ = 0u; + clear_has_lost(); + } + inline ::google::protobuf::uint32 Ping::lost() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Ping.lost) + return lost_; + } + inline void Ping::set_lost(::google::protobuf::uint32 value) + { + set_has_lost(); + lost_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.Ping.lost) + } + +// optional uint32 resync = 5; + inline bool Ping::has_resync() const + { + return (_has_bits_[0] & 0x00000010u) != 0; + } + inline void Ping::set_has_resync() + { + _has_bits_[0] |= 0x00000010u; + } + inline void Ping::clear_has_resync() + { + _has_bits_[0] &= ~0x00000010u; + } + inline void Ping::clear_resync() + { + resync_ = 0u; + clear_has_resync(); + } + inline ::google::protobuf::uint32 Ping::resync() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Ping.resync) + return resync_; + } + inline void Ping::set_resync(::google::protobuf::uint32 value) + { + set_has_resync(); + resync_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.Ping.resync) + } + +// optional uint32 udp_packets = 6; + inline bool Ping::has_udp_packets() const + { + return (_has_bits_[0] & 0x00000020u) != 0; + } + inline void Ping::set_has_udp_packets() + { + _has_bits_[0] |= 0x00000020u; + } + inline void Ping::clear_has_udp_packets() + { + _has_bits_[0] &= ~0x00000020u; + } + inline void Ping::clear_udp_packets() + { + udp_packets_ = 0u; + clear_has_udp_packets(); + } + inline ::google::protobuf::uint32 Ping::udp_packets() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Ping.udp_packets) + return udp_packets_; + } + inline void Ping::set_udp_packets(::google::protobuf::uint32 value) + { + set_has_udp_packets(); + udp_packets_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.Ping.udp_packets) + } + +// optional uint32 tcp_packets = 7; + inline bool Ping::has_tcp_packets() const + { + return (_has_bits_[0] & 0x00000040u) != 0; + } + inline void Ping::set_has_tcp_packets() + { + _has_bits_[0] |= 0x00000040u; + } + inline void Ping::clear_has_tcp_packets() + { + _has_bits_[0] &= ~0x00000040u; + } + inline void Ping::clear_tcp_packets() + { + tcp_packets_ = 0u; + clear_has_tcp_packets(); + } + inline ::google::protobuf::uint32 Ping::tcp_packets() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Ping.tcp_packets) + return tcp_packets_; + } + inline void Ping::set_tcp_packets(::google::protobuf::uint32 value) + { + set_has_tcp_packets(); + tcp_packets_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.Ping.tcp_packets) + } + +// optional float udp_ping_avg = 8; + inline bool Ping::has_udp_ping_avg() const + { + return (_has_bits_[0] & 0x00000080u) != 0; + } + inline void Ping::set_has_udp_ping_avg() + { + _has_bits_[0] |= 0x00000080u; + } + inline void Ping::clear_has_udp_ping_avg() + { + _has_bits_[0] &= ~0x00000080u; + } + inline void Ping::clear_udp_ping_avg() + { + udp_ping_avg_ = 0; + clear_has_udp_ping_avg(); + } + inline float Ping::udp_ping_avg() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Ping.udp_ping_avg) + return udp_ping_avg_; + } + inline void Ping::set_udp_ping_avg(float value) + { + set_has_udp_ping_avg(); + udp_ping_avg_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.Ping.udp_ping_avg) + } + +// optional float udp_ping_var = 9; + inline bool Ping::has_udp_ping_var() const + { + return (_has_bits_[0] & 0x00000100u) != 0; + } + inline void Ping::set_has_udp_ping_var() + { + _has_bits_[0] |= 0x00000100u; + } + inline void Ping::clear_has_udp_ping_var() + { + _has_bits_[0] &= ~0x00000100u; + } + inline void Ping::clear_udp_ping_var() + { + udp_ping_var_ = 0; + clear_has_udp_ping_var(); + } + inline float Ping::udp_ping_var() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Ping.udp_ping_var) + return udp_ping_var_; + } + inline void Ping::set_udp_ping_var(float value) + { + set_has_udp_ping_var(); + udp_ping_var_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.Ping.udp_ping_var) + } + +// optional float tcp_ping_avg = 10; + inline bool Ping::has_tcp_ping_avg() const + { + return (_has_bits_[0] & 0x00000200u) != 0; + } + inline void Ping::set_has_tcp_ping_avg() + { + _has_bits_[0] |= 0x00000200u; + } + inline void Ping::clear_has_tcp_ping_avg() + { + _has_bits_[0] &= ~0x00000200u; + } + inline void Ping::clear_tcp_ping_avg() + { + tcp_ping_avg_ = 0; + clear_has_tcp_ping_avg(); + } + inline float Ping::tcp_ping_avg() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Ping.tcp_ping_avg) + return tcp_ping_avg_; + } + inline void Ping::set_tcp_ping_avg(float value) + { + set_has_tcp_ping_avg(); + tcp_ping_avg_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.Ping.tcp_ping_avg) + } + +// optional float tcp_ping_var = 11; + inline bool Ping::has_tcp_ping_var() const + { + return (_has_bits_[0] & 0x00000400u) != 0; + } + inline void Ping::set_has_tcp_ping_var() + { + _has_bits_[0] |= 0x00000400u; + } + inline void Ping::clear_has_tcp_ping_var() + { + _has_bits_[0] &= ~0x00000400u; + } + inline void Ping::clear_tcp_ping_var() + { + tcp_ping_var_ = 0; + clear_has_tcp_ping_var(); + } + inline float Ping::tcp_ping_var() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Ping.tcp_ping_var) + return tcp_ping_var_; + } + inline void Ping::set_tcp_ping_var(float value) + { + set_has_tcp_ping_var(); + tcp_ping_var_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.Ping.tcp_ping_var) + } + +// ------------------------------------------------------------------- + +// Reject + +// optional .MumbleProto.Reject.RejectType type = 1; + inline bool Reject::has_type() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void Reject::set_has_type() + { + _has_bits_[0] |= 0x00000001u; + } + inline void Reject::clear_has_type() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void Reject::clear_type() + { + type_ = 0; + clear_has_type(); + } + inline ::MumbleProto::Reject_RejectType Reject::type() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Reject.type) + return static_cast< ::MumbleProto::Reject_RejectType >(type_); + } + inline void Reject::set_type(::MumbleProto::Reject_RejectType value) + { + assert(::MumbleProto::Reject_RejectType_IsValid(value)); + set_has_type(); + type_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.Reject.type) + } + +// optional string reason = 2; + inline bool Reject::has_reason() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void Reject::set_has_reason() + { + _has_bits_[0] |= 0x00000002u; + } + inline void Reject::clear_has_reason() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void Reject::clear_reason() + { + if (reason_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_->clear(); + } + clear_has_reason(); + } + inline const ::std::string& Reject::reason() const + { + // @@protoc_insertion_point(field_get:MumbleProto.Reject.reason) + return *reason_; + } + inline void Reject::set_reason(const ::std::string& value) + { + set_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_ = new ::std::string; + } + reason_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.Reject.reason) + } + inline void Reject::set_reason(const char* value) + { + set_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_ = new ::std::string; + } + reason_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.Reject.reason) + } + inline void Reject::set_reason(const char* value, size_t size) + { + set_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_ = new ::std::string; + } + reason_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.Reject.reason) + } + inline ::std::string* Reject::mutable_reason() + { + set_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.Reject.reason) + return reason_; + } + inline ::std::string* Reject::release_reason() + { + clear_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = reason_; + reason_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void Reject::set_allocated_reason(::std::string* reason) + { + if (reason_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete reason_; + } + if (reason) + { + set_has_reason(); + reason_ = reason; + } + else + { + clear_has_reason(); + reason_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.Reject.reason) + } + +// ------------------------------------------------------------------- + +// ServerSync + +// optional uint32 session = 1; + inline bool ServerSync::has_session() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void ServerSync::set_has_session() + { + _has_bits_[0] |= 0x00000001u; + } + inline void ServerSync::clear_has_session() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void ServerSync::clear_session() + { + session_ = 0u; + clear_has_session(); + } + inline ::google::protobuf::uint32 ServerSync::session() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ServerSync.session) + return session_; + } + inline void ServerSync::set_session(::google::protobuf::uint32 value) + { + set_has_session(); + session_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ServerSync.session) + } + +// optional uint32 max_bandwidth = 2; + inline bool ServerSync::has_max_bandwidth() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void ServerSync::set_has_max_bandwidth() + { + _has_bits_[0] |= 0x00000002u; + } + inline void ServerSync::clear_has_max_bandwidth() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void ServerSync::clear_max_bandwidth() + { + max_bandwidth_ = 0u; + clear_has_max_bandwidth(); + } + inline ::google::protobuf::uint32 ServerSync::max_bandwidth() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ServerSync.max_bandwidth) + return max_bandwidth_; + } + inline void ServerSync::set_max_bandwidth(::google::protobuf::uint32 value) + { + set_has_max_bandwidth(); + max_bandwidth_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ServerSync.max_bandwidth) + } + +// optional string welcome_text = 3; + inline bool ServerSync::has_welcome_text() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void ServerSync::set_has_welcome_text() + { + _has_bits_[0] |= 0x00000004u; + } + inline void ServerSync::clear_has_welcome_text() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void ServerSync::clear_welcome_text() + { + if (welcome_text_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + welcome_text_->clear(); + } + clear_has_welcome_text(); + } + inline const ::std::string& ServerSync::welcome_text() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ServerSync.welcome_text) + return *welcome_text_; + } + inline void ServerSync::set_welcome_text(const ::std::string& value) + { + set_has_welcome_text(); + if (welcome_text_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + welcome_text_ = new ::std::string; + } + welcome_text_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.ServerSync.welcome_text) + } + inline void ServerSync::set_welcome_text(const char* value) + { + set_has_welcome_text(); + if (welcome_text_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + welcome_text_ = new ::std::string; + } + welcome_text_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.ServerSync.welcome_text) + } + inline void ServerSync::set_welcome_text(const char* value, size_t size) + { + set_has_welcome_text(); + if (welcome_text_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + welcome_text_ = new ::std::string; + } + welcome_text_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.ServerSync.welcome_text) + } + inline ::std::string* ServerSync::mutable_welcome_text() + { + set_has_welcome_text(); + if (welcome_text_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + welcome_text_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.ServerSync.welcome_text) + return welcome_text_; + } + inline ::std::string* ServerSync::release_welcome_text() + { + clear_has_welcome_text(); + if (welcome_text_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = welcome_text_; + welcome_text_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void ServerSync::set_allocated_welcome_text(::std::string* welcome_text) + { + if (welcome_text_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete welcome_text_; + } + if (welcome_text) + { + set_has_welcome_text(); + welcome_text_ = welcome_text; + } + else + { + clear_has_welcome_text(); + welcome_text_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.ServerSync.welcome_text) + } + +// optional uint64 permissions = 4; + inline bool ServerSync::has_permissions() const + { + return (_has_bits_[0] & 0x00000008u) != 0; + } + inline void ServerSync::set_has_permissions() + { + _has_bits_[0] |= 0x00000008u; + } + inline void ServerSync::clear_has_permissions() + { + _has_bits_[0] &= ~0x00000008u; + } + inline void ServerSync::clear_permissions() + { + permissions_ = GOOGLE_ULONGLONG(0); + clear_has_permissions(); + } + inline ::google::protobuf::uint64 ServerSync::permissions() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ServerSync.permissions) + return permissions_; + } + inline void ServerSync::set_permissions(::google::protobuf::uint64 value) + { + set_has_permissions(); + permissions_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ServerSync.permissions) + } + +// ------------------------------------------------------------------- + +// ChannelRemove + +// required uint32 channel_id = 1; + inline bool ChannelRemove::has_channel_id() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void ChannelRemove::set_has_channel_id() + { + _has_bits_[0] |= 0x00000001u; + } + inline void ChannelRemove::clear_has_channel_id() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void ChannelRemove::clear_channel_id() + { + channel_id_ = 0u; + clear_has_channel_id(); + } + inline ::google::protobuf::uint32 ChannelRemove::channel_id() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ChannelRemove.channel_id) + return channel_id_; + } + inline void ChannelRemove::set_channel_id(::google::protobuf::uint32 value) + { + set_has_channel_id(); + channel_id_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ChannelRemove.channel_id) + } + +// ------------------------------------------------------------------- + +// ChannelState + +// optional uint32 channel_id = 1; + inline bool ChannelState::has_channel_id() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void ChannelState::set_has_channel_id() + { + _has_bits_[0] |= 0x00000001u; + } + inline void ChannelState::clear_has_channel_id() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void ChannelState::clear_channel_id() + { + channel_id_ = 0u; + clear_has_channel_id(); + } + inline ::google::protobuf::uint32 ChannelState::channel_id() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ChannelState.channel_id) + return channel_id_; + } + inline void ChannelState::set_channel_id(::google::protobuf::uint32 value) + { + set_has_channel_id(); + channel_id_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ChannelState.channel_id) + } + +// optional uint32 parent = 2; + inline bool ChannelState::has_parent() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void ChannelState::set_has_parent() + { + _has_bits_[0] |= 0x00000002u; + } + inline void ChannelState::clear_has_parent() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void ChannelState::clear_parent() + { + parent_ = 0u; + clear_has_parent(); + } + inline ::google::protobuf::uint32 ChannelState::parent() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ChannelState.parent) + return parent_; + } + inline void ChannelState::set_parent(::google::protobuf::uint32 value) + { + set_has_parent(); + parent_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ChannelState.parent) + } + +// optional string name = 3; + inline bool ChannelState::has_name() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void ChannelState::set_has_name() + { + _has_bits_[0] |= 0x00000004u; + } + inline void ChannelState::clear_has_name() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void ChannelState::clear_name() + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_->clear(); + } + clear_has_name(); + } + inline const ::std::string& ChannelState::name() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ChannelState.name) + return *name_; + } + inline void ChannelState::set_name(const ::std::string& value) + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + name_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.ChannelState.name) + } + inline void ChannelState::set_name(const char* value) + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + name_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.ChannelState.name) + } + inline void ChannelState::set_name(const char* value, size_t size) + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + name_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.ChannelState.name) + } + inline ::std::string* ChannelState::mutable_name() + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.ChannelState.name) + return name_; + } + inline ::std::string* ChannelState::release_name() + { + clear_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = name_; + name_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void ChannelState::set_allocated_name(::std::string* name) + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete name_; + } + if (name) + { + set_has_name(); + name_ = name; + } + else + { + clear_has_name(); + name_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.ChannelState.name) + } + +// repeated uint32 links = 4; + inline int ChannelState::links_size() const + { + return links_.size(); + } + inline void ChannelState::clear_links() + { + links_.Clear(); + } + inline ::google::protobuf::uint32 ChannelState::links(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.ChannelState.links) + return links_.Get(index); + } + inline void ChannelState::set_links(int index, + ::google::protobuf::uint32 value) + { + links_.Set(index, value); + // @@protoc_insertion_point(field_set:MumbleProto.ChannelState.links) + } + inline void ChannelState::add_links(::google::protobuf::uint32 value) + { + links_.Add(value); + // @@protoc_insertion_point(field_add:MumbleProto.ChannelState.links) + } + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + ChannelState::links() const + { + // @@protoc_insertion_point(field_list:MumbleProto.ChannelState.links) + return links_; + } + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + ChannelState::mutable_links() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.ChannelState.links) + return &links_; + } + +// optional string description = 5; + inline bool ChannelState::has_description() const + { + return (_has_bits_[0] & 0x00000010u) != 0; + } + inline void ChannelState::set_has_description() + { + _has_bits_[0] |= 0x00000010u; + } + inline void ChannelState::clear_has_description() + { + _has_bits_[0] &= ~0x00000010u; + } + inline void ChannelState::clear_description() + { + if (description_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + description_->clear(); + } + clear_has_description(); + } + inline const ::std::string& ChannelState::description() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ChannelState.description) + return *description_; + } + inline void ChannelState::set_description(const ::std::string& value) + { + set_has_description(); + if (description_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + description_ = new ::std::string; + } + description_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.ChannelState.description) + } + inline void ChannelState::set_description(const char* value) + { + set_has_description(); + if (description_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + description_ = new ::std::string; + } + description_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.ChannelState.description) + } + inline void ChannelState::set_description(const char* value, size_t size) + { + set_has_description(); + if (description_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + description_ = new ::std::string; + } + description_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.ChannelState.description) + } + inline ::std::string* ChannelState::mutable_description() + { + set_has_description(); + if (description_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + description_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.ChannelState.description) + return description_; + } + inline ::std::string* ChannelState::release_description() + { + clear_has_description(); + if (description_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = description_; + description_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void ChannelState::set_allocated_description(::std::string* description) + { + if (description_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete description_; + } + if (description) + { + set_has_description(); + description_ = description; + } + else + { + clear_has_description(); + description_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.ChannelState.description) + } + +// repeated uint32 links_add = 6; + inline int ChannelState::links_add_size() const + { + return links_add_.size(); + } + inline void ChannelState::clear_links_add() + { + links_add_.Clear(); + } + inline ::google::protobuf::uint32 ChannelState::links_add(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.ChannelState.links_add) + return links_add_.Get(index); + } + inline void ChannelState::set_links_add(int index, + ::google::protobuf::uint32 value) + { + links_add_.Set(index, value); + // @@protoc_insertion_point(field_set:MumbleProto.ChannelState.links_add) + } + inline void ChannelState::add_links_add(::google::protobuf::uint32 value) + { + links_add_.Add(value); + // @@protoc_insertion_point(field_add:MumbleProto.ChannelState.links_add) + } + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + ChannelState::links_add() const + { + // @@protoc_insertion_point(field_list:MumbleProto.ChannelState.links_add) + return links_add_; + } + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + ChannelState::mutable_links_add() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.ChannelState.links_add) + return &links_add_; + } + +// repeated uint32 links_remove = 7; + inline int ChannelState::links_remove_size() const + { + return links_remove_.size(); + } + inline void ChannelState::clear_links_remove() + { + links_remove_.Clear(); + } + inline ::google::protobuf::uint32 ChannelState::links_remove(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.ChannelState.links_remove) + return links_remove_.Get(index); + } + inline void ChannelState::set_links_remove(int index, + ::google::protobuf::uint32 value) + { + links_remove_.Set(index, value); + // @@protoc_insertion_point(field_set:MumbleProto.ChannelState.links_remove) + } + inline void ChannelState::add_links_remove(::google::protobuf::uint32 value) + { + links_remove_.Add(value); + // @@protoc_insertion_point(field_add:MumbleProto.ChannelState.links_remove) + } + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + ChannelState::links_remove() const + { + // @@protoc_insertion_point(field_list:MumbleProto.ChannelState.links_remove) + return links_remove_; + } + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + ChannelState::mutable_links_remove() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.ChannelState.links_remove) + return &links_remove_; + } + +// optional bool temporary = 8 [default = false]; + inline bool ChannelState::has_temporary() const + { + return (_has_bits_[0] & 0x00000080u) != 0; + } + inline void ChannelState::set_has_temporary() + { + _has_bits_[0] |= 0x00000080u; + } + inline void ChannelState::clear_has_temporary() + { + _has_bits_[0] &= ~0x00000080u; + } + inline void ChannelState::clear_temporary() + { + temporary_ = false; + clear_has_temporary(); + } + inline bool ChannelState::temporary() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ChannelState.temporary) + return temporary_; + } + inline void ChannelState::set_temporary(bool value) + { + set_has_temporary(); + temporary_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ChannelState.temporary) + } + +// optional int32 position = 9 [default = 0]; + inline bool ChannelState::has_position() const + { + return (_has_bits_[0] & 0x00000100u) != 0; + } + inline void ChannelState::set_has_position() + { + _has_bits_[0] |= 0x00000100u; + } + inline void ChannelState::clear_has_position() + { + _has_bits_[0] &= ~0x00000100u; + } + inline void ChannelState::clear_position() + { + position_ = 0; + clear_has_position(); + } + inline ::google::protobuf::int32 ChannelState::position() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ChannelState.position) + return position_; + } + inline void ChannelState::set_position(::google::protobuf::int32 value) + { + set_has_position(); + position_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ChannelState.position) + } + +// optional bytes description_hash = 10; + inline bool ChannelState::has_description_hash() const + { + return (_has_bits_[0] & 0x00000200u) != 0; + } + inline void ChannelState::set_has_description_hash() + { + _has_bits_[0] |= 0x00000200u; + } + inline void ChannelState::clear_has_description_hash() + { + _has_bits_[0] &= ~0x00000200u; + } + inline void ChannelState::clear_description_hash() + { + if (description_hash_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + description_hash_->clear(); + } + clear_has_description_hash(); + } + inline const ::std::string& ChannelState::description_hash() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ChannelState.description_hash) + return *description_hash_; + } + inline void ChannelState::set_description_hash(const ::std::string& value) + { + set_has_description_hash(); + if (description_hash_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + description_hash_ = new ::std::string; + } + description_hash_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.ChannelState.description_hash) + } + inline void ChannelState::set_description_hash(const char* value) + { + set_has_description_hash(); + if (description_hash_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + description_hash_ = new ::std::string; + } + description_hash_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.ChannelState.description_hash) + } + inline void ChannelState::set_description_hash(const void* value, size_t size) + { + set_has_description_hash(); + if (description_hash_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + description_hash_ = new ::std::string; + } + description_hash_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.ChannelState.description_hash) + } + inline ::std::string* ChannelState::mutable_description_hash() + { + set_has_description_hash(); + if (description_hash_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + description_hash_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.ChannelState.description_hash) + return description_hash_; + } + inline ::std::string* ChannelState::release_description_hash() + { + clear_has_description_hash(); + if (description_hash_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = description_hash_; + description_hash_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void ChannelState::set_allocated_description_hash( + ::std::string* description_hash) + { + if (description_hash_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete description_hash_; + } + if (description_hash) + { + set_has_description_hash(); + description_hash_ = description_hash; + } + else + { + clear_has_description_hash(); + description_hash_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.ChannelState.description_hash) + } + +// optional uint32 max_users = 11; + inline bool ChannelState::has_max_users() const + { + return (_has_bits_[0] & 0x00000400u) != 0; + } + inline void ChannelState::set_has_max_users() + { + _has_bits_[0] |= 0x00000400u; + } + inline void ChannelState::clear_has_max_users() + { + _has_bits_[0] &= ~0x00000400u; + } + inline void ChannelState::clear_max_users() + { + max_users_ = 0u; + clear_has_max_users(); + } + inline ::google::protobuf::uint32 ChannelState::max_users() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ChannelState.max_users) + return max_users_; + } + inline void ChannelState::set_max_users(::google::protobuf::uint32 value) + { + set_has_max_users(); + max_users_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ChannelState.max_users) + } + +// ------------------------------------------------------------------- + +// UserRemove + +// required uint32 session = 1; + inline bool UserRemove::has_session() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void UserRemove::set_has_session() + { + _has_bits_[0] |= 0x00000001u; + } + inline void UserRemove::clear_has_session() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void UserRemove::clear_session() + { + session_ = 0u; + clear_has_session(); + } + inline ::google::protobuf::uint32 UserRemove::session() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserRemove.session) + return session_; + } + inline void UserRemove::set_session(::google::protobuf::uint32 value) + { + set_has_session(); + session_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserRemove.session) + } + +// optional uint32 actor = 2; + inline bool UserRemove::has_actor() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void UserRemove::set_has_actor() + { + _has_bits_[0] |= 0x00000002u; + } + inline void UserRemove::clear_has_actor() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void UserRemove::clear_actor() + { + actor_ = 0u; + clear_has_actor(); + } + inline ::google::protobuf::uint32 UserRemove::actor() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserRemove.actor) + return actor_; + } + inline void UserRemove::set_actor(::google::protobuf::uint32 value) + { + set_has_actor(); + actor_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserRemove.actor) + } + +// optional string reason = 3; + inline bool UserRemove::has_reason() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void UserRemove::set_has_reason() + { + _has_bits_[0] |= 0x00000004u; + } + inline void UserRemove::clear_has_reason() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void UserRemove::clear_reason() + { + if (reason_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_->clear(); + } + clear_has_reason(); + } + inline const ::std::string& UserRemove::reason() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserRemove.reason) + return *reason_; + } + inline void UserRemove::set_reason(const ::std::string& value) + { + set_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_ = new ::std::string; + } + reason_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.UserRemove.reason) + } + inline void UserRemove::set_reason(const char* value) + { + set_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_ = new ::std::string; + } + reason_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.UserRemove.reason) + } + inline void UserRemove::set_reason(const char* value, size_t size) + { + set_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_ = new ::std::string; + } + reason_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.UserRemove.reason) + } + inline ::std::string* UserRemove::mutable_reason() + { + set_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.UserRemove.reason) + return reason_; + } + inline ::std::string* UserRemove::release_reason() + { + clear_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = reason_; + reason_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void UserRemove::set_allocated_reason(::std::string* reason) + { + if (reason_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete reason_; + } + if (reason) + { + set_has_reason(); + reason_ = reason; + } + else + { + clear_has_reason(); + reason_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.UserRemove.reason) + } + +// optional bool ban = 4; + inline bool UserRemove::has_ban() const + { + return (_has_bits_[0] & 0x00000008u) != 0; + } + inline void UserRemove::set_has_ban() + { + _has_bits_[0] |= 0x00000008u; + } + inline void UserRemove::clear_has_ban() + { + _has_bits_[0] &= ~0x00000008u; + } + inline void UserRemove::clear_ban() + { + ban_ = false; + clear_has_ban(); + } + inline bool UserRemove::ban() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserRemove.ban) + return ban_; + } + inline void UserRemove::set_ban(bool value) + { + set_has_ban(); + ban_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserRemove.ban) + } + +// ------------------------------------------------------------------- + +// UserState + +// optional uint32 session = 1; + inline bool UserState::has_session() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void UserState::set_has_session() + { + _has_bits_[0] |= 0x00000001u; + } + inline void UserState::clear_has_session() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void UserState::clear_session() + { + session_ = 0u; + clear_has_session(); + } + inline ::google::protobuf::uint32 UserState::session() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.session) + return session_; + } + inline void UserState::set_session(::google::protobuf::uint32 value) + { + set_has_session(); + session_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserState.session) + } + +// optional uint32 actor = 2; + inline bool UserState::has_actor() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void UserState::set_has_actor() + { + _has_bits_[0] |= 0x00000002u; + } + inline void UserState::clear_has_actor() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void UserState::clear_actor() + { + actor_ = 0u; + clear_has_actor(); + } + inline ::google::protobuf::uint32 UserState::actor() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.actor) + return actor_; + } + inline void UserState::set_actor(::google::protobuf::uint32 value) + { + set_has_actor(); + actor_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserState.actor) + } + +// optional string name = 3; + inline bool UserState::has_name() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void UserState::set_has_name() + { + _has_bits_[0] |= 0x00000004u; + } + inline void UserState::clear_has_name() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void UserState::clear_name() + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_->clear(); + } + clear_has_name(); + } + inline const ::std::string& UserState::name() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.name) + return *name_; + } + inline void UserState::set_name(const ::std::string& value) + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + name_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.UserState.name) + } + inline void UserState::set_name(const char* value) + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + name_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.UserState.name) + } + inline void UserState::set_name(const char* value, size_t size) + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + name_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.UserState.name) + } + inline ::std::string* UserState::mutable_name() + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.UserState.name) + return name_; + } + inline ::std::string* UserState::release_name() + { + clear_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = name_; + name_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void UserState::set_allocated_name(::std::string* name) + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete name_; + } + if (name) + { + set_has_name(); + name_ = name; + } + else + { + clear_has_name(); + name_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.UserState.name) + } + +// optional uint32 user_id = 4; + inline bool UserState::has_user_id() const + { + return (_has_bits_[0] & 0x00000008u) != 0; + } + inline void UserState::set_has_user_id() + { + _has_bits_[0] |= 0x00000008u; + } + inline void UserState::clear_has_user_id() + { + _has_bits_[0] &= ~0x00000008u; + } + inline void UserState::clear_user_id() + { + user_id_ = 0u; + clear_has_user_id(); + } + inline ::google::protobuf::uint32 UserState::user_id() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.user_id) + return user_id_; + } + inline void UserState::set_user_id(::google::protobuf::uint32 value) + { + set_has_user_id(); + user_id_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserState.user_id) + } + +// optional uint32 channel_id = 5; + inline bool UserState::has_channel_id() const + { + return (_has_bits_[0] & 0x00000010u) != 0; + } + inline void UserState::set_has_channel_id() + { + _has_bits_[0] |= 0x00000010u; + } + inline void UserState::clear_has_channel_id() + { + _has_bits_[0] &= ~0x00000010u; + } + inline void UserState::clear_channel_id() + { + channel_id_ = 0u; + clear_has_channel_id(); + } + inline ::google::protobuf::uint32 UserState::channel_id() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.channel_id) + return channel_id_; + } + inline void UserState::set_channel_id(::google::protobuf::uint32 value) + { + set_has_channel_id(); + channel_id_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserState.channel_id) + } + +// optional bool mute = 6; + inline bool UserState::has_mute() const + { + return (_has_bits_[0] & 0x00000020u) != 0; + } + inline void UserState::set_has_mute() + { + _has_bits_[0] |= 0x00000020u; + } + inline void UserState::clear_has_mute() + { + _has_bits_[0] &= ~0x00000020u; + } + inline void UserState::clear_mute() + { + mute_ = false; + clear_has_mute(); + } + inline bool UserState::mute() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.mute) + return mute_; + } + inline void UserState::set_mute(bool value) + { + set_has_mute(); + mute_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserState.mute) + } + +// optional bool deaf = 7; + inline bool UserState::has_deaf() const + { + return (_has_bits_[0] & 0x00000040u) != 0; + } + inline void UserState::set_has_deaf() + { + _has_bits_[0] |= 0x00000040u; + } + inline void UserState::clear_has_deaf() + { + _has_bits_[0] &= ~0x00000040u; + } + inline void UserState::clear_deaf() + { + deaf_ = false; + clear_has_deaf(); + } + inline bool UserState::deaf() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.deaf) + return deaf_; + } + inline void UserState::set_deaf(bool value) + { + set_has_deaf(); + deaf_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserState.deaf) + } + +// optional bool suppress = 8; + inline bool UserState::has_suppress() const + { + return (_has_bits_[0] & 0x00000080u) != 0; + } + inline void UserState::set_has_suppress() + { + _has_bits_[0] |= 0x00000080u; + } + inline void UserState::clear_has_suppress() + { + _has_bits_[0] &= ~0x00000080u; + } + inline void UserState::clear_suppress() + { + suppress_ = false; + clear_has_suppress(); + } + inline bool UserState::suppress() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.suppress) + return suppress_; + } + inline void UserState::set_suppress(bool value) + { + set_has_suppress(); + suppress_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserState.suppress) + } + +// optional bool self_mute = 9; + inline bool UserState::has_self_mute() const + { + return (_has_bits_[0] & 0x00000100u) != 0; + } + inline void UserState::set_has_self_mute() + { + _has_bits_[0] |= 0x00000100u; + } + inline void UserState::clear_has_self_mute() + { + _has_bits_[0] &= ~0x00000100u; + } + inline void UserState::clear_self_mute() + { + self_mute_ = false; + clear_has_self_mute(); + } + inline bool UserState::self_mute() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.self_mute) + return self_mute_; + } + inline void UserState::set_self_mute(bool value) + { + set_has_self_mute(); + self_mute_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserState.self_mute) + } + +// optional bool self_deaf = 10; + inline bool UserState::has_self_deaf() const + { + return (_has_bits_[0] & 0x00000200u) != 0; + } + inline void UserState::set_has_self_deaf() + { + _has_bits_[0] |= 0x00000200u; + } + inline void UserState::clear_has_self_deaf() + { + _has_bits_[0] &= ~0x00000200u; + } + inline void UserState::clear_self_deaf() + { + self_deaf_ = false; + clear_has_self_deaf(); + } + inline bool UserState::self_deaf() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.self_deaf) + return self_deaf_; + } + inline void UserState::set_self_deaf(bool value) + { + set_has_self_deaf(); + self_deaf_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserState.self_deaf) + } + +// optional bytes texture = 11; + inline bool UserState::has_texture() const + { + return (_has_bits_[0] & 0x00000400u) != 0; + } + inline void UserState::set_has_texture() + { + _has_bits_[0] |= 0x00000400u; + } + inline void UserState::clear_has_texture() + { + _has_bits_[0] &= ~0x00000400u; + } + inline void UserState::clear_texture() + { + if (texture_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + texture_->clear(); + } + clear_has_texture(); + } + inline const ::std::string& UserState::texture() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.texture) + return *texture_; + } + inline void UserState::set_texture(const ::std::string& value) + { + set_has_texture(); + if (texture_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + texture_ = new ::std::string; + } + texture_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.UserState.texture) + } + inline void UserState::set_texture(const char* value) + { + set_has_texture(); + if (texture_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + texture_ = new ::std::string; + } + texture_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.UserState.texture) + } + inline void UserState::set_texture(const void* value, size_t size) + { + set_has_texture(); + if (texture_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + texture_ = new ::std::string; + } + texture_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.UserState.texture) + } + inline ::std::string* UserState::mutable_texture() + { + set_has_texture(); + if (texture_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + texture_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.UserState.texture) + return texture_; + } + inline ::std::string* UserState::release_texture() + { + clear_has_texture(); + if (texture_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = texture_; + texture_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void UserState::set_allocated_texture(::std::string* texture) + { + if (texture_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete texture_; + } + if (texture) + { + set_has_texture(); + texture_ = texture; + } + else + { + clear_has_texture(); + texture_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.UserState.texture) + } + +// optional bytes plugin_context = 12; + inline bool UserState::has_plugin_context() const + { + return (_has_bits_[0] & 0x00000800u) != 0; + } + inline void UserState::set_has_plugin_context() + { + _has_bits_[0] |= 0x00000800u; + } + inline void UserState::clear_has_plugin_context() + { + _has_bits_[0] &= ~0x00000800u; + } + inline void UserState::clear_plugin_context() + { + if (plugin_context_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + plugin_context_->clear(); + } + clear_has_plugin_context(); + } + inline const ::std::string& UserState::plugin_context() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.plugin_context) + return *plugin_context_; + } + inline void UserState::set_plugin_context(const ::std::string& value) + { + set_has_plugin_context(); + if (plugin_context_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + plugin_context_ = new ::std::string; + } + plugin_context_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.UserState.plugin_context) + } + inline void UserState::set_plugin_context(const char* value) + { + set_has_plugin_context(); + if (plugin_context_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + plugin_context_ = new ::std::string; + } + plugin_context_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.UserState.plugin_context) + } + inline void UserState::set_plugin_context(const void* value, size_t size) + { + set_has_plugin_context(); + if (plugin_context_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + plugin_context_ = new ::std::string; + } + plugin_context_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.UserState.plugin_context) + } + inline ::std::string* UserState::mutable_plugin_context() + { + set_has_plugin_context(); + if (plugin_context_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + plugin_context_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.UserState.plugin_context) + return plugin_context_; + } + inline ::std::string* UserState::release_plugin_context() + { + clear_has_plugin_context(); + if (plugin_context_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = plugin_context_; + plugin_context_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void UserState::set_allocated_plugin_context(::std::string* + plugin_context) + { + if (plugin_context_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete plugin_context_; + } + if (plugin_context) + { + set_has_plugin_context(); + plugin_context_ = plugin_context; + } + else + { + clear_has_plugin_context(); + plugin_context_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.UserState.plugin_context) + } + +// optional string plugin_identity = 13; + inline bool UserState::has_plugin_identity() const + { + return (_has_bits_[0] & 0x00001000u) != 0; + } + inline void UserState::set_has_plugin_identity() + { + _has_bits_[0] |= 0x00001000u; + } + inline void UserState::clear_has_plugin_identity() + { + _has_bits_[0] &= ~0x00001000u; + } + inline void UserState::clear_plugin_identity() + { + if (plugin_identity_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + plugin_identity_->clear(); + } + clear_has_plugin_identity(); + } + inline const ::std::string& UserState::plugin_identity() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.plugin_identity) + return *plugin_identity_; + } + inline void UserState::set_plugin_identity(const ::std::string& value) + { + set_has_plugin_identity(); + if (plugin_identity_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + plugin_identity_ = new ::std::string; + } + plugin_identity_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.UserState.plugin_identity) + } + inline void UserState::set_plugin_identity(const char* value) + { + set_has_plugin_identity(); + if (plugin_identity_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + plugin_identity_ = new ::std::string; + } + plugin_identity_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.UserState.plugin_identity) + } + inline void UserState::set_plugin_identity(const char* value, size_t size) + { + set_has_plugin_identity(); + if (plugin_identity_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + plugin_identity_ = new ::std::string; + } + plugin_identity_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.UserState.plugin_identity) + } + inline ::std::string* UserState::mutable_plugin_identity() + { + set_has_plugin_identity(); + if (plugin_identity_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + plugin_identity_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.UserState.plugin_identity) + return plugin_identity_; + } + inline ::std::string* UserState::release_plugin_identity() + { + clear_has_plugin_identity(); + if (plugin_identity_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = plugin_identity_; + plugin_identity_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void UserState::set_allocated_plugin_identity(::std::string* + plugin_identity) + { + if (plugin_identity_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete plugin_identity_; + } + if (plugin_identity) + { + set_has_plugin_identity(); + plugin_identity_ = plugin_identity; + } + else + { + clear_has_plugin_identity(); + plugin_identity_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.UserState.plugin_identity) + } + +// optional string comment = 14; + inline bool UserState::has_comment() const + { + return (_has_bits_[0] & 0x00002000u) != 0; + } + inline void UserState::set_has_comment() + { + _has_bits_[0] |= 0x00002000u; + } + inline void UserState::clear_has_comment() + { + _has_bits_[0] &= ~0x00002000u; + } + inline void UserState::clear_comment() + { + if (comment_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + comment_->clear(); + } + clear_has_comment(); + } + inline const ::std::string& UserState::comment() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.comment) + return *comment_; + } + inline void UserState::set_comment(const ::std::string& value) + { + set_has_comment(); + if (comment_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + comment_ = new ::std::string; + } + comment_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.UserState.comment) + } + inline void UserState::set_comment(const char* value) + { + set_has_comment(); + if (comment_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + comment_ = new ::std::string; + } + comment_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.UserState.comment) + } + inline void UserState::set_comment(const char* value, size_t size) + { + set_has_comment(); + if (comment_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + comment_ = new ::std::string; + } + comment_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.UserState.comment) + } + inline ::std::string* UserState::mutable_comment() + { + set_has_comment(); + if (comment_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + comment_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.UserState.comment) + return comment_; + } + inline ::std::string* UserState::release_comment() + { + clear_has_comment(); + if (comment_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = comment_; + comment_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void UserState::set_allocated_comment(::std::string* comment) + { + if (comment_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete comment_; + } + if (comment) + { + set_has_comment(); + comment_ = comment; + } + else + { + clear_has_comment(); + comment_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.UserState.comment) + } + +// optional string hash = 15; + inline bool UserState::has_hash() const + { + return (_has_bits_[0] & 0x00004000u) != 0; + } + inline void UserState::set_has_hash() + { + _has_bits_[0] |= 0x00004000u; + } + inline void UserState::clear_has_hash() + { + _has_bits_[0] &= ~0x00004000u; + } + inline void UserState::clear_hash() + { + if (hash_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + hash_->clear(); + } + clear_has_hash(); + } + inline const ::std::string& UserState::hash() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.hash) + return *hash_; + } + inline void UserState::set_hash(const ::std::string& value) + { + set_has_hash(); + if (hash_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + hash_ = new ::std::string; + } + hash_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.UserState.hash) + } + inline void UserState::set_hash(const char* value) + { + set_has_hash(); + if (hash_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + hash_ = new ::std::string; + } + hash_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.UserState.hash) + } + inline void UserState::set_hash(const char* value, size_t size) + { + set_has_hash(); + if (hash_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + hash_ = new ::std::string; + } + hash_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.UserState.hash) + } + inline ::std::string* UserState::mutable_hash() + { + set_has_hash(); + if (hash_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + hash_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.UserState.hash) + return hash_; + } + inline ::std::string* UserState::release_hash() + { + clear_has_hash(); + if (hash_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = hash_; + hash_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void UserState::set_allocated_hash(::std::string* hash) + { + if (hash_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete hash_; + } + if (hash) + { + set_has_hash(); + hash_ = hash; + } + else + { + clear_has_hash(); + hash_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.UserState.hash) + } + +// optional bytes comment_hash = 16; + inline bool UserState::has_comment_hash() const + { + return (_has_bits_[0] & 0x00008000u) != 0; + } + inline void UserState::set_has_comment_hash() + { + _has_bits_[0] |= 0x00008000u; + } + inline void UserState::clear_has_comment_hash() + { + _has_bits_[0] &= ~0x00008000u; + } + inline void UserState::clear_comment_hash() + { + if (comment_hash_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + comment_hash_->clear(); + } + clear_has_comment_hash(); + } + inline const ::std::string& UserState::comment_hash() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.comment_hash) + return *comment_hash_; + } + inline void UserState::set_comment_hash(const ::std::string& value) + { + set_has_comment_hash(); + if (comment_hash_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + comment_hash_ = new ::std::string; + } + comment_hash_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.UserState.comment_hash) + } + inline void UserState::set_comment_hash(const char* value) + { + set_has_comment_hash(); + if (comment_hash_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + comment_hash_ = new ::std::string; + } + comment_hash_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.UserState.comment_hash) + } + inline void UserState::set_comment_hash(const void* value, size_t size) + { + set_has_comment_hash(); + if (comment_hash_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + comment_hash_ = new ::std::string; + } + comment_hash_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.UserState.comment_hash) + } + inline ::std::string* UserState::mutable_comment_hash() + { + set_has_comment_hash(); + if (comment_hash_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + comment_hash_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.UserState.comment_hash) + return comment_hash_; + } + inline ::std::string* UserState::release_comment_hash() + { + clear_has_comment_hash(); + if (comment_hash_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = comment_hash_; + comment_hash_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void UserState::set_allocated_comment_hash(::std::string* comment_hash) + { + if (comment_hash_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete comment_hash_; + } + if (comment_hash) + { + set_has_comment_hash(); + comment_hash_ = comment_hash; + } + else + { + clear_has_comment_hash(); + comment_hash_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.UserState.comment_hash) + } + +// optional bytes texture_hash = 17; + inline bool UserState::has_texture_hash() const + { + return (_has_bits_[0] & 0x00010000u) != 0; + } + inline void UserState::set_has_texture_hash() + { + _has_bits_[0] |= 0x00010000u; + } + inline void UserState::clear_has_texture_hash() + { + _has_bits_[0] &= ~0x00010000u; + } + inline void UserState::clear_texture_hash() + { + if (texture_hash_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + texture_hash_->clear(); + } + clear_has_texture_hash(); + } + inline const ::std::string& UserState::texture_hash() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.texture_hash) + return *texture_hash_; + } + inline void UserState::set_texture_hash(const ::std::string& value) + { + set_has_texture_hash(); + if (texture_hash_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + texture_hash_ = new ::std::string; + } + texture_hash_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.UserState.texture_hash) + } + inline void UserState::set_texture_hash(const char* value) + { + set_has_texture_hash(); + if (texture_hash_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + texture_hash_ = new ::std::string; + } + texture_hash_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.UserState.texture_hash) + } + inline void UserState::set_texture_hash(const void* value, size_t size) + { + set_has_texture_hash(); + if (texture_hash_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + texture_hash_ = new ::std::string; + } + texture_hash_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.UserState.texture_hash) + } + inline ::std::string* UserState::mutable_texture_hash() + { + set_has_texture_hash(); + if (texture_hash_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + texture_hash_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.UserState.texture_hash) + return texture_hash_; + } + inline ::std::string* UserState::release_texture_hash() + { + clear_has_texture_hash(); + if (texture_hash_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = texture_hash_; + texture_hash_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void UserState::set_allocated_texture_hash(::std::string* texture_hash) + { + if (texture_hash_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete texture_hash_; + } + if (texture_hash) + { + set_has_texture_hash(); + texture_hash_ = texture_hash; + } + else + { + clear_has_texture_hash(); + texture_hash_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.UserState.texture_hash) + } + +// optional bool priority_speaker = 18; + inline bool UserState::has_priority_speaker() const + { + return (_has_bits_[0] & 0x00020000u) != 0; + } + inline void UserState::set_has_priority_speaker() + { + _has_bits_[0] |= 0x00020000u; + } + inline void UserState::clear_has_priority_speaker() + { + _has_bits_[0] &= ~0x00020000u; + } + inline void UserState::clear_priority_speaker() + { + priority_speaker_ = false; + clear_has_priority_speaker(); + } + inline bool UserState::priority_speaker() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.priority_speaker) + return priority_speaker_; + } + inline void UserState::set_priority_speaker(bool value) + { + set_has_priority_speaker(); + priority_speaker_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserState.priority_speaker) + } + +// optional bool recording = 19; + inline bool UserState::has_recording() const + { + return (_has_bits_[0] & 0x00040000u) != 0; + } + inline void UserState::set_has_recording() + { + _has_bits_[0] |= 0x00040000u; + } + inline void UserState::clear_has_recording() + { + _has_bits_[0] &= ~0x00040000u; + } + inline void UserState::clear_recording() + { + recording_ = false; + clear_has_recording(); + } + inline bool UserState::recording() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserState.recording) + return recording_; + } + inline void UserState::set_recording(bool value) + { + set_has_recording(); + recording_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserState.recording) + } + +// ------------------------------------------------------------------- + +// BanList_BanEntry + +// required bytes address = 1; + inline bool BanList_BanEntry::has_address() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void BanList_BanEntry::set_has_address() + { + _has_bits_[0] |= 0x00000001u; + } + inline void BanList_BanEntry::clear_has_address() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void BanList_BanEntry::clear_address() + { + if (address_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + address_->clear(); + } + clear_has_address(); + } + inline const ::std::string& BanList_BanEntry::address() const + { + // @@protoc_insertion_point(field_get:MumbleProto.BanList.BanEntry.address) + return *address_; + } + inline void BanList_BanEntry::set_address(const ::std::string& value) + { + set_has_address(); + if (address_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + address_ = new ::std::string; + } + address_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.BanList.BanEntry.address) + } + inline void BanList_BanEntry::set_address(const char* value) + { + set_has_address(); + if (address_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + address_ = new ::std::string; + } + address_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.BanList.BanEntry.address) + } + inline void BanList_BanEntry::set_address(const void* value, size_t size) + { + set_has_address(); + if (address_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + address_ = new ::std::string; + } + address_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.BanList.BanEntry.address) + } + inline ::std::string* BanList_BanEntry::mutable_address() + { + set_has_address(); + if (address_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + address_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.BanList.BanEntry.address) + return address_; + } + inline ::std::string* BanList_BanEntry::release_address() + { + clear_has_address(); + if (address_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = address_; + address_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void BanList_BanEntry::set_allocated_address(::std::string* address) + { + if (address_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete address_; + } + if (address) + { + set_has_address(); + address_ = address; + } + else + { + clear_has_address(); + address_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.BanList.BanEntry.address) + } + +// required uint32 mask = 2; + inline bool BanList_BanEntry::has_mask() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void BanList_BanEntry::set_has_mask() + { + _has_bits_[0] |= 0x00000002u; + } + inline void BanList_BanEntry::clear_has_mask() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void BanList_BanEntry::clear_mask() + { + mask_ = 0u; + clear_has_mask(); + } + inline ::google::protobuf::uint32 BanList_BanEntry::mask() const + { + // @@protoc_insertion_point(field_get:MumbleProto.BanList.BanEntry.mask) + return mask_; + } + inline void BanList_BanEntry::set_mask(::google::protobuf::uint32 value) + { + set_has_mask(); + mask_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.BanList.BanEntry.mask) + } + +// optional string name = 3; + inline bool BanList_BanEntry::has_name() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void BanList_BanEntry::set_has_name() + { + _has_bits_[0] |= 0x00000004u; + } + inline void BanList_BanEntry::clear_has_name() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void BanList_BanEntry::clear_name() + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_->clear(); + } + clear_has_name(); + } + inline const ::std::string& BanList_BanEntry::name() const + { + // @@protoc_insertion_point(field_get:MumbleProto.BanList.BanEntry.name) + return *name_; + } + inline void BanList_BanEntry::set_name(const ::std::string& value) + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + name_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.BanList.BanEntry.name) + } + inline void BanList_BanEntry::set_name(const char* value) + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + name_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.BanList.BanEntry.name) + } + inline void BanList_BanEntry::set_name(const char* value, size_t size) + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + name_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.BanList.BanEntry.name) + } + inline ::std::string* BanList_BanEntry::mutable_name() + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.BanList.BanEntry.name) + return name_; + } + inline ::std::string* BanList_BanEntry::release_name() + { + clear_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = name_; + name_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void BanList_BanEntry::set_allocated_name(::std::string* name) + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete name_; + } + if (name) + { + set_has_name(); + name_ = name; + } + else + { + clear_has_name(); + name_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.BanList.BanEntry.name) + } + +// optional string hash = 4; + inline bool BanList_BanEntry::has_hash() const + { + return (_has_bits_[0] & 0x00000008u) != 0; + } + inline void BanList_BanEntry::set_has_hash() + { + _has_bits_[0] |= 0x00000008u; + } + inline void BanList_BanEntry::clear_has_hash() + { + _has_bits_[0] &= ~0x00000008u; + } + inline void BanList_BanEntry::clear_hash() + { + if (hash_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + hash_->clear(); + } + clear_has_hash(); + } + inline const ::std::string& BanList_BanEntry::hash() const + { + // @@protoc_insertion_point(field_get:MumbleProto.BanList.BanEntry.hash) + return *hash_; + } + inline void BanList_BanEntry::set_hash(const ::std::string& value) + { + set_has_hash(); + if (hash_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + hash_ = new ::std::string; + } + hash_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.BanList.BanEntry.hash) + } + inline void BanList_BanEntry::set_hash(const char* value) + { + set_has_hash(); + if (hash_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + hash_ = new ::std::string; + } + hash_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.BanList.BanEntry.hash) + } + inline void BanList_BanEntry::set_hash(const char* value, size_t size) + { + set_has_hash(); + if (hash_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + hash_ = new ::std::string; + } + hash_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.BanList.BanEntry.hash) + } + inline ::std::string* BanList_BanEntry::mutable_hash() + { + set_has_hash(); + if (hash_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + hash_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.BanList.BanEntry.hash) + return hash_; + } + inline ::std::string* BanList_BanEntry::release_hash() + { + clear_has_hash(); + if (hash_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = hash_; + hash_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void BanList_BanEntry::set_allocated_hash(::std::string* hash) + { + if (hash_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete hash_; + } + if (hash) + { + set_has_hash(); + hash_ = hash; + } + else + { + clear_has_hash(); + hash_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.BanList.BanEntry.hash) + } + +// optional string reason = 5; + inline bool BanList_BanEntry::has_reason() const + { + return (_has_bits_[0] & 0x00000010u) != 0; + } + inline void BanList_BanEntry::set_has_reason() + { + _has_bits_[0] |= 0x00000010u; + } + inline void BanList_BanEntry::clear_has_reason() + { + _has_bits_[0] &= ~0x00000010u; + } + inline void BanList_BanEntry::clear_reason() + { + if (reason_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_->clear(); + } + clear_has_reason(); + } + inline const ::std::string& BanList_BanEntry::reason() const + { + // @@protoc_insertion_point(field_get:MumbleProto.BanList.BanEntry.reason) + return *reason_; + } + inline void BanList_BanEntry::set_reason(const ::std::string& value) + { + set_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_ = new ::std::string; + } + reason_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.BanList.BanEntry.reason) + } + inline void BanList_BanEntry::set_reason(const char* value) + { + set_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_ = new ::std::string; + } + reason_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.BanList.BanEntry.reason) + } + inline void BanList_BanEntry::set_reason(const char* value, size_t size) + { + set_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_ = new ::std::string; + } + reason_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.BanList.BanEntry.reason) + } + inline ::std::string* BanList_BanEntry::mutable_reason() + { + set_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.BanList.BanEntry.reason) + return reason_; + } + inline ::std::string* BanList_BanEntry::release_reason() + { + clear_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = reason_; + reason_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void BanList_BanEntry::set_allocated_reason(::std::string* reason) + { + if (reason_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete reason_; + } + if (reason) + { + set_has_reason(); + reason_ = reason; + } + else + { + clear_has_reason(); + reason_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.BanList.BanEntry.reason) + } + +// optional string start = 6; + inline bool BanList_BanEntry::has_start() const + { + return (_has_bits_[0] & 0x00000020u) != 0; + } + inline void BanList_BanEntry::set_has_start() + { + _has_bits_[0] |= 0x00000020u; + } + inline void BanList_BanEntry::clear_has_start() + { + _has_bits_[0] &= ~0x00000020u; + } + inline void BanList_BanEntry::clear_start() + { + if (start_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + start_->clear(); + } + clear_has_start(); + } + inline const ::std::string& BanList_BanEntry::start() const + { + // @@protoc_insertion_point(field_get:MumbleProto.BanList.BanEntry.start) + return *start_; + } + inline void BanList_BanEntry::set_start(const ::std::string& value) + { + set_has_start(); + if (start_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + start_ = new ::std::string; + } + start_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.BanList.BanEntry.start) + } + inline void BanList_BanEntry::set_start(const char* value) + { + set_has_start(); + if (start_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + start_ = new ::std::string; + } + start_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.BanList.BanEntry.start) + } + inline void BanList_BanEntry::set_start(const char* value, size_t size) + { + set_has_start(); + if (start_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + start_ = new ::std::string; + } + start_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.BanList.BanEntry.start) + } + inline ::std::string* BanList_BanEntry::mutable_start() + { + set_has_start(); + if (start_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + start_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.BanList.BanEntry.start) + return start_; + } + inline ::std::string* BanList_BanEntry::release_start() + { + clear_has_start(); + if (start_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = start_; + start_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void BanList_BanEntry::set_allocated_start(::std::string* start) + { + if (start_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete start_; + } + if (start) + { + set_has_start(); + start_ = start; + } + else + { + clear_has_start(); + start_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.BanList.BanEntry.start) + } + +// optional uint32 duration = 7; + inline bool BanList_BanEntry::has_duration() const + { + return (_has_bits_[0] & 0x00000040u) != 0; + } + inline void BanList_BanEntry::set_has_duration() + { + _has_bits_[0] |= 0x00000040u; + } + inline void BanList_BanEntry::clear_has_duration() + { + _has_bits_[0] &= ~0x00000040u; + } + inline void BanList_BanEntry::clear_duration() + { + duration_ = 0u; + clear_has_duration(); + } + inline ::google::protobuf::uint32 BanList_BanEntry::duration() const + { + // @@protoc_insertion_point(field_get:MumbleProto.BanList.BanEntry.duration) + return duration_; + } + inline void BanList_BanEntry::set_duration(::google::protobuf::uint32 value) + { + set_has_duration(); + duration_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.BanList.BanEntry.duration) + } + +// ------------------------------------------------------------------- + +// BanList + +// repeated .MumbleProto.BanList.BanEntry bans = 1; + inline int BanList::bans_size() const + { + return bans_.size(); + } + inline void BanList::clear_bans() + { + bans_.Clear(); + } + inline const ::MumbleProto::BanList_BanEntry& BanList::bans(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.BanList.bans) + return bans_.Get(index); + } + inline ::MumbleProto::BanList_BanEntry* BanList::mutable_bans(int index) + { + // @@protoc_insertion_point(field_mutable:MumbleProto.BanList.bans) + return bans_.Mutable(index); + } + inline ::MumbleProto::BanList_BanEntry* BanList::add_bans() + { + // @@protoc_insertion_point(field_add:MumbleProto.BanList.bans) + return bans_.Add(); + } + inline const ::google::protobuf::RepeatedPtrField< ::MumbleProto::BanList_BanEntry >& + BanList::bans() const + { + // @@protoc_insertion_point(field_list:MumbleProto.BanList.bans) + return bans_; + } + inline ::google::protobuf::RepeatedPtrField< ::MumbleProto::BanList_BanEntry >* + BanList::mutable_bans() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.BanList.bans) + return &bans_; + } + +// optional bool query = 2 [default = false]; + inline bool BanList::has_query() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void BanList::set_has_query() + { + _has_bits_[0] |= 0x00000002u; + } + inline void BanList::clear_has_query() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void BanList::clear_query() + { + query_ = false; + clear_has_query(); + } + inline bool BanList::query() const + { + // @@protoc_insertion_point(field_get:MumbleProto.BanList.query) + return query_; + } + inline void BanList::set_query(bool value) + { + set_has_query(); + query_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.BanList.query) + } + +// ------------------------------------------------------------------- + +// TextMessage + +// optional uint32 actor = 1; + inline bool TextMessage::has_actor() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void TextMessage::set_has_actor() + { + _has_bits_[0] |= 0x00000001u; + } + inline void TextMessage::clear_has_actor() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void TextMessage::clear_actor() + { + actor_ = 0u; + clear_has_actor(); + } + inline ::google::protobuf::uint32 TextMessage::actor() const + { + // @@protoc_insertion_point(field_get:MumbleProto.TextMessage.actor) + return actor_; + } + inline void TextMessage::set_actor(::google::protobuf::uint32 value) + { + set_has_actor(); + actor_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.TextMessage.actor) + } + +// repeated uint32 session = 2; + inline int TextMessage::session_size() const + { + return session_.size(); + } + inline void TextMessage::clear_session() + { + session_.Clear(); + } + inline ::google::protobuf::uint32 TextMessage::session(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.TextMessage.session) + return session_.Get(index); + } + inline void TextMessage::set_session(int index, + ::google::protobuf::uint32 value) + { + session_.Set(index, value); + // @@protoc_insertion_point(field_set:MumbleProto.TextMessage.session) + } + inline void TextMessage::add_session(::google::protobuf::uint32 value) + { + session_.Add(value); + // @@protoc_insertion_point(field_add:MumbleProto.TextMessage.session) + } + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + TextMessage::session() const + { + // @@protoc_insertion_point(field_list:MumbleProto.TextMessage.session) + return session_; + } + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + TextMessage::mutable_session() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.TextMessage.session) + return &session_; + } + +// repeated uint32 channel_id = 3; + inline int TextMessage::channel_id_size() const + { + return channel_id_.size(); + } + inline void TextMessage::clear_channel_id() + { + channel_id_.Clear(); + } + inline ::google::protobuf::uint32 TextMessage::channel_id(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.TextMessage.channel_id) + return channel_id_.Get(index); + } + inline void TextMessage::set_channel_id(int index, + ::google::protobuf::uint32 value) + { + channel_id_.Set(index, value); + // @@protoc_insertion_point(field_set:MumbleProto.TextMessage.channel_id) + } + inline void TextMessage::add_channel_id(::google::protobuf::uint32 value) + { + channel_id_.Add(value); + // @@protoc_insertion_point(field_add:MumbleProto.TextMessage.channel_id) + } + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + TextMessage::channel_id() const + { + // @@protoc_insertion_point(field_list:MumbleProto.TextMessage.channel_id) + return channel_id_; + } + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + TextMessage::mutable_channel_id() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.TextMessage.channel_id) + return &channel_id_; + } + +// repeated uint32 tree_id = 4; + inline int TextMessage::tree_id_size() const + { + return tree_id_.size(); + } + inline void TextMessage::clear_tree_id() + { + tree_id_.Clear(); + } + inline ::google::protobuf::uint32 TextMessage::tree_id(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.TextMessage.tree_id) + return tree_id_.Get(index); + } + inline void TextMessage::set_tree_id(int index, + ::google::protobuf::uint32 value) + { + tree_id_.Set(index, value); + // @@protoc_insertion_point(field_set:MumbleProto.TextMessage.tree_id) + } + inline void TextMessage::add_tree_id(::google::protobuf::uint32 value) + { + tree_id_.Add(value); + // @@protoc_insertion_point(field_add:MumbleProto.TextMessage.tree_id) + } + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + TextMessage::tree_id() const + { + // @@protoc_insertion_point(field_list:MumbleProto.TextMessage.tree_id) + return tree_id_; + } + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + TextMessage::mutable_tree_id() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.TextMessage.tree_id) + return &tree_id_; + } + +// required string message = 5; + inline bool TextMessage::has_message() const + { + return (_has_bits_[0] & 0x00000010u) != 0; + } + inline void TextMessage::set_has_message() + { + _has_bits_[0] |= 0x00000010u; + } + inline void TextMessage::clear_has_message() + { + _has_bits_[0] &= ~0x00000010u; + } + inline void TextMessage::clear_message() + { + if (message_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + message_->clear(); + } + clear_has_message(); + } + inline const ::std::string& TextMessage::message() const + { + // @@protoc_insertion_point(field_get:MumbleProto.TextMessage.message) + return *message_; + } + inline void TextMessage::set_message(const ::std::string& value) + { + set_has_message(); + if (message_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + message_ = new ::std::string; + } + message_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.TextMessage.message) + } + inline void TextMessage::set_message(const char* value) + { + set_has_message(); + if (message_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + message_ = new ::std::string; + } + message_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.TextMessage.message) + } + inline void TextMessage::set_message(const char* value, size_t size) + { + set_has_message(); + if (message_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + message_ = new ::std::string; + } + message_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.TextMessage.message) + } + inline ::std::string* TextMessage::mutable_message() + { + set_has_message(); + if (message_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + message_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.TextMessage.message) + return message_; + } + inline ::std::string* TextMessage::release_message() + { + clear_has_message(); + if (message_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = message_; + message_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void TextMessage::set_allocated_message(::std::string* message) + { + if (message_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete message_; + } + if (message) + { + set_has_message(); + message_ = message; + } + else + { + clear_has_message(); + message_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.TextMessage.message) + } + +// ------------------------------------------------------------------- + +// PermissionDenied + +// optional uint32 permission = 1; + inline bool PermissionDenied::has_permission() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void PermissionDenied::set_has_permission() + { + _has_bits_[0] |= 0x00000001u; + } + inline void PermissionDenied::clear_has_permission() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void PermissionDenied::clear_permission() + { + permission_ = 0u; + clear_has_permission(); + } + inline ::google::protobuf::uint32 PermissionDenied::permission() const + { + // @@protoc_insertion_point(field_get:MumbleProto.PermissionDenied.permission) + return permission_; + } + inline void PermissionDenied::set_permission(::google::protobuf::uint32 value) + { + set_has_permission(); + permission_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.PermissionDenied.permission) + } + +// optional uint32 channel_id = 2; + inline bool PermissionDenied::has_channel_id() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void PermissionDenied::set_has_channel_id() + { + _has_bits_[0] |= 0x00000002u; + } + inline void PermissionDenied::clear_has_channel_id() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void PermissionDenied::clear_channel_id() + { + channel_id_ = 0u; + clear_has_channel_id(); + } + inline ::google::protobuf::uint32 PermissionDenied::channel_id() const + { + // @@protoc_insertion_point(field_get:MumbleProto.PermissionDenied.channel_id) + return channel_id_; + } + inline void PermissionDenied::set_channel_id(::google::protobuf::uint32 value) + { + set_has_channel_id(); + channel_id_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.PermissionDenied.channel_id) + } + +// optional uint32 session = 3; + inline bool PermissionDenied::has_session() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void PermissionDenied::set_has_session() + { + _has_bits_[0] |= 0x00000004u; + } + inline void PermissionDenied::clear_has_session() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void PermissionDenied::clear_session() + { + session_ = 0u; + clear_has_session(); + } + inline ::google::protobuf::uint32 PermissionDenied::session() const + { + // @@protoc_insertion_point(field_get:MumbleProto.PermissionDenied.session) + return session_; + } + inline void PermissionDenied::set_session(::google::protobuf::uint32 value) + { + set_has_session(); + session_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.PermissionDenied.session) + } + +// optional string reason = 4; + inline bool PermissionDenied::has_reason() const + { + return (_has_bits_[0] & 0x00000008u) != 0; + } + inline void PermissionDenied::set_has_reason() + { + _has_bits_[0] |= 0x00000008u; + } + inline void PermissionDenied::clear_has_reason() + { + _has_bits_[0] &= ~0x00000008u; + } + inline void PermissionDenied::clear_reason() + { + if (reason_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_->clear(); + } + clear_has_reason(); + } + inline const ::std::string& PermissionDenied::reason() const + { + // @@protoc_insertion_point(field_get:MumbleProto.PermissionDenied.reason) + return *reason_; + } + inline void PermissionDenied::set_reason(const ::std::string& value) + { + set_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_ = new ::std::string; + } + reason_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.PermissionDenied.reason) + } + inline void PermissionDenied::set_reason(const char* value) + { + set_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_ = new ::std::string; + } + reason_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.PermissionDenied.reason) + } + inline void PermissionDenied::set_reason(const char* value, size_t size) + { + set_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_ = new ::std::string; + } + reason_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.PermissionDenied.reason) + } + inline ::std::string* PermissionDenied::mutable_reason() + { + set_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + reason_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.PermissionDenied.reason) + return reason_; + } + inline ::std::string* PermissionDenied::release_reason() + { + clear_has_reason(); + if (reason_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = reason_; + reason_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void PermissionDenied::set_allocated_reason(::std::string* reason) + { + if (reason_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete reason_; + } + if (reason) + { + set_has_reason(); + reason_ = reason; + } + else + { + clear_has_reason(); + reason_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.PermissionDenied.reason) + } + +// optional .MumbleProto.PermissionDenied.DenyType type = 5; + inline bool PermissionDenied::has_type() const + { + return (_has_bits_[0] & 0x00000010u) != 0; + } + inline void PermissionDenied::set_has_type() + { + _has_bits_[0] |= 0x00000010u; + } + inline void PermissionDenied::clear_has_type() + { + _has_bits_[0] &= ~0x00000010u; + } + inline void PermissionDenied::clear_type() + { + type_ = 0; + clear_has_type(); + } + inline ::MumbleProto::PermissionDenied_DenyType PermissionDenied::type() const + { + // @@protoc_insertion_point(field_get:MumbleProto.PermissionDenied.type) + return static_cast< ::MumbleProto::PermissionDenied_DenyType >(type_); + } + inline void PermissionDenied::set_type(::MumbleProto::PermissionDenied_DenyType + value) + { + assert(::MumbleProto::PermissionDenied_DenyType_IsValid(value)); + set_has_type(); + type_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.PermissionDenied.type) + } + +// optional string name = 6; + inline bool PermissionDenied::has_name() const + { + return (_has_bits_[0] & 0x00000020u) != 0; + } + inline void PermissionDenied::set_has_name() + { + _has_bits_[0] |= 0x00000020u; + } + inline void PermissionDenied::clear_has_name() + { + _has_bits_[0] &= ~0x00000020u; + } + inline void PermissionDenied::clear_name() + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_->clear(); + } + clear_has_name(); + } + inline const ::std::string& PermissionDenied::name() const + { + // @@protoc_insertion_point(field_get:MumbleProto.PermissionDenied.name) + return *name_; + } + inline void PermissionDenied::set_name(const ::std::string& value) + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + name_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.PermissionDenied.name) + } + inline void PermissionDenied::set_name(const char* value) + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + name_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.PermissionDenied.name) + } + inline void PermissionDenied::set_name(const char* value, size_t size) + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + name_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.PermissionDenied.name) + } + inline ::std::string* PermissionDenied::mutable_name() + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.PermissionDenied.name) + return name_; + } + inline ::std::string* PermissionDenied::release_name() + { + clear_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = name_; + name_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void PermissionDenied::set_allocated_name(::std::string* name) + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete name_; + } + if (name) + { + set_has_name(); + name_ = name; + } + else + { + clear_has_name(); + name_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.PermissionDenied.name) + } + +// ------------------------------------------------------------------- + +// ACL_ChanGroup + +// required string name = 1; + inline bool ACL_ChanGroup::has_name() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void ACL_ChanGroup::set_has_name() + { + _has_bits_[0] |= 0x00000001u; + } + inline void ACL_ChanGroup::clear_has_name() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void ACL_ChanGroup::clear_name() + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_->clear(); + } + clear_has_name(); + } + inline const ::std::string& ACL_ChanGroup::name() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.ChanGroup.name) + return *name_; + } + inline void ACL_ChanGroup::set_name(const ::std::string& value) + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + name_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.ACL.ChanGroup.name) + } + inline void ACL_ChanGroup::set_name(const char* value) + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + name_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.ACL.ChanGroup.name) + } + inline void ACL_ChanGroup::set_name(const char* value, size_t size) + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + name_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.ACL.ChanGroup.name) + } + inline ::std::string* ACL_ChanGroup::mutable_name() + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.ACL.ChanGroup.name) + return name_; + } + inline ::std::string* ACL_ChanGroup::release_name() + { + clear_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = name_; + name_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void ACL_ChanGroup::set_allocated_name(::std::string* name) + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete name_; + } + if (name) + { + set_has_name(); + name_ = name; + } + else + { + clear_has_name(); + name_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.ACL.ChanGroup.name) + } + +// optional bool inherited = 2 [default = true]; + inline bool ACL_ChanGroup::has_inherited() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void ACL_ChanGroup::set_has_inherited() + { + _has_bits_[0] |= 0x00000002u; + } + inline void ACL_ChanGroup::clear_has_inherited() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void ACL_ChanGroup::clear_inherited() + { + inherited_ = true; + clear_has_inherited(); + } + inline bool ACL_ChanGroup::inherited() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.ChanGroup.inherited) + return inherited_; + } + inline void ACL_ChanGroup::set_inherited(bool value) + { + set_has_inherited(); + inherited_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ACL.ChanGroup.inherited) + } + +// optional bool inherit = 3 [default = true]; + inline bool ACL_ChanGroup::has_inherit() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void ACL_ChanGroup::set_has_inherit() + { + _has_bits_[0] |= 0x00000004u; + } + inline void ACL_ChanGroup::clear_has_inherit() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void ACL_ChanGroup::clear_inherit() + { + inherit_ = true; + clear_has_inherit(); + } + inline bool ACL_ChanGroup::inherit() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.ChanGroup.inherit) + return inherit_; + } + inline void ACL_ChanGroup::set_inherit(bool value) + { + set_has_inherit(); + inherit_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ACL.ChanGroup.inherit) + } + +// optional bool inheritable = 4 [default = true]; + inline bool ACL_ChanGroup::has_inheritable() const + { + return (_has_bits_[0] & 0x00000008u) != 0; + } + inline void ACL_ChanGroup::set_has_inheritable() + { + _has_bits_[0] |= 0x00000008u; + } + inline void ACL_ChanGroup::clear_has_inheritable() + { + _has_bits_[0] &= ~0x00000008u; + } + inline void ACL_ChanGroup::clear_inheritable() + { + inheritable_ = true; + clear_has_inheritable(); + } + inline bool ACL_ChanGroup::inheritable() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.ChanGroup.inheritable) + return inheritable_; + } + inline void ACL_ChanGroup::set_inheritable(bool value) + { + set_has_inheritable(); + inheritable_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ACL.ChanGroup.inheritable) + } + +// repeated uint32 add = 5; + inline int ACL_ChanGroup::add_size() const + { + return add_.size(); + } + inline void ACL_ChanGroup::clear_add() + { + add_.Clear(); + } + inline ::google::protobuf::uint32 ACL_ChanGroup::add(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.ChanGroup.add) + return add_.Get(index); + } + inline void ACL_ChanGroup::set_add(int index, ::google::protobuf::uint32 value) + { + add_.Set(index, value); + // @@protoc_insertion_point(field_set:MumbleProto.ACL.ChanGroup.add) + } + inline void ACL_ChanGroup::add_add(::google::protobuf::uint32 value) + { + add_.Add(value); + // @@protoc_insertion_point(field_add:MumbleProto.ACL.ChanGroup.add) + } + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + ACL_ChanGroup::add() const + { + // @@protoc_insertion_point(field_list:MumbleProto.ACL.ChanGroup.add) + return add_; + } + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + ACL_ChanGroup::mutable_add() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.ACL.ChanGroup.add) + return &add_; + } + +// repeated uint32 remove = 6; + inline int ACL_ChanGroup::remove_size() const + { + return remove_.size(); + } + inline void ACL_ChanGroup::clear_remove() + { + remove_.Clear(); + } + inline ::google::protobuf::uint32 ACL_ChanGroup::remove(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.ChanGroup.remove) + return remove_.Get(index); + } + inline void ACL_ChanGroup::set_remove(int index, + ::google::protobuf::uint32 value) + { + remove_.Set(index, value); + // @@protoc_insertion_point(field_set:MumbleProto.ACL.ChanGroup.remove) + } + inline void ACL_ChanGroup::add_remove(::google::protobuf::uint32 value) + { + remove_.Add(value); + // @@protoc_insertion_point(field_add:MumbleProto.ACL.ChanGroup.remove) + } + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + ACL_ChanGroup::remove() const + { + // @@protoc_insertion_point(field_list:MumbleProto.ACL.ChanGroup.remove) + return remove_; + } + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + ACL_ChanGroup::mutable_remove() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.ACL.ChanGroup.remove) + return &remove_; + } + +// repeated uint32 inherited_members = 7; + inline int ACL_ChanGroup::inherited_members_size() const + { + return inherited_members_.size(); + } + inline void ACL_ChanGroup::clear_inherited_members() + { + inherited_members_.Clear(); + } + inline ::google::protobuf::uint32 ACL_ChanGroup::inherited_members( + int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.ChanGroup.inherited_members) + return inherited_members_.Get(index); + } + inline void ACL_ChanGroup::set_inherited_members(int index, + ::google::protobuf::uint32 value) + { + inherited_members_.Set(index, value); + // @@protoc_insertion_point(field_set:MumbleProto.ACL.ChanGroup.inherited_members) + } + inline void ACL_ChanGroup::add_inherited_members(::google::protobuf::uint32 + value) + { + inherited_members_.Add(value); + // @@protoc_insertion_point(field_add:MumbleProto.ACL.ChanGroup.inherited_members) + } + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + ACL_ChanGroup::inherited_members() const + { + // @@protoc_insertion_point(field_list:MumbleProto.ACL.ChanGroup.inherited_members) + return inherited_members_; + } + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + ACL_ChanGroup::mutable_inherited_members() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.ACL.ChanGroup.inherited_members) + return &inherited_members_; + } + +// ------------------------------------------------------------------- + +// ACL_ChanACL + +// optional bool apply_here = 1 [default = true]; + inline bool ACL_ChanACL::has_apply_here() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void ACL_ChanACL::set_has_apply_here() + { + _has_bits_[0] |= 0x00000001u; + } + inline void ACL_ChanACL::clear_has_apply_here() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void ACL_ChanACL::clear_apply_here() + { + apply_here_ = true; + clear_has_apply_here(); + } + inline bool ACL_ChanACL::apply_here() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.ChanACL.apply_here) + return apply_here_; + } + inline void ACL_ChanACL::set_apply_here(bool value) + { + set_has_apply_here(); + apply_here_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ACL.ChanACL.apply_here) + } + +// optional bool apply_subs = 2 [default = true]; + inline bool ACL_ChanACL::has_apply_subs() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void ACL_ChanACL::set_has_apply_subs() + { + _has_bits_[0] |= 0x00000002u; + } + inline void ACL_ChanACL::clear_has_apply_subs() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void ACL_ChanACL::clear_apply_subs() + { + apply_subs_ = true; + clear_has_apply_subs(); + } + inline bool ACL_ChanACL::apply_subs() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.ChanACL.apply_subs) + return apply_subs_; + } + inline void ACL_ChanACL::set_apply_subs(bool value) + { + set_has_apply_subs(); + apply_subs_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ACL.ChanACL.apply_subs) + } + +// optional bool inherited = 3 [default = true]; + inline bool ACL_ChanACL::has_inherited() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void ACL_ChanACL::set_has_inherited() + { + _has_bits_[0] |= 0x00000004u; + } + inline void ACL_ChanACL::clear_has_inherited() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void ACL_ChanACL::clear_inherited() + { + inherited_ = true; + clear_has_inherited(); + } + inline bool ACL_ChanACL::inherited() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.ChanACL.inherited) + return inherited_; + } + inline void ACL_ChanACL::set_inherited(bool value) + { + set_has_inherited(); + inherited_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ACL.ChanACL.inherited) + } + +// optional uint32 user_id = 4; + inline bool ACL_ChanACL::has_user_id() const + { + return (_has_bits_[0] & 0x00000008u) != 0; + } + inline void ACL_ChanACL::set_has_user_id() + { + _has_bits_[0] |= 0x00000008u; + } + inline void ACL_ChanACL::clear_has_user_id() + { + _has_bits_[0] &= ~0x00000008u; + } + inline void ACL_ChanACL::clear_user_id() + { + user_id_ = 0u; + clear_has_user_id(); + } + inline ::google::protobuf::uint32 ACL_ChanACL::user_id() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.ChanACL.user_id) + return user_id_; + } + inline void ACL_ChanACL::set_user_id(::google::protobuf::uint32 value) + { + set_has_user_id(); + user_id_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ACL.ChanACL.user_id) + } + +// optional string group = 5; + inline bool ACL_ChanACL::has_group() const + { + return (_has_bits_[0] & 0x00000010u) != 0; + } + inline void ACL_ChanACL::set_has_group() + { + _has_bits_[0] |= 0x00000010u; + } + inline void ACL_ChanACL::clear_has_group() + { + _has_bits_[0] &= ~0x00000010u; + } + inline void ACL_ChanACL::clear_group() + { + if (group_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + group_->clear(); + } + clear_has_group(); + } + inline const ::std::string& ACL_ChanACL::group() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.ChanACL.group) + return *group_; + } + inline void ACL_ChanACL::set_group(const ::std::string& value) + { + set_has_group(); + if (group_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + group_ = new ::std::string; + } + group_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.ACL.ChanACL.group) + } + inline void ACL_ChanACL::set_group(const char* value) + { + set_has_group(); + if (group_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + group_ = new ::std::string; + } + group_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.ACL.ChanACL.group) + } + inline void ACL_ChanACL::set_group(const char* value, size_t size) + { + set_has_group(); + if (group_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + group_ = new ::std::string; + } + group_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.ACL.ChanACL.group) + } + inline ::std::string* ACL_ChanACL::mutable_group() + { + set_has_group(); + if (group_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + group_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.ACL.ChanACL.group) + return group_; + } + inline ::std::string* ACL_ChanACL::release_group() + { + clear_has_group(); + if (group_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = group_; + group_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void ACL_ChanACL::set_allocated_group(::std::string* group) + { + if (group_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete group_; + } + if (group) + { + set_has_group(); + group_ = group; + } + else + { + clear_has_group(); + group_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.ACL.ChanACL.group) + } + +// optional uint32 grant = 6; + inline bool ACL_ChanACL::has_grant() const + { + return (_has_bits_[0] & 0x00000020u) != 0; + } + inline void ACL_ChanACL::set_has_grant() + { + _has_bits_[0] |= 0x00000020u; + } + inline void ACL_ChanACL::clear_has_grant() + { + _has_bits_[0] &= ~0x00000020u; + } + inline void ACL_ChanACL::clear_grant() + { + grant_ = 0u; + clear_has_grant(); + } + inline ::google::protobuf::uint32 ACL_ChanACL::grant() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.ChanACL.grant) + return grant_; + } + inline void ACL_ChanACL::set_grant(::google::protobuf::uint32 value) + { + set_has_grant(); + grant_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ACL.ChanACL.grant) + } + +// optional uint32 deny = 7; + inline bool ACL_ChanACL::has_deny() const + { + return (_has_bits_[0] & 0x00000040u) != 0; + } + inline void ACL_ChanACL::set_has_deny() + { + _has_bits_[0] |= 0x00000040u; + } + inline void ACL_ChanACL::clear_has_deny() + { + _has_bits_[0] &= ~0x00000040u; + } + inline void ACL_ChanACL::clear_deny() + { + deny_ = 0u; + clear_has_deny(); + } + inline ::google::protobuf::uint32 ACL_ChanACL::deny() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.ChanACL.deny) + return deny_; + } + inline void ACL_ChanACL::set_deny(::google::protobuf::uint32 value) + { + set_has_deny(); + deny_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ACL.ChanACL.deny) + } + +// ------------------------------------------------------------------- + +// ACL + +// required uint32 channel_id = 1; + inline bool ACL::has_channel_id() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void ACL::set_has_channel_id() + { + _has_bits_[0] |= 0x00000001u; + } + inline void ACL::clear_has_channel_id() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void ACL::clear_channel_id() + { + channel_id_ = 0u; + clear_has_channel_id(); + } + inline ::google::protobuf::uint32 ACL::channel_id() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.channel_id) + return channel_id_; + } + inline void ACL::set_channel_id(::google::protobuf::uint32 value) + { + set_has_channel_id(); + channel_id_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ACL.channel_id) + } + +// optional bool inherit_acls = 2 [default = true]; + inline bool ACL::has_inherit_acls() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void ACL::set_has_inherit_acls() + { + _has_bits_[0] |= 0x00000002u; + } + inline void ACL::clear_has_inherit_acls() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void ACL::clear_inherit_acls() + { + inherit_acls_ = true; + clear_has_inherit_acls(); + } + inline bool ACL::inherit_acls() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.inherit_acls) + return inherit_acls_; + } + inline void ACL::set_inherit_acls(bool value) + { + set_has_inherit_acls(); + inherit_acls_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ACL.inherit_acls) + } + +// repeated .MumbleProto.ACL.ChanGroup groups = 3; + inline int ACL::groups_size() const + { + return groups_.size(); + } + inline void ACL::clear_groups() + { + groups_.Clear(); + } + inline const ::MumbleProto::ACL_ChanGroup& ACL::groups(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.groups) + return groups_.Get(index); + } + inline ::MumbleProto::ACL_ChanGroup* ACL::mutable_groups(int index) + { + // @@protoc_insertion_point(field_mutable:MumbleProto.ACL.groups) + return groups_.Mutable(index); + } + inline ::MumbleProto::ACL_ChanGroup* ACL::add_groups() + { + // @@protoc_insertion_point(field_add:MumbleProto.ACL.groups) + return groups_.Add(); + } + inline const ::google::protobuf::RepeatedPtrField< ::MumbleProto::ACL_ChanGroup >& + ACL::groups() const + { + // @@protoc_insertion_point(field_list:MumbleProto.ACL.groups) + return groups_; + } + inline ::google::protobuf::RepeatedPtrField< ::MumbleProto::ACL_ChanGroup >* + ACL::mutable_groups() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.ACL.groups) + return &groups_; + } + +// repeated .MumbleProto.ACL.ChanACL acls = 4; + inline int ACL::acls_size() const + { + return acls_.size(); + } + inline void ACL::clear_acls() + { + acls_.Clear(); + } + inline const ::MumbleProto::ACL_ChanACL& ACL::acls(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.acls) + return acls_.Get(index); + } + inline ::MumbleProto::ACL_ChanACL* ACL::mutable_acls(int index) + { + // @@protoc_insertion_point(field_mutable:MumbleProto.ACL.acls) + return acls_.Mutable(index); + } + inline ::MumbleProto::ACL_ChanACL* ACL::add_acls() + { + // @@protoc_insertion_point(field_add:MumbleProto.ACL.acls) + return acls_.Add(); + } + inline const ::google::protobuf::RepeatedPtrField< ::MumbleProto::ACL_ChanACL >& + ACL::acls() const + { + // @@protoc_insertion_point(field_list:MumbleProto.ACL.acls) + return acls_; + } + inline ::google::protobuf::RepeatedPtrField< ::MumbleProto::ACL_ChanACL >* + ACL::mutable_acls() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.ACL.acls) + return &acls_; + } + +// optional bool query = 5 [default = false]; + inline bool ACL::has_query() const + { + return (_has_bits_[0] & 0x00000010u) != 0; + } + inline void ACL::set_has_query() + { + _has_bits_[0] |= 0x00000010u; + } + inline void ACL::clear_has_query() + { + _has_bits_[0] &= ~0x00000010u; + } + inline void ACL::clear_query() + { + query_ = false; + clear_has_query(); + } + inline bool ACL::query() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ACL.query) + return query_; + } + inline void ACL::set_query(bool value) + { + set_has_query(); + query_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ACL.query) + } + +// ------------------------------------------------------------------- + +// QueryUsers + +// repeated uint32 ids = 1; + inline int QueryUsers::ids_size() const + { + return ids_.size(); + } + inline void QueryUsers::clear_ids() + { + ids_.Clear(); + } + inline ::google::protobuf::uint32 QueryUsers::ids(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.QueryUsers.ids) + return ids_.Get(index); + } + inline void QueryUsers::set_ids(int index, ::google::protobuf::uint32 value) + { + ids_.Set(index, value); + // @@protoc_insertion_point(field_set:MumbleProto.QueryUsers.ids) + } + inline void QueryUsers::add_ids(::google::protobuf::uint32 value) + { + ids_.Add(value); + // @@protoc_insertion_point(field_add:MumbleProto.QueryUsers.ids) + } + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + QueryUsers::ids() const + { + // @@protoc_insertion_point(field_list:MumbleProto.QueryUsers.ids) + return ids_; + } + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + QueryUsers::mutable_ids() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.QueryUsers.ids) + return &ids_; + } + +// repeated string names = 2; + inline int QueryUsers::names_size() const + { + return names_.size(); + } + inline void QueryUsers::clear_names() + { + names_.Clear(); + } + inline const ::std::string& QueryUsers::names(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.QueryUsers.names) + return names_.Get(index); + } + inline ::std::string* QueryUsers::mutable_names(int index) + { + // @@protoc_insertion_point(field_mutable:MumbleProto.QueryUsers.names) + return names_.Mutable(index); + } + inline void QueryUsers::set_names(int index, const ::std::string& value) + { + // @@protoc_insertion_point(field_set:MumbleProto.QueryUsers.names) + names_.Mutable(index)->assign(value); + } + inline void QueryUsers::set_names(int index, const char* value) + { + names_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.QueryUsers.names) + } + inline void QueryUsers::set_names(int index, const char* value, size_t size) + { + names_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.QueryUsers.names) + } + inline ::std::string* QueryUsers::add_names() + { + return names_.Add(); + } + inline void QueryUsers::add_names(const ::std::string& value) + { + names_.Add()->assign(value); + // @@protoc_insertion_point(field_add:MumbleProto.QueryUsers.names) + } + inline void QueryUsers::add_names(const char* value) + { + names_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:MumbleProto.QueryUsers.names) + } + inline void QueryUsers::add_names(const char* value, size_t size) + { + names_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:MumbleProto.QueryUsers.names) + } + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& + QueryUsers::names() const + { + // @@protoc_insertion_point(field_list:MumbleProto.QueryUsers.names) + return names_; + } + inline ::google::protobuf::RepeatedPtrField< ::std::string>* + QueryUsers::mutable_names() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.QueryUsers.names) + return &names_; + } + +// ------------------------------------------------------------------- + +// CryptSetup + +// optional bytes key = 1; + inline bool CryptSetup::has_key() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void CryptSetup::set_has_key() + { + _has_bits_[0] |= 0x00000001u; + } + inline void CryptSetup::clear_has_key() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void CryptSetup::clear_key() + { + if (key_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + key_->clear(); + } + clear_has_key(); + } + inline const ::std::string& CryptSetup::key() const + { + // @@protoc_insertion_point(field_get:MumbleProto.CryptSetup.key) + return *key_; + } + inline void CryptSetup::set_key(const ::std::string& value) + { + set_has_key(); + if (key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + key_ = new ::std::string; + } + key_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.CryptSetup.key) + } + inline void CryptSetup::set_key(const char* value) + { + set_has_key(); + if (key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + key_ = new ::std::string; + } + key_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.CryptSetup.key) + } + inline void CryptSetup::set_key(const void* value, size_t size) + { + set_has_key(); + if (key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + key_ = new ::std::string; + } + key_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.CryptSetup.key) + } + inline ::std::string* CryptSetup::mutable_key() + { + set_has_key(); + if (key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + key_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.CryptSetup.key) + return key_; + } + inline ::std::string* CryptSetup::release_key() + { + clear_has_key(); + if (key_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = key_; + key_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void CryptSetup::set_allocated_key(::std::string* key) + { + if (key_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete key_; + } + if (key) + { + set_has_key(); + key_ = key; + } + else + { + clear_has_key(); + key_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.CryptSetup.key) + } + +// optional bytes client_nonce = 2; + inline bool CryptSetup::has_client_nonce() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void CryptSetup::set_has_client_nonce() + { + _has_bits_[0] |= 0x00000002u; + } + inline void CryptSetup::clear_has_client_nonce() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void CryptSetup::clear_client_nonce() + { + if (client_nonce_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + client_nonce_->clear(); + } + clear_has_client_nonce(); + } + inline const ::std::string& CryptSetup::client_nonce() const + { + // @@protoc_insertion_point(field_get:MumbleProto.CryptSetup.client_nonce) + return *client_nonce_; + } + inline void CryptSetup::set_client_nonce(const ::std::string& value) + { + set_has_client_nonce(); + if (client_nonce_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + client_nonce_ = new ::std::string; + } + client_nonce_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.CryptSetup.client_nonce) + } + inline void CryptSetup::set_client_nonce(const char* value) + { + set_has_client_nonce(); + if (client_nonce_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + client_nonce_ = new ::std::string; + } + client_nonce_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.CryptSetup.client_nonce) + } + inline void CryptSetup::set_client_nonce(const void* value, size_t size) + { + set_has_client_nonce(); + if (client_nonce_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + client_nonce_ = new ::std::string; + } + client_nonce_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.CryptSetup.client_nonce) + } + inline ::std::string* CryptSetup::mutable_client_nonce() + { + set_has_client_nonce(); + if (client_nonce_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + client_nonce_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.CryptSetup.client_nonce) + return client_nonce_; + } + inline ::std::string* CryptSetup::release_client_nonce() + { + clear_has_client_nonce(); + if (client_nonce_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = client_nonce_; + client_nonce_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void CryptSetup::set_allocated_client_nonce(::std::string* client_nonce) + { + if (client_nonce_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete client_nonce_; + } + if (client_nonce) + { + set_has_client_nonce(); + client_nonce_ = client_nonce; + } + else + { + clear_has_client_nonce(); + client_nonce_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.CryptSetup.client_nonce) + } + +// optional bytes server_nonce = 3; + inline bool CryptSetup::has_server_nonce() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void CryptSetup::set_has_server_nonce() + { + _has_bits_[0] |= 0x00000004u; + } + inline void CryptSetup::clear_has_server_nonce() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void CryptSetup::clear_server_nonce() + { + if (server_nonce_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + server_nonce_->clear(); + } + clear_has_server_nonce(); + } + inline const ::std::string& CryptSetup::server_nonce() const + { + // @@protoc_insertion_point(field_get:MumbleProto.CryptSetup.server_nonce) + return *server_nonce_; + } + inline void CryptSetup::set_server_nonce(const ::std::string& value) + { + set_has_server_nonce(); + if (server_nonce_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + server_nonce_ = new ::std::string; + } + server_nonce_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.CryptSetup.server_nonce) + } + inline void CryptSetup::set_server_nonce(const char* value) + { + set_has_server_nonce(); + if (server_nonce_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + server_nonce_ = new ::std::string; + } + server_nonce_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.CryptSetup.server_nonce) + } + inline void CryptSetup::set_server_nonce(const void* value, size_t size) + { + set_has_server_nonce(); + if (server_nonce_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + server_nonce_ = new ::std::string; + } + server_nonce_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.CryptSetup.server_nonce) + } + inline ::std::string* CryptSetup::mutable_server_nonce() + { + set_has_server_nonce(); + if (server_nonce_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + server_nonce_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.CryptSetup.server_nonce) + return server_nonce_; + } + inline ::std::string* CryptSetup::release_server_nonce() + { + clear_has_server_nonce(); + if (server_nonce_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = server_nonce_; + server_nonce_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void CryptSetup::set_allocated_server_nonce(::std::string* server_nonce) + { + if (server_nonce_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete server_nonce_; + } + if (server_nonce) + { + set_has_server_nonce(); + server_nonce_ = server_nonce; + } + else + { + clear_has_server_nonce(); + server_nonce_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.CryptSetup.server_nonce) + } + +// ------------------------------------------------------------------- + +// ContextActionModify + +// required string action = 1; + inline bool ContextActionModify::has_action() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void ContextActionModify::set_has_action() + { + _has_bits_[0] |= 0x00000001u; + } + inline void ContextActionModify::clear_has_action() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void ContextActionModify::clear_action() + { + if (action_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + action_->clear(); + } + clear_has_action(); + } + inline const ::std::string& ContextActionModify::action() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ContextActionModify.action) + return *action_; + } + inline void ContextActionModify::set_action(const ::std::string& value) + { + set_has_action(); + if (action_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + action_ = new ::std::string; + } + action_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.ContextActionModify.action) + } + inline void ContextActionModify::set_action(const char* value) + { + set_has_action(); + if (action_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + action_ = new ::std::string; + } + action_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.ContextActionModify.action) + } + inline void ContextActionModify::set_action(const char* value, size_t size) + { + set_has_action(); + if (action_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + action_ = new ::std::string; + } + action_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.ContextActionModify.action) + } + inline ::std::string* ContextActionModify::mutable_action() + { + set_has_action(); + if (action_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + action_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.ContextActionModify.action) + return action_; + } + inline ::std::string* ContextActionModify::release_action() + { + clear_has_action(); + if (action_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = action_; + action_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void ContextActionModify::set_allocated_action(::std::string* action) + { + if (action_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete action_; + } + if (action) + { + set_has_action(); + action_ = action; + } + else + { + clear_has_action(); + action_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.ContextActionModify.action) + } + +// optional string text = 2; + inline bool ContextActionModify::has_text() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void ContextActionModify::set_has_text() + { + _has_bits_[0] |= 0x00000002u; + } + inline void ContextActionModify::clear_has_text() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void ContextActionModify::clear_text() + { + if (text_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + text_->clear(); + } + clear_has_text(); + } + inline const ::std::string& ContextActionModify::text() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ContextActionModify.text) + return *text_; + } + inline void ContextActionModify::set_text(const ::std::string& value) + { + set_has_text(); + if (text_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + text_ = new ::std::string; + } + text_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.ContextActionModify.text) + } + inline void ContextActionModify::set_text(const char* value) + { + set_has_text(); + if (text_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + text_ = new ::std::string; + } + text_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.ContextActionModify.text) + } + inline void ContextActionModify::set_text(const char* value, size_t size) + { + set_has_text(); + if (text_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + text_ = new ::std::string; + } + text_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.ContextActionModify.text) + } + inline ::std::string* ContextActionModify::mutable_text() + { + set_has_text(); + if (text_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + text_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.ContextActionModify.text) + return text_; + } + inline ::std::string* ContextActionModify::release_text() + { + clear_has_text(); + if (text_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = text_; + text_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void ContextActionModify::set_allocated_text(::std::string* text) + { + if (text_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete text_; + } + if (text) + { + set_has_text(); + text_ = text; + } + else + { + clear_has_text(); + text_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.ContextActionModify.text) + } + +// optional uint32 context = 3; + inline bool ContextActionModify::has_context() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void ContextActionModify::set_has_context() + { + _has_bits_[0] |= 0x00000004u; + } + inline void ContextActionModify::clear_has_context() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void ContextActionModify::clear_context() + { + context_ = 0u; + clear_has_context(); + } + inline ::google::protobuf::uint32 ContextActionModify::context() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ContextActionModify.context) + return context_; + } + inline void ContextActionModify::set_context(::google::protobuf::uint32 value) + { + set_has_context(); + context_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ContextActionModify.context) + } + +// optional .MumbleProto.ContextActionModify.Operation operation = 4; + inline bool ContextActionModify::has_operation() const + { + return (_has_bits_[0] & 0x00000008u) != 0; + } + inline void ContextActionModify::set_has_operation() + { + _has_bits_[0] |= 0x00000008u; + } + inline void ContextActionModify::clear_has_operation() + { + _has_bits_[0] &= ~0x00000008u; + } + inline void ContextActionModify::clear_operation() + { + operation_ = 0; + clear_has_operation(); + } + inline ::MumbleProto::ContextActionModify_Operation + ContextActionModify::operation() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ContextActionModify.operation) + return static_cast< ::MumbleProto::ContextActionModify_Operation >(operation_); + } + inline void ContextActionModify::set_operation( + ::MumbleProto::ContextActionModify_Operation value) + { + assert(::MumbleProto::ContextActionModify_Operation_IsValid(value)); + set_has_operation(); + operation_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ContextActionModify.operation) + } + +// ------------------------------------------------------------------- + +// ContextAction + +// optional uint32 session = 1; + inline bool ContextAction::has_session() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void ContextAction::set_has_session() + { + _has_bits_[0] |= 0x00000001u; + } + inline void ContextAction::clear_has_session() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void ContextAction::clear_session() + { + session_ = 0u; + clear_has_session(); + } + inline ::google::protobuf::uint32 ContextAction::session() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ContextAction.session) + return session_; + } + inline void ContextAction::set_session(::google::protobuf::uint32 value) + { + set_has_session(); + session_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ContextAction.session) + } + +// optional uint32 channel_id = 2; + inline bool ContextAction::has_channel_id() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void ContextAction::set_has_channel_id() + { + _has_bits_[0] |= 0x00000002u; + } + inline void ContextAction::clear_has_channel_id() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void ContextAction::clear_channel_id() + { + channel_id_ = 0u; + clear_has_channel_id(); + } + inline ::google::protobuf::uint32 ContextAction::channel_id() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ContextAction.channel_id) + return channel_id_; + } + inline void ContextAction::set_channel_id(::google::protobuf::uint32 value) + { + set_has_channel_id(); + channel_id_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ContextAction.channel_id) + } + +// required string action = 3; + inline bool ContextAction::has_action() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void ContextAction::set_has_action() + { + _has_bits_[0] |= 0x00000004u; + } + inline void ContextAction::clear_has_action() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void ContextAction::clear_action() + { + if (action_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + action_->clear(); + } + clear_has_action(); + } + inline const ::std::string& ContextAction::action() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ContextAction.action) + return *action_; + } + inline void ContextAction::set_action(const ::std::string& value) + { + set_has_action(); + if (action_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + action_ = new ::std::string; + } + action_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.ContextAction.action) + } + inline void ContextAction::set_action(const char* value) + { + set_has_action(); + if (action_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + action_ = new ::std::string; + } + action_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.ContextAction.action) + } + inline void ContextAction::set_action(const char* value, size_t size) + { + set_has_action(); + if (action_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + action_ = new ::std::string; + } + action_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.ContextAction.action) + } + inline ::std::string* ContextAction::mutable_action() + { + set_has_action(); + if (action_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + action_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.ContextAction.action) + return action_; + } + inline ::std::string* ContextAction::release_action() + { + clear_has_action(); + if (action_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = action_; + action_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void ContextAction::set_allocated_action(::std::string* action) + { + if (action_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete action_; + } + if (action) + { + set_has_action(); + action_ = action; + } + else + { + clear_has_action(); + action_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.ContextAction.action) + } + +// ------------------------------------------------------------------- + +// UserList_User + +// required uint32 user_id = 1; + inline bool UserList_User::has_user_id() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void UserList_User::set_has_user_id() + { + _has_bits_[0] |= 0x00000001u; + } + inline void UserList_User::clear_has_user_id() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void UserList_User::clear_user_id() + { + user_id_ = 0u; + clear_has_user_id(); + } + inline ::google::protobuf::uint32 UserList_User::user_id() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserList.User.user_id) + return user_id_; + } + inline void UserList_User::set_user_id(::google::protobuf::uint32 value) + { + set_has_user_id(); + user_id_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserList.User.user_id) + } + +// optional string name = 2; + inline bool UserList_User::has_name() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void UserList_User::set_has_name() + { + _has_bits_[0] |= 0x00000002u; + } + inline void UserList_User::clear_has_name() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void UserList_User::clear_name() + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_->clear(); + } + clear_has_name(); + } + inline const ::std::string& UserList_User::name() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserList.User.name) + return *name_; + } + inline void UserList_User::set_name(const ::std::string& value) + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + name_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.UserList.User.name) + } + inline void UserList_User::set_name(const char* value) + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + name_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.UserList.User.name) + } + inline void UserList_User::set_name(const char* value, size_t size) + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + name_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.UserList.User.name) + } + inline ::std::string* UserList_User::mutable_name() + { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + name_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.UserList.User.name) + return name_; + } + inline ::std::string* UserList_User::release_name() + { + clear_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = name_; + name_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void UserList_User::set_allocated_name(::std::string* name) + { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete name_; + } + if (name) + { + set_has_name(); + name_ = name; + } + else + { + clear_has_name(); + name_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.UserList.User.name) + } + +// optional string last_seen = 3; + inline bool UserList_User::has_last_seen() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void UserList_User::set_has_last_seen() + { + _has_bits_[0] |= 0x00000004u; + } + inline void UserList_User::clear_has_last_seen() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void UserList_User::clear_last_seen() + { + if (last_seen_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + last_seen_->clear(); + } + clear_has_last_seen(); + } + inline const ::std::string& UserList_User::last_seen() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserList.User.last_seen) + return *last_seen_; + } + inline void UserList_User::set_last_seen(const ::std::string& value) + { + set_has_last_seen(); + if (last_seen_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + last_seen_ = new ::std::string; + } + last_seen_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.UserList.User.last_seen) + } + inline void UserList_User::set_last_seen(const char* value) + { + set_has_last_seen(); + if (last_seen_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + last_seen_ = new ::std::string; + } + last_seen_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.UserList.User.last_seen) + } + inline void UserList_User::set_last_seen(const char* value, size_t size) + { + set_has_last_seen(); + if (last_seen_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + last_seen_ = new ::std::string; + } + last_seen_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.UserList.User.last_seen) + } + inline ::std::string* UserList_User::mutable_last_seen() + { + set_has_last_seen(); + if (last_seen_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + last_seen_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.UserList.User.last_seen) + return last_seen_; + } + inline ::std::string* UserList_User::release_last_seen() + { + clear_has_last_seen(); + if (last_seen_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = last_seen_; + last_seen_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void UserList_User::set_allocated_last_seen(::std::string* last_seen) + { + if (last_seen_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete last_seen_; + } + if (last_seen) + { + set_has_last_seen(); + last_seen_ = last_seen; + } + else + { + clear_has_last_seen(); + last_seen_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.UserList.User.last_seen) + } + +// optional uint32 last_channel = 4; + inline bool UserList_User::has_last_channel() const + { + return (_has_bits_[0] & 0x00000008u) != 0; + } + inline void UserList_User::set_has_last_channel() + { + _has_bits_[0] |= 0x00000008u; + } + inline void UserList_User::clear_has_last_channel() + { + _has_bits_[0] &= ~0x00000008u; + } + inline void UserList_User::clear_last_channel() + { + last_channel_ = 0u; + clear_has_last_channel(); + } + inline ::google::protobuf::uint32 UserList_User::last_channel() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserList.User.last_channel) + return last_channel_; + } + inline void UserList_User::set_last_channel(::google::protobuf::uint32 value) + { + set_has_last_channel(); + last_channel_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserList.User.last_channel) + } + +// ------------------------------------------------------------------- + +// UserList + +// repeated .MumbleProto.UserList.User users = 1; + inline int UserList::users_size() const + { + return users_.size(); + } + inline void UserList::clear_users() + { + users_.Clear(); + } + inline const ::MumbleProto::UserList_User& UserList::users(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserList.users) + return users_.Get(index); + } + inline ::MumbleProto::UserList_User* UserList::mutable_users(int index) + { + // @@protoc_insertion_point(field_mutable:MumbleProto.UserList.users) + return users_.Mutable(index); + } + inline ::MumbleProto::UserList_User* UserList::add_users() + { + // @@protoc_insertion_point(field_add:MumbleProto.UserList.users) + return users_.Add(); + } + inline const ::google::protobuf::RepeatedPtrField< ::MumbleProto::UserList_User >& + UserList::users() const + { + // @@protoc_insertion_point(field_list:MumbleProto.UserList.users) + return users_; + } + inline ::google::protobuf::RepeatedPtrField< ::MumbleProto::UserList_User >* + UserList::mutable_users() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.UserList.users) + return &users_; + } + +// ------------------------------------------------------------------- + +// VoiceTarget_Target + +// repeated uint32 session = 1; + inline int VoiceTarget_Target::session_size() const + { + return session_.size(); + } + inline void VoiceTarget_Target::clear_session() + { + session_.Clear(); + } + inline ::google::protobuf::uint32 VoiceTarget_Target::session(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.VoiceTarget.Target.session) + return session_.Get(index); + } + inline void VoiceTarget_Target::set_session(int index, + ::google::protobuf::uint32 value) + { + session_.Set(index, value); + // @@protoc_insertion_point(field_set:MumbleProto.VoiceTarget.Target.session) + } + inline void VoiceTarget_Target::add_session(::google::protobuf::uint32 value) + { + session_.Add(value); + // @@protoc_insertion_point(field_add:MumbleProto.VoiceTarget.Target.session) + } + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + VoiceTarget_Target::session() const + { + // @@protoc_insertion_point(field_list:MumbleProto.VoiceTarget.Target.session) + return session_; + } + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + VoiceTarget_Target::mutable_session() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.VoiceTarget.Target.session) + return &session_; + } + +// optional uint32 channel_id = 2; + inline bool VoiceTarget_Target::has_channel_id() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void VoiceTarget_Target::set_has_channel_id() + { + _has_bits_[0] |= 0x00000002u; + } + inline void VoiceTarget_Target::clear_has_channel_id() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void VoiceTarget_Target::clear_channel_id() + { + channel_id_ = 0u; + clear_has_channel_id(); + } + inline ::google::protobuf::uint32 VoiceTarget_Target::channel_id() const + { + // @@protoc_insertion_point(field_get:MumbleProto.VoiceTarget.Target.channel_id) + return channel_id_; + } + inline void VoiceTarget_Target::set_channel_id(::google::protobuf::uint32 + value) + { + set_has_channel_id(); + channel_id_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.VoiceTarget.Target.channel_id) + } + +// optional string group = 3; + inline bool VoiceTarget_Target::has_group() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void VoiceTarget_Target::set_has_group() + { + _has_bits_[0] |= 0x00000004u; + } + inline void VoiceTarget_Target::clear_has_group() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void VoiceTarget_Target::clear_group() + { + if (group_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + group_->clear(); + } + clear_has_group(); + } + inline const ::std::string& VoiceTarget_Target::group() const + { + // @@protoc_insertion_point(field_get:MumbleProto.VoiceTarget.Target.group) + return *group_; + } + inline void VoiceTarget_Target::set_group(const ::std::string& value) + { + set_has_group(); + if (group_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + group_ = new ::std::string; + } + group_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.VoiceTarget.Target.group) + } + inline void VoiceTarget_Target::set_group(const char* value) + { + set_has_group(); + if (group_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + group_ = new ::std::string; + } + group_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.VoiceTarget.Target.group) + } + inline void VoiceTarget_Target::set_group(const char* value, size_t size) + { + set_has_group(); + if (group_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + group_ = new ::std::string; + } + group_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.VoiceTarget.Target.group) + } + inline ::std::string* VoiceTarget_Target::mutable_group() + { + set_has_group(); + if (group_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + group_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.VoiceTarget.Target.group) + return group_; + } + inline ::std::string* VoiceTarget_Target::release_group() + { + clear_has_group(); + if (group_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = group_; + group_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void VoiceTarget_Target::set_allocated_group(::std::string* group) + { + if (group_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete group_; + } + if (group) + { + set_has_group(); + group_ = group; + } + else + { + clear_has_group(); + group_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.VoiceTarget.Target.group) + } + +// optional bool links = 4 [default = false]; + inline bool VoiceTarget_Target::has_links() const + { + return (_has_bits_[0] & 0x00000008u) != 0; + } + inline void VoiceTarget_Target::set_has_links() + { + _has_bits_[0] |= 0x00000008u; + } + inline void VoiceTarget_Target::clear_has_links() + { + _has_bits_[0] &= ~0x00000008u; + } + inline void VoiceTarget_Target::clear_links() + { + links_ = false; + clear_has_links(); + } + inline bool VoiceTarget_Target::links() const + { + // @@protoc_insertion_point(field_get:MumbleProto.VoiceTarget.Target.links) + return links_; + } + inline void VoiceTarget_Target::set_links(bool value) + { + set_has_links(); + links_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.VoiceTarget.Target.links) + } + +// optional bool children = 5 [default = false]; + inline bool VoiceTarget_Target::has_children() const + { + return (_has_bits_[0] & 0x00000010u) != 0; + } + inline void VoiceTarget_Target::set_has_children() + { + _has_bits_[0] |= 0x00000010u; + } + inline void VoiceTarget_Target::clear_has_children() + { + _has_bits_[0] &= ~0x00000010u; + } + inline void VoiceTarget_Target::clear_children() + { + children_ = false; + clear_has_children(); + } + inline bool VoiceTarget_Target::children() const + { + // @@protoc_insertion_point(field_get:MumbleProto.VoiceTarget.Target.children) + return children_; + } + inline void VoiceTarget_Target::set_children(bool value) + { + set_has_children(); + children_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.VoiceTarget.Target.children) + } + +// ------------------------------------------------------------------- + +// VoiceTarget + +// optional uint32 id = 1; + inline bool VoiceTarget::has_id() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void VoiceTarget::set_has_id() + { + _has_bits_[0] |= 0x00000001u; + } + inline void VoiceTarget::clear_has_id() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void VoiceTarget::clear_id() + { + id_ = 0u; + clear_has_id(); + } + inline ::google::protobuf::uint32 VoiceTarget::id() const + { + // @@protoc_insertion_point(field_get:MumbleProto.VoiceTarget.id) + return id_; + } + inline void VoiceTarget::set_id(::google::protobuf::uint32 value) + { + set_has_id(); + id_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.VoiceTarget.id) + } + +// repeated .MumbleProto.VoiceTarget.Target targets = 2; + inline int VoiceTarget::targets_size() const + { + return targets_.size(); + } + inline void VoiceTarget::clear_targets() + { + targets_.Clear(); + } + inline const ::MumbleProto::VoiceTarget_Target& VoiceTarget::targets( + int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.VoiceTarget.targets) + return targets_.Get(index); + } + inline ::MumbleProto::VoiceTarget_Target* VoiceTarget::mutable_targets( + int index) + { + // @@protoc_insertion_point(field_mutable:MumbleProto.VoiceTarget.targets) + return targets_.Mutable(index); + } + inline ::MumbleProto::VoiceTarget_Target* VoiceTarget::add_targets() + { + // @@protoc_insertion_point(field_add:MumbleProto.VoiceTarget.targets) + return targets_.Add(); + } + inline const ::google::protobuf::RepeatedPtrField< ::MumbleProto::VoiceTarget_Target >& + VoiceTarget::targets() const + { + // @@protoc_insertion_point(field_list:MumbleProto.VoiceTarget.targets) + return targets_; + } + inline ::google::protobuf::RepeatedPtrField< ::MumbleProto::VoiceTarget_Target >* + VoiceTarget::mutable_targets() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.VoiceTarget.targets) + return &targets_; + } + +// ------------------------------------------------------------------- + +// PermissionQuery + +// optional uint32 channel_id = 1; + inline bool PermissionQuery::has_channel_id() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void PermissionQuery::set_has_channel_id() + { + _has_bits_[0] |= 0x00000001u; + } + inline void PermissionQuery::clear_has_channel_id() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void PermissionQuery::clear_channel_id() + { + channel_id_ = 0u; + clear_has_channel_id(); + } + inline ::google::protobuf::uint32 PermissionQuery::channel_id() const + { + // @@protoc_insertion_point(field_get:MumbleProto.PermissionQuery.channel_id) + return channel_id_; + } + inline void PermissionQuery::set_channel_id(::google::protobuf::uint32 value) + { + set_has_channel_id(); + channel_id_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.PermissionQuery.channel_id) + } + +// optional uint32 permissions = 2; + inline bool PermissionQuery::has_permissions() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void PermissionQuery::set_has_permissions() + { + _has_bits_[0] |= 0x00000002u; + } + inline void PermissionQuery::clear_has_permissions() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void PermissionQuery::clear_permissions() + { + permissions_ = 0u; + clear_has_permissions(); + } + inline ::google::protobuf::uint32 PermissionQuery::permissions() const + { + // @@protoc_insertion_point(field_get:MumbleProto.PermissionQuery.permissions) + return permissions_; + } + inline void PermissionQuery::set_permissions(::google::protobuf::uint32 value) + { + set_has_permissions(); + permissions_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.PermissionQuery.permissions) + } + +// optional bool flush = 3 [default = false]; + inline bool PermissionQuery::has_flush() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void PermissionQuery::set_has_flush() + { + _has_bits_[0] |= 0x00000004u; + } + inline void PermissionQuery::clear_has_flush() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void PermissionQuery::clear_flush() + { + flush_ = false; + clear_has_flush(); + } + inline bool PermissionQuery::flush() const + { + // @@protoc_insertion_point(field_get:MumbleProto.PermissionQuery.flush) + return flush_; + } + inline void PermissionQuery::set_flush(bool value) + { + set_has_flush(); + flush_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.PermissionQuery.flush) + } + +// ------------------------------------------------------------------- + +// CodecVersion + +// required int32 alpha = 1; + inline bool CodecVersion::has_alpha() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void CodecVersion::set_has_alpha() + { + _has_bits_[0] |= 0x00000001u; + } + inline void CodecVersion::clear_has_alpha() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void CodecVersion::clear_alpha() + { + alpha_ = 0; + clear_has_alpha(); + } + inline ::google::protobuf::int32 CodecVersion::alpha() const + { + // @@protoc_insertion_point(field_get:MumbleProto.CodecVersion.alpha) + return alpha_; + } + inline void CodecVersion::set_alpha(::google::protobuf::int32 value) + { + set_has_alpha(); + alpha_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.CodecVersion.alpha) + } + +// required int32 beta = 2; + inline bool CodecVersion::has_beta() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void CodecVersion::set_has_beta() + { + _has_bits_[0] |= 0x00000002u; + } + inline void CodecVersion::clear_has_beta() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void CodecVersion::clear_beta() + { + beta_ = 0; + clear_has_beta(); + } + inline ::google::protobuf::int32 CodecVersion::beta() const + { + // @@protoc_insertion_point(field_get:MumbleProto.CodecVersion.beta) + return beta_; + } + inline void CodecVersion::set_beta(::google::protobuf::int32 value) + { + set_has_beta(); + beta_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.CodecVersion.beta) + } + +// required bool prefer_alpha = 3 [default = true]; + inline bool CodecVersion::has_prefer_alpha() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void CodecVersion::set_has_prefer_alpha() + { + _has_bits_[0] |= 0x00000004u; + } + inline void CodecVersion::clear_has_prefer_alpha() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void CodecVersion::clear_prefer_alpha() + { + prefer_alpha_ = true; + clear_has_prefer_alpha(); + } + inline bool CodecVersion::prefer_alpha() const + { + // @@protoc_insertion_point(field_get:MumbleProto.CodecVersion.prefer_alpha) + return prefer_alpha_; + } + inline void CodecVersion::set_prefer_alpha(bool value) + { + set_has_prefer_alpha(); + prefer_alpha_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.CodecVersion.prefer_alpha) + } + +// optional bool opus = 4 [default = false]; + inline bool CodecVersion::has_opus() const + { + return (_has_bits_[0] & 0x00000008u) != 0; + } + inline void CodecVersion::set_has_opus() + { + _has_bits_[0] |= 0x00000008u; + } + inline void CodecVersion::clear_has_opus() + { + _has_bits_[0] &= ~0x00000008u; + } + inline void CodecVersion::clear_opus() + { + opus_ = false; + clear_has_opus(); + } + inline bool CodecVersion::opus() const + { + // @@protoc_insertion_point(field_get:MumbleProto.CodecVersion.opus) + return opus_; + } + inline void CodecVersion::set_opus(bool value) + { + set_has_opus(); + opus_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.CodecVersion.opus) + } + +// ------------------------------------------------------------------- + +// UserStats_Stats + +// optional uint32 good = 1; + inline bool UserStats_Stats::has_good() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void UserStats_Stats::set_has_good() + { + _has_bits_[0] |= 0x00000001u; + } + inline void UserStats_Stats::clear_has_good() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void UserStats_Stats::clear_good() + { + good_ = 0u; + clear_has_good(); + } + inline ::google::protobuf::uint32 UserStats_Stats::good() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.Stats.good) + return good_; + } + inline void UserStats_Stats::set_good(::google::protobuf::uint32 value) + { + set_has_good(); + good_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.Stats.good) + } + +// optional uint32 late = 2; + inline bool UserStats_Stats::has_late() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void UserStats_Stats::set_has_late() + { + _has_bits_[0] |= 0x00000002u; + } + inline void UserStats_Stats::clear_has_late() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void UserStats_Stats::clear_late() + { + late_ = 0u; + clear_has_late(); + } + inline ::google::protobuf::uint32 UserStats_Stats::late() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.Stats.late) + return late_; + } + inline void UserStats_Stats::set_late(::google::protobuf::uint32 value) + { + set_has_late(); + late_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.Stats.late) + } + +// optional uint32 lost = 3; + inline bool UserStats_Stats::has_lost() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void UserStats_Stats::set_has_lost() + { + _has_bits_[0] |= 0x00000004u; + } + inline void UserStats_Stats::clear_has_lost() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void UserStats_Stats::clear_lost() + { + lost_ = 0u; + clear_has_lost(); + } + inline ::google::protobuf::uint32 UserStats_Stats::lost() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.Stats.lost) + return lost_; + } + inline void UserStats_Stats::set_lost(::google::protobuf::uint32 value) + { + set_has_lost(); + lost_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.Stats.lost) + } + +// optional uint32 resync = 4; + inline bool UserStats_Stats::has_resync() const + { + return (_has_bits_[0] & 0x00000008u) != 0; + } + inline void UserStats_Stats::set_has_resync() + { + _has_bits_[0] |= 0x00000008u; + } + inline void UserStats_Stats::clear_has_resync() + { + _has_bits_[0] &= ~0x00000008u; + } + inline void UserStats_Stats::clear_resync() + { + resync_ = 0u; + clear_has_resync(); + } + inline ::google::protobuf::uint32 UserStats_Stats::resync() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.Stats.resync) + return resync_; + } + inline void UserStats_Stats::set_resync(::google::protobuf::uint32 value) + { + set_has_resync(); + resync_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.Stats.resync) + } + +// ------------------------------------------------------------------- + +// UserStats + +// optional uint32 session = 1; + inline bool UserStats::has_session() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void UserStats::set_has_session() + { + _has_bits_[0] |= 0x00000001u; + } + inline void UserStats::clear_has_session() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void UserStats::clear_session() + { + session_ = 0u; + clear_has_session(); + } + inline ::google::protobuf::uint32 UserStats::session() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.session) + return session_; + } + inline void UserStats::set_session(::google::protobuf::uint32 value) + { + set_has_session(); + session_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.session) + } + +// optional bool stats_only = 2 [default = false]; + inline bool UserStats::has_stats_only() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void UserStats::set_has_stats_only() + { + _has_bits_[0] |= 0x00000002u; + } + inline void UserStats::clear_has_stats_only() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void UserStats::clear_stats_only() + { + stats_only_ = false; + clear_has_stats_only(); + } + inline bool UserStats::stats_only() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.stats_only) + return stats_only_; + } + inline void UserStats::set_stats_only(bool value) + { + set_has_stats_only(); + stats_only_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.stats_only) + } + +// repeated bytes certificates = 3; + inline int UserStats::certificates_size() const + { + return certificates_.size(); + } + inline void UserStats::clear_certificates() + { + certificates_.Clear(); + } + inline const ::std::string& UserStats::certificates(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.certificates) + return certificates_.Get(index); + } + inline ::std::string* UserStats::mutable_certificates(int index) + { + // @@protoc_insertion_point(field_mutable:MumbleProto.UserStats.certificates) + return certificates_.Mutable(index); + } + inline void UserStats::set_certificates(int index, const ::std::string& value) + { + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.certificates) + certificates_.Mutable(index)->assign(value); + } + inline void UserStats::set_certificates(int index, const char* value) + { + certificates_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.UserStats.certificates) + } + inline void UserStats::set_certificates(int index, const void* value, + size_t size) + { + certificates_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.UserStats.certificates) + } + inline ::std::string* UserStats::add_certificates() + { + return certificates_.Add(); + } + inline void UserStats::add_certificates(const ::std::string& value) + { + certificates_.Add()->assign(value); + // @@protoc_insertion_point(field_add:MumbleProto.UserStats.certificates) + } + inline void UserStats::add_certificates(const char* value) + { + certificates_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:MumbleProto.UserStats.certificates) + } + inline void UserStats::add_certificates(const void* value, size_t size) + { + certificates_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:MumbleProto.UserStats.certificates) + } + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& + UserStats::certificates() const + { + // @@protoc_insertion_point(field_list:MumbleProto.UserStats.certificates) + return certificates_; + } + inline ::google::protobuf::RepeatedPtrField< ::std::string>* + UserStats::mutable_certificates() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.UserStats.certificates) + return &certificates_; + } + +// optional .MumbleProto.UserStats.Stats from_client = 4; + inline bool UserStats::has_from_client() const + { + return (_has_bits_[0] & 0x00000008u) != 0; + } + inline void UserStats::set_has_from_client() + { + _has_bits_[0] |= 0x00000008u; + } + inline void UserStats::clear_has_from_client() + { + _has_bits_[0] &= ~0x00000008u; + } + inline void UserStats::clear_from_client() + { + if (from_client_ != NULL) from_client_->::MumbleProto::UserStats_Stats::Clear(); + clear_has_from_client(); + } + inline const ::MumbleProto::UserStats_Stats& UserStats::from_client() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.from_client) + return from_client_ != NULL ? *from_client_ : *default_instance_->from_client_; + } + inline ::MumbleProto::UserStats_Stats* UserStats::mutable_from_client() + { + set_has_from_client(); + if (from_client_ == NULL) from_client_ = new ::MumbleProto::UserStats_Stats; + // @@protoc_insertion_point(field_mutable:MumbleProto.UserStats.from_client) + return from_client_; + } + inline ::MumbleProto::UserStats_Stats* UserStats::release_from_client() + { + clear_has_from_client(); + ::MumbleProto::UserStats_Stats* temp = from_client_; + from_client_ = NULL; + return temp; + } + inline void UserStats::set_allocated_from_client(::MumbleProto::UserStats_Stats* + from_client) + { + delete from_client_; + from_client_ = from_client; + if (from_client) + { + set_has_from_client(); + } + else + { + clear_has_from_client(); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.UserStats.from_client) + } + +// optional .MumbleProto.UserStats.Stats from_server = 5; + inline bool UserStats::has_from_server() const + { + return (_has_bits_[0] & 0x00000010u) != 0; + } + inline void UserStats::set_has_from_server() + { + _has_bits_[0] |= 0x00000010u; + } + inline void UserStats::clear_has_from_server() + { + _has_bits_[0] &= ~0x00000010u; + } + inline void UserStats::clear_from_server() + { + if (from_server_ != NULL) from_server_->::MumbleProto::UserStats_Stats::Clear(); + clear_has_from_server(); + } + inline const ::MumbleProto::UserStats_Stats& UserStats::from_server() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.from_server) + return from_server_ != NULL ? *from_server_ : *default_instance_->from_server_; + } + inline ::MumbleProto::UserStats_Stats* UserStats::mutable_from_server() + { + set_has_from_server(); + if (from_server_ == NULL) from_server_ = new ::MumbleProto::UserStats_Stats; + // @@protoc_insertion_point(field_mutable:MumbleProto.UserStats.from_server) + return from_server_; + } + inline ::MumbleProto::UserStats_Stats* UserStats::release_from_server() + { + clear_has_from_server(); + ::MumbleProto::UserStats_Stats* temp = from_server_; + from_server_ = NULL; + return temp; + } + inline void UserStats::set_allocated_from_server(::MumbleProto::UserStats_Stats* + from_server) + { + delete from_server_; + from_server_ = from_server; + if (from_server) + { + set_has_from_server(); + } + else + { + clear_has_from_server(); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.UserStats.from_server) + } + +// optional uint32 udp_packets = 6; + inline bool UserStats::has_udp_packets() const + { + return (_has_bits_[0] & 0x00000020u) != 0; + } + inline void UserStats::set_has_udp_packets() + { + _has_bits_[0] |= 0x00000020u; + } + inline void UserStats::clear_has_udp_packets() + { + _has_bits_[0] &= ~0x00000020u; + } + inline void UserStats::clear_udp_packets() + { + udp_packets_ = 0u; + clear_has_udp_packets(); + } + inline ::google::protobuf::uint32 UserStats::udp_packets() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.udp_packets) + return udp_packets_; + } + inline void UserStats::set_udp_packets(::google::protobuf::uint32 value) + { + set_has_udp_packets(); + udp_packets_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.udp_packets) + } + +// optional uint32 tcp_packets = 7; + inline bool UserStats::has_tcp_packets() const + { + return (_has_bits_[0] & 0x00000040u) != 0; + } + inline void UserStats::set_has_tcp_packets() + { + _has_bits_[0] |= 0x00000040u; + } + inline void UserStats::clear_has_tcp_packets() + { + _has_bits_[0] &= ~0x00000040u; + } + inline void UserStats::clear_tcp_packets() + { + tcp_packets_ = 0u; + clear_has_tcp_packets(); + } + inline ::google::protobuf::uint32 UserStats::tcp_packets() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.tcp_packets) + return tcp_packets_; + } + inline void UserStats::set_tcp_packets(::google::protobuf::uint32 value) + { + set_has_tcp_packets(); + tcp_packets_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.tcp_packets) + } + +// optional float udp_ping_avg = 8; + inline bool UserStats::has_udp_ping_avg() const + { + return (_has_bits_[0] & 0x00000080u) != 0; + } + inline void UserStats::set_has_udp_ping_avg() + { + _has_bits_[0] |= 0x00000080u; + } + inline void UserStats::clear_has_udp_ping_avg() + { + _has_bits_[0] &= ~0x00000080u; + } + inline void UserStats::clear_udp_ping_avg() + { + udp_ping_avg_ = 0; + clear_has_udp_ping_avg(); + } + inline float UserStats::udp_ping_avg() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.udp_ping_avg) + return udp_ping_avg_; + } + inline void UserStats::set_udp_ping_avg(float value) + { + set_has_udp_ping_avg(); + udp_ping_avg_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.udp_ping_avg) + } + +// optional float udp_ping_var = 9; + inline bool UserStats::has_udp_ping_var() const + { + return (_has_bits_[0] & 0x00000100u) != 0; + } + inline void UserStats::set_has_udp_ping_var() + { + _has_bits_[0] |= 0x00000100u; + } + inline void UserStats::clear_has_udp_ping_var() + { + _has_bits_[0] &= ~0x00000100u; + } + inline void UserStats::clear_udp_ping_var() + { + udp_ping_var_ = 0; + clear_has_udp_ping_var(); + } + inline float UserStats::udp_ping_var() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.udp_ping_var) + return udp_ping_var_; + } + inline void UserStats::set_udp_ping_var(float value) + { + set_has_udp_ping_var(); + udp_ping_var_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.udp_ping_var) + } + +// optional float tcp_ping_avg = 10; + inline bool UserStats::has_tcp_ping_avg() const + { + return (_has_bits_[0] & 0x00000200u) != 0; + } + inline void UserStats::set_has_tcp_ping_avg() + { + _has_bits_[0] |= 0x00000200u; + } + inline void UserStats::clear_has_tcp_ping_avg() + { + _has_bits_[0] &= ~0x00000200u; + } + inline void UserStats::clear_tcp_ping_avg() + { + tcp_ping_avg_ = 0; + clear_has_tcp_ping_avg(); + } + inline float UserStats::tcp_ping_avg() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.tcp_ping_avg) + return tcp_ping_avg_; + } + inline void UserStats::set_tcp_ping_avg(float value) + { + set_has_tcp_ping_avg(); + tcp_ping_avg_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.tcp_ping_avg) + } + +// optional float tcp_ping_var = 11; + inline bool UserStats::has_tcp_ping_var() const + { + return (_has_bits_[0] & 0x00000400u) != 0; + } + inline void UserStats::set_has_tcp_ping_var() + { + _has_bits_[0] |= 0x00000400u; + } + inline void UserStats::clear_has_tcp_ping_var() + { + _has_bits_[0] &= ~0x00000400u; + } + inline void UserStats::clear_tcp_ping_var() + { + tcp_ping_var_ = 0; + clear_has_tcp_ping_var(); + } + inline float UserStats::tcp_ping_var() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.tcp_ping_var) + return tcp_ping_var_; + } + inline void UserStats::set_tcp_ping_var(float value) + { + set_has_tcp_ping_var(); + tcp_ping_var_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.tcp_ping_var) + } + +// optional .MumbleProto.Version version = 12; + inline bool UserStats::has_version() const + { + return (_has_bits_[0] & 0x00000800u) != 0; + } + inline void UserStats::set_has_version() + { + _has_bits_[0] |= 0x00000800u; + } + inline void UserStats::clear_has_version() + { + _has_bits_[0] &= ~0x00000800u; + } + inline void UserStats::clear_version() + { + if (version_ != NULL) version_->::MumbleProto::Version::Clear(); + clear_has_version(); + } + inline const ::MumbleProto::Version& UserStats::version() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.version) + return version_ != NULL ? *version_ : *default_instance_->version_; + } + inline ::MumbleProto::Version* UserStats::mutable_version() + { + set_has_version(); + if (version_ == NULL) version_ = new ::MumbleProto::Version; + // @@protoc_insertion_point(field_mutable:MumbleProto.UserStats.version) + return version_; + } + inline ::MumbleProto::Version* UserStats::release_version() + { + clear_has_version(); + ::MumbleProto::Version* temp = version_; + version_ = NULL; + return temp; + } + inline void UserStats::set_allocated_version(::MumbleProto::Version* version) + { + delete version_; + version_ = version; + if (version) + { + set_has_version(); + } + else + { + clear_has_version(); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.UserStats.version) + } + +// repeated int32 celt_versions = 13; + inline int UserStats::celt_versions_size() const + { + return celt_versions_.size(); + } + inline void UserStats::clear_celt_versions() + { + celt_versions_.Clear(); + } + inline ::google::protobuf::int32 UserStats::celt_versions(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.celt_versions) + return celt_versions_.Get(index); + } + inline void UserStats::set_celt_versions(int index, + ::google::protobuf::int32 value) + { + celt_versions_.Set(index, value); + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.celt_versions) + } + inline void UserStats::add_celt_versions(::google::protobuf::int32 value) + { + celt_versions_.Add(value); + // @@protoc_insertion_point(field_add:MumbleProto.UserStats.celt_versions) + } + inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + UserStats::celt_versions() const + { + // @@protoc_insertion_point(field_list:MumbleProto.UserStats.celt_versions) + return celt_versions_; + } + inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + UserStats::mutable_celt_versions() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.UserStats.celt_versions) + return &celt_versions_; + } + +// optional bytes address = 14; + inline bool UserStats::has_address() const + { + return (_has_bits_[0] & 0x00002000u) != 0; + } + inline void UserStats::set_has_address() + { + _has_bits_[0] |= 0x00002000u; + } + inline void UserStats::clear_has_address() + { + _has_bits_[0] &= ~0x00002000u; + } + inline void UserStats::clear_address() + { + if (address_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + address_->clear(); + } + clear_has_address(); + } + inline const ::std::string& UserStats::address() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.address) + return *address_; + } + inline void UserStats::set_address(const ::std::string& value) + { + set_has_address(); + if (address_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + address_ = new ::std::string; + } + address_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.address) + } + inline void UserStats::set_address(const char* value) + { + set_has_address(); + if (address_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + address_ = new ::std::string; + } + address_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.UserStats.address) + } + inline void UserStats::set_address(const void* value, size_t size) + { + set_has_address(); + if (address_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + address_ = new ::std::string; + } + address_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.UserStats.address) + } + inline ::std::string* UserStats::mutable_address() + { + set_has_address(); + if (address_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + address_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.UserStats.address) + return address_; + } + inline ::std::string* UserStats::release_address() + { + clear_has_address(); + if (address_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = address_; + address_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void UserStats::set_allocated_address(::std::string* address) + { + if (address_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete address_; + } + if (address) + { + set_has_address(); + address_ = address; + } + else + { + clear_has_address(); + address_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.UserStats.address) + } + +// optional uint32 bandwidth = 15; + inline bool UserStats::has_bandwidth() const + { + return (_has_bits_[0] & 0x00004000u) != 0; + } + inline void UserStats::set_has_bandwidth() + { + _has_bits_[0] |= 0x00004000u; + } + inline void UserStats::clear_has_bandwidth() + { + _has_bits_[0] &= ~0x00004000u; + } + inline void UserStats::clear_bandwidth() + { + bandwidth_ = 0u; + clear_has_bandwidth(); + } + inline ::google::protobuf::uint32 UserStats::bandwidth() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.bandwidth) + return bandwidth_; + } + inline void UserStats::set_bandwidth(::google::protobuf::uint32 value) + { + set_has_bandwidth(); + bandwidth_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.bandwidth) + } + +// optional uint32 onlinesecs = 16; + inline bool UserStats::has_onlinesecs() const + { + return (_has_bits_[0] & 0x00008000u) != 0; + } + inline void UserStats::set_has_onlinesecs() + { + _has_bits_[0] |= 0x00008000u; + } + inline void UserStats::clear_has_onlinesecs() + { + _has_bits_[0] &= ~0x00008000u; + } + inline void UserStats::clear_onlinesecs() + { + onlinesecs_ = 0u; + clear_has_onlinesecs(); + } + inline ::google::protobuf::uint32 UserStats::onlinesecs() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.onlinesecs) + return onlinesecs_; + } + inline void UserStats::set_onlinesecs(::google::protobuf::uint32 value) + { + set_has_onlinesecs(); + onlinesecs_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.onlinesecs) + } + +// optional uint32 idlesecs = 17; + inline bool UserStats::has_idlesecs() const + { + return (_has_bits_[0] & 0x00010000u) != 0; + } + inline void UserStats::set_has_idlesecs() + { + _has_bits_[0] |= 0x00010000u; + } + inline void UserStats::clear_has_idlesecs() + { + _has_bits_[0] &= ~0x00010000u; + } + inline void UserStats::clear_idlesecs() + { + idlesecs_ = 0u; + clear_has_idlesecs(); + } + inline ::google::protobuf::uint32 UserStats::idlesecs() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.idlesecs) + return idlesecs_; + } + inline void UserStats::set_idlesecs(::google::protobuf::uint32 value) + { + set_has_idlesecs(); + idlesecs_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.idlesecs) + } + +// optional bool strong_certificate = 18 [default = false]; + inline bool UserStats::has_strong_certificate() const + { + return (_has_bits_[0] & 0x00020000u) != 0; + } + inline void UserStats::set_has_strong_certificate() + { + _has_bits_[0] |= 0x00020000u; + } + inline void UserStats::clear_has_strong_certificate() + { + _has_bits_[0] &= ~0x00020000u; + } + inline void UserStats::clear_strong_certificate() + { + strong_certificate_ = false; + clear_has_strong_certificate(); + } + inline bool UserStats::strong_certificate() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.strong_certificate) + return strong_certificate_; + } + inline void UserStats::set_strong_certificate(bool value) + { + set_has_strong_certificate(); + strong_certificate_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.strong_certificate) + } + +// optional bool opus = 19 [default = false]; + inline bool UserStats::has_opus() const + { + return (_has_bits_[0] & 0x00040000u) != 0; + } + inline void UserStats::set_has_opus() + { + _has_bits_[0] |= 0x00040000u; + } + inline void UserStats::clear_has_opus() + { + _has_bits_[0] &= ~0x00040000u; + } + inline void UserStats::clear_opus() + { + opus_ = false; + clear_has_opus(); + } + inline bool UserStats::opus() const + { + // @@protoc_insertion_point(field_get:MumbleProto.UserStats.opus) + return opus_; + } + inline void UserStats::set_opus(bool value) + { + set_has_opus(); + opus_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.UserStats.opus) + } + +// ------------------------------------------------------------------- + +// RequestBlob + +// repeated uint32 session_texture = 1; + inline int RequestBlob::session_texture_size() const + { + return session_texture_.size(); + } + inline void RequestBlob::clear_session_texture() + { + session_texture_.Clear(); + } + inline ::google::protobuf::uint32 RequestBlob::session_texture(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.RequestBlob.session_texture) + return session_texture_.Get(index); + } + inline void RequestBlob::set_session_texture(int index, + ::google::protobuf::uint32 value) + { + session_texture_.Set(index, value); + // @@protoc_insertion_point(field_set:MumbleProto.RequestBlob.session_texture) + } + inline void RequestBlob::add_session_texture(::google::protobuf::uint32 value) + { + session_texture_.Add(value); + // @@protoc_insertion_point(field_add:MumbleProto.RequestBlob.session_texture) + } + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + RequestBlob::session_texture() const + { + // @@protoc_insertion_point(field_list:MumbleProto.RequestBlob.session_texture) + return session_texture_; + } + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + RequestBlob::mutable_session_texture() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.RequestBlob.session_texture) + return &session_texture_; + } + +// repeated uint32 session_comment = 2; + inline int RequestBlob::session_comment_size() const + { + return session_comment_.size(); + } + inline void RequestBlob::clear_session_comment() + { + session_comment_.Clear(); + } + inline ::google::protobuf::uint32 RequestBlob::session_comment(int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.RequestBlob.session_comment) + return session_comment_.Get(index); + } + inline void RequestBlob::set_session_comment(int index, + ::google::protobuf::uint32 value) + { + session_comment_.Set(index, value); + // @@protoc_insertion_point(field_set:MumbleProto.RequestBlob.session_comment) + } + inline void RequestBlob::add_session_comment(::google::protobuf::uint32 value) + { + session_comment_.Add(value); + // @@protoc_insertion_point(field_add:MumbleProto.RequestBlob.session_comment) + } + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + RequestBlob::session_comment() const + { + // @@protoc_insertion_point(field_list:MumbleProto.RequestBlob.session_comment) + return session_comment_; + } + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + RequestBlob::mutable_session_comment() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.RequestBlob.session_comment) + return &session_comment_; + } + +// repeated uint32 channel_description = 3; + inline int RequestBlob::channel_description_size() const + { + return channel_description_.size(); + } + inline void RequestBlob::clear_channel_description() + { + channel_description_.Clear(); + } + inline ::google::protobuf::uint32 RequestBlob::channel_description( + int index) const + { + // @@protoc_insertion_point(field_get:MumbleProto.RequestBlob.channel_description) + return channel_description_.Get(index); + } + inline void RequestBlob::set_channel_description(int index, + ::google::protobuf::uint32 value) + { + channel_description_.Set(index, value); + // @@protoc_insertion_point(field_set:MumbleProto.RequestBlob.channel_description) + } + inline void RequestBlob::add_channel_description(::google::protobuf::uint32 + value) + { + channel_description_.Add(value); + // @@protoc_insertion_point(field_add:MumbleProto.RequestBlob.channel_description) + } + inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >& + RequestBlob::channel_description() const + { + // @@protoc_insertion_point(field_list:MumbleProto.RequestBlob.channel_description) + return channel_description_; + } + inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >* + RequestBlob::mutable_channel_description() + { + // @@protoc_insertion_point(field_mutable_list:MumbleProto.RequestBlob.channel_description) + return &channel_description_; + } + +// ------------------------------------------------------------------- + +// ServerConfig + +// optional uint32 max_bandwidth = 1; + inline bool ServerConfig::has_max_bandwidth() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void ServerConfig::set_has_max_bandwidth() + { + _has_bits_[0] |= 0x00000001u; + } + inline void ServerConfig::clear_has_max_bandwidth() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void ServerConfig::clear_max_bandwidth() + { + max_bandwidth_ = 0u; + clear_has_max_bandwidth(); + } + inline ::google::protobuf::uint32 ServerConfig::max_bandwidth() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ServerConfig.max_bandwidth) + return max_bandwidth_; + } + inline void ServerConfig::set_max_bandwidth(::google::protobuf::uint32 value) + { + set_has_max_bandwidth(); + max_bandwidth_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ServerConfig.max_bandwidth) + } + +// optional string welcome_text = 2; + inline bool ServerConfig::has_welcome_text() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void ServerConfig::set_has_welcome_text() + { + _has_bits_[0] |= 0x00000002u; + } + inline void ServerConfig::clear_has_welcome_text() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void ServerConfig::clear_welcome_text() + { + if (welcome_text_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + welcome_text_->clear(); + } + clear_has_welcome_text(); + } + inline const ::std::string& ServerConfig::welcome_text() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ServerConfig.welcome_text) + return *welcome_text_; + } + inline void ServerConfig::set_welcome_text(const ::std::string& value) + { + set_has_welcome_text(); + if (welcome_text_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + welcome_text_ = new ::std::string; + } + welcome_text_->assign(value); + // @@protoc_insertion_point(field_set:MumbleProto.ServerConfig.welcome_text) + } + inline void ServerConfig::set_welcome_text(const char* value) + { + set_has_welcome_text(); + if (welcome_text_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + welcome_text_ = new ::std::string; + } + welcome_text_->assign(value); + // @@protoc_insertion_point(field_set_char:MumbleProto.ServerConfig.welcome_text) + } + inline void ServerConfig::set_welcome_text(const char* value, size_t size) + { + set_has_welcome_text(); + if (welcome_text_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + welcome_text_ = new ::std::string; + } + welcome_text_->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:MumbleProto.ServerConfig.welcome_text) + } + inline ::std::string* ServerConfig::mutable_welcome_text() + { + set_has_welcome_text(); + if (welcome_text_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + welcome_text_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:MumbleProto.ServerConfig.welcome_text) + return welcome_text_; + } + inline ::std::string* ServerConfig::release_welcome_text() + { + clear_has_welcome_text(); + if (welcome_text_ == + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + return NULL; + } + else + { + ::std::string* temp = welcome_text_; + welcome_text_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } + } + inline void ServerConfig::set_allocated_welcome_text(::std::string* + welcome_text) + { + if (welcome_text_ != + &::google::protobuf::internal::GetEmptyStringAlreadyInited()) + { + delete welcome_text_; + } + if (welcome_text) + { + set_has_welcome_text(); + welcome_text_ = welcome_text; + } + else + { + clear_has_welcome_text(); + welcome_text_ = const_cast< ::std::string*> + (&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:MumbleProto.ServerConfig.welcome_text) + } + +// optional bool allow_html = 3; + inline bool ServerConfig::has_allow_html() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void ServerConfig::set_has_allow_html() + { + _has_bits_[0] |= 0x00000004u; + } + inline void ServerConfig::clear_has_allow_html() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void ServerConfig::clear_allow_html() + { + allow_html_ = false; + clear_has_allow_html(); + } + inline bool ServerConfig::allow_html() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ServerConfig.allow_html) + return allow_html_; + } + inline void ServerConfig::set_allow_html(bool value) + { + set_has_allow_html(); + allow_html_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ServerConfig.allow_html) + } + +// optional uint32 message_length = 4; + inline bool ServerConfig::has_message_length() const + { + return (_has_bits_[0] & 0x00000008u) != 0; + } + inline void ServerConfig::set_has_message_length() + { + _has_bits_[0] |= 0x00000008u; + } + inline void ServerConfig::clear_has_message_length() + { + _has_bits_[0] &= ~0x00000008u; + } + inline void ServerConfig::clear_message_length() + { + message_length_ = 0u; + clear_has_message_length(); + } + inline ::google::protobuf::uint32 ServerConfig::message_length() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ServerConfig.message_length) + return message_length_; + } + inline void ServerConfig::set_message_length(::google::protobuf::uint32 value) + { + set_has_message_length(); + message_length_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ServerConfig.message_length) + } + +// optional uint32 image_message_length = 5; + inline bool ServerConfig::has_image_message_length() const + { + return (_has_bits_[0] & 0x00000010u) != 0; + } + inline void ServerConfig::set_has_image_message_length() + { + _has_bits_[0] |= 0x00000010u; + } + inline void ServerConfig::clear_has_image_message_length() + { + _has_bits_[0] &= ~0x00000010u; + } + inline void ServerConfig::clear_image_message_length() + { + image_message_length_ = 0u; + clear_has_image_message_length(); + } + inline ::google::protobuf::uint32 ServerConfig::image_message_length() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ServerConfig.image_message_length) + return image_message_length_; + } + inline void ServerConfig::set_image_message_length(::google::protobuf::uint32 + value) + { + set_has_image_message_length(); + image_message_length_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ServerConfig.image_message_length) + } + +// optional uint32 max_users = 6; + inline bool ServerConfig::has_max_users() const + { + return (_has_bits_[0] & 0x00000020u) != 0; + } + inline void ServerConfig::set_has_max_users() + { + _has_bits_[0] |= 0x00000020u; + } + inline void ServerConfig::clear_has_max_users() + { + _has_bits_[0] &= ~0x00000020u; + } + inline void ServerConfig::clear_max_users() + { + max_users_ = 0u; + clear_has_max_users(); + } + inline ::google::protobuf::uint32 ServerConfig::max_users() const + { + // @@protoc_insertion_point(field_get:MumbleProto.ServerConfig.max_users) + return max_users_; + } + inline void ServerConfig::set_max_users(::google::protobuf::uint32 value) + { + set_has_max_users(); + max_users_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.ServerConfig.max_users) + } + +// ------------------------------------------------------------------- + +// SuggestConfig + +// optional uint32 version = 1; + inline bool SuggestConfig::has_version() const + { + return (_has_bits_[0] & 0x00000001u) != 0; + } + inline void SuggestConfig::set_has_version() + { + _has_bits_[0] |= 0x00000001u; + } + inline void SuggestConfig::clear_has_version() + { + _has_bits_[0] &= ~0x00000001u; + } + inline void SuggestConfig::clear_version() + { + version_ = 0u; + clear_has_version(); + } + inline ::google::protobuf::uint32 SuggestConfig::version() const + { + // @@protoc_insertion_point(field_get:MumbleProto.SuggestConfig.version) + return version_; + } + inline void SuggestConfig::set_version(::google::protobuf::uint32 value) + { + set_has_version(); + version_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.SuggestConfig.version) + } + +// optional bool positional = 2; + inline bool SuggestConfig::has_positional() const + { + return (_has_bits_[0] & 0x00000002u) != 0; + } + inline void SuggestConfig::set_has_positional() + { + _has_bits_[0] |= 0x00000002u; + } + inline void SuggestConfig::clear_has_positional() + { + _has_bits_[0] &= ~0x00000002u; + } + inline void SuggestConfig::clear_positional() + { + positional_ = false; + clear_has_positional(); + } + inline bool SuggestConfig::positional() const + { + // @@protoc_insertion_point(field_get:MumbleProto.SuggestConfig.positional) + return positional_; + } + inline void SuggestConfig::set_positional(bool value) + { + set_has_positional(); + positional_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.SuggestConfig.positional) + } + +// optional bool push_to_talk = 3; + inline bool SuggestConfig::has_push_to_talk() const + { + return (_has_bits_[0] & 0x00000004u) != 0; + } + inline void SuggestConfig::set_has_push_to_talk() + { + _has_bits_[0] |= 0x00000004u; + } + inline void SuggestConfig::clear_has_push_to_talk() + { + _has_bits_[0] &= ~0x00000004u; + } + inline void SuggestConfig::clear_push_to_talk() + { + push_to_talk_ = false; + clear_has_push_to_talk(); + } + inline bool SuggestConfig::push_to_talk() const + { + // @@protoc_insertion_point(field_get:MumbleProto.SuggestConfig.push_to_talk) + return push_to_talk_; + } + inline void SuggestConfig::set_push_to_talk(bool value) + { + set_has_push_to_talk(); + push_to_talk_ = value; + // @@protoc_insertion_point(field_set:MumbleProto.SuggestConfig.push_to_talk) + } + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace MumbleProto + +#ifndef SWIG +namespace google +{ + namespace protobuf + { + + template <> struct + is_proto_enum< ::MumbleProto::Reject_RejectType> : ::google::protobuf::internal::true_type {}; + template <> + inline const EnumDescriptor* + GetEnumDescriptor< ::MumbleProto::Reject_RejectType>() + { + return ::MumbleProto::Reject_RejectType_descriptor(); + } + template <> struct + is_proto_enum< ::MumbleProto::PermissionDenied_DenyType> : ::google::protobuf::internal::true_type {}; + template <> + inline const EnumDescriptor* + GetEnumDescriptor< ::MumbleProto::PermissionDenied_DenyType>() + { + return ::MumbleProto::PermissionDenied_DenyType_descriptor(); + } + template <> struct + is_proto_enum< ::MumbleProto::ContextActionModify_Context> : ::google::protobuf::internal::true_type {}; + template <> + inline const EnumDescriptor* + GetEnumDescriptor< ::MumbleProto::ContextActionModify_Context>() + { + return ::MumbleProto::ContextActionModify_Context_descriptor(); + } + template <> struct + is_proto_enum< ::MumbleProto::ContextActionModify_Operation> : ::google::protobuf::internal::true_type {}; + template <> + inline const EnumDescriptor* + GetEnumDescriptor< ::MumbleProto::ContextActionModify_Operation>() + { + return ::MumbleProto::ContextActionModify_Operation_descriptor(); + } + + } // namespace google +} // namespace protobuf +#endif // SWIG + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_Mumble_2eproto__INCLUDED diff --git a/src/mumble/Mumble.proto b/src/mumble/Mumble.proto new file mode 100644 index 0000000..8395353 --- /dev/null +++ b/src/mumble/Mumble.proto @@ -0,0 +1,561 @@ +// Copyright 2005-2016 The Mumble Developers. All rights reserved. +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file at the root of the +// Mumble source tree or at . + +package MumbleProto; + +option optimize_for = SPEED; + +message Version { + // 2-byte Major, 1-byte Minor and 1-byte Patch version number. + optional uint32 version = 1; + // Client release name. + optional string release = 2; + // Client OS name. + optional string os = 3; + // Client OS version. + optional string os_version = 4; +} + +// Not used. Not even for tunneling UDP through TCP. +message UDPTunnel { + // Not used. + required bytes packet = 1; +} + +// Used by the client to send the authentication credentials to the server. +message Authenticate { + // UTF-8 encoded username. + optional string username = 1; + // Server or user password. + optional string password = 2; + // Additional access tokens for server ACL groups. + repeated string tokens = 3; + // A list of CELT bitstream version constants supported by the client. + repeated int32 celt_versions = 4; + optional bool opus = 5 [default = false]; +} + +// Sent by the client to notify the server that the client is still alive. +// Server must reply to the packet with the same timestamp and its own +// good/late/lost/resync numbers. None of the fields is strictly required. +message Ping { + // Client timestamp. Server should not attempt to decode. + optional uint64 timestamp = 1; + // The amount of good packets received. + optional uint32 good = 2; + // The amount of late packets received. + optional uint32 late = 3; + // The amount of packets never received. + optional uint32 lost = 4; + // The amount of nonce resyncs. + optional uint32 resync = 5; + // The total amount of UDP packets received. + optional uint32 udp_packets = 6; + // The total amount of TCP packets received. + optional uint32 tcp_packets = 7; + // UDP ping average. + optional float udp_ping_avg = 8; + // UDP ping variance. + optional float udp_ping_var = 9; + // TCP ping average. + optional float tcp_ping_avg = 10; + // TCP ping variance. + optional float tcp_ping_var = 11; +} + +// Sent by the server when it rejects the user connection. +message Reject { + enum RejectType { + // The rejection reason is unknown (details should be available + // in Reject.reason). + None = 0; + // The client attempted to connect with an incompatible version. + WrongVersion = 1; + // The user name supplied by the client was invalid. + InvalidUsername = 2; + // The client attempted to authenticate as a user with a password but it + // was wrong. + WrongUserPW = 3; + // The client attempted to connect to a passworded server but the password + // was wrong. + WrongServerPW = 4; + // Supplied username is already in use. + UsernameInUse = 5; + // Server is currently full and cannot accept more users. + ServerFull = 6; + // The user did not provide a certificate but one is required. + NoCertificate = 7; + AuthenticatorFail = 8; + } + // Rejection type. + optional RejectType type = 1; + // Human readable rejection reason. + optional string reason = 2; +} + +// ServerSync message is sent by the server when it has authenticated the user +// and finished synchronizing the server state. +message ServerSync { + // The session of the current user. + optional uint32 session = 1; + // Maximum bandwidth that the user should use. + optional uint32 max_bandwidth = 2; + // Server welcome text. + optional string welcome_text = 3; + // Current user permissions in the root channel. + optional uint64 permissions = 4; +} + +// Sent by the client when it wants a channel removed. Sent by the server when +// a channel has been removed and clients should be notified. +message ChannelRemove { + required uint32 channel_id = 1; +} + +// Used to communicate channel properties between the client and the server. +// Sent by the server during the login process or when channel properties are +// updated. Client may use this message to update said channel properties. +message ChannelState { + // Unique ID for the channel within the server. + optional uint32 channel_id = 1; + // channel_id of the parent channel. + optional uint32 parent = 2; + // UTF-8 encoded channel name. + optional string name = 3; + // A collection of channel id values of the linked channels. Absent during + // the first channel listing. + repeated uint32 links = 4; + // UTF-8 encoded channel description. Only if the description is less than + // 128 bytes + optional string description = 5; + // A collection of channel_id values that should be added to links. + repeated uint32 links_add = 6; + // A collection of channel_id values that should be removed from links. + repeated uint32 links_remove = 7; + // True if the channel is temporary. + optional bool temporary = 8 [default = false]; + // Position weight to tweak the channel position in the channel list. + optional int32 position = 9 [default = 0]; + // SHA1 hash of the description if the description is 128 bytes or more. + optional bytes description_hash = 10; + // Maximum number of users allowed in the channel. If this value is zero, + // the maximum number of users allowed in the channel is given by the + // server's "usersperchannel" setting. + optional uint32 max_users = 11; +} + +// Used to communicate user leaving or being kicked. May be sent by the client +// when it attempts to kick a user. Sent by the server when it informs the +// clients that a user is not present anymore. +message UserRemove { + // The user who is being kicked, identified by their session, not present + // when no one is being kicked. + required uint32 session = 1; + // The user who initiated the removal. Either the user who performs the kick + // or the user who is currently leaving. + optional uint32 actor = 2; + // Reason for the kick, stored as the ban reason if the user is banned. + optional string reason = 3; + // True if the kick should result in a ban. + optional bool ban = 4; +} + +// Sent by the server when it communicates new and changed users to client. +// First seen during login procedure. May be sent by the client when it wishes +// to alter its state. +message UserState { + // Unique user session ID of the user whose state this is, may change on + // reconnect. + optional uint32 session = 1; + // The session of the user who is updating this user. + optional uint32 actor = 2; + // User name, UTF-8 encoded. + optional string name = 3; + // Registered user ID if the user is registered. + optional uint32 user_id = 4; + // Channel on which the user is. + optional uint32 channel_id = 5; + // True if the user is muted by admin. + optional bool mute = 6; + // True if the user is deafened by admin. + optional bool deaf = 7; + // True if the user has been suppressed from talking by a reason other than + // being muted. + optional bool suppress = 8; + // True if the user has muted self. + optional bool self_mute = 9; + // True if the user has deafened self. + optional bool self_deaf = 10; + // User image if it is less than 128 bytes. + optional bytes texture = 11; + // The positional audio plugin identifier. + // Positional audio information is only sent to users who share + // identical plugin contexts. + // + // This value is not trasmitted to clients. + optional bytes plugin_context = 12; + // The user's plugin-specific identity. + // This value is not transmitted to clients. + optional string plugin_identity = 13; + // User comment if it is less than 128 bytes. + optional string comment = 14; + // The hash of the user certificate. + optional string hash = 15; + // SHA1 hash of the user comment if it 128 bytes or more. + optional bytes comment_hash = 16; + // SHA1 hash of the user picture if it 128 bytes or more. + optional bytes texture_hash = 17; + // True if the user is a priority speaker. + optional bool priority_speaker = 18; + // True if the user is currently recording. + optional bool recording = 19; +} + +// Relays information on the bans. The client may send the BanList message to +// either modify the list of bans or query them from the server. The server +// sends this list only after a client queries for it. +message BanList { + message BanEntry { + // Banned IP address. + required bytes address = 1; + // The length of the subnet mask for the ban. + required uint32 mask = 2; + // User name for identification purposes (does not affect the ban). + optional string name = 3; + // The certificate hash of the banned user. + optional string hash = 4; + // Reason for the ban (does not affect the ban). + optional string reason = 5; + // Ban start time. + optional string start = 6; + // Ban duration in seconds. + optional uint32 duration = 7; + } + // List of ban entries currently in place. + repeated BanEntry bans = 1; + // True if the server should return the list, false if it should replace old + // ban list with the one provided. + optional bool query = 2 [default = false]; +} + +// Used to send and broadcast text messages. +message TextMessage { + // The message sender, identified by its session. + optional uint32 actor = 1; + // Target users for the message, identified by their session. + repeated uint32 session = 2; + // The channels to which the message is sent, identified by their + // channel_ids. + repeated uint32 channel_id = 3; + // The root channels when sending message recursively to several channels, + // identified by their channel_ids. + repeated uint32 tree_id = 4; + // The UTF-8 encoded message. May be HTML if the server allows. + required string message = 5; +} + +message PermissionDenied { + enum DenyType { + // Operation denied for other reason, see reason field. + Text = 0; + // Permissions were denied. + Permission = 1; + // Cannot modify SuperUser. + SuperUser = 2; + // Invalid channel name. + ChannelName = 3; + // Text message too long. + TextTooLong = 4; + // The flux capacitor was spelled wrong. + H9K = 5; + // Operation not permitted in temporary channel. + TemporaryChannel = 6; + // Operation requires certificate. + MissingCertificate = 7; + // Invalid username. + UserName = 8; + // Channel is full. + ChannelFull = 9; + NestingLimit = 10; + } + // The denied permission when type is Permission. + optional uint32 permission = 1; + // channel_id for the channel where the permission was denied when type is + // Permission. + optional uint32 channel_id = 2; + // The user who was denied permissions, identified by session. + optional uint32 session = 3; + // Textual reason for the denial. + optional string reason = 4; + // Type of the denial. + optional DenyType type = 5; + // The name that is invalid when type is UserName. + optional string name = 6; +} + +message ACL { + message ChanGroup { + // Name of the channel group, UTF-8 encoded. + required string name = 1; + // True if the group has been inherited from the parent (Read only). + optional bool inherited = 2 [default = true]; + // True if the group members are inherited. + optional bool inherit = 3 [default = true]; + // True if the group can be inherited by sub channels. + optional bool inheritable = 4 [default = true]; + // Users explicitly included in this group, identified by user_id. + repeated uint32 add = 5; + // Users explicitly removed from this group in this channel if the group + // has been inherited, identified by user_id. + repeated uint32 remove = 6; + // Users inherited, identified by user_id. + repeated uint32 inherited_members = 7; + } + message ChanACL { + // True if this ACL applies to the current channel. + optional bool apply_here = 1 [default = true]; + // True if this ACL applies to the sub channels. + optional bool apply_subs = 2 [default = true]; + // True if the ACL has been inherited from the parent. + optional bool inherited = 3 [default = true]; + // ID of the user that is affected by this ACL. + optional uint32 user_id = 4; + // ID of the group that is affected by this ACL. + optional string group = 5; + // Bit flag field of the permissions granted by this ACL. + optional uint32 grant = 6; + // Bit flag field of the permissions denied by this ACL. + optional uint32 deny = 7; + } + // Channel ID of the channel this message affects. + required uint32 channel_id = 1; + // True if the channel inherits its parent's ACLs. + optional bool inherit_acls = 2 [default = true]; + // User group specifications. + repeated ChanGroup groups = 3; + // ACL specifications. + repeated ChanACL acls = 4; + // True if the message is a query for ACLs instead of setting them. + optional bool query = 5 [default = false]; +} + +// Client may use this message to refresh its registered user information. The +// client should fill the IDs or Names of the users it wants to refresh. The +// server fills the missing parts and sends the message back. +message QueryUsers { + // user_ids. + repeated uint32 ids = 1; + // User names in the same order as ids. + repeated string names = 2; +} + +// Used to initialize and resync the UDP encryption. Either side may request a +// resync by sending the message without any values filled. The resync is +// performed by sending the message with only the client or server nonce +// filled. +message CryptSetup { + // Encryption key. + optional bytes key = 1; + // Client nonce. + optional bytes client_nonce = 2; + // Server nonce. + optional bytes server_nonce = 3; +} + +message ContextActionModify { + enum Context { + // Action is applicable to the server. + Server = 0x01; + // Action can target a Channel. + Channel = 0x02; + // Action can target a User. + User = 0x04; + } + enum Operation { + Add = 0; + Remove = 1; + } + // The action name. + required string action = 1; + // The display name of the action. + optional string text = 2; + // Context bit flags defining where the action should be displayed. + optional uint32 context = 3; + optional Operation operation = 4; +} + +// Sent by the client when it wants to initiate a Context action. +message ContextAction { + // The target User for the action, identified by session. + optional uint32 session = 1; + // The target Channel for the action, identified by channel_id. + optional uint32 channel_id = 2; + // The action that should be executed. + required string action = 3; +} + +// Lists the registered users. +message UserList { + message User { + // Registered user ID. + required uint32 user_id = 1; + // Registered user name. + optional string name = 2; + optional string last_seen = 3; + optional uint32 last_channel = 4; + } + // A list of registered users. + repeated User users = 1; +} + +// Sent by the client when it wants to register or clear whisper targets. +// +// Note: The first available target ID is 1 as 0 is reserved for normal +// talking. Maximum target ID is 30. +message VoiceTarget { + message Target { + // Users that are included as targets. + repeated uint32 session = 1; + // Channel that is included as a target. + optional uint32 channel_id = 2; + // ACL group that is included as a target. + optional string group = 3; + // True if the voice should follow links from the specified channel. + optional bool links = 4 [default = false]; + // True if the voice should also be sent to children of the specific + // channel. + optional bool children = 5 [default = false]; + } + // Voice target ID. + optional uint32 id = 1; + // The receivers that this voice target includes. + repeated Target targets = 2; +} + +// Sent by the client when it wants permissions for a certain channel. Sent by +// the server when it replies to the query or wants the user to resync all +// channel permissions. +message PermissionQuery { + // channel_id of the channel for which the permissions are queried. + optional uint32 channel_id = 1; + // Channel permissions. + optional uint32 permissions = 2; + // True if the client should drop its current permission information for all + // channels. + optional bool flush = 3 [default = false]; +} + +// Sent by the server to notify the users of the version of the CELT codec they +// should use. This may change during the connection when new users join. +message CodecVersion { + // The version of the CELT Alpha codec. + required int32 alpha = 1; + // The version of the CELT Beta codec. + required int32 beta = 2; + // True if the user should prefer Alpha over Beta. + required bool prefer_alpha = 3 [default = true]; + optional bool opus = 4 [default = false]; +} + +// Used to communicate user stats between the server and clients. +message UserStats { + message Stats { + // The amount of good packets received. + optional uint32 good = 1; + // The amount of late packets received. + optional uint32 late = 2; + // The amount of packets never received. + optional uint32 lost = 3; + // The amount of nonce resyncs. + optional uint32 resync = 4; + } + + // User whose stats these are. + optional uint32 session = 1; + // True if the message contains only mutable stats (packets, ping). + optional bool stats_only = 2 [default = false]; + // Full user certificate chain of the user certificate in DER format. + repeated bytes certificates = 3; + // Packet statistics for packets received from the client. + optional Stats from_client = 4; + // Packet statistics for packets sent by the server. + optional Stats from_server = 5; + + // Amount of UDP packets sent. + optional uint32 udp_packets = 6; + // Amount of TCP packets sent. + optional uint32 tcp_packets = 7; + // UDP ping average. + optional float udp_ping_avg = 8; + // UDP ping variance. + optional float udp_ping_var = 9; + // TCP ping average. + optional float tcp_ping_avg = 10; + // TCP ping variance. + optional float tcp_ping_var = 11; + + // Client version. + optional Version version = 12; + // A list of CELT bitstream version constants supported by the client of this + // user. + repeated int32 celt_versions = 13; + // Client IP address. + optional bytes address = 14; + // Bandwith used by this client. + optional uint32 bandwidth = 15; + // Connection duration. + optional uint32 onlinesecs = 16; + // Duration since last activity. + optional uint32 idlesecs = 17; + // True if the user has a strong certificate. + optional bool strong_certificate = 18 [default = false]; + optional bool opus = 19 [default = false]; +} + +// Used by the client to request binary data from the server. By default large +// comments or textures are not sent within standard messages but instead the +// hash is. If the client does not recognize the hash it may request the +// resource when it needs it. The client does so by sending a RequestBlob +// message with the correct fields filled with the user sessions or channel_ids +// it wants to receive. The server replies to this by sending a new +// UserState/ChannelState message with the resources filled even if they would +// normally be transmitted as hashes. +message RequestBlob { + // sessions of the requested UserState textures. + repeated uint32 session_texture = 1; + // sessions of the requested UserState comments. + repeated uint32 session_comment = 2; + // channel_ids of the requested ChannelState descriptions. + repeated uint32 channel_description = 3; +} + +// Sent by the server when it informs the clients on server configuration +// details. +message ServerConfig { + // The maximum bandwidth the clients should use. + optional uint32 max_bandwidth = 1; + // Server welcome text. + optional string welcome_text = 2; + // True if the server allows HTML. + optional bool allow_html = 3; + // Maximum text message length. + optional uint32 message_length = 4; + // Maximum image message length. + optional uint32 image_message_length = 5; + // The maximum number of users allowed on the server. + optional uint32 max_users = 6; +} + +// Sent by the server to inform the clients of suggested client configuration +// specified by the server administrator. +message SuggestConfig { + // Suggested client version. + optional uint32 version = 1; + // True if the administrator suggests positional audio to be used on this + // server. + optional bool positional = 2; + // True if the administrator suggests push to talk to be used on this server. + optional bool push_to_talk = 3; +} diff --git a/src/mumble/audio-player.cc b/src/mumble/audio-player.cc new file mode 100644 index 0000000..51aaf8b --- /dev/null +++ b/src/mumble/audio-player.cc @@ -0,0 +1,290 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 dafoxia + Copyright (c) 2014 niko20010 + Copyright (c) 2015 dafoxia + Copyright (c) 2015 loscoala + Copyright (c) 2016 dafoxia + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "mumble/audio-player.hh" +#include "mumble/udp-packet.hh" + +namespace Mumble +{ + namespace wav = WaveFile; + // namespace pa = PortAudio; + + AudioPlayer::AudioPlayer (Codec codec, Connection &connection, + size_t sample_rate, size_t bitrate) + : m_conn (connection), + /* m_wav_format (wav::Format (wav::Channels::mono, wav::SampleFormat::pcm_16, + static_cast (sample_rate))),*/ + m_codec (codec), m_bitrate (bitrate), m_sample_rate (sample_rate), + m_framesize (COMPRESSED_SIZE * 10) + { + create_encoder (m_sample_rate, m_bitrate); + } + + AudioPlayer::~AudioPlayer () + { + m_bounded_produce_thread.join (); + // kill_threads () + } + + void AudioPlayer::codec (Codec val) + { + m_codec = val; + create_encoder (m_sample_rate, m_bitrate); + } + + void AudioPlayer::play_file (const std::string &file) + { + (void) file; + throw std::string ("not fully implemented yet"); + /* + if (!m_playing) + { + m_file = std::make_unique (file, m_wav_format); + m_bounded_produce_thread = std::thread ([this] () + { + bounded_produce (); + }); + m_playing = true; + } + */ + } + + void AudioPlayer::stream_named_pipe (const std::string &file) + { + if (!m_playing) + { + m_file = std::make_unique (file); + m_bounded_produce_thread = std::thread ([this] () + { + bounded_produce (); + }); + m_playing = true; + } + } + + bool AudioPlayer::stream_portaudio () + { + return false; + /* + require 'ruby-portaudio' + PortAudio.init + unless playing? + @portaudio = pa::Stream.open( :sample_rate => 48000, :frames => 8192, :input => { :device => PortAudio::Device.default_input, :channels => 1, :sample_format => :int16, :suggested_latency => 0.05 }) + @audiobuffer = pa::SampleBuffer.new( :format => :float32, :channels => 1, :frames => @framesize) + @portaudio.start + spawn_threads :portaudio + @playing = true + end + true + rescue + # no portaudio installed - no streaming possible + false + end + */ + } + + void AudioPlayer::stop () + { + if (m_playing) + { + // kill_threads (); + m_encoder->reset (); + if (!m_file->closed ()) + { + m_file->close (); + } + /* + if (!m_portaudio.stopped ()) + { + m_portaudio.stop (); + } + */ + m_playing = false; + m_bounded_produce_thread.join (); + } + } + + void AudioPlayer::bitrate (size_t val) + { + if (!(m_codec == Codec::alpha || m_codec == Codec::beta)) + { + try + { + m_encoder->bitrate (val); + m_bitrate = val; + } + catch (...) + { + } + } + } + + void AudioPlayer::framelength (std::chrono::milliseconds ms) + { + using namespace std::chrono_literals; + double framelength; + if (ms >= 1ms && ms <= 4ms) + { + framelength = 2.5; + } + else if (ms > 4ms && ms <= 14ms) + { + framelength = 10.f; + } + else if (ms > 14ms && ms <= 30ms) + { + framelength = 20.f; + } + else if (ms > 30ms && ms <= 45ms) + { + framelength = 40.f; + } + else + { + framelength = 60.f; + } + m_framesize = COMPRESSED_SIZE * framelength; + try + { + m_encoder->frame_size (m_framesize); + /* + if (!m_portaudio.stopped ()) + { + m_audiobuffer = std::make_unique (pa::Format::float32, 1, m_framesize); + } + */ + } + catch (...) + { + } + } + + void AudioPlayer::create_encoder (size_t sample_rate, size_t bitrate) + { + // kill_threads (); + m_encoder = nullptr; + + if (m_codec == Codec::alpha || m_codec == Codec::beta) + { + /* + m_encoder = Celt::Encoder (sample_rate, sample_rate / 100, 1, + clamp (bitrate / 800, 0, 127)); + m_encoder.vbr_rate (bitrate); + m_encoder.prediction_request (false); + */ + } + else + { + // TODO: check over valid sample_rates (see opus-constants.h) + assert (sample_rate == 48'000 /*'*/); + m_encoder = std::make_unique + (static_cast (sample_rate), m_framesize, Opus::Channels::mono, + 7200); + m_encoder->bitrate (bitrate); + // constrainted vbr doesn't work with Opus::Signal::voice + m_encoder->signal (Opus::Signal::music); + m_encoder->vbr (true); + m_encoder->vbr_constraint (true); + m_encoder->packet_loss_percentage (10); + m_encoder->dtx (true); + } + } + + std::vector AudioPlayer::change_volume (const std::vector + &samples) + { + std::vector v; + for (const auto &s : samples) + { + //std::transform (std::begin (samples), std::end (samples), + // std::back_inserter (v), + // [this] (int16_t s) + //{ + // return s * (m_volume / 100.0); + //}); + v.push_back (s * (m_volume / 100.0)); + } + return v; + } + + void AudioPlayer::bounded_produce () + { + // TODO: Check if frame_size is in bytes or in samples + m_file->each_buffer (m_encoder->frame_size (), [this] (const auto &samples) + { + this->encode_samples (samples); + this->consume (); + return this->m_playing; + }); + m_playing = false; + } + + void AudioPlayer::produce () + { + // TODO: Check if frame_size is in bytes or in samples + encode_samples (m_file->read (m_encoder->frame_size ())); + consume (); + } + + void AudioPlayer::portaudio () + { + /* + begin + @portaudio.read(@audiobuffer) + @queue << @encoder.encode_ptr(@audiobuffer.to_ptr) + consume + rescue + sleep 0.2 + end + */ + } + + void AudioPlayer::encode_samples (const std::vector &samples) + { + if (m_volume == 100) + { + m_queue.push (m_encoder->encode (samples)); + } + else + { + m_queue.push (m_encoder->encode (change_volume (samples))); + } + } + + void AudioPlayer::consume (void) + { + m_seq %= 1'000'000; + m_seq++; + + auto frame = m_queue.front (); + m_queue.pop (); + + UDPPacket packet; + packet.type = m_codec; + packet.target = 0; + packet.sequence_number = m_seq; + packet.payload = frame; + m_conn.send_udp_packet (packet.data (m_pds)); + } +} diff --git a/src/mumble/audio-player.hh b/src/mumble/audio-player.hh new file mode 100644 index 0000000..e2ad467 --- /dev/null +++ b/src/mumble/audio-player.hh @@ -0,0 +1,103 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 dafoxia + Copyright (c) 2014 niko20010 + Copyright (c) 2015 dafoxia + Copyright (c) 2015 loscoala + Copyright (c) 2016 dafoxia + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include +#include +#include +#include + +#include "io/sample-reader.hh" +#include "io/raw-s16le-file-sample-reader.hh" +#include "mumble/connection.hh" +#include "io/wavefile-format.hh" +#include "io/wavefile-reader.hh" +#include "opus/encoder.hh" +#include "mumble/codec.hh" +#include "mumble/packet-data-stream.hh" + +namespace Mumble +{ + class AudioPlayer + { + private: + int m_volume = 100; + bool m_playing = false; + Connection &m_conn; + // WaveFile::Format m_wav_format; + Codec m_codec; + size_t m_bitrate; + size_t m_sample_rate; + size_t m_framesize; + std::unique_ptr m_file; + std::thread m_bounded_produce_thread; + std::unique_ptr m_encoder; + uint32_t m_seq = 0; + std::queue> m_queue; + PacketDataStream m_pds; + public: + static const int COMPRESSED_SIZE = 48; + AudioPlayer (Codec codec, Connection &connection, size_t sample_rate, + size_t bitrate); + ~AudioPlayer(); + void codec (Codec val); + inline void volume (int vol) + { + m_volume = vol; + } + inline int volume () const + { + return m_volume; + } + inline bool playing () const + { + return m_playing; + } + void play_file (const std::string &file); + void stream_named_pipe (const std::string &pipe); + bool stream_portaudio (); + void stop (); + void bitrate (size_t bitrate); + inline int bitrate () const + { + return m_bitrate; + } + void framelength (const std::chrono::milliseconds ms); + inline std::chrono::milliseconds framelength () + { + return std::chrono::milliseconds (m_framesize / COMPRESSED_SIZE); + } + private: + void create_encoder (size_t sample_rate, size_t bitrate); + std::vector change_volume (const std::vector &samples); + void bounded_produce (); + void produce (); + void portaudio (); + void encode_samples (const std::vector &samples); + void consume (); + }; +} + diff --git a/src/mumble/audio-recorder.cc b/src/mumble/audio-recorder.cc new file mode 100644 index 0000000..3f9a907 --- /dev/null +++ b/src/mumble/audio-recorder.cc @@ -0,0 +1,166 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 dafoxia + Copyright (c) 2014 niko20010 + Copyright (c) 2015 dafoxia + Copyright (c) 2016 dafoxia + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "mumble/audio-recorder.hh" + +namespace Mumble +{ + AudioRecorder::AudioRecorder (ClientIntf &client, size_t sample_rate) + : m_client (client), m_sample_rate ( + sample_rate) /* m_wav_format (WaveFile::Format (mono, pcm_16, sample_rate)) */ + { + } + + void AudioRecorder::stream_portaudio () + { + /* + PortAudio.init + unless !recording? + @portaudio = PortAudio::Stream.open( :sample_rate => 48000, :frames => 8192, :output => { :device => PortAudio::Device.default_output, :channels => 1, :sample_format => :int16, :suggested_latency => 0.25 }) + @audiobuffer = PortAudio::SampleBuffer.new(:format => :int16, :channels => 1, :frames => 8192) + @portaudio.start + @callback = @client.on_udp_tunnel { |msg| process_udp_tunnel msg } + spawn_thread :portaudio + @recording = true + end + true + rescue + # no portaudio gem installed - no streaming possible. + false + end + */ + } + + void AudioRecorder::start (const std::string &file) + { + if (m_recording) + { + return; + } + /* + m_file = std::make_unique (m_filename, m_wav_format); + m_callback = m_client.on_udp_tunnel { |msg| process_udp_tunnel msg } + spawn_thread :write_audio + @recording = true + end + */ + } + + void AudioRecorder::stop () + { + if (!m_recording) + { + return; + } + /* + @client.remove_callback :udp_tunnel, @callback + kill_threads + @opus_decoders.values.each &:destroy + @opus_decoders.clear + @queues.clear + @file.close + @recording = false + */ + } + + /* + private + def process_udp_tunnel(message) + @pds_lock.synchronize do + @pds.rewind + @pds.append_block message.packet#[1..-1] # we need packet type info + + @pds.rewind + packet_type = @pds.get_next + source = @pds.get_int + seq = @pds.get_int + case ( packet_type >> 5 ) + when Codec::alpha + len = @pds.get_next + alpha = @pds.get_block ( len & 0x7f ) + @queues[source] << @celt_decoders[source].decode(alpha.join) + while ( len 0x80 ) != 0 + len = @pds.get_next + alpha = @pds.get_block ( len & 0x7f ) + @queues[source] << @celt_decoders[source].decode(alpha.join) + end + when Codec::beta + len = @pds.get_next + beta = @pds.get_block ( len & 0x7f ) + @queues[source] << @celt_decoders[source].decode(beta.join) + while ( len 0x80 ) != 0 + len = @pds.get_next + beta = @pds.get_block ( len & 0x7f ) + @queues[source] << @celt_decoders[source].decode(beta.join) + end + when Codec::opus + len = @pds.get_int + opus = @pds.get_block ( len & 0x1FFF ) + @queues[source] << @opus_decoders[source].decode(opus.join) + @opus_decoders[source].reset if ( len & 0x2000 ) == 0x2000 + end + end + end + + + def initialize(client, sample_rate) + h[k] = Opus::Decoder.new sample_rate, sample_rate / 100, 1 + h[k] = Celt::Decoder.new sample_rate, sample_rate / 100, 1 + end + + # TODO: Better audio stream merge with normalization + def write_audio + pcms = @queues.values + .reject { |q| q.empty? } # Remove empty queues + .map { |q| q.pop.unpack 's*' } # Grab the top element of each queue and expand + + head, *tail = pcms + if head + samples = head.zip(*tail) + .map { |pcms| pcms.reduce(:+) / pcms.size } # Average together all the columns of the matrix (merge audio streams) + .flatten # Flatten the resulting 1d matrix + @file.write WaveFile::Buffer.new(samples, @wav_format) + end + end + + def portaudio + pcms = @queues.values + .reject { |q| q.empty? } # Remove empty queues + .map { |q| q.pop.unpack 's*' } # Grab the top element of each queue and expand + head, *tail = pcms + if head + samples = head.zip(*tail) + .map { |pcms| pcms.reduce(:+) / pcms.size } # Average together all the columns of the matrix (merge audio streams) + .flatten # Flatten the resulting 1d matrix + @audiobuffer = PortAudio::SampleBuffer.new( :format => :int16, :channels => 1, :frames => send.size / 2 +1) + @audiobuffer.add(sample.pack 's*') + begin + @portaudio << @audiobuffer + rescue + end + end + end + end + end + */ +} diff --git a/src/mumble/audio-recorder.hh b/src/mumble/audio-recorder.hh new file mode 100644 index 0000000..9b0f12a --- /dev/null +++ b/src/mumble/audio-recorder.hh @@ -0,0 +1,69 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 dafoxia + Copyright (c) 2014 niko20010 + Copyright (c) 2015 dafoxia + Copyright (c) 2016 dafoxia + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include +#include +#include +#include +#include + +#include "Mumble.pb.h" +#include "mumble/packet-data-stream.hh" +#include "opus/decoder.hh" + +namespace Mumble +{ + struct ClientIntf + { + }; + + class AudioRecorder + { + private: + ClientIntf &m_client; + size_t m_sample_rate; + // WaveFile::Format m_wav_format; + PacketDataStream m_pds; + std::mutex m_pds_lock; + std::map m_opus_decoders; + // std::map m_celt_decoders; + std::map> m_queues; + bool m_recording = false; + public: + AudioRecorder (ClientIntf &client, size_t sample_rate); + inline bool recording () const + { + return m_recording; + } + void stream_portaudio (); + void start (const std::string &file); + void stop (); + private: + void process_udp_tunnel (const MumbleProto::UDPTunnel &message); + void write_audio (); + void portaudio (); + }; +} diff --git a/src/mumble/cert-manager.cc b/src/mumble/cert-manager.cc new file mode 100644 index 0000000..d849a24 --- /dev/null +++ b/src/mumble/cert-manager.cc @@ -0,0 +1,105 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 niko20010 + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include +#include + +#include "mumble/cert-manager.hh" +#include "io/file.hh" +#include "openssl/x509/name.hh" +#include "openssl/x509/extension-factory.hh" +#include "openssl/pem.hh" + +namespace fs = std::experimental::filesystem; + +namespace Mumble +{ + CertManager::CertManager (const std::string &username, SSLCertOpts opts) + : m_username (username), m_opts (opts), m_cert_dir (opts.cert_dir) + { + std::string username_lower; + std::transform(username.begin(), username.end(), username_lower.begin(), + ::tolower); + m_cert_dir /= username_lower + "_cert"; + fs::create_directories (m_cert_dir); + m_private_key_path = m_cert_dir / "private_key.pem"; + m_public_key_path = m_cert_dir / "public_key.pem"; + m_cert_path = m_cert_dir / "cert.pem"; + setup_key (); + setup_cert (); + } + + void CertManager::setup_key () + { + if (fs::exists (m_private_key_path)) + { + m_key = std::make_unique ( + OpenSSL::PEM::rsa_private_key (IO::File::read_all_text (m_private_key_path))); + } + else + { + m_key = std::make_unique (2048); + IO::File::write_all_text (m_private_key_path, + OpenSSL::PEM::rsa_private_key (*m_key)); + IO::File::write_all_text (m_public_key_path, + OpenSSL::PEM::rsa_public_key (*m_key)); + } + } + + void CertManager::setup_cert () + { + if (fs::exists (m_cert_path)) + { + m_cert = std::make_unique (OpenSSL::PEM::x509 ( + IO::File::read_all_text (m_cert_path))); + } + else + { + OpenSSL::X509::Name issuer; + issuer.add_entry ("C", m_opts.country_code); + issuer.add_entry ("O", m_opts.organization); + issuer.add_entry ("OU", m_opts.organization_unit); + issuer.add_entry ("CN", m_username); + m_cert = std::make_unique (); + m_cert->issuer (issuer); + m_cert->subject (issuer); + m_cert->not_before (0); + m_cert->not_after (5 * 365 * 24 * 60 * 60); + m_cert->public_key (OpenSSL::PKey::Envelope (m_key->public_key ())); + srand (time(0)); + m_cert->serial (rand() % 65536 + 1); + m_cert->version (2); + + OpenSSL::X509::ExtensionFactory ef { *m_cert, *m_cert }; + + m_cert->add_extension (ef.create_extension ("basicConstraints", "CA:TRUE", + true)); + m_cert->add_extension (ef.create_extension ("keyUsage", "keyCertSign, cRLSign", + true)); + m_cert->add_extension (ef.create_extension ("subjectKeyIdentifier", "hash", + false)); + m_cert->add_extension (ef.create_extension ("authorityKeyIdentifier", + "keyid:always", false)); + + m_cert->sign (*m_key, OpenSSL::PKey::EnvelopeMessageDigest::sha256 ()); + IO::File::write_all_text (m_cert_path, OpenSSL::PEM::x509 (*m_cert)); + } + } +} diff --git a/src/mumble/cert-manager.hh b/src/mumble/cert-manager.hh new file mode 100644 index 0000000..1b85287 --- /dev/null +++ b/src/mumble/cert-manager.hh @@ -0,0 +1,78 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 niko20010 + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include +#include + +#include "openssl/pkey/rsa.hh" +#include "openssl/x509/certificate.hh" +#include "mumble/configuration.hh" + +namespace Mumble +{ + class CertManager + { + private: + std::string m_username; + SSLCertOpts m_opts; + std::experimental::filesystem::path m_cert_dir; + std::unique_ptr m_key; + std::unique_ptr m_cert; + std::experimental::filesystem::path m_private_key_path; + std::experimental::filesystem::path m_public_key_path; + std::experimental::filesystem::path m_cert_path; + public: + CertManager (const std::string &username, SSLCertOpts opts); + inline const OpenSSL::PKey::RSA& key () const + { + if (m_key == nullptr) + { + throw std::string ("key not initialized"); + } + return *m_key; + } + inline const OpenSSL::X509::Certificate& cert () const + { + if (m_cert == nullptr) + { + throw std::string ("cert not initialized"); + } + return *m_cert; + } + inline const std::experimental::filesystem::path& private_key_path () const + { + return m_private_key_path; + } + inline const std::experimental::filesystem::path& public_key_path () const + { + return m_public_key_path; + } + inline const std::experimental::filesystem::path& cert_path () const + { + return m_cert_path; + } + private: + void setup_key (); + void setup_cert (); + }; +} diff --git a/src/mumble/channel.cc b/src/mumble/channel.cc new file mode 100644 index 0000000..127ffa2 --- /dev/null +++ b/src/mumble/channel.cc @@ -0,0 +1,69 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2014 Jack Chen (chendo) + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 dafoxia + Copyright (c) 2014 niko20010 + Copyright (c) 2015 loscoala + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "mumble/channel.hh" + +namespace Mumble +{ + void Channel::update (const MumbleProto::ChannelState &msg) + { + if (msg.has_channel_id ()) + { + m_channel_id = msg.channel_id (); + } + if (msg.has_parent ()) + { + m_parent = msg.parent (); + } + if (msg.has_name ()) + { + m_name = msg.name (); + } + m_links.clear (); + for (auto i = 0; i < msg.links_size (); i++) + { + m_links.push_back (msg.links (i)); + } + if (msg.has_description ()) + { + m_description = msg.description (); + } + if (msg.has_temporary ()) + { + m_temporary = msg.temporary (); + } + if (msg.has_position ()) + { + m_position = msg.position (); + } + if (msg.has_description_hash ()) + { + m_description_hash = msg.description_hash (); + } + if (msg.has_max_users ()) + { + m_max_users = msg.max_users (); + m_max_users_set = true; + } + } +} diff --git a/src/mumble/channel.hh b/src/mumble/channel.hh new file mode 100644 index 0000000..b087025 --- /dev/null +++ b/src/mumble/channel.hh @@ -0,0 +1,90 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2014 Jack Chen (chendo) + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 dafoxia + Copyright (c) 2014 niko20010 + Copyright (c) 2015 loscoala + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include + +#include "Mumble.pb.h" + +namespace Mumble +{ + class Channel + { + private: + uint32_t m_channel_id; + uint32_t m_parent = 0; + std::string m_name; + std::list m_links; + std::string m_description; + bool m_temporary = false; + int32_t m_position = 0; + std::string m_description_hash; + uint32_t m_max_users; + bool m_max_users_set = false; + public: + inline Channel (const MumbleProto::ChannelState &msg) + { + update (msg); + } + inline auto channel_id () const + { + return m_channel_id; + } + inline auto parent () const + { + return m_parent; + } + inline auto name () const + { + return m_name; + } + inline auto links () const + { + return m_links; + } + inline auto description () const + { + return m_description; + } + inline auto temporary () const + { + return m_temporary; + } + inline auto description_hash () const + { + return m_description_hash; + } + inline auto max_users () const + { + return m_max_users; + } + inline auto max_users_set () const + { + return m_max_users_set; + } + void update (const MumbleProto::ChannelState &msg); + }; +} + diff --git a/src/mumble/client.cc b/src/mumble/client.cc new file mode 100644 index 0000000..526ed08 --- /dev/null +++ b/src/mumble/client.cc @@ -0,0 +1,589 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2012 Matthew Perry (mattvperry) + Copyright (c) 2013 Jeromy Maligie (Kingles) + Copyright (c) 2013 Matthew Perry (mattvperry) + Copyright (c) 2014 Aaron Herting (qwertos) + Copyright (c) 2014 Benjamin Neff (SuperTux88) + Copyright (c) 2014 Jack Chen (chendo) + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 Meister der Bots + Copyright (c) 2014 dafoxia + Copyright (c) 2015 dafoxia + Copyright (c) 2015 loscoala + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include +#include + +#include "mumble/mumble.hh" +#include "mumble/client.hh" +#include "mumble/img-reader.hh" +#include "mumble/version.hh" + +namespace Mumble +{ + Client::Client (const std::string &host, int port, const std::string &username, + const std::string password, + std::function conf_func) + { + m_config = Mumble::configuration; + m_config.host = host; + m_config.port = port; + m_config.username = username; + m_config.password = password; + if (conf_func) + { + conf_func (m_config); + } + } + + bool Client::connect () + { + m_conn = std::make_unique (m_config.host, m_config.port, + cert_manager ()); + m_conn->connect (); + if (!m_conn->connected ()) + { + return false; + } + init_callbacks (); + version_exchange (); + authenticate (); + m_connected = true; + m_read_thread_running = true; + m_read_thread = std::thread ([this] { read (); }); + m_ping_thread_running = true; + m_ping_thread = std::thread ([this] { ping (); }); + return m_connected; + } + + void Client::disconnect () + { + m_conn->disconnect (); + m_synced = false; + m_ready = false; + m_connected = false; + m_audio_streamer = nullptr; + m_m2m = nullptr; + m_read_thread_running = false; + m_read_thread.join (); + m_ping_thread_running = false; + m_ping_thread.join (); + } + + const CertManager& Client::cert_manager () + { + if (m_cert_manager == nullptr) + { + m_cert_manager = std::make_unique (m_config.username, + m_config.ssl_cert_opts); + } + return *m_cert_manager; + } + + const AudioRecorder& Client::recorder () + { + if (!m_codec_usable) + { + throw std::string ("no usable codec"); + } + if (m_recorder == nullptr) + { + Mumble::ClientIntf intf; + m_recorder = std::make_unique (intf, + m_config.sample_rate); + } + return *m_recorder; + } + + void Client::mumble2mumble (bool rec) + { + if (m_m2m != nullptr) + { + return; + } + m_m2m = std::make_unique (m_codec, *m_conn, + m_config.sample_rate, m_config.sample_rate / 100, 1, m_config.bitrate); + if (rec) + { + on ([this] (auto m) + { + m_m2m->process_udp_tunnel (m); + }); + } + } + + std::list Client::m2m_speakers () + { + if (m_m2m == nullptr) + { + throw "M2M not initializied"; + } + return m_m2m->getspeakers (); + } + + std::vector Client::m2m_get_frame (uint32_t speaker) + { + if (m_m2m == nullptr) + { + throw "M2M not initializied"; + } + return m_m2m->getframe (speaker); + } + + void Client::m2m_writeframe (const std::vector& frame) + { + if (m_m2m == nullptr) + { + throw "M2M not initializied"; + } + return m_m2m->produce (frame); + } + + size_t Client::m2m_getsize (uint32_t speaker) + { + if (m_m2m == nullptr) + { + throw std::string ("M2M not initializied"); + } + return m_m2m->getsize (speaker); + } + + void Client::mute (bool b) + { + MumbleProto::UserState message; + message.set_self_mute (b); + send (message); + } + + AudioPlayer& Client::player () + { + if (!m_codec_usable) + { + throw std::string ("no usable codec"); + } + if (!m_audio_streamer) + { + m_audio_streamer = std::make_unique (m_codec, *m_conn, + m_config.sample_rate, + m_config.bitrate); + } + return *m_audio_streamer; + } + + User& Client::me () + { + return m_users.at (m_session); + } + + std::string Client::imgmsg (const std::string &file) + { + return ImgReader::msg_from_file (file); + } + + void Client::comment (const std::string &newcomment) + { + MumbleProto::UserState message; + message.set_comment (newcomment); + send (message); + } + + Channel& Client::join_channel(const std::string &channel) + { + uint32_t id = channel_id (channel); + MumbleProto::UserState msg; + msg.set_session (m_session); + msg.set_channel_id (id); + send (msg); + return m_channels.at (id); + } + + User& Client::text_user_internal (uint32_t session_id, + const std::string &message_text) + { + MumbleProto::TextMessage msg; + msg.add_session (session_id); + msg.set_message (message_text); + send (msg); + return m_users.at (session_id); + } + + User& Client::text_user_img (uint32_t session_id, const std::string &file) + { + return text_user_internal (session_id, ImgReader::msg_from_file (file)); + } + + Channel& Client::text_channel_internal (uint32_t channel_id, + const std::string &message_text) + { + MumbleProto::TextMessage msg; + msg.add_channel_id (channel_id); + msg.set_message (message_text); + return m_channels.at (channel_id); + } + + Channel& Client::text_channel_img (uint32_t channel_id, const std::string &file) + { + return text_channel_internal (channel_id, ImgReader::msg_from_file (file)); + } + + void Client::register_self () + { + MumbleProto::UserState msg; + msg.set_session (m_session); + msg.set_user_id (0); + send (msg); + } + + void Client::avatar (const std::string &img) + { + // first set Image, then update Hash + // imagesize is max 600x60 + // has to be a PNG with AlphaChannel and 32 Bit deepth (ARGB format) + // SHA1 assumes a 20 byte array, leave room for 0 termination char as well! + uint8_t hash[21] = {0}; + SHA1 (reinterpret_cast (img.data()), img.size (), hash); + MumbleProto::UserState msg; + msg.set_texture (img); + msg.set_texture_hash (reinterpret_cast (hash)); + send (msg); + } + + void Client::fetch_avatar (uint32_t id) + { + // send a request for avatar image + // answer is in user_state + MumbleProto::RequestBlob msg; + msg.add_session_texture (id); + send (msg); + } + + void Client::fetch_channel_description (uint32_t id) + { + MumbleProto::RequestBlob msg; + msg.add_channel_description (id); + send (msg); + } + + void Client::fetch_session_comment (uint32_t id) + { + MumbleProto::RequestBlob msg; + msg.add_session_comment (id); + send (msg); + } + + template + inline T* find_model(std::map map, const std::string &name) + { + for (auto &it : map) + { + if (it.second.name () == name) + { + return &it.second; + } + } + return nullptr; + } + + User* Client::find_user (const std::string &name) + { + return find_model (m_users, name); + } + + Channel* Client::find_channel (const std::string &name) + { + return find_model (m_channels, name); + } + + void Client::bitrate (int bitrate) + { + try + { + m_audio_streamer->bitrate (bitrate); + } + catch (...) + { + } + } + + int Client::bitrate () + { + try + { + return m_audio_streamer->bitrate (); + } + catch (...) + { + return 0; + } + } + + void Client::frame_length (std::chrono::milliseconds framelength) + { + try + { + m_audio_streamer->framelength (framelength); + } + catch (...) + { + } + } + + std::chrono::milliseconds Client::frame_length () + { + using namespace std::chrono_literals; + try + { + return m_audio_streamer->framelength (); + } + catch (...) + { + return 0ms; + } + } + + void Client::read () + { + while (m_read_thread_running) + { + try + { + auto pair = m_conn->read_message (); + run_callbacks (pair.first, *pair.second); + } + catch (const std::string &s) + { + std::cerr << "Could not read message from server: " << s << std::endl; + } + } + } + + void Client::ping () + { + using namespace std::chrono_literals; + using namespace std::chrono; + + while (m_ping_thread_running) + { + MumbleProto::Ping msg; + msg.set_timestamp (duration_cast + (system_clock::now ().time_since_epoch ()).count ()); + send (msg); + std::this_thread::sleep_for (15s); + } + } + + void Client::run_callbacks (int type, const ::google::protobuf::Message& msg) + { + auto cbs = m_callbacks.find (type); + if (cbs != std::end (m_callbacks)) + { + for (auto f : cbs->second) + { + f (msg); + } + } + } + + template + constexpr const T& clamp (const T& v, const T& lo, const T& hi) + { + return v < lo ? lo : v > hi ? hi : v; + } + + void Client::init_callbacks () + { + on ([this] (auto msg) + { + if (msg.has_max_bandwidth ()) + { + m_max_bandwidth = msg.max_bandwidth (); + m_config.bitrate = clamp (m_config.bitrate, 0, m_max_bandwidth - 32000); + } + m_session = msg.session (); + m_synced = true; + for (auto f : m_connected_callbacks) + { + f (); + } + }); + on ([this] (auto msg) + { + auto channel_id = msg.channel_id (); + auto channel = m_channels.find (channel_id); + if (channel == std::end (m_channels)) + { + m_channels.emplace (channel_id, msg); + } + else + { + channel->second.update (msg); + } + }); + on ([this] (auto msg) + { + m_channels.erase (msg.channel_id ()); + }); + on ([this] (auto msg) + { + auto session = msg.session (); + auto user = m_users.find (session); + if (user == std::end (m_users)) + { + m_users.emplace (session, msg); + } + else + { + user->second.update (msg); + } + }); + on ([this] (auto msg) + { + auto session = msg.session (); + if (session == m_session) + { + this->disconnect (); + } + m_users.erase (session); + }); + on ([this] (auto msg) + { + this->codec_version (msg); + }); + on ([this] (auto msg) + { + using namespace std::chrono; + using namespace std::chrono_literals; + m_pingtime = (duration_cast + (system_clock::now ().time_since_epoch ()).count ()) - msg.timestamp (); + m_ready = true; + }); + on ([this] (auto msg) + { + // For later implementation of UDP communication + (void) msg; + }); + on ([this] (auto msg) + { + m_rejectmessage = std::make_unique (msg); + this->disconnect (); + }); + on ([this] (auto msg) + { + (void) msg; + }); + } + + void Client::version_exchange () + { + MumbleProto::Version msg; + msg.set_version (encode_version (1, 3, 0)); + msg.set_release (std::string ("mrpbpp ") + Mumble::_VERSION); + msg.set_os ("Unknown"); + msg.set_os_version ("Unknown"); + // os: %x{uname -s -m}.strip, + // os_version: %x{uname -v}.strip + send (msg); + } + + void Client::authenticate () + { + // encoder = Celt::Encoder.new 32000, 180, 1, 1 + MumbleProto::Authenticate msg; + msg.set_username (m_config.username); + msg.set_password (m_config.password); + // celt_versions: [encoder.bitstream_version], + msg.set_opus (true); + send (msg); + } + + void Client::codec_version (const MumbleProto::CodecVersion &message) + { + if (message.has_opus ()) + { + m_codec = Codec::opus; + m_codec_usable = true; + } + else + { + m_codec_usable = false; + /* + encoder = Celt::Encoder.new 32000, 180, 1, 1 + @codec = [Codec::alpha, Codec::beta][[message.alpha, message.beta].index(encoder.bitstream_version)] + encoder.destroy + */ + } + if (m_m2m != nullptr) + { + m_m2m->codec (m_codec); + } + if (m_audio_streamer != nullptr) + { + m_audio_streamer->codec (m_codec); + } + } + + uint32_t Client::channel_id (const std::string &channelname) + { + Channel* channel = find_channel (channelname); + if (channel == nullptr) + { + throw "ChannelNotFound"; + } + return channel_id (*channel); + } + + uint32_t Client::channel_id (const Channel &channel) + { + return channel_id (channel.channel_id ()); + } + + uint32_t Client::channel_id (uint32_t channel_id) + { + const auto &it = m_channels.find (channel_id); + if (it == std::end (m_channels)) + { + throw "ChannelNotFound"; + } + return channel_id; + } + + uint32_t Client::user_session (const std::string &username) + { + User* user = find_user (username); + if (user == nullptr) + { + throw "UserNotFound"; + } + return user_session (*user); + } + + uint32_t Client::user_session (const User &user) + { + return user_session (user.session ()); + } + + uint32_t Client::user_session (uint32_t session) + { + if (m_users.find (session) == std::end (m_users)) + { + throw "UserNotFound"; + } + return session; + } +} diff --git a/src/mumble/client.hh b/src/mumble/client.hh new file mode 100644 index 0000000..26d925a --- /dev/null +++ b/src/mumble/client.hh @@ -0,0 +1,239 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2012 Matthew Perry (mattvperry) + Copyright (c) 2013 Jeromy Maligie (Kingles) + Copyright (c) 2013 Matthew Perry (mattvperry) + Copyright (c) 2014 Aaron Herting (qwertos) + Copyright (c) 2014 Benjamin Neff (SuperTux88) + Copyright (c) 2014 Jack Chen (chendo) + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 Meister der Bots + Copyright (c) 2014 dafoxia + Copyright (c) 2015 dafoxia + Copyright (c) 2015 loscoala + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Mumble.pb.h" +#include "mumble/cert-manager.hh" +#include "mumble/mumble-2-mumble.hh" +#include "mumble/audio-recorder.hh" +#include "mumble/configuration.hh" +#include "mumble/messages.hh" +#include "mumble/audio-player.hh" +#include "mumble/connection.hh" +#include "mumble/channel.hh" +#include "mumble/user.hh" +#include "mumble/codec.hh" + +namespace Mumble +{ + class Client + { + private: + std::map m_users; + std::map m_channels; + bool m_ready = false; + Codec m_codec = Codec::opus; + bool m_codec_usable = false; + int m_max_bandwidth = 0; + std::unique_ptr m_rejectmessage = nullptr; + int m_pingtime = 0; + bool m_connected = false; + bool m_synced = false; + Configuration m_config; + std::unique_ptr m_m2m; + std::unique_ptr m_cert_manager; + std::unique_ptr m_recorder; + std::unique_ptr m_conn; + std::map>> m_callbacks; + std::list> m_connected_callbacks; + std::unique_ptr m_audio_streamer; + std::thread m_read_thread; + std::thread m_ping_thread; + bool m_read_thread_running; + bool m_ping_thread_running; + uint32_t m_session; + public: + Client (const std::string &host, int port = 64738, + const std::string &username = "RubyClient", + const std::string password = "", + std::function conf_func = nullptr); + inline ~Client () + { + m_read_thread_running = false; + m_ping_thread_running = false; + m_read_thread.join (); + m_ping_thread.join (); + } + bool connect (); + void disconnect (); + inline bool connected () const + { + return m_connected; + } + inline bool synced () const + { + return m_synced; + } + const CertManager& cert_manager (); + const AudioRecorder& recorder (); + inline std::string codec () const + { + if (!m_codec_usable) + { + throw std::string ("no usable codec"); + } + return to_string (m_codec); + } + inline Codec codec_int () const + { + return m_codec; + } + void mumble2mumble (bool rec); + std::list m2m_speakers (); + std::vector m2m_get_frame (uint32_t speaker); + void m2m_writeframe (const std::vector &frame); + size_t m2m_getsize (uint32_t speaker); + void mute (bool b = true); + AudioPlayer& player (); + User& me (); + std::string imgmsg (const std::string &file); + void comment (const std::string &newcomment); + Channel& join_channel (const std::string &channel); + template + inline User& text_user (const T &user, const std::string &message) + { + return text_user_internal (user_session (user), message); + } + template + inline User& text_user_img (const T &user, const std::string &file) + { + return text_user_img_internal (user_session (user), file); + } + template + inline Channel& text_channel (const T &channel, const std::string &message) + { + return text_channel_internal (channel_id (channel), message); + } + template + inline Channel& text_channel_img (const T &channel, const std::string &file) + { + return text_channel_img_internal (channel_id (channel), file); + } + void avatar (const std::string &img); + void fetch_avatar (uint32_t id); + void fetch_channel_description (uint32_t id); + void fetch_session_comment (uint32_t id); + User* find_user (const std::string &name); + Channel* find_channel (const std::string &name); + void bitrate (int bitrate); + int bitrate (); + void frame_length (std::chrono::milliseconds framelength); + std::chrono::milliseconds frame_length (); + inline void on_connected (std::function f) + { + m_connected_callbacks.push_back (f); + } + /* + // Doesn't work like this ... + template + inline void remove_callback (std::function f) + { + // m_callbacks [std::type_index (typeid (T))].remove (f); + } + */ + template + inline void on (std::function f) + { + m_callbacks [Messages::sym_to_type.at (std::type_index (typeid ( + T)))].push_back ([f] (const auto &message) + { + f (dynamic_cast(message)); + }); + } + template + inline void send (const T &message) + { + m_conn->send_message (Messages::sym_to_type.at (std::type_index (typeid (T))), + message); + } + inline auto& pingtime () const + { + return m_pingtime; + } + inline const auto& rejectmessage () const + { + return m_rejectmessage; + } + inline auto& users () + { + return m_users; + } + inline auto& channels () + { + return m_channels; + } + inline auto& max_bandwidth () const + { + return m_max_bandwidth; + } + void register_self (); + inline bool ready () + { + return m_ready; + } + private: + User& text_user_internal (uint32_t session_id, const std::string &message_text); + User& text_user_img (uint32_t session_id, const std::string &file); + Channel& text_channel_internal (uint32_t channel_id, + const std::string &message_text); + Channel& text_channel_img (uint32_t channel_id, const std::string &file); + void send_internal (int type, const ::google::protobuf::Message& msg); + void read (); + void ping (); + void run_callbacks (int type, const ::google::protobuf::Message& msg); + void init_callbacks (); + void version_exchange (); + void authenticate (); + void codec_version (const MumbleProto::CodecVersion &message); + uint32_t channel_id (const std::string &channelname); + uint32_t channel_id (const Channel &channel); + uint32_t channel_id (uint32_t user_id); + uint32_t user_session (const std::string &username); + uint32_t user_session (const User &user); + uint32_t user_session (uint32_t user_id); + static uint32_t encode_version(int major, int minor, int patch) + { + return (major << 16) | (minor << 8) | (patch & 0xff); + } + }; +} diff --git a/src/mumble/codec.hh b/src/mumble/codec.hh new file mode 100644 index 0000000..1da6610 --- /dev/null +++ b/src/mumble/codec.hh @@ -0,0 +1,70 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2012 Matthew Perry (mattvperry) + Copyright (c) 2013 Jeromy Maligie (Kingles) + Copyright (c) 2013 Matthew Perry (mattvperry) + Copyright (c) 2014 Aaron Herting (qwertos) + Copyright (c) 2014 Benjamin Neff (SuperTux88) + Copyright (c) 2014 Jack Chen (chendo) + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 Meister der Bots + Copyright (c) 2014 dafoxia + Copyright (c) 2015 dafoxia + Copyright (c) 2015 loscoala + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include +#include + +namespace Mumble +{ + // The integral values assigned here are used in the UDP (and UDPTunnel) + // packet stream. Do not change! + enum class Codec : uint8_t + { + alpha = 0, + // Not a codec, but is used for UDP PING packets + ping = 1, + speex = 2, + beta = 3, + opus = 4 + }; + + inline std::string to_string (Codec codec) + { + switch (codec) + { + case Codec::alpha: + return "CELT-ALPHA (0.7.0)"; + case Codec::ping: + return "PING"; + case Codec::speex: + return "SPEEX"; + case Codec::beta: + return "CELT-BETA (0.11.0)"; + case Codec::opus: + return "OPUS"; + default: + std::stringstream ss; + ss << "[ERROR] Unknown codec: " << static_cast (codec); + return ss.str (); + } + } +} diff --git a/src/mumble/configuration.hh b/src/mumble/configuration.hh new file mode 100644 index 0000000..ec6d3a6 --- /dev/null +++ b/src/mumble/configuration.hh @@ -0,0 +1,53 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2012 Matthew Perry (mattvperry) + Copyright (c) 2013 Matthew Perry (mattvperry) + Copyright (c) 2014 Aaron Herting (qwertos) + Copyright (c) 2014 Jack Chen (chendo) + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 dafoxia + Copyright (c) 2014 niko20010 + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include + +namespace Mumble +{ + struct SSLCertOpts + { + std::experimental::filesystem::path cert_dir; + std::string country_code; + std::string organization; + std::string organization_unit; + }; + + struct Configuration + { + std::string host; + int port; + std::string username; + std::string password; + int sample_rate; + int bitrate; + bool vbr_rate; + SSLCertOpts ssl_cert_opts; + }; + +} diff --git a/src/mumble/connection.cc b/src/mumble/connection.cc new file mode 100644 index 0000000..cfee63b --- /dev/null +++ b/src/mumble/connection.cc @@ -0,0 +1,150 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2012 Matthew Perry (mattvperry) + Copyright (c) 2012 Iván Eixarch (joker-x) + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 dafoxia + Copyright (c) 2014 niko20010 + Copyright (c) 2015 dafoxia + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include +#include + +#include "openssl/ssl/method.hh" +#include "mumble/connection.hh" +#include "util/endian.hh" + +namespace Mumble +{ + Connection::Connection (const std::string &host, uint16_t port, + const CertManager &cert_manager) : m_host (host), m_port (port), + m_cert_manager (cert_manager), m_connected (false) + { + } + + void Connection::connect () + { + using namespace OpenSSL::SSL; + m_context = std::make_unique (Method::sslv23 ()); + m_context->verify_none (); + m_context->key (m_cert_manager.key ()); + m_context->cert (m_cert_manager.cert()); + try + { + m_tcp_socket = std::make_unique (m_host, m_port); + m_socket = std::make_unique (*m_tcp_socket, *m_context); + m_socket->connect (); + m_connected = true; + } + catch (const std::string &s) + { + std::cerr << "Could not connect to " << m_host << ":" << m_port << std::endl; + } + catch (...) + { + throw; + } + } + + void Connection::disconnect () + { + m_connected = false; + if (m_socket != nullptr) + { + m_socket->close (); + } + } + + std::pair> + Connection::read_message () + { + std::vector prefix; + while (prefix.size () == 0) + { + prefix = read_data (6); + } + assert (prefix.size () == 6); + + uint16_t type = EndianUtils::value_from_u16be (prefix, 0); + uint32_t len = EndianUtils::value_from_u32be (prefix, 2); + + auto data = read_data (len); + auto msg = Messages::msg_from_type (type); + if (type == Messages::sym_to_type.at (std::type_index (typeid ( + MumbleProto::UDPTunnel)))) + { + // UDP Packet -- No Protobuf + auto udp_tunnel = dynamic_cast(*msg); + udp_tunnel.set_packet (std::string (std::begin (data), std::end (data))); + } + else + { + std::stringstream is (std::string (std::begin (data), std::end (data))); + msg->ParseFromIstream (&is); + } + return std::make_pair (type, std::move (msg)); + } + + std::vector Connection::make_prefix (uint16_t type, uint32_t len) + { + std::vector prefix; + EndianUtils::add_to_u16be (prefix, type); + EndianUtils::add_to_u32be (prefix, len); + return prefix; + } + + void Connection::send_udp_packet (const std::vector &packet) + { + uint16_t type = Messages::sym_to_type.at (std::type_index (typeid ( + MumbleProto::UDPTunnel))); + send_data (type, packet); + } + + void Connection::send_message (uint16_t type, + const ::google::protobuf::Message &msg) + { + std::stringstream os; + msg.SerializeToOstream (&os); + std::string os_str = os.str (); + send_data (type, std::vector (std::begin (os_str), std::end (os_str))); + } + + void Connection::send_data (uint16_t type, const std::vector &data) + { + uint32_t len = data.size (); + auto prefix = make_prefix (type, len); + if (m_connected) + { + std::lock_guard lock (m_write_lock); + m_socket->write (prefix); + m_socket->write (data); + } + } + + std::vector Connection::read_data (uint32_t len) + { + if (m_connected) + { + return m_socket->read (len); + } + else + { + return { }; + } + } +} diff --git a/src/mumble/connection.hh b/src/mumble/connection.hh new file mode 100644 index 0000000..eda17d0 --- /dev/null +++ b/src/mumble/connection.hh @@ -0,0 +1,71 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2012 Matthew Perry (mattvperry) + Copyright (c) 2012 Iván Eixarch (joker-x) + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 dafoxia + Copyright (c) 2014 niko20010 + Copyright (c) 2015 dafoxia + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include +#include +#include +#include +#include + +#include "mumble/cert-manager.hh" +#include "network/tcp-socket.hh" +#include "openssl/ssl/context.hh" +#include "openssl/ssl/socket.hh" +#include "mumble/messages.hh" +#include "Mumble.pb.h" + +namespace Mumble +{ + class Connection + { + public: + Connection (const std::string &host, uint16_t port, + const CertManager &cert_manager); + void connect (); + void disconnect (); + std::pair> read_message (); + void send_udp_packet (const std::vector &packet); + void send_message (uint16_t type, const ::google::protobuf::Message &msg); + inline auto connected () const + { + return m_connected; + } + private: + std::string m_host; + uint16_t m_port; + const CertManager &m_cert_manager; + bool m_connected; + std::mutex m_write_lock; + std::unique_ptr m_tcp_socket; + std::unique_ptr m_context; + std::unique_ptr m_socket; + void send_data (uint16_t type, const std::vector &data); + std::vector read_data (uint32_t len); + static std::vector make_prefix (uint16_t type, uint32_t len); + }; +} + diff --git a/src/mumble/img-reader.cc b/src/mumble/img-reader.cc new file mode 100644 index 0000000..a7f1a09 --- /dev/null +++ b/src/mumble/img-reader.cc @@ -0,0 +1,94 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 niko20010 + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include +#include +#include + +#include "util/base64.hh" +#include "mumble/img-reader.hh" + +namespace fs = std::experimental::filesystem; + +namespace Mumble +{ + const std::list ImgReader::FORMATS = {"png", "jpg", "jpeg", "svg"}; + + std::string ImgReader::msg_from_file (const fs::path &file) + { + auto p = extension_valid (file.extension ()); + if (!p.first) + { + throw std::string ("Image format must be on of the following: " + + formats_to_string ()); + } + std::ifstream is (file); + if (is.fail ()) + { + throw std::string ("File could not be opened for reading: ") + file.string (); + } + auto size = is.tellg (); + if (size > 128 * 1024) + { + throw std::string ("Image must be smaller than 128 KiB"); + } + std::vector data (size, 0); + is.read (reinterpret_cast (data.data ()), size); + + std::stringstream res; + res << ""; + return res.str (); + } + + std::pair ImgReader::extension_valid ( + const std::string &extension) + { + for (auto& fmt : FORMATS) + { + if (extension.compare (extension.size () - fmt.size (), fmt.size (), fmt) == 0) + { + return std::make_pair (true, fmt); + } + } + return std::make_pair (false, ""); + } + + std::string ImgReader::formats_to_string () + { + std::stringstream ss; + ss << "{"; + bool fst = true; + for (auto& fmt : FORMATS) + { + if (fst) + { + ss << fmt; + fst = false; + } + else + { + ss << ", " << fmt; + } + } + ss << "}"; + return ss.str (); + } +} diff --git a/src/mumble/img-reader.hh b/src/mumble/img-reader.hh new file mode 100644 index 0000000..854a57d --- /dev/null +++ b/src/mumble/img-reader.hh @@ -0,0 +1,41 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 niko20010 + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include +#include + +namespace Mumble +{ + class ImgReader + { + public: + static const std::list FORMATS; + static std::string msg_from_file (const std::experimental::filesystem::path + &file); + private: + static std::pair extension_valid (const std::string + &extension); + static std::string formats_to_string (); + }; +} + diff --git a/src/mumble/messages.cc b/src/mumble/messages.cc new file mode 100644 index 0000000..6a890a0 --- /dev/null +++ b/src/mumble/messages.cc @@ -0,0 +1,121 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2012 Matthew Perry (mattvperry) + Copyright (c) 2013 Jeromy Maligie (Kingles) + Copyright (c) 2013 Matthew Perry (mattvperry) + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 niko20010 + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "mumble/messages.hh" + +namespace Mumble +{ + std::unordered_map Messages::sym_to_type + { + {std::type_index(typeid (MumbleProto::Version)), 0}, + {std::type_index(typeid (MumbleProto::UDPTunnel)), 1}, + {std::type_index(typeid (MumbleProto::Authenticate)), 2}, + {std::type_index(typeid (MumbleProto::Ping)), 3}, + {std::type_index(typeid (MumbleProto::Reject)), 4}, + {std::type_index(typeid (MumbleProto::ServerSync)), 5}, + {std::type_index(typeid (MumbleProto::ChannelRemove)), 6}, + {std::type_index(typeid (MumbleProto::ChannelState)), 7}, + {std::type_index(typeid (MumbleProto::UserRemove)), 8}, + {std::type_index(typeid (MumbleProto::UserState)), 9}, + {std::type_index(typeid (MumbleProto::BanList)), 10}, + {std::type_index(typeid (MumbleProto::TextMessage)), 11}, + {std::type_index(typeid (MumbleProto::PermissionDenied)), 12}, + {std::type_index(typeid (MumbleProto::ACL)), 13}, + {std::type_index(typeid (MumbleProto::QueryUsers)), 14}, + {std::type_index(typeid (MumbleProto::CryptSetup)), 15}, + {std::type_index(typeid (MumbleProto::ContextActionModify)), 16}, + {std::type_index(typeid (MumbleProto::ContextAction)), 17}, + {std::type_index(typeid (MumbleProto::UserList)), 18}, + {std::type_index(typeid (MumbleProto::VoiceTarget)), 19}, + {std::type_index(typeid (MumbleProto::PermissionQuery)), 20}, + {std::type_index(typeid (MumbleProto::CodecVersion)), 21}, + {std::type_index(typeid (MumbleProto::UserStats)), 22}, + {std::type_index(typeid (MumbleProto::RequestBlob)), 23}, + {std::type_index(typeid (MumbleProto::ServerConfig)), 24}, + {std::type_index(typeid (MumbleProto::SuggestConfig)), 25} + }; + + std::unique_ptr<::google::protobuf::Message> Messages::msg_from_type ( + uint16_t type) + { + switch (type) + { + case 0: + return std::make_unique (); + case 1: + return std::make_unique (); + case 2: + return std::make_unique (); + case 3: + return std::make_unique (); + case 4: + return std::make_unique (); + case 5: + return std::make_unique (); + case 6: + return std::make_unique (); + case 7: + return std::make_unique (); + case 8: + return std::make_unique (); + case 9: + return std::make_unique (); + case 10: + return std::make_unique (); + case 11: + return std::make_unique (); + case 12: + return std::make_unique (); + case 13: + return std::make_unique (); + case 14: + return std::make_unique (); + case 15: + return std::make_unique (); + case 16: + return std::make_unique (); + case 17: + return std::make_unique (); + case 18: + return std::make_unique (); + case 19: + return std::make_unique (); + case 20: + return std::make_unique (); + case 21: + return std::make_unique (); + case 22: + return std::make_unique (); + case 23: + return std::make_unique (); + case 24: + return std::make_unique (); + case 25: + return std::make_unique (); + default: + throw std::string ("Invalid message type"); + } + } + +} + diff --git a/src/mumble/messages.hh b/src/mumble/messages.hh new file mode 100644 index 0000000..69efed4 --- /dev/null +++ b/src/mumble/messages.hh @@ -0,0 +1,45 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2012 Matthew Perry (mattvperry) + Copyright (c) 2013 Jeromy Maligie (Kingles) + Copyright (c) 2013 Matthew Perry (mattvperry) + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 niko20010 + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include +#include +#include +#include +#include + +#include "Mumble.pb.h" + +namespace Mumble +{ + class Messages + { + public: + static std::unordered_map sym_to_type; + static std::unique_ptr<::google::protobuf::Message> msg_from_type ( + uint16_t type); + }; + +} diff --git a/src/mumble/mumble-2-mumble.cc b/src/mumble/mumble-2-mumble.cc new file mode 100644 index 0000000..e2c761d --- /dev/null +++ b/src/mumble/mumble-2-mumble.cc @@ -0,0 +1,174 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2014 Meister der Bots + Copyright (c) 2014 dafoxia + Copyright (c) 2014 niko20010 + Copyright (c) 2015 loscoala + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include +#include +#include + +#include "mumble/mumble-2-mumble.hh" +#include "mumble/udp-packet.hh" + +namespace Mumble +{ + Mumble2Mumble::Mumble2Mumble (Codec codec, Connection &conn, + size_t sample_rate, + size_t frame_size, size_t channels, size_t bitrate): + m_codec (codec), m_conn (conn), m_sample_rate (sample_rate), + m_channels (channels), + m_opus_encoder (static_cast (sample_rate), sample_rate / 100, + static_cast (channels), COMPRESSED_SIZE) +/* +m_celt_encoder (sample_rate, sample_rate / 100, channels, [bitrate / 6800, 127].min) +*/ + { + // TODO: Add other allowed values for opus + assert (sample_rate == 48'000 /*'*/); + assert (channels == 1 || channels == 2); + (void) frame_size; + // CBR + m_opus_encoder.vbr (false); + m_opus_encoder.bitrate (bitrate); + m_opus_encoder.signal (Opus::Signal::music); + //m_celt_encoder.vbr_rate = bitrate + //m_celt_encoder.prediction_request = 0 + m_consume = std::thread {[this] () + { + this->consume(); + } + }; + } + + Mumble2Mumble::~Mumble2Mumble () + { + // kill_threads + } + + void Mumble2Mumble::process_udp_tunnel (const MumbleProto::UDPTunnel &message) + { + std::lock_guard lock (m_pds_lock); + auto packetstr = message.packet (); + std::vector packet_data (packetstr.begin (), packetstr.end ()); + + UDPPacket packet; + packet.data (m_pds, packet_data); + + auto opus_emplaced = m_opus_decoders.emplace (packet.source_session_id, + Opus::Decoder (m_sample_rate, m_sample_rate / 100, m_channels)); + auto opus_decoder = opus_emplaced.first->second; + auto queue_emplaced = m_queues.emplace (packet.source_session_id, + std::queue>()); + auto queue = queue_emplaced.first->second; + // h[k] = Celt::Decoder.new sample_rate, sample_rate / 100, channels + if (queue.size () <= 200) + { + queue.push (opus_decoder.decode (packet.payload)); + } + } + + std::list Mumble2Mumble::getspeakers () + { + std::list list; + for (const auto& pair : m_queues) + { + list.push_back (pair.first); + } + return list; + } + + std::vector Mumble2Mumble::getframe (uint32_t speaker) + { + auto queue = m_queues.at (speaker); + auto frame = queue.front (); + queue.pop (); + return frame; + } + + size_t Mumble2Mumble::getsize (uint32_t speaker) + { + return m_queues.at (speaker).size (); + } + + void Mumble2Mumble::produce (const std::vector &frame) + { + std::copy (std::begin (frame), std::end (frame), + std::back_inserter (m_rawaudio)); + } + + void Mumble2Mumble::consume () + { + auto num_frames = 0; + switch (m_codec) + { + case Codec::opus: + while (m_rawaudio.size () >= m_opus_encoder.frame_size () * 2) + { + num_frames++; + std::vector part; + std::move (std::begin (m_rawaudio), + std::begin (m_rawaudio) + m_opus_encoder.frame_size () * 2, + std::back_inserter (part)); + m_plqueue.push (m_opus_encoder.encode (part)); + } + /* + when Codec::alpha + while @rawaudio.size >= ( @celt_encoder.frame_size * 2 ) + num_frames =+1 + part = @rawaudio.slice!( 0, (@celt_encoder.frame_size * 2 ) ) + @plqueue << @celt_encoder.encode(part) + end + when Codec::beta + while @rawaudio.size >= ( @celt_encoder.frame_size * 2 ) + num_frames =+1 + part = @rawaudio.slice!( 0, (@celt_encoder.frame_size * 2 ) ) + @plqueue << @celt_encoder.encode(part) + end + */ + default: + throw std::string ("m2m invalid codec"); + } + if (m_plqueue.size () > 0) + { + m_seq++; + + auto frame = m_plqueue.front (); + m_plqueue.pop (); + try + { + UDPPacket packet; + packet.type = m_codec; + packet.target = 0; + packet.sequence_number = m_seq; + packet.payload = frame; + m_conn.send_udp_packet (packet.data (m_sendpds)); + } + catch (...) + { + std::cout << "could not write (fatal!)" << std::endl; + } + } + else + { + using namespace std::chrono_literals; + std::this_thread::sleep_for (2ms); + } + } +} diff --git a/src/mumble/mumble-2-mumble.hh b/src/mumble/mumble-2-mumble.hh new file mode 100644 index 0000000..e9b0ad8 --- /dev/null +++ b/src/mumble/mumble-2-mumble.hh @@ -0,0 +1,84 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2014 Meister der Bots + Copyright (c) 2014 dafoxia + Copyright (c) 2014 niko20010 + Copyright (c) 2015 loscoala + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include +#include +#include +#include +#include + +#include "mumble/Mumble.pb.h" +#include "mumble/connection.hh" +#include "mumble/packet-data-stream.hh" +#include "opus/constants.hh" +#include "opus/decoder.hh" +#include "opus/encoder.hh" +#include "mumble/codec.hh" + +namespace Mumble +{ + class Mumble2Mumble + { + public: + static const int COMPRESSED_SIZE = 960; + private: + PacketDataStream m_pds; + PacketDataStream m_sendpds; + Codec m_codec; + Connection &m_conn; + int m_sample_rate; + int m_channels; + std::mutex m_pds_lock; + std::map m_opus_decoders; + // std::map m_celt_decoders; + std::map>> m_queues; + Opus::Encoder m_opus_encoder; + // Celt::Encoder m_celt_encoder; + std::vector m_rawaudio; + uint32_t m_seq = 0; + std::queue> m_plqueue; + std::thread m_consume; + // bool m_consume_running; + public: + Mumble2Mumble (Codec codec, Connection &conn, size_t sample_rate, + size_t frame_size, size_t channels, size_t bitrate); + ~Mumble2Mumble (); + void process_udp_tunnel (const MumbleProto::UDPTunnel &message); + std::list getspeakers (); + std::vector getframe (uint32_t speaker); + size_t getsize (uint32_t speaker); + void produce (const std::vector &frame); + inline void codec (Codec codec) + { + m_codec = codec; + } + inline void init_encoder (Codec codec) + { + m_codec = codec; + } + private: + void consume (); + }; +} diff --git a/src/mumble/mumble.hh b/src/mumble/mumble.hh new file mode 100644 index 0000000..51de82c --- /dev/null +++ b/src/mumble/mumble.hh @@ -0,0 +1,53 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2012 Matthew Perry (mattvperry) + Copyright (c) 2013 Matthew Perry (mattvperry) + Copyright (c) 2014 Aaron Herting (qwertos) + Copyright (c) 2014 Jack Chen (chendo) + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 dafoxia + Copyright (c) 2014 niko20010 + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include "mumble/configuration.hh" + +namespace Mumble +{ + Configuration DEFAULTS = + { + /*host*/ "", + /*port*/ 64738, + /*username*/ "", + /*password*/ "", + /*sample_rate*/ 48000, + /*bitrate*/ 32000, + /*vbr_rate*/ false, + /*ssl_cert_opts*/ { + /*cert_dir*/ ".", + /*country_code*/ "US", + /*organization*/ "github.com", + /*organization_unit*/ "Engineering" + } + }; + + Configuration configuration {DEFAULTS}; + // inline Configuration& configure () { return configuration; } + // Thread.abort_on_exception = true +} + diff --git a/src/mumble/packet-data-stream.cc b/src/mumble/packet-data-stream.cc new file mode 100644 index 0000000..b8e2ef8 --- /dev/null +++ b/src/mumble/packet-data-stream.cc @@ -0,0 +1,215 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2012 Matthew Perry (mattvperry) + Copyright (c) 2014 niko20010 + Copyright (c) 2015 dafoxia + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "mumble/packet-data-stream.hh" + +namespace Mumble +{ + PacketDataStream::PacketDataStream (size_t capacity) : m_data (capacity, 0), + m_capacity (capacity) + { + } + + PacketDataStream::PacketDataStream (const std::vector &data) : m_data ( + data), m_capacity (data.size ()) + { + } + + void PacketDataStream::append (uint8_t val) + { + if (m_pos < m_capacity) + { + m_data[m_pos++] = val; + } + else + { + m_ok = false; + } + } + + void PacketDataStream::append_block (const std::vector &data) + { + auto len = data.size (); + if (len < left ()) + { + for (auto val : data) + { + m_data[m_pos++] = val; + } + } + else + { + m_ok = false; + } + } + + std::vector PacketDataStream::get_block (size_t len) + { + std::vector block; + if (len < left ()) + { + for (size_t i = 0; i < len; i++) + { + block.push_back (m_data[m_pos++]); + } + } + else + { + m_ok = false; + } + return block; + } + + uint8_t PacketDataStream::get_next () + { + if (m_pos < m_capacity) + { + return m_data[m_pos++]; + } + else + { + m_ok = false; + return 0; + } + } + + void PacketDataStream::put_int (int64_t val) + { + if (((val & 0x8000000000000000) != 0) && (~val < 0x100000000)) + { + val = ~val; + // puts int + if (val <= 0x3) + { + // Shortcase for -1 to -4 + append(0xFC | val); + } + else + { + append(0xF8); + } + } + + if (val < 0x80) + { + // Need top bit clear + append (val); + } + else if (val < 0x4000) + { + // Need top two bits clear + append ((val >> 8) | 0x80); + append (val & 0xFF); + } + else if (val < 0x200000) + { + // Need top three bits clear + append ((val >> 16) | 0xC0); + append ((val >> 8) & 0xFF); + append (val & 0xFF); + } + else if (val < 0x10000000) + { + // Need top four bits clear + append ((val >> 24) | 0xE0); + append ((val >> 16) & 0xFF); + append ((val >> 8) & 0xFF); + append (val & 0xFF); + } + else if (val < 0x100000000) + { + // It's a full 32-bit integer. + append (0xF0); + append ((val >> 24) & 0xFF); + append ((val >> 16) & 0xFF); + append ((val >> 8) & 0xFF); + append (val & 0xFF); + } + else + { + // It's a 64-bit value. + append (0xF4); + append ((val >> 56) & 0xFF); + append ((val >> 48) & 0xFF); + append ((val >> 40) & 0xFF); + append ((val >> 32) & 0xFF); + append ((val >> 24) & 0xFF); + append ((val >> 16) & 0xFF); + append ((val >> 8) & 0xFF); + append (val & 0xFF); + } + } + + int64_t PacketDataStream::get_int () + { + uint8_t v = get_next (); + int64_t val = 0; + + if ((v & 0x80) == 0x00) + { + val = v & 0x7F; + } + else if ( (v & 0xC0) == 0x80) + { + val = (v & 0x3F) << 8 | get_next (); + } + else if ( (v & 0xF0) == 0xF0) + { + uint8_t x = v & 0xFC; + if (x == 0xF0) + { + val = get_next () << 24 | get_next () << 16 | get_next () << 8 | get_next (); + } + else if ( x == 0xF4) + { + val = (int64_t) get_next () << 56 | (int64_t) get_next () << 48 | + (int64_t) get_next () << 40 | (int64_t) get_next () << + 32 | + get_next () << 24 | get_next () << 16 | get_next () << 8 | get_next (); + } + else if ( x == 0xF8) + { + val = get_int (); + val = ~val; + } + else if ( x == 0xFC) + { + val = v & 0x03; + val = ~val; + } + else + { + m_ok = false; + val = 0; + } + } + else if ( (v & 0xF0) == 0xE0) + { + val = (v & 0x0F) << 24 | get_next () << 16 | get_next () << 8 | get_next (); + } + else if ( (v & 0xE0) == 0xC0) + { + val = (v & 0x1F) << 16 | get_next () << 8 | get_next (); + } + return val; + } + +} diff --git a/src/mumble/packet-data-stream.hh b/src/mumble/packet-data-stream.hh new file mode 100644 index 0000000..49c1168 --- /dev/null +++ b/src/mumble/packet-data-stream.hh @@ -0,0 +1,74 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2012 Matthew Perry (mattvperry) + Copyright (c) 2014 niko20010 + Copyright (c) 2015 dafoxia + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include +#include + +namespace Mumble +{ + class PacketDataStream + { + private: + std::vector m_data; + size_t m_capacity; + size_t m_pos = 0; + bool m_ok = true; + public: + PacketDataStream (size_t capacity = 8192); + PacketDataStream (const std::vector &data); + inline bool valid () + { + return m_ok; + } + inline size_t size () + { + return m_pos; + } + inline size_t left () + { + return m_capacity - m_pos; + } + void append (uint8_t val); + uint8_t get_next (); + void append_block (const std::vector &data); + std::vector get_block (size_t len); + inline void rewind () + { + m_pos = 0; + } + void skip (size_t len = 1) + { + if (len < left ()) + { + m_pos += len; + } + else + { + m_ok = false; + } + } + void put_int (int64_t val); + int64_t get_int (); + }; +} diff --git a/src/mumble/udp-packet.cc b/src/mumble/udp-packet.cc new file mode 100644 index 0000000..a1a531a --- /dev/null +++ b/src/mumble/udp-packet.cc @@ -0,0 +1,122 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2012 Matthew Perry (mattvperry) + Copyright (c) 2013 Jeromy Maligie (Kingles) + Copyright (c) 2013 Matthew Perry (mattvperry) + Copyright (c) 2014 Aaron Herting (qwertos) + Copyright (c) 2014 Benjamin Neff (SuperTux88) + Copyright (c) 2014 Jack Chen (chendo) + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 Meister der Bots + Copyright (c) 2014 dafoxia + Copyright (c) 2015 dafoxia + Copyright (c) 2015 loscoala + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "mumble/udp-packet.hh" + +namespace Mumble +{ + std::vector UDPPacket::data (PacketDataStream &pds) + { + pds.rewind (); + uint8_t header = (static_cast (this->type) << 5) | + (this->target & 0x1F); + pds.append (header); + if (this->type == Codec::ping) + { + pds.put_int (this->timestamp); + } + else + { + pds.put_int (this->sequence_number); + if (this->type == Codec::opus) + { + // TODO: This only works for OPUS. CELT and SPEEX use a multi frame model + // where the frames have to be packed / unpacked individually + pds.append (this->payload.size ()); + pds.append_block (this->payload); + } + else + { + throw std::string ("packet type not yet supported"); + } + // TODO: Add position_info data + } + auto packet_size = pds.size (); + pds.rewind (); + return pds.get_block (packet_size); + } + + void UDPPacket::data (PacketDataStream &pds, const std::vector &data) + { + pds.rewind (); + pds.append_block (data); + pds.rewind (); + + uint8_t header = pds.get_next (); + this->type = static_cast (header >> 5); + this->target = header & 0x1F; + + if (this->type == Codec::ping) + { + this->timestamp = pds.get_int (); + } + else + { + this->source_session_id = pds.get_int (); + this->sequence_number = pds.get_int (); + if (this->type == Codec::opus) + { + auto len = pds.get_int (); + this->payload = pds.get_block (len); + } + else + { + throw std::string ("packet type not yet supported"); + /* + case Codec::alpha: + + auto len = m_pds.get_next (); + auto audio = m_pds.get_block (len & 0x7f); + queue << celt_decoder.decode (audio.join()); + while ((len & 0x80) != 0) + { + len = m_pds.get_next (); + audio = m_pds.get_block (len & 0x7f); + if (len & 0x7f != 0) + queue << celt_decoder.decode (audio.join ()); + } + + break; + case Codec::beta: + + auto len = m_pds.get_next (); + auto audio = m_pds.get_block (len & 0x7f); + queue << m_celt_decoder.decode (audio.join ()); + while ((len & 0x80) != 0) + { + len = m_pds.get_next (); + audio += m_pds.get_block (len & 0x7f); + queue << celt_decoder.decode (audio.join()); + end + */ + } + // TODO: Read position info data (if available) + } + } +} diff --git a/src/mumble/udp-packet.hh b/src/mumble/udp-packet.hh new file mode 100644 index 0000000..f1173f6 --- /dev/null +++ b/src/mumble/udp-packet.hh @@ -0,0 +1,60 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2012 Matthew Perry (mattvperry) + Copyright (c) 2013 Jeromy Maligie (Kingles) + Copyright (c) 2013 Matthew Perry (mattvperry) + Copyright (c) 2014 Aaron Herting (qwertos) + Copyright (c) 2014 Benjamin Neff (SuperTux88) + Copyright (c) 2014 Jack Chen (chendo) + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 Meister der Bots + Copyright (c) 2014 dafoxia + Copyright (c) 2015 dafoxia + Copyright (c) 2015 loscoala + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include + +#include "mumble/codec.hh" +#include "mumble/packet-data-stream.hh" + +namespace Mumble +{ + class UDPPacket + { + public: + Codec type; + uint8_t target; + uint32_t source_session_id; + uint32_t timestamp; + uint32_t sequence_number; + std::vector payload; + /* + struct + { + double x; + double y; + double z; + } position_info; + */ + + std::vector data (PacketDataStream &pds); + void data (PacketDataStream &pds, const std::vector &data); + }; +} diff --git a/src/mumble/user.cc b/src/mumble/user.cc new file mode 100644 index 0000000..2b7d18a --- /dev/null +++ b/src/mumble/user.cc @@ -0,0 +1,106 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2014 Jack Chen (chendo) + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 dafoxia + Copyright (c) 2014 niko20010 + Copyright (c) 2015 loscoala + Copyright (c) 2015 Georg G. (nilsding) + Copyright (c) 2015 Karsten Nerdinger (Piratonym) + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "mumble/user.hh" + +namespace Mumble +{ + void User::update (const MumbleProto::UserState &msg) + { + if (msg.has_session ()) + { + m_session = msg.session (); + } + if (msg.has_name ()) + { + m_name = msg.name (); + } + if (msg.has_user_id ()) + { + m_user_id = msg.user_id (); + m_has_user_id = true; + } + if (msg.has_channel_id ()) + { + m_channel_id = msg.channel_id (); + } + if (msg.has_mute ()) + { + m_mute = msg.mute (); + } + if (msg.has_deaf ()) + { + m_deaf = msg.deaf (); + } + if (msg.has_suppress ()) + { + m_suppress = msg.suppress (); + } + if (msg.has_self_mute ()) + { + m_self_mute = msg.self_mute (); + } + if (msg.has_self_deaf ()) + { + m_self_deaf = msg.self_deaf (); + } + if (msg.has_texture ()) + { + m_texture.clear (); + const auto& tmp = msg.texture (); + std::copy (std::begin (tmp), std::end (tmp), std::back_inserter (m_texture)); + } + if (msg.has_comment ()) + { + m_comment = msg.comment (); + } + if (msg.has_hash ()) + { + m_hash = msg.hash (); + } + if (msg.has_comment_hash ()) + { + m_comment_hash.clear (); + const auto& tmp = msg.comment_hash (); + std::copy (std::begin (tmp), std::end (tmp), + std::back_inserter (m_comment_hash)); + } + if (msg.has_texture_hash ()) + { + m_texture_hash.clear (); + const auto& tmp = msg.texture_hash (); + std::copy (std::begin (tmp), std::end (tmp), + std::back_inserter (m_texture_hash)); + } + if (msg.has_priority_speaker ()) + { + m_priority_speaker = msg.priority_speaker (); + } + if (msg.has_recording ()) + { + m_recording = msg.recording (); + } + } +} diff --git a/src/mumble/user.hh b/src/mumble/user.hh new file mode 100644 index 0000000..24a6ddc --- /dev/null +++ b/src/mumble/user.hh @@ -0,0 +1,134 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2014 Jack Chen (chendo) + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 dafoxia + Copyright (c) 2014 niko20010 + Copyright (c) 2015 loscoala + Copyright (c) 2015 Georg G. (nilsding) + Copyright (c) 2015 Karsten Nerdinger (Piratonym) + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include +#include + +#include "Mumble.pb.h" + +namespace Mumble +{ + class User + { + private: + uint32_t m_session; + std::string m_name; + uint32_t m_user_id = 0; + bool m_has_user_id; + uint32_t m_channel_id = 0; + bool m_mute = false; + bool m_deaf = false; + bool m_suppress = false; + bool m_self_mute = false; + bool m_self_deaf = false; + std::vector m_texture; + //std::vector m_plugin_context; + //std::string m_plugin_identity; + std::string m_comment; + std::string m_hash; + std::vector m_comment_hash; + std::vector m_texture_hash; + bool m_priority_speaker = false; + bool m_recording = false; + public: + inline User (const MumbleProto::UserState &msg) + { + update (msg); + } + inline auto session () const + { + return m_session; + } + inline auto name () const + { + return m_name; + } + inline auto user_id () const + { + return m_user_id; + } + inline auto has_user_id () const + { + return m_has_user_id; + } + inline auto channel_id () const + { + return m_channel_id; + } + inline auto mute () const + { + return m_mute; + } + inline auto deaf () const + { + return m_deaf; + } + inline auto suppress () const + { + return m_suppress; + } + inline auto self_mute () const + { + return m_self_mute; + } + inline auto self_deaf () const + { + return m_self_deaf; + } + inline auto texture () const + { + return m_texture; + } + inline auto comment () const + { + return m_comment; + } + inline auto hash () const + { + return m_hash; + } + inline auto comment_hash () const + { + return m_comment_hash; + } + inline auto texture_hash () const + { + return m_texture_hash; + } + inline auto priority_speaker () const + { + return m_priority_speaker; + } + inline auto recording () const + { + return m_recording; + } + void update (const MumbleProto::UserState &msg); + }; +} + diff --git a/src/mumble/version.hh b/src/mumble/version.hh new file mode 100644 index 0000000..dd76c61 --- /dev/null +++ b/src/mumble/version.hh @@ -0,0 +1,30 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2012 Matthew Perry (mattvperry) + Copyright (c) 2013 Matthew Perry (mattvperry) + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 niko20010 + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +namespace Mumble +{ + const std::string _VERSION + {"1.1.2" + }; +} diff --git a/src/network/tcp-socket.cc b/src/network/tcp-socket.cc new file mode 100644 index 0000000..36efcce --- /dev/null +++ b/src/network/tcp-socket.cc @@ -0,0 +1,94 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + +// #include +// #include +// #include +// #nclude +// #include +// #include + +#include "network/tcp-socket.hh" + +#include +#include +#include + +TCPSocket::TCPSocket (const std::string &host, uint16_t port) +{ + m_sockfd = socket (AF_INET, SOCK_STREAM, 0); + if (m_sockfd < 0) + { + throw std::string ("ERROR opening socket"); + } + + hostent *server; + server = gethostbyname (host.c_str ()); + if (server == nullptr) + { + throw std::string ("ERROR, no such host"); + } + + bzero ((char *) &m_server_addr, sizeof (m_server_addr)); + m_server_addr.sin_family = AF_INET; + bcopy ((char *) server->h_addr, (char *) &m_server_addr.sin_addr.s_addr, + server->h_length); + m_server_addr.sin_port = htons (port); +} + +TCPSocket::~TCPSocket () +{ + disconnect (); +} + +void TCPSocket::connect () +{ + if (::connect (m_sockfd, (struct sockaddr*) &m_server_addr, + sizeof (m_server_addr)) < 0) + { + throw std::string ("ERROR connecting"); + } +} + +void TCPSocket::disconnect () +{ + ::close (m_sockfd); +} + +std::string TCPSocket::read (uint32_t len) +{ + char* buffer = new char[len + 1]; + bzero(buffer, len + 1); + auto n = ::read (m_sockfd, buffer, len); + if (n < 0) + { + throw std::string ("ERROR reading from socket"); + } + std::string s (buffer, buffer + n); + delete[] buffer; + return s; +} + +void TCPSocket::write (const std::string &data) +{ + if (::write (m_sockfd, data.data (), data.size ()) < 0) + { + throw std::string ("ERROR writing to socket"); + } +} diff --git a/src/network/tcp-socket.hh b/src/network/tcp-socket.hh new file mode 100644 index 0000000..c63691d --- /dev/null +++ b/src/network/tcp-socket.hh @@ -0,0 +1,42 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +// #include + +#include + +class TCPSocket +{ +public: + TCPSocket (const std::string &host, uint16_t port); + ~TCPSocket (); + void connect (); + void disconnect (); + std::string read (uint32_t len); + void write (const std::string &data); + inline auto data () const + { + return m_sockfd; + } +private: + int m_sockfd; + sockaddr_in m_server_addr; +}; diff --git a/src/openssl/basic-input-output.cc b/src/openssl/basic-input-output.cc new file mode 100644 index 0000000..69e8fce --- /dev/null +++ b/src/openssl/basic-input-output.cc @@ -0,0 +1,36 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "openssl/basic-input-output.hh" + +namespace OpenSSL +{ + BasicInputOutput::BasicInputOutput () + { + } + + BasicInputOutput::~BasicInputOutput () + { + BIO_free (m_bio); + } + + void BasicInputOutput::write (const std::vector &data) + { + BIO_write (m_bio, data.data (), data.size ()); + } +} diff --git a/src/openssl/basic-input-output.hh b/src/openssl/basic-input-output.hh new file mode 100644 index 0000000..a50869b --- /dev/null +++ b/src/openssl/basic-input-output.hh @@ -0,0 +1,45 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include +#include +#include +#include + +namespace OpenSSL +{ + class BasicInputOutput + { + protected: + BIO *m_bio; + BasicInputOutput (); + public: + virtual ~BasicInputOutput (); + inline auto data () const + { + return m_bio; + } + void write (const std::vector &data); + + BasicInputOutput(BasicInputOutput const&) = delete; + BasicInputOutput& operator=(BasicInputOutput const&) = delete; + }; +} diff --git a/src/openssl/memory-basic-input-output.cc b/src/openssl/memory-basic-input-output.cc new file mode 100644 index 0000000..8fd5a5e --- /dev/null +++ b/src/openssl/memory-basic-input-output.cc @@ -0,0 +1,38 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "openssl/memory-basic-input-output.hh" + +namespace OpenSSL +{ + MemoryBasicInputOutput::MemoryBasicInputOutput () + { + m_bio = BIO_new (BIO_s_mem ()); + if (m_bio == nullptr) + { + throw std::string ("BIO_new () failed"); + } + } + + std::vector MemoryBasicInputOutput::mem_data () + { + char *data; + auto len = BIO_get_mem_data (m_bio, &data); + return std::vector (data, data + len); + } +} diff --git a/src/openssl/memory-basic-input-output.hh b/src/openssl/memory-basic-input-output.hh new file mode 100644 index 0000000..3bd8cbb --- /dev/null +++ b/src/openssl/memory-basic-input-output.hh @@ -0,0 +1,43 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include +#include +#include + +#include "openssl/basic-input-output.hh" + +namespace OpenSSL +{ + class MemoryBasicInputOutput : public BasicInputOutput + { + public: + MemoryBasicInputOutput (); + std::vector mem_data (); + // TODO + /* + long BIO_set_mem_eof_return(BIO *b, int v); + long BIO_set_mem_buf(BIO *b, BUF_MEM *bm, int c); + long BIO_get_mem_ptr(BIO *b, BUF_MEM **pp); + BIO* BIO_new_mem_buf(void *buf, int len); + */ + }; +} diff --git a/src/openssl/openssl.cc b/src/openssl/openssl.cc new file mode 100644 index 0000000..398dff3 --- /dev/null +++ b/src/openssl/openssl.cc @@ -0,0 +1,31 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include + +#include "openssl/openssl.hh" + +namespace OpenSSL +{ + void library_init () + { + // Always returns 1 + (void) SSL_library_init (); + } +} + diff --git a/src/openssl/openssl.hh b/src/openssl/openssl.hh new file mode 100644 index 0000000..656c71a --- /dev/null +++ b/src/openssl/openssl.hh @@ -0,0 +1,24 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +namespace OpenSSL +{ + void library_init (); +} diff --git a/src/openssl/pem.cc b/src/openssl/pem.cc new file mode 100644 index 0000000..8707dbe --- /dev/null +++ b/src/openssl/pem.cc @@ -0,0 +1,126 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "openssl/pem.hh" +#include "openssl/memory-basic-input-output.hh" + +namespace OpenSSL +{ + PKey::RSA PEM::rsa_private_key (BasicInputOutput &bio) + { + ::RSA *rsa = PEM_read_bio_RSAPrivateKey (bio.data (), nullptr, nullptr, + nullptr); + if (rsa == nullptr) + { + throw std::string ("PEM_read_bio_RSAPrivateKey () failed"); + } + return PKey::RSA (rsa, true); + } + + PKey::RSA PEM::rsa_private_key (const std::string &pem) + { + OpenSSL::MemoryBasicInputOutput bio; + bio.write (std::vector (std::begin (pem), std::end (pem))); + return rsa_private_key (bio); + } + + PKey::RSA PEM::rsa_public_key (BasicInputOutput &bio) + { + ::RSA *rsa = PEM_read_bio_RSAPublicKey (bio.data (), nullptr, nullptr, nullptr); + if (rsa == nullptr) + { + throw std::string ("PEM_read_bio_RSAPublicKey () failed"); + } + return PKey::RSA (rsa, false); + } + + PKey::RSA PEM::rsa_public_key (const std::string &pem) + { + MemoryBasicInputOutput bio; + bio.write (std::vector (std::begin (pem), std::end (pem))); + return rsa_public_key (bio); + } + + void PEM::rsa_private_key (BasicInputOutput &bio, const PKey::RSA &rsa) + { + // TODO: Why does the PEM function take a non const pointer here, + // but not in the corresponding PublicKey version??? + if (PEM_write_bio_RSAPrivateKey (bio.data (), const_cast (rsa.data ()), + nullptr, nullptr, 0, nullptr, nullptr) != 1) + { + throw std::string ("PEM_write_bio_RSAPrivateKey () failed"); + } + } + + std::string PEM::rsa_private_key (const PKey::RSA &rsa) + { + MemoryBasicInputOutput bio; + rsa_private_key (bio, rsa); + auto data = bio.mem_data (); + return std::string (std::begin (data), std::end (data)); + } + + void PEM::rsa_public_key (BasicInputOutput &bio, const PKey::RSA &rsa) + { + if (PEM_write_bio_RSAPublicKey (bio.data (), rsa.data ()) != 1) + { + throw std::string ("PEM_write_bio_RSAPublicKey () failed"); + } + } + + std::string PEM::rsa_public_key (const PKey::RSA &rsa) + { + MemoryBasicInputOutput bio; + rsa_public_key (bio, rsa); + auto data = bio.mem_data (); + return std::string (std::begin (data), std::end (data)); + } + + X509::Certificate PEM::x509 (BasicInputOutput &bio) + { + ::X509 *x509 = PEM_read_bio_X509 (bio.data (), nullptr, nullptr, nullptr); + if (x509 == nullptr) + { + throw std::string ("PEM_read_bio_X509 () failed"); + } + return X509::Certificate (x509); + } + + X509::Certificate PEM::x509 (const std::string &pem) + { + MemoryBasicInputOutput bio; + bio.write (std::vector (std::begin (pem), std::end (pem))); + return x509 (bio); + } + + void PEM::x509 (BasicInputOutput &bio, const X509::Certificate &cert) + { + if (PEM_write_bio_X509 (bio.data (), const_cast<::X509*> (cert.data ())) != 1) + { + throw std::string ("PEM_write_bio_X509 () failed"); + } + } + + std::string PEM::x509 (const X509::Certificate &cert) + { + MemoryBasicInputOutput bio; + x509 (bio, cert); + auto data = bio.mem_data (); + return std::string (std::begin (data), std::end (data)); + } +} diff --git a/src/openssl/pem.hh b/src/openssl/pem.hh new file mode 100644 index 0000000..04da529 --- /dev/null +++ b/src/openssl/pem.hh @@ -0,0 +1,49 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include + +#include "openssl/basic-input-output.hh" +#include "openssl/pkey/rsa.hh" +#include "openssl/x509/certificate.hh" + +namespace OpenSSL +{ + class PEM + { + public: + // Read RSA + static PKey::RSA rsa_private_key (BasicInputOutput &bio); + static PKey::RSA rsa_private_key (const std::string &pem); + static PKey::RSA rsa_public_key (BasicInputOutput &bio); + static PKey::RSA rsa_public_key (const std::string &pem); + // Write RSA + static void rsa_private_key (BasicInputOutput &bio, const PKey::RSA &rsa); + static std::string rsa_private_key (const PKey::RSA &rsa); + static void rsa_public_key (BasicInputOutput &bio, const PKey::RSA &rsa); + static std::string rsa_public_key (const PKey::RSA &rsa); + // Read X509 + static X509::Certificate x509 (BasicInputOutput &bio); + static X509::Certificate x509 (const std::string &pem); + // Write X509 + static void x509 (BasicInputOutput &bio, const X509::Certificate &cert); + static std::string x509 (const X509::Certificate &cert); + }; +} diff --git a/src/openssl/pkey/envelope-message-digest.cc b/src/openssl/pkey/envelope-message-digest.cc new file mode 100644 index 0000000..90b1088 --- /dev/null +++ b/src/openssl/pkey/envelope-message-digest.cc @@ -0,0 +1,32 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "openssl/pkey/envelope-message-digest.hh" + +namespace OpenSSL::PKey +{ + EnvelopeMessageDigest::EnvelopeMessageDigest (const EVP_MD *evp_md) : m_evp_md ( + evp_md) + { + } + + EnvelopeMessageDigest EnvelopeMessageDigest::sha256 () + { + return EnvelopeMessageDigest (EVP_sha256 ()); + } +} diff --git a/src/openssl/pkey/envelope-message-digest.hh b/src/openssl/pkey/envelope-message-digest.hh new file mode 100644 index 0000000..3b1d202 --- /dev/null +++ b/src/openssl/pkey/envelope-message-digest.hh @@ -0,0 +1,37 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include + +namespace OpenSSL::PKey +{ + class EnvelopeMessageDigest + { + private: + const EVP_MD *m_evp_md; + public: + EnvelopeMessageDigest (const EVP_MD *evp_md); + static EnvelopeMessageDigest sha256 (); + inline auto data () const + { + return m_evp_md; + } + }; +} diff --git a/src/openssl/pkey/envelope.cc b/src/openssl/pkey/envelope.cc new file mode 100644 index 0000000..1fc8db1 --- /dev/null +++ b/src/openssl/pkey/envelope.cc @@ -0,0 +1,65 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "openssl/pkey/envelope.hh" + +namespace OpenSSL::PKey +{ + Envelope::Envelope () + { + m_evp_pkey = EVP_PKEY_new (); + if (m_evp_pkey == nullptr) + { + throw std::string ("EVP_PKEY_new () failed"); + } + } + + Envelope::~Envelope () + { + EVP_PKEY_free (m_evp_pkey); + } + + Envelope::Envelope (EVP_PKEY *evp_pkey) + { + m_evp_pkey = evp_pkey; + } + + Envelope::Envelope (const RSA &rsa) : Envelope () + { + if (EVP_PKEY_set1_RSA (m_evp_pkey, const_cast<::RSA*> (rsa.data ())) != 1) + { + throw std::string ("EVP_PKEY_set1_RSA () failed"); + } + } + + Envelope::Envelope (Envelope &&other) + { + m_evp_pkey = other.m_evp_pkey; + other.m_evp_pkey = nullptr; + } + + Envelope& Envelope::operator= (Envelope &&other) + { + assert (this != &other); + EVP_PKEY_free (m_evp_pkey); + m_evp_pkey = other.m_evp_pkey; + other.m_evp_pkey = nullptr; + return *this; + } + +} diff --git a/src/openssl/pkey/envelope.hh b/src/openssl/pkey/envelope.hh new file mode 100644 index 0000000..c074222 --- /dev/null +++ b/src/openssl/pkey/envelope.hh @@ -0,0 +1,51 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include + +#include "openssl/pkey/rsa.hh" + +namespace OpenSSL::PKey +{ + class Envelope + { + private: + EVP_PKEY *m_evp_pkey = nullptr; + public: + Envelope (); + ~Envelope (); + Envelope (EVP_PKEY *evp_pkey); + Envelope (const RSA &rsa); + Envelope (Envelope &&other); + Envelope& operator= (Envelope &&other); + // There is no dup () function to duplicate an Envelope_PKEY struct + // A workaround could be to use i2d_PrivateKey () and d2i_PrivateKey () + // which gets the DER representation and then converts it back + // However there might only be a public key in the struct which complicates things?! + //Envelope (const Envelope &other) = delete; + //Envelope& operator= (Envelope other) = delete; + // friend void swap (RSA &first, RSA &second); // nothrow + inline const EVP_PKEY* data () const + { + return m_evp_pkey; + } + }; +} diff --git a/src/openssl/pkey/rsa.cc b/src/openssl/pkey/rsa.cc new file mode 100644 index 0000000..a21f93d --- /dev/null +++ b/src/openssl/pkey/rsa.cc @@ -0,0 +1,96 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "openssl/basic-input-output.hh" +#include "openssl/pkey/rsa.hh" +#include "openssl/pem.hh" + +namespace OpenSSL::PKey +{ + RSA::RSA () + { + } + + RSA::RSA (::RSA *rsa, bool has_private) + : m_has_private (has_private), m_rsa (rsa) + { + } + + RSA::RSA (size_t size) : RSA () + { + m_rsa = RSA_generate_key (size, RSA_F4, nullptr, nullptr); + if (m_rsa == nullptr) + { + throw std::string ("RSA_generate_key () failed"); + } + } + + RSA::RSA (const RSA &other) + : m_has_private (other.m_has_private) + { + if (other.m_has_private) + { + m_rsa = RSAPrivateKey_dup (const_cast<::RSA*> (other.m_rsa)); + if (m_rsa == nullptr) + { + throw std::string ("RSAPrivateKey_dup () failed"); + } + } + else + { + m_rsa = RSAPublicKey_dup (const_cast<::RSA*> (other.m_rsa)); + if (m_rsa == nullptr) + { + throw std::string ("RSAPublicKey_dup () failed"); + } + } + } + + RSA::RSA (RSA &&other) : RSA () + { + swap (*this, other); + } + + RSA& RSA::operator= (RSA other) + { + swap (*this, other); + return *this; + } + + void swap (RSA &first, RSA &second) + { + using std::swap; + swap (first.m_has_private, second.m_has_private); + swap (first.m_rsa, second.m_rsa); + } + + RSA::~RSA () + { + RSA_free (m_rsa); + } + + RSA RSA::public_key () + { + ::RSA *rsa = RSAPublicKey_dup (m_rsa); + if (rsa == nullptr) + { + throw std::string ("RSAPublicKey_dup () failed"); + } + return RSA (rsa, false); + } +} diff --git a/src/openssl/pkey/rsa.hh b/src/openssl/pkey/rsa.hh new file mode 100644 index 0000000..f5e7f70 --- /dev/null +++ b/src/openssl/pkey/rsa.hh @@ -0,0 +1,50 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include + +// algorithm-independent private key in memory +#include "openssl/evp.h" +// RSA algorithm +#include "openssl/rsa.h" + +namespace OpenSSL::PKey +{ + class RSA + { + private: + bool m_has_private = true; + ::RSA *m_rsa = nullptr; + public: + RSA (); + RSA (::RSA *rsa, bool has_private); + RSA (size_t size); + RSA (const RSA &other); + RSA (RSA &&other); + RSA& operator= (RSA other); + friend void swap (RSA &first, RSA &second); // nothrow + ~RSA (); + RSA public_key (); + inline const ::RSA* data () const + { + return m_rsa; + } + }; +} diff --git a/src/openssl/ssl/context.cc b/src/openssl/ssl/context.cc new file mode 100644 index 0000000..f6cef6e --- /dev/null +++ b/src/openssl/ssl/context.cc @@ -0,0 +1,58 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "openssl/ssl/context.hh" + +namespace OpenSSL::SSL +{ + Context::Context (Method method) + { + m_ssl_ctx = SSL_CTX_new (method.data ()); + if (m_ssl_ctx == nullptr) + { + throw std::string ("SSL_CTX_new () failed"); + } + } + + Context::~Context () + { + SSL_CTX_free (m_ssl_ctx); + } + + void Context::verify_none () + { + SSL_CTX_set_verify (m_ssl_ctx, SSL_VERIFY_NONE, nullptr); + } + + void Context::key (const OpenSSL::PKey::RSA &key) + { + if (SSL_CTX_use_RSAPrivateKey (m_ssl_ctx, const_cast (key.data ())) != 1) + { + throw std::string ("SSL_CTX_use_RSAPrivateKey () failed"); + } + } + + void Context::cert (const OpenSSL::X509::Certificate &cert) + { + if (SSL_CTX_use_certificate (m_ssl_ctx, + const_cast<::X509*> (cert.data ())) != 1) + { + throw std::string ("SSL_CTX_use_certificate () failed"); + } + } +} diff --git a/src/openssl/ssl/context.hh b/src/openssl/ssl/context.hh new file mode 100644 index 0000000..88a9ad1 --- /dev/null +++ b/src/openssl/ssl/context.hh @@ -0,0 +1,44 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include "openssl/pkey/rsa.hh" +#include "openssl/x509/certificate.hh" +#include "openssl/ssl/method.hh" + +namespace OpenSSL::SSL +{ + class Context + { + private: + SSL_CTX *m_ssl_ctx; + std::unique_ptr m_key; + std::unique_ptr m_cert; + public: + Context (Method method); + ~Context (); + void verify_none (); + void key (const OpenSSL::PKey::RSA &key); + void cert (const OpenSSL::X509::Certificate &cert); + inline auto data () const + { + return m_ssl_ctx; + } + }; +} diff --git a/src/openssl/ssl/method.cc b/src/openssl/ssl/method.cc new file mode 100644 index 0000000..6dc9f66 --- /dev/null +++ b/src/openssl/ssl/method.cc @@ -0,0 +1,39 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "openssl/ssl/method.hh" + +namespace OpenSSL::SSL +{ + Method::Method (const SSL_METHOD *ssl_method) : m_ssl_method (ssl_method) + { + + } + + Method Method::sslv23 () + { + return Method (SSLv23_method ()); + } + + /* + Method Method::tls () + { + return Method (TLS_method ()); + } + */ +} diff --git a/src/openssl/ssl/method.hh b/src/openssl/ssl/method.hh new file mode 100644 index 0000000..cfdd71c --- /dev/null +++ b/src/openssl/ssl/method.hh @@ -0,0 +1,38 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include + +namespace OpenSSL::SSL +{ + class Method + { + private: + const SSL_METHOD *m_ssl_method; + public: + Method (const SSL_METHOD *ssl_method); + static Method sslv23 (); + // static Method tls (); + inline auto data () const + { + return m_ssl_method; + } + }; +} diff --git a/src/openssl/ssl/socket.cc b/src/openssl/ssl/socket.cc new file mode 100644 index 0000000..fbfe259 --- /dev/null +++ b/src/openssl/ssl/socket.cc @@ -0,0 +1,85 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include + +#include "openssl/ssl/socket.hh" + +namespace OpenSSL::SSL +{ + Socket::Socket (TCPSocket &socket, Context &context) : m_socket (socket) + { + m_ssl = SSL_new (context.data ()); + if (m_ssl == nullptr) + { + throw std::string ("SSL_new () failed"); + } + if (SSL_set_fd (m_ssl, socket.data ()) != 1) + { + throw std::string ("SSL_set_fd () failed"); + } + } + + void Socket::connect () + { + m_socket.connect (); + if (SSL_connect (m_ssl) != 1) + { + throw std::string ("SSL_connect () failed"); + } + } + + void Socket::close () + { + // TODO: Does it make sense to handle the result here? + (void) SSL_shutdown (m_ssl); + } + + std::vector Socket::read (size_t len) + { + std::vector buf (len, 0); + size_t bytes_read = SSL_read (m_ssl, buf.data (), buf.size ()); + if (bytes_read <= 0) + { + throw std::string ("SSL_read () failed"); + } + else + { + //std::cout << "SSL_read (" << len << ") returned " << bytes_read << " bytes: " << std::endl; + //for (const auto &it : buf) + // { + // std::cout << (int) it << " "; + // } + //std::cout << std::endl; + } + return buf; + } + + void Socket::write (const std::vector &data) + { + if (SSL_write (m_ssl, data.data (), data.size ()) <= 0) + { + throw std::string ("SSL_write () failed"); + } + } + + Socket::~Socket () + { + SSL_free (m_ssl); + } +} diff --git a/src/openssl/ssl/socket.hh b/src/openssl/ssl/socket.hh new file mode 100644 index 0000000..b1b1972 --- /dev/null +++ b/src/openssl/ssl/socket.hh @@ -0,0 +1,42 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include + +#include "network/tcp-socket.hh" +#include "openssl/ssl/context.hh" + +namespace OpenSSL::SSL +{ + class Socket + { + private: + TCPSocket &m_socket; + ::SSL *m_ssl; + public: + Socket (TCPSocket &socket, Context &context); + ~Socket (); + void connect (); + void close (); + std::vector read (size_t len); + void write (const std::vector &data); + }; +} diff --git a/src/openssl/x509/certificate.cc b/src/openssl/x509/certificate.cc new file mode 100644 index 0000000..837dea9 --- /dev/null +++ b/src/openssl/x509/certificate.cc @@ -0,0 +1,115 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "openssl/x509/certificate.hh" + +namespace OpenSSL::X509 +{ + Certificate::Certificate () + { + m_x509 = X509_new (); + if (m_x509 == nullptr) + { + throw std::string ("X509_new () failed"); + } + } + + Certificate::Certificate (::X509 *x509) : m_x509 (x509) + { + } + + Certificate::Certificate(const Certificate &other) + { + m_x509 = X509_dup (other.m_x509); + if (m_x509 == nullptr) + { + throw std::string ("X509_dup () failed"); + } + } + + Certificate::~Certificate () + { + X509_free (m_x509); + } + + void Certificate::issuer (const Name &issuer) + { + X509_set_issuer_name (m_x509, const_cast (issuer.data ())); + } + + Name Certificate::issuer (void) const + { + return Name (X509_get_issuer_name (m_x509)); + } + + void Certificate::subject (const Name &subject) + { + X509_set_subject_name (m_x509, const_cast (subject.data ())); + } + + void Certificate::not_before (long not_before) + { + X509_gmtime_adj (X509_get_notBefore (m_x509), not_before); + } + + void Certificate::not_after (time_t not_after) + { + X509_gmtime_adj (X509_get_notAfter (m_x509), not_after); + } + + void Certificate::public_key (OpenSSL::PKey::Envelope &&public_key) + { + m_public_key = std::move (public_key); + X509_set_pubkey (m_x509, const_cast (m_public_key.data ())); + } + + void Certificate::serial (int serial) + { + ASN1_INTEGER_set (X509_get_serialNumber (m_x509), serial); + } + + void Certificate::version (long version) + { + if (X509_set_version (m_x509, version) != 1) + { + throw std::string ("X509_set_version () failed"); + } + } + + void Certificate::add_extension (const Extension &extension) + { + if (X509_add_ext (m_x509, const_cast (extension.data ()), + -1) != 1) + { + throw std::string ("X509_add_ext () failed"); + } + } + + void Certificate::sign (const OpenSSL::PKey::Envelope &key, + const OpenSSL::PKey::EnvelopeMessageDigest &digest) + { + // C-C-C-Combo Breaker: X509_sign returns the size of the signature + // in bytes, instead of "1" for success, like most other functions do. + // It always returns 0 on failure though. + if (X509_sign (m_x509, const_cast (key.data ()), + digest.data ()) == 0) + { + throw std::string ("X509_sign () failed"); + } + } +} diff --git a/src/openssl/x509/certificate.hh b/src/openssl/x509/certificate.hh new file mode 100644 index 0000000..f5293d6 --- /dev/null +++ b/src/openssl/x509/certificate.hh @@ -0,0 +1,57 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include + +#include "openssl/pkey/envelope.hh" +#include "openssl/pkey/envelope-message-digest.hh" +#include "openssl/x509/name.hh" +#include "openssl/x509/extension.hh" + +namespace OpenSSL::X509 +{ + class Certificate + { + private: + ::X509 *m_x509; + OpenSSL::PKey::Envelope m_public_key; + public: + Certificate (); + Certificate (::X509 *x509); + Certificate (const Certificate &other); + ~Certificate (); + void issuer (const Name &issuer); + Name issuer (void) const; + void subject (const Name &subject); + void not_before (long not_before); + void not_after (long not_after); + void public_key (OpenSSL::PKey::Envelope &&public_key); + void serial (int serial); + void version (long version); + void add_extension (const Extension &extension); + void sign (const OpenSSL::PKey::Envelope &key, + const OpenSSL::PKey::EnvelopeMessageDigest &digest); + inline const ::X509* data () const + { + return m_x509; + } + }; +} diff --git a/src/openssl/x509/extension-factory.cc b/src/openssl/x509/extension-factory.cc new file mode 100644 index 0000000..cf9003c --- /dev/null +++ b/src/openssl/x509/extension-factory.cc @@ -0,0 +1,69 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "openssl/x509/extension-factory.hh" + +#include +#include + +namespace OpenSSL::X509 +{ + ExtensionFactory::ExtensionFactory (const OpenSSL::X509::Certificate + &issuer_certificate, + const OpenSSL::X509::Certificate &subject_certificate) + : m_issuer_certificate (issuer_certificate), + m_subject_certificate (subject_certificate) + { + } + + Extension ExtensionFactory::create_extension (const std::string &oid, + const std::string &value, + bool critical) + { + // Is name a long name? + int nid = OBJ_ln2nid (oid.c_str ()); + if (nid == 0) + { + // Is it a short name? + nid = OBJ_sn2nid (oid.c_str ()); + if (nid == 0) + { + throw std::string ("unknown OID: " + oid); + } + } + std::string combined_value; + if (critical) + { + combined_value = "critical,"; + } + combined_value += value; + X509_EXTENSION *ext = nullptr; + X509V3_CTX ctx; + X509V3_set_ctx_nodb (&ctx); + X509V3_set_ctx (&ctx, const_cast<::X509*> (m_issuer_certificate.data ()), + const_cast<::X509*> (m_subject_certificate.data ()), nullptr, nullptr, + 0); + ext = X509V3_EXT_conf_nid (nullptr, &ctx, nid, + const_cast (combined_value.c_str ())); + if (ext == nullptr) + { + throw std::string ("X509V3_EXT_conf_nid () failed"); + } + return Extension (ext); + } +} diff --git a/src/openssl/x509/extension-factory.hh b/src/openssl/x509/extension-factory.hh new file mode 100644 index 0000000..2deddac --- /dev/null +++ b/src/openssl/x509/extension-factory.hh @@ -0,0 +1,37 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include "openssl/x509/certificate.hh" +#include "openssl/x509/extension.hh" + +namespace OpenSSL::X509 +{ + class ExtensionFactory + { + private: + const OpenSSL::X509::Certificate &m_issuer_certificate; + const OpenSSL::X509::Certificate &m_subject_certificate; + public: + ExtensionFactory (const OpenSSL::X509::Certificate &issuer_certificate, + const OpenSSL::X509::Certificate &subject_certificate); + Extension create_extension (const std::string &oid, const std::string &value, + bool critical); + }; +} diff --git a/src/openssl/x509/extension.cc b/src/openssl/x509/extension.cc new file mode 100644 index 0000000..0597b97 --- /dev/null +++ b/src/openssl/x509/extension.cc @@ -0,0 +1,31 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "openssl/x509/extension.hh" + +namespace OpenSSL::X509 +{ + Extension::Extension (X509_EXTENSION *ext) : m_ext (ext) + { + } + + Extension::~Extension () + { + X509_EXTENSION_free (m_ext); + } +} diff --git a/src/openssl/x509/extension.hh b/src/openssl/x509/extension.hh new file mode 100644 index 0000000..e792323 --- /dev/null +++ b/src/openssl/x509/extension.hh @@ -0,0 +1,37 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include + +namespace OpenSSL::X509 +{ + class Extension + { + private: + X509_EXTENSION *m_ext; + public: + Extension (X509_EXTENSION *ext); + ~Extension (); + inline const X509_EXTENSION* data () const + { + return m_ext; + } + }; +} diff --git a/src/openssl/x509/name.cc b/src/openssl/x509/name.cc new file mode 100644 index 0000000..c46c813 --- /dev/null +++ b/src/openssl/x509/name.cc @@ -0,0 +1,54 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "name.hh" + +namespace OpenSSL::X509 +{ + Name::Name () + { + m_name = X509_NAME_new (); + if (m_name == nullptr) + { + throw std::string ("X509_NAME_new () failed"); + } + } + + Name::Name (X509_NAME *name) : m_name (name) + { + } + + Name::~Name () + { + X509_NAME_free (m_name); + } + + void Name::add_entry (const std::string &field, const std::string &text) + { + if (field == "C" && text.size () > 2) + { + throw std::string ("Country name too long (should be 2 characters long)"); + } + if (X509_NAME_add_entry_by_txt (m_name, field.c_str (), MBSTRING_UTF8, + reinterpret_cast (text.c_str ()), + text.size (), -1, 0) != 1) + { + throw std::string ("X509_NAME_add_entry_by_txt () failed"); + } + } +} diff --git a/src/openssl/x509/name.hh b/src/openssl/x509/name.hh new file mode 100644 index 0000000..aa244ba --- /dev/null +++ b/src/openssl/x509/name.hh @@ -0,0 +1,40 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include + +namespace OpenSSL::X509 +{ + class Name + { + private: + X509_NAME *m_name; + public: + Name (); + Name (X509_NAME *name); + ~Name (); + void add_entry (const std::string &field, const std::string &text); + inline const X509_NAME* data () const + { + return m_name; + } + }; +} diff --git a/src/opus/constants.hh b/src/opus/constants.hh new file mode 100644 index 0000000..0a0d994 --- /dev/null +++ b/src/opus/constants.hh @@ -0,0 +1,54 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include + +namespace Opus +{ + enum class SampleRate : opus_int32 + { + fs_8k = 8'000, + fs_12k = 12'000, + fs_16k = 16'000, + fs_24k = 24'000, + fs_48k = 48'000 + /*'*/ + }; + + enum class Channels : int + { + mono = 1, + stereo = 2 + }; + + enum class Application : opus_int32 + { + voip = OPUS_APPLICATION_VOIP, + audio = OPUS_APPLICATION_AUDIO, + restricted_lowdelay = OPUS_APPLICATION_RESTRICTED_LOWDELAY + }; + + enum class Signal : opus_int32 + { + auto_ = OPUS_AUTO, + voice = OPUS_SIGNAL_VOICE, + music = OPUS_SIGNAL_MUSIC + }; +} diff --git a/src/opus/decoder.cc b/src/opus/decoder.cc new file mode 100644 index 0000000..a72e9cc --- /dev/null +++ b/src/opus/decoder.cc @@ -0,0 +1,93 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2014 Aaron Herting (qwertos) + Copyright (c) 2014 dafoxia + Copyright (c) 2015 loscoala + Copyright (c) 2015 dafoxia + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "opus/decoder.hh" + +namespace Opus +{ + Decoder::Decoder(size_t sample_rate, size_t frame_size, size_t channels) + : m_frame_size (frame_size), m_channels (channels) + { + m_decoder = opus_decoder_create (sample_rate, channels, nullptr); + } + + Decoder::~Decoder () + { + opus_decoder_destroy (m_decoder); + } + + void Decoder::reset () + { + opus_decoder_ctl (m_decoder, OPUS_RESET_STATE); + } + + std::vector Decoder::decode (const std::vector &data) + { + static_assert(sizeof(opus_int16) == sizeof(int16_t)); + std::vector samples (m_frame_size * m_channels, 0); + auto sample_count = opus_decode (m_decoder, data.data (), data.size (), + samples.data (), + samples.size () * sizeof(int16_t), 0); + if (sample_count < 0) + { + m_lasterror = sample_count; + sample_count = 0; + } + samples.resize (sample_count); + return samples; + } + + /* + void Decoder::decode_missed () + { + // This is incomplete, needs to pass + // the exact missing duration size and do something with the output + // See documentation for opus_decode () + opus_decode (m_decoder, nullptr, 0, nullptr, 0, 0); + } + */ + + std::string Decoder::lasterror_text () + { + switch (m_lasterror) + { + case 0: + return "OK"; + case -1: + return "BAD ARG"; + case -2: + return "BUFFER TOO SMALL"; + case -3: + return "INTERNAL ERROR"; + case -4: + return "INVALID PACKET"; + case -5: + return "UNIMPLEMENTED"; + case -6: + return "INVALID STATE"; + case -7: + return "ALLOC FAIL"; + default: + return "UNKNOWN ERROR"; + } + } +} diff --git a/src/opus/decoder.hh b/src/opus/decoder.hh new file mode 100644 index 0000000..4697e5e --- /dev/null +++ b/src/opus/decoder.hh @@ -0,0 +1,53 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2014 Aaron Herting (qwertos) + Copyright (c) 2014 dafoxia + Copyright (c) 2015 loscoala + Copyright (c) 2015 dafoxia + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include +#include +#include + +#include + +namespace Opus +{ + class Decoder + { + private: + size_t m_frame_size; + size_t m_channels; + OpusDecoder *m_decoder; + int32_t m_lasterror; + public: + Decoder (size_t sample_rate, size_t frame_size, size_t channels); + ~Decoder (); + void reset (); + std::vector decode (const std::vector &data); + void decode_missed (); + inline auto lasterror () const + { + return m_lasterror; + } + std::string lasterror_text (); + }; +} diff --git a/src/opus/encoder.cc b/src/opus/encoder.cc new file mode 100644 index 0000000..80a2ff8 --- /dev/null +++ b/src/opus/encoder.cc @@ -0,0 +1,250 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 dafoxia + Copyright (c) 2015 loscoala + Copyright (c) 2015 dafoxia + Copyright (c) 2016 dafoxia + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include "opus/encoder.hh" + +namespace Opus +{ + Encoder::Encoder (SampleRate sample_rate, size_t frame_size, Channels channels, + size_t size) + : m_frame_size (frame_size), m_size (size) + { + m_encoder = opus_encoder_create (static_cast (sample_rate), + static_cast (channels), + static_cast (Application::audio), nullptr); + } + + Encoder::~Encoder () + { + opus_encoder_destroy (m_encoder); + } + + void Encoder::reset () + { + opus_encoder_ctl (m_encoder, OPUS_RESET_STATE); + } + + void Encoder::vbr (bool enable) + { + opus_encoder_ctl (m_encoder, OPUS_SET_VBR(enable ? 1 : 0)); + } + + void Encoder::vbr_constraint (bool enable) + { + opus_encoder_ctl (m_encoder, OPUS_SET_VBR_CONSTRAINT(enable ? 1 : 0)); + } + + void Encoder::packet_loss_percentage (size_t percentage) + { + assert (percentage <= 100); + opus_encoder_ctl (m_encoder, OPUS_SET_PACKET_LOSS_PERC(percentage)); + } + + void Encoder::bitrate (size_t bitrate) + { + opus_encoder_ctl (m_encoder, OPUS_SET_BITRATE(bitrate)); + } + + void Encoder::bitrate_max () + { + opus_encoder_ctl (m_encoder, OPUS_SET_BITRATE(OPUS_BITRATE_MAX)); + } + + void Encoder::bitrate_auto () + { + opus_encoder_ctl (m_encoder, OPUS_SET_BITRATE(OPUS_AUTO)); + } + + void Encoder::signal (Signal signal) + { + opus_encoder_ctl (m_encoder, OPUS_SET_SIGNAL(static_cast (signal))); + } + + std::vector Encoder::encode (const std::vector &samples) + { + std::vector out (m_size, 0); + auto len = opus_encode (m_encoder, samples.data (), m_frame_size, out.data (), + m_size); + if (len < 0 || static_cast (len) != m_size) + { + throw std::string ("opus_encode returned wrong length"); + } + return out; + } + + /* + def opus_get_complexity + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_GET_COMPLEXITY_REQUEST + end + + def opus_get_bitrate + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_GET_BITRATE_REQUEST + end + + def opus_set_complexity(value) + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_SET_COMPLEXITY_REQUEST, :int32, value + end + + def opus_get_vbr + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_GET_VBR_REQUEST + end + + def opus_set_vbr_constraint(value) + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_SET_VBR_CONSTRAINT_REQUEST, :int32, value + end + + def opus_get_vbr_constraint + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_GET_VBR_CONSTRAINT_REQUEST + end + + #* + def opus_set_force_cannels(value) + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_SET_FORCE_CHANNELS_REQUEST, :int32, value + end + + #define OPUS_GET_FORCE_CHANNELS(x) OPUS_GET_FORCE_CHANNELS_REQUEST, __opus_check_int_ptr(x) + def opus_get_force_channels + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_GET_FORCE_CHANNELS_REQUEST + end + + #define OPUS_SET_MAX_BANDWIDTH(x) OPUS_SET_MAX_BANDWIDTH_REQUEST, __opus_check_int(x) + def opus_set_max_bandwidth(value) + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_SET_MAX_BANDWIDTH_REQUEST, :int32, value + end + + #define OPUS_GET_MAX_BANDWIDTH(x) OPUS_GET_MAX_BANDWIDTH_REQUEST, __opus_check_int_ptr(x) + def opus_get_max_bandwidth + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_GET_MAX_BANDWIDTH_REQUEST + end + + #define OPUS_SET_BANDWIDTH(x) OPUS_SET_BANDWIDTH_REQUEST, __opus_check_int(x) + def opus_set_bandwidth(value) + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_SET_BANDWIDTH_REQUEST, :int32, value + end + + #define OPUS_SET_SIGNAL(x) OPUS_SET_SIGNAL_REQUEST, __opus_check_int(x) + def opus_set_signal(value) + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_SET_SIGNAL_REQUEST, :int32, value + end + + #define OPUS_GET_SIGNAL(x) OPUS_GET_SIGNAL_REQUEST, __opus_check_int_ptr(x) + def opus_get_signal + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_GET_SIGNAL_REQUEST + end + + #define OPUS_SET_APPLICATION(x) OPUS_SET_APPLICATION_REQUEST, __opus_check_int(x) + def opus_set_application(value) + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_SET_APPLICATION_REQUEST, :int32, value + end + + #define OPUS_GET_APPLICATION(x) OPUS_GET_APPLICATION_REQUEST, __opus_check_int_ptr(x) + def opus_get_application + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_GET_APPLICATION_REQUEST, :int32, value + end + + # + #define OPUS_GET_SAMPLE_RATE(x) OPUS_GET_SAMPLE_RATE_REQUEST, __opus_check_int_ptr(x) + def opus_encoder_get_sample_rate + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_GET_SAMPLE_RATE_REQUEST + end + + # + #define OPUS_GET_LOOKAHEAD(x) OPUS_GET_LOOKAHEAD_REQUEST, __opus_check_int_ptr(x) + def opus_get_lookahead + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_GET_LOOKAHEAD_REQUEST + end + + #define OPUS_SET_INBAND_FEC(x) OPUS_SET_INBAND_FEC_REQUEST, __opus_check_int(x) + def opus_set_inband_fec(value) + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_SET_INBAND_FEC_REQUEST, :int32, value + end + + #define OPUS_GET_INBAND_FEC(x) OPUS_GET_INBAND_FEC_REQUEST, __opus_check_int_ptr(x) + def opus_get_inband_fec + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_GET_INBAND_FEC_REQUEST + end + + #define OPUS_SET_PACKET_LOSS_PERC(x) OPUS_SET_PACKET_LOSS_PERC_REQUEST, __opus_check_int(x) + def opus_set_packet_loss_perc(value) + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_SET_PACKET_LOSS_PERC_REQUEST, :int32, value + end + + #define OPUS_GET_PACKET_LOSS_PERC(x) OPUS_GET_PACKET_LOSS_PERC_REQUEST, __opus_check_int_ptr(x) + def opus_get_packet_loss_perc + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_GET_PACKET_LOSS_PERC_REQUEST + end + */ + + void Encoder::dtx (bool enable) + { + opus_encoder_ctl (m_encoder, OPUS_SET_DTX(enable ? 1 : 0)); + } + + /* + #define OPUS_GET_DTX(x) OPUS_GET_DTX_REQUEST, __opus_check_int_ptr(x) + def opus_get_dtx + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_GET_DTX_REQUEST + end + + #define OPUS_SET_LSB_DEPTH(x) OPUS_SET_LSB_DEPTH_REQUEST, __opus_check_int(x) + def opus_set_lsb_depth(value) + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_SET_LSB_DEPTH_REQUEST, :int32, value + end + + #define OPUS_GET_LSB_DEPTH(x) OPUS_GET_LSB_DEPTH_REQUEST, __opus_check_int_ptr(x) + def opus_get_lsb_depth + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_GET_LSB_DEPTH_REQUEST + end + + #define OPUS_GET_LAST_PACKET_DURATION(x) OPUS_GET_LAST_PACKET_DURATION_REQUEST, __opus_check_int_ptr(x) + def opus_get_last_packet_duration + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_GET_LAST_PACKET_DURATION_REQUEST + end + + #define OPUS_SET_EXPERT_FRAME_DURATION(x) OPUS_SET_EXPERT_FRAME_DURATION_REQUEST, __opus_check_int(x) + def opus_set_expert_frame_duration(value) + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_SET_EXPERT_FRAME_DURATION_REQUEST, :int32, value + end + + #define OPUS_GET_EXPERT_FRAME_DURATION(x) OPUS_GET_EXPERT_FRAME_DURATION_REQUEST, __opus_check_int_ptr(x) + def opus_get_expert_frame_duration + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_GET_EXPERT_FRAME_DURATION_REQUEST + end + + #define OPUS_SET_PREDICTION_DISABLED(x) OPUS_SET_PREDICTION_DISABLED_REQUEST, __opus_check_int(x) + def opus_set_prediction_disabled(value) + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_SET_PREDICTION_DISABLED_REQUEST, :int32, value + end + + #define OPUS_GET_PREDICTION_DISABLED(x) OPUS_GET_PREDICTION_DISABLED_REQUEST, __opus_check_int_ptr(x) + def opus_get_prediction_disabled + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_GET_PREDICTION_DISABLED_REQUEST + end + + #define OPUS_GET_BANDWIDTH(x) OPUS_GET_BANDWIDTH_REQUEST, __opus_check_int_ptr(x) + def opus_encoder_get_bandwidth + Opus.opus_encoder_ctl @encoder, Opus::Constants::OPUS_GET_BANDWIDTH_REQUEST + end + */ + +} diff --git a/src/opus/encoder.hh b/src/opus/encoder.hh new file mode 100644 index 0000000..6c1bd6d --- /dev/null +++ b/src/opus/encoder.hh @@ -0,0 +1,111 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2014 Matthew Perry (mattvperry) + Copyright (c) 2014 dafoxia + Copyright (c) 2015 loscoala + Copyright (c) 2015 dafoxia + Copyright (c) 2016 dafoxia + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include +#include +#include +#include +#include + +#include "opus/constants.hh" + +namespace Opus +{ + class Encoder + { + // attr_reader :sample_rate, :frame_size, :channels, :vbr_rate, :vbr_constraint, :bitrate, :signal + private: + size_t m_frame_size; + size_t m_size; + OpusEncoder *m_encoder; + public: + Encoder (SampleRate sample_rate, size_t frame_size, Channels channels, + size_t size); + ~Encoder (); + void reset (); + void dtx (bool enable); + void vbr (bool enable); + void vbr_constraint (bool enable); + void packet_loss_percentage (size_t percentage); + void bitrate (size_t bitrate); + void bitrate_max (); + void bitrate_auto (); + void signal (Signal signal); + inline size_t frame_size (void) const + { + return m_frame_size; + } + inline void frame_size (size_t frame_size) + { + m_frame_size = frame_size; + } + std::vector encode (const std::vector &samples); + }; +} + +/* + def vbr_rate=(value) + def vbr_contstraint=(value) + def packet_loss_perc=(value) + def bitrate=(value) + def signal=(value) + def set_frame_size frame_size + def encode(data) + def encode_ptr(memorypointer) + def opus_get_complexity + def opus_get_bitrate + def opus_set_complexity(value) + def opus_set_bitrate(value) + def opus_set_vbr(value) + def opus_get_vbr + def opus_set_vbr_constraint(value) + def opus_get_vbr_constraint + def opus_set_force_cannels(value) + def opus_get_force_channels + def opus_set_max_bandwidth(value) + def opus_get_max_bandwidth + def opus_set_bandwidth(value) + def opus_set_signal(value) + def opus_get_signal + def opus_set_application(value) + def opus_get_application + def opus_encoder_get_sample_rate + def opus_get_lookahead + def opus_set_inband_fec(value) + def opus_get_inband_fec + def opus_set_packet_loss_perc(value) + def opus_get_packet_loss_perc + def opus_set_dtx(value) + def opus_get_dtx + def opus_set_lsb_depth(value) + def opus_get_lsb_depth + def opus_get_last_packet_duration + def opus_set_expert_frame_duration(value) + def opus_get_expert_frame_duration + def opus_set_prediction_disabled(value) + def opus_get_prediction_disabled + def opus_encoder_get_bandwidth +*/ diff --git a/src/pluginbot/conf.cc b/src/pluginbot/conf.cc new file mode 100644 index 0000000..4002e60 --- /dev/null +++ b/src/pluginbot/conf.cc @@ -0,0 +1,117 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2015 Natenom + Copyright (c) 2015 Stunner1984 + Copyright (c) 2015 dafoxia + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include + +#include "pluginbot/conf.hh" + +namespace MumblePluginBot +{ + extern const std::string logo; + extern const std::string superanswer; + + std::map std_config () + { + return + { + {"version", "2.0"}, + {"main_tempdir", "/home/botmaster/temp/"}, + {"ducking", "false"}, + {"control_automute", "true"}, + {"chan_notify", "0x0000"}, + {"controlstring", "."}, + {"debug", "true"}, + {"ticks_per_hour", "3600"}, + {"listen_to_private_message_only", "false"}, + {"listen_to_registered_users_only", "true"}, + {"use_vbr", "1"}, + {"stop_on_unregistered_users", "true"}, + {"use_comment_for_status_display", "true"}, + // {"set_comment_available: false"}, + {"mumbleserver_host", "127.0.0.1"}, + {"mumbleserver_port", "64738"}, + {"mumbleserver_username", "MumbleRubyPluginbot"}, + {"mumbleserver_userpassword", ""}, + {"mumbleserver_targetchannel", "Bottest"}, + {"quality_bitrate", "72000"}, + {"initial_volume", "65"}, + {"mpd_fifopath", "/home/botmaster/mpd1/mpd.fifo"}, + {"mpd_host", "localhost"}, + {"mpd_port", "7701"}, + {"controllable", "true"}, + {"certdirectory", "/home/botmaster/src/certs"}, + {"need_binding", "false"}, + {"boundto", "nobody"}, + {"logo", logo}, + {"superanswer", superanswer}, + {"superpassword", "kaguBe gave me all the power from kaguBe and I wish to "}, + {"youtube_downloadsubdir", "downloadedfromyt/"}, + {"youtube_tempsubdir", "youtubeplugin/"}, + {"youtube_stream", "nil"}, + {"youtube_youtubedl", "/home/botmaster/src/youtube-dl"}, + {"youtube_to_mp3", "nil"}, + {"youtube_youtubedl_options", ""}, + {"youtube_commandlineprefixes", ""}, + {"youtube_maxresults", "200"}, + {"soundcloud_downloadsubdir", "downloadedfromsc/"}, + {"soundcloud_tempsubdir", "soundcloudplugin/"}, + {"soundcloud_youtubedl", "/home/botmaster/src/youtube-dl"}, + {"soundcloud_to_mp3", "nil"}, + {"soundcloud_youtubedl_options", ""}, + {"soundcloud_commandlineprefixes", ""}, + {"bandcamp_downloadsubdir", "downloadedfrombc/"}, + {"bandcamp_tempsubdir", "bandcampplugin/"}, + {"bandcamp_youtubedl", "/home/botmaster/src/youtube-dl"}, + {"bandcamp_to_mp3", "nil"}, + {"bandcamp_youtubedl_options", ""}, + {"bandcamp_commandlineprefixes", ""}, + {"ektoplazm_downloadsubdir", "ektoplazm/"}, + {"ektoplazm_tempsubdir", "ektoplazmplugin/"}, + {"mpd_musicfolder", "/home/botmaster/music/"}, + {"control_historysize", "20"}, + { + "mpd_template_comment_disabled", + "Artist: DISABLED
" + "Title: DISABLED
" + "Album: DISABLED

" + "Write %shelp to me, to get a list of my commands!" + }, + { + "mpd_template_comment_enabled", + "Artist: %s
" + "Title: %s
" \ + "Album: %s

" \ + "Write %shelp to me, to get a list of my commands!" + } + }; + } + + std::map ext_config () + { + return { }; + } + + const std::string logo {""}; + + const std::string superanswer + {"" + }; +} diff --git a/src/pluginbot/conf.hh b/src/pluginbot/conf.hh new file mode 100644 index 0000000..095f2e2 --- /dev/null +++ b/src/pluginbot/conf.hh @@ -0,0 +1,32 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2015 Natenom + Copyright (c) 2015 Stunner1984 + Copyright (c) 2015 dafoxia + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include + +namespace MumblePluginBot +{ + std::map std_config (); + std::map ext_config (); +} + diff --git a/src/pluginbot/main.cc b/src/pluginbot/main.cc new file mode 100644 index 0000000..3439fd6 --- /dev/null +++ b/src/pluginbot/main.cc @@ -0,0 +1,966 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2015 dafoxia + Copyright (c) 2015 netinetwalker + Copyright (c) 2015 Natenom + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#include +#include +#include +#include + +#include "mumble/configuration.hh" +#include "pluginbot/main.hh" +#include "pluginbot/plugin.hh" +#include "pluginbot/conf.hh" + +namespace MumblePluginBot +{ + const std::string org_source_url = + "https://github.com/dafoxia/mumble-ruby-pluginbot/"; + const std::string org_doc_url = + "https://wiki.natenom.com/w/Mumble-Ruby-Pluginbot/"; + const std::string org_license_url = + "https://github.com/dafoxia/mumble-ruby-pluginbot/blob/master/LICENSE/"; + const std::string org_issues_url = + "https://github.com/dafoxia/mumble-ruby-pluginbot/issues/"; + const std::string org_wiki_url = + "https://wiki.natenom.com/w/Mumble-Ruby-Pluginbot/"; + + Main::Main (const std::map &settings, + const std::string &config_filename, + const Aither::Log &log) : m_settings (settings), m_log (log) + { + // load all plugins + /* + Dir["./plugins/ *.rb"].each do |f| + require f + std::cout << "Plugin //{f} loaded." + end + */ + if (config_filename != "") + { + AITHER_VERBOSE("parse extra config"); + /* + if File.exist? v + begin + require_relative v + ext_config() + rescue + std::cout << "Your config could not be loaded!" << std::endl; + end + else + std::cout << "Config path- and/or filename is wrong!" << std::endl; + std::cout << "used //{v}" << std::endl; + std::cout << "Config not loaded!" << std::endl; + end + */ + } + if (m_settings.find ("ducking_volume") == std::end (m_settings)) + { + m_settings["ducking_volume"] = 20; + } + m_configured_settings = m_settings; + } + + Main::~Main () + { + stop_duckthread (); + try + { + m_ticktimer_running = false; + m_ticktimer.join (); + } + catch (const std::system_error &e) + { + AITHER_WARNING("Can't join timertick thread"); + } + } + + + void Main::init_settings () + { + m_run = false; + m_cli = std::make_unique (m_settings["mumbleserver_host"], + std::stoi (m_settings["mumbleserver_port"]), + m_settings["mumbleserver_username"], + m_settings["mumbleserver_userpassword"], [&] (auto conf) + { + conf.bitrate = std::stoi (m_settings["quality_bitrate"]); + conf.vbr_rate = std::stoi (m_settings["use_vbr"]); + conf.ssl_cert_opts.cert_dir = m_settings["certdirectory"]; + }); + } + + void Main::disconnect () + { + if (m_cli->connected ()) + { + m_cli->disconnect (); + } + } + + int Main::calc_overall_bandwidth (int framelength, int bitrate) const + { + return (1000.f / framelength * 320.f) + bitrate; + } + + int Main::overall_bandwidth () const + { + return calc_overall_bandwidth(m_cli->frame_length ().count (), + m_cli->bitrate ()); + } + + void Main::start_duckthread () + { + using namespace std::chrono_literals; + auto &player = m_cli->player (); + if (m_duckthread_running) + { + return; + } + m_duckthread_running = true; + m_duckthread = std::thread {[&] { + while (m_duckthread_running && player.volume () < 100) + { + player.volume (player.volume () + 2); + std::this_thread::sleep_for (20ms); + } + } + }; + } + +void Main::stop_duckthread () +{ + try + { + m_duckthread_running = false; + m_duckthread.join (); + } + catch (...) + { + AITHER_DEBUG("[killduckthread] can't kill because #{$!}"); + } +} + +void Main::mumble_start () +{ + using namespace std::chrono_literals; + m_cli->on ([&] (auto serverconfig) + { + m_settings["mumbleserver_imagelength"] = serverconfig.image_message_length (); + m_settings["mumbleserver_messagelength"] = serverconfig.message_length (); + m_settings["mumbleserver_allow_html"] = serverconfig.allow_html (); + }); + + m_cli->on ([&] (auto suggestconfig) + { + m_settings["mumbleserver_version"] = suggestconfig.version (); + m_settings["mumbleserver_positional"] = suggestconfig.positional (); + m_settings["mumbleserver_push_to_talk"] = suggestconfig.push_to_talk (); + }); + + m_cli->connect (); + //for (;;) + // { + // std::this_thread::sleep_for (0.5s); + // } + for (int i = 0; i < 10; i++) + { + if (m_cli->connected ()) + { + break; + } + AITHER_DEBUG("Connecting to the server is still ongoing."); + std::this_thread::sleep_for (0.5s); + } + if (!m_cli->connected ()) + { + m_cli->disconnect (); + AITHER_DEBUG("Connection timed out"); + return; + } + AITHER_VERBOSE("connected"); + std::this_thread::sleep_for (0.1s); + for (int i = 0; i < 10; i++) + { + if (m_cli->synced ()) + { + break; + } + AITHER_DEBUG("Server sync is still ongoing."); + std::this_thread::sleep_for (0.5s); + } + if (!m_cli->synced ()) + { + AITHER_DEBUG("Server sync timed out"); + m_cli->disconnect (); + return; + } + { + const std::string &targetchannel = m_settings["mumbleserver_targetchannel"]; + try + { + m_cli->join_channel (targetchannel); + } + catch (...) + { + AITHER_DEBUG("[joincannel] Can't join " + targetchannel + "!"); + } + } + m_cli->comment (""); + m_settings["set_comment_available"] = "true"; + m_cli->on ([&] (const auto &msg) + { + this->handle_user_state_changes (msg); + }); + m_cli->on ([&] (const auto &msg) + { + this->handle_text_message (msg); + }); + m_cli->on ([&] (const auto &_) + { + (void)_; + if (m_settings["ducking"] == "true") + { + m_cli->player ().volume ((std::stoi (m_settings["ducking_volume"]) | 0x1) - 1); + this->start_duckthread (); + } + }); + m_run = true; + m_cli->player ().stream_named_pipe (m_settings["mpd_fifopath"]); + init_plugins (); + m_ticktimer_running = true; + m_ticktimer = std::thread + { + [&] (void) + { + timertick (); + } + }; +} + +void Main::init_plugins () +{ + /* + #init all plugins + init = @settings.clone + init[:cli] = @cli + + std::cout << "initplugins" << std::endl; + Plugin.plugins.each do |plugin_class| + @plugin << plugin_class.new + end + + maxcount = @plugin.length + allok = 0 + while allok != @plugin.length do + allok = 0 + @plugin.each do |plugin| + init = plugin.init(init) + if plugin.name != "false" + allok += 1 + end + end + maxcount -= 1 + break if maxcount <= 0 + end + std::cout << "maybe not all plugins functional!" << std::endl; if maxcount <= 0 + */ +} + + void Main::timertick () + { + using namespace std::chrono_literals; + int ticks_per_hour = 3600; + try + { + ticks_per_hour = std::stoi (m_settings["ticks_per_hour"]); + } + catch(std::invalid_argument) + { + } + while (m_ticktimer_running) + { + // TODO: The commented out part is WRONG. + // It sleeps for a very short amount of time and makes the process use 100% CPU + // So find out how to do proper math with std::chrono here! + // OTOH: Keeping it at 1s should be fine for now. + (void) ticks_per_hour; + std::this_thread::sleep_for (1s); // (1h / ticks_per_hour); + auto time = std::chrono::system_clock::now (); + (void) time; + /* + @plugin.each do |plugin| + plugin.ticks(time) + end + */ + } + } + + void Main::handle_user_state_changes (const MumbleProto::UserState &msg) + { + (void) msg; + // msg.actor = session_id of user who did something on someone, + // if self done, both is the same. + // msg.session = session_id of the target + } + + void Main::handle_text_message (const MumbleProto::TextMessage &msg) + { + if (!msg.has_actor ()) + { + // ignore text messages from the server + return; + } + // This is hacky because mumble uses -1 for user_id of unregistered users, + // while mumble-ruby seems to just omit the value for unregistered users. + // With this hacky thing commands from SuperUser are also being ignored. + uint32_t msg_userid = (uint32_t) -1; + bool sender_is_registered = false; + auto &user = m_cli->users ().at (msg.actor ()); + if (user.has_user_id ()) + { + msg_userid = user.user_id (); + sender_is_registered = true; + } + // user on a blacklist? + if (m_settings.find (user.hash ()) != std::end (m_settings)) + { + // virtually unregister + sender_is_registered = false; + if (m_settings["debug"] == "true") + { + std::cout << "user in blacklist!" << std::endl; + } + } + // FIXME: strip html tags. + // BEFORE doing this we need to ensure that no plugin needs the html + // source code. For example youtube plugin needs them... + //msg.message.gsub!(/(<[^<^>]*>)/, "") + + if (msg.message () == m_settings["superpassword"] + "restart") + { + m_settings = m_configured_settings; + m_cli->text_channel (m_cli->me ().channel_id (), + m_settings["superanswer"]); + m_run = false; + m_cli->disconnect (); + } + + if (msg.message () == m_settings["superpassword"] + "reset") + { + m_settings = m_configured_settings; + m_cli->text_channel (m_cli->me ().channel_id (), + m_settings["superanswer"]); + } + + if (!sender_is_registered + && m_settings["listen_to_registered_users_only"] == "true") + { + if (m_settings["debug"] == "true") + { + std::cout << + "Debug: Not listening because " + "'listen_to_registered_users_only' is 'true' " + "and sender is unregistered or on a blacklist." + << std::endl; + } + return; + } + + // Check whether message is a private one or was sent to the channel. + // Channel messages don't have a session, so skip them + if (!msg.session_size () + && m_settings["listen_to_private_message_only"] == "true") + { + if (m_settings["debug"] == "true") + { + std::cout << + "Debug: Not listening because " + "'listen_to_private_message_only' is 'true' " + "and message was sent to channel." + << std::endl; + } + return; + } + if (m_settings["controllable"] != "true") + { + return; + } + // message consists of: control_string + command [+ space + arguments] + std::string message = msg.message (); + const std::string &cs = m_settings["controlstring"]; + auto cs_size = cs.size (); + // Check whether we have a command after the controlstring. + if (message.size () <= cs_size || message.compare (0, cs_size, cs)) + { + return; + } + // remove control string + message = message.substr (cs_size); + auto space_pos = message.find (' '); + const std::string command = message.substr (0, space_pos); + std::string arguments; + if (space_pos != std::string::npos && space_pos + 1 < message.size ()) + { + arguments = message.substr (space_pos + 1); + } + handle_text_message2 (msg, command, arguments, msg_userid); + } + + std::string a_tag (const std::string &url, const std::string &label) + { + return "" + label + ""; + } + + const std::string br_tag = "
\n"; + + std::string li_tag (const std::string &inner_html) + { + return "
  • " + inner_html + "
  • \n"; + } + + std::string tr_tag (const std::string &inner_html) + { + return "" + inner_html + "\n"; + } + + std::string td_tag (const std::string &inner_html) + { + return "" + inner_html + ""; + } + + std::string u_tag (const std::string &inner_html) + { + return "" + inner_html + ""; + } + + std::string i_tag (const std::string &inner_html) + { + return "" + inner_html + ""; + } + + std::string b_tag (const std::string &inner_html) + { + return "" + inner_html + ""; + } + + std::string red_span (const std::string &inner_html) + { + return "" + inner_html + ""; + } + + std::string ul_tag (const std::string &inner_html) + { + std::stringstream ss; + ss << "
      " << std::endl; + ss << inner_html; + ss << "
    " << std::endl; + return ss.str (); + } + + std::string table_tag (const std::string &inner_html) + { + std::stringstream ss; + ss << "" << std::endl; + ss << inner_html; + ss << "
    " << std::endl; + return ss.str (); + } + + void Main::handle_text_message2 (const MumbleProto::TextMessage &msg, + const std::string &command, + const std::string &arguments, + uint32_t msg_userid) + { + const auto &actor = msg.actor (); + /* + @plugin.each do |plugin| + plugin.handle_chat(msg, message) + end + */ + + std::function reply = [this, actor] (auto msg) + { + m_cli->text_user (actor, msg); + }; + + std::map commands = + { + { + "about", { + false, [] (auto ca) + { + about (ca); + } + } + }, + { + "settings", { + false, [] (auto ca) + { + settings (ca); + } + } + }, + { + "set", { + true, [] (auto ca) + { + set (ca); + } + } + }, + { + "bind", { + false, [] (auto ca) + { + bind (ca); + } + } + }, + { + "unbind", { + true, [] (auto ca) + { + ca.settings["boundto"] = "nobody"; + } + } + }, + { + "reset", { + true, [this] (auto ca) + { + (void) ca; + m_settings = m_configured_settings; + } + } + }, + { + "restart", { + true, [this] (auto ca) + { + m_run = false; + ca.cli.disconnect (); + } + } + }, + { + "register", { + true, [this] (auto ca) + { + ca.cli.register_self (); + } + } + }, + { + "blacklist", { + true, [] (auto ca) + { + blacklist (ca); + } + } + }, + { + "ducking", { + false, [] (auto ca) + { + ducking (ca); + } + } + }, + { + "duckvol", { + false, [] (auto ca) + { + duckvol (ca); + } + } + }, + { + "bitrate", { + false, [] (auto ca) + { + bitrate (ca); + } + } + }, + { + "framesize", { + false, [] (auto ca) + { + framesize (ca); + } + } + }, + { + "bandwidth", { + false, [] (auto ca) + { + bandwidth (ca); + } + } + }, + { + "plugins", { + false, [] (auto ca) + { + plugins (ca); + } + } + }, + { + "jobs", { + false, [] (auto ca) + { + jobs (ca); + } + } + }, + { + "internals", { + false, [] (auto ca) + { + internals (ca); + } + } + }, + { + "help", { + false, [] (auto ca) + { + help (ca); + } + } + } + }; + + CommandArgs ca = {msg, command, arguments, msg_userid, m_settings, reply, + *m_cli, *this + }; + bool boundto_msg_user = m_settings["boundto"] == std::to_string (msg_userid); + + const auto it = commands.find (command); + if (it != std::end (commands)) + { + if (!it->second.needs_binding || boundto_msg_user) + { + it->second.func (ca); + } + } +} + +void Main::about (CommandArgs &ca) +{ + std::stringstream header; + header << br_tag + "Hi, I am a MRPB++ bot." << br_tag; + std::stringstream out; + out << li_tag (a_tag (org_source_url, "Get my source code")) << std::endl; + out << li_tag (a_tag (org_doc_url, "Read my documentation")) << std::endl; + out << li_tag ("I am licensed under the " + a_tag (org_license_url, + "MIT license")) << std::endl; + out << li_tag ("If you have any issues, bugs or ideas please tell us on " + + a_tag (org_issues_url, org_issues_url)) << std::endl; + ca.reply (header.str () + ul_tag (out.str ())); +} + +void Main::settings (CommandArgs &ca) +{ + std::stringstream out; + for (const auto &it : ca.settings) + { + if (it.first != "logo") + { + out << tr_tag (td_tag (it.first) + td_tag (it.second)) << std::endl; + } + } + ca.reply (table_tag (out.str ())); +} + +void Main::set (CommandArgs &ca) +{ + const std::string &arguments = ca.arguments; + auto equals_pos = arguments.find ('='); + if (equals_pos != std::string::npos) + { + const std::string key = arguments.substr (0, equals_pos); + const std::string val = arguments.substr (equals_pos + 1); + ca.settings[key] = val; + } +} + +void Main::bind (CommandArgs &ca) +{ + if (ca.settings["boundto"] == "nobody") + { + ca.settings["boundto"] = std::to_string (ca.msg_userid); + } +} + +void Main::blacklist (CommandArgs &ca) +{ + const std::string &username = ca.arguments; + Mumble::User* user = ca.cli.find_user (username); + if (user) + { + const std::string hash_text = user->hash (); + ca.settings[hash_text] = username; + ca.reply ("This ban is active until the bot restarts. " + "To permaban add following line to your configuration:"); + ca.reply (hash_text + "=" + username); + } + else + { + ca.reply ("User not found: " + username); + } +} + +void Main::ducking (CommandArgs &ca) +{ + const std::string ducking = ca.settings["ducking"] == "true" ? "false" : "true"; + ca.settings["ducking"] = ducking; + if (ducking == "true") + { + ca.reply ("Music ducking is on."); + } + else + { + ca.reply ("Music ducking is off."); + } +} + + void Main::duckvol (CommandArgs &ca) + { + if (ca.arguments == "") + { + const std::string &volume = ca.settings["ducking_volume"]; + const std::string &ducking = ca.settings["ducking"]; + ca.reply ("Ducking volume is set to " + volume + + "% of normal volume. Ducking itself it set to: " + ducking + "."); + } + else + { + try + { + int volume = std::stoi (ca.arguments); + if (volume >= 0 && volume <= 100) + { + ca.settings["ducking_volume"] = volume; + ca.reply ("ducking is set to " + std::to_string (volume) + + "% of normal volume."); + } + else + { + ca.reply ("Volume must be within a range of 0 to 100."); + } + } + catch (std::invalid_argument) + { + ca.reply ("Invalid volume: " + ca.arguments); + } + } + } + + void Main::bitrate (CommandArgs &ca) + { + if (ca.arguments == "") + { + const std::string &bitrate = std::to_string (ca.cli.bitrate ()); + ca.reply ("Encoding is set to " + bitrate + " bit/s."); + } + else + { + try + { + int bitrate = std::stoi (ca.arguments); + ca.cli.bitrate (bitrate); + ca.reply ("Encoding is set now to " + std::to_string (bitrate) + " bit/s."); + ca.reply ("The calculated overall bandwidth is " + std::to_string ( + ca.main.overall_bandwidth ()) + " bit/s."); + } + catch (std::invalid_argument) + { + ca.reply ("Invalid bitrate: " + ca.arguments); + } + } + } + + void Main::framesize (CommandArgs &ca) + { + if (ca.arguments == "") + { + std::chrono::milliseconds frame_length = ca.cli.frame_length (); + ca.reply ("sending in " + std::to_string (frame_length.count ()) + + " ms frames."); + } + else + { + try + { + std::chrono::milliseconds frame_length {std::stoi (ca.arguments)}; + ca.cli.frame_length (frame_length); + ca.reply ("Sending now in " + std::to_string (frame_length.count ()) + + " ms frames."); + ca.reply ("The calculated overall bandwidth is " + std::to_string ( + ca.main.overall_bandwidth ()) + " bit/s."); + ca.reply ("Server settings " + std::to_string (ca.cli.max_bandwidth ()) + + " bit/s."); + } + catch (std::invalid_argument) + { + ca.reply ("Invalid framesize: " + ca.arguments); + } + } + } + + void Main::bandwidth (CommandArgs &ca) + { + ca.reply (br_tag + u_tag ("Current bandwidth related settings:") + br_tag + + "The calculated overall bandwidth (audio + overhead): " + std::to_string ( + ca.main.overall_bandwidth ()) + " bit/s" + br_tag + + " Audio encoding bandwidth: " + std::to_string (ca.cli.bitrate ()) + " bit/s" + + br_tag + + " Framesize: " + std::to_string (ca.cli.frame_length ().count ()) + " ms"); + } + + void Main::plugins (CommandArgs &ca) + { + std::stringstream ss; + /* + @plugin.each do |plugin| + help << plugin.name + "
    " + end + */ + std::string help = br_tag + red_span ("Loaded plugins:" + br_tag + b_tag ( + ss.str ())); + const std::string cs = ca.settings["controlstring"]; + help += br_tag + b_tag (cs + "help " + i_tag ("pluginname")) + + " Get the help text for the specific plugin." + br_tag + br_tag + + "For example send the following text to " + + "get some basic control commands of the bot:" + br_tag + b_tag ( + cs + "help mpd") + br_tag; + ca.reply (help); + } + + void Main::jobs (CommandArgs &ca) + { + (void) ca; + // TODO: Removed, but there is experimental code in the original MRPB + } + + void Main::internals (CommandArgs &ca) + { + const std::string cs = ca.settings["controlstring"]; + + std::string help {br_tag + red_span (b_tag ("Internal commands")) + br_tag}; + help += b_tag ("superpassword+restart") + " will restart the bot." + br_tag; + help += b_tag ("superpassword+reset") + " will reset variables to start values." + + br_tag; + help += b_tag (cs + "about") + " Get information about this bot." + br_tag; + help += b_tag (cs + "settings") + " display current settings." + br_tag; + help += b_tag (cs + "set " + i_tag ("variable=value")) + + " Set variable to value." + br_tag; + help += b_tag (cs + "bind") + + " Bind bot to a user. " + "(some functions will only work if bot is bound)." + + br_tag; + help += b_tag (cs + "unbind") + " Unbind bot." + br_tag; + help += b_tag (cs + "reset") + + " Reset variables to default value. Needs binding!" + br_tag; + help += b_tag (cs + "restart") + " Restart Bot. Needs binding." + br_tag; + help += b_tag (cs + "blacklist " + i_tag ("username")) + + " Add user to blacklist. Needs binding." + br_tag; + help += b_tag (cs + "register") + + " Let the bot register itself on the current server. " + + "Works only if server allows it. " + + "If it doesn't work ask an administrator of your Mumble server. " + + "Be aware that after registration only " + + "an administrator can change the name of the bot." + + br_tag; + help += b_tag (cs + "ducking") + " Toggle voice ducking on/off." + br_tag; + help += b_tag (cs + "duckvol " + i_tag ("volume")) + + " Set the ducking volume (% of normal volume)." + br_tag; + help += b_tag (cs + "duckvol") + " Show current ducking volume." + br_tag; + help += b_tag (cs + "bitrate " + i_tag ("rate in kbit/s")) + + " Set audio encoding rate. " + + "Note that the bot needs additional bandwidth for overhead "+ + "so the overall bandwidth is higher than this bitrate." + + br_tag; + help += b_tag (cs + "bandwidth") + + " Show information about the overall bandwidth, " + + "audio bandwidth (bitrate) and framesize." + + br_tag; + + ca.reply (help); + } + +void Main::help (CommandArgs &ca) +{ + if (ca.arguments == "all") + { + // Send help texts of all plugins. + /* + std::string help; + @plugin.each do |plugin| + help = plugin.help(help.to_s) + ca.reply (help); + end + */ + } + else if (ca.arguments != "") + { + // Send help for a specific plugin. + /* + std::string help; + @plugin.each do |plugin| + help = plugin.help('') if plugin.name.upcase == message.split[1].upcase + end + ca.reply (help); + */ + } + else + { + // Send default help text. + const std::string cs = ca.settings["controlstring"]; + std::string help = br_tag; + help += "Hi, I am a " + a_tag (org_wiki_url, "Mumble-Ruby-Pluginbot") + + " and YOU can control me through text commands." + br_tag; + help += br_tag; + help += "I will give you a good start with the basic commands you " + "need to control the music I have to offer :) - if you " + "send me the following command:" + br_tag; + help += b_tag (cs + "help mpd") + br_tag; + help += br_tag; + help += "If you are more interested in who/what I am, send to me:" + br_tag; + help += b_tag (cs + "about") + br_tag; + help += br_tag; + help += b_tag (u_tag ("Commands for advanced users:")) + br_tag; + help += b_tag (cs + "plugins") + " - Get a list of available plugins." + br_tag; + help += br_tag; + help += "Note: Every plugin has its own help text; to get it send the command: " + + br_tag; + help += b_tag (cs + "help name_of_the_plugin") + br_tag; + help += "For example: " + br_tag; + help += b_tag (cs + "help mpd") + br_tag; + help += br_tag; + help += b_tag (u_tag ("Commands for experts only:")) + br_tag; + help += b_tag (cs + "internals") + " - See my internal commands." + br_tag; + ca.reply (help); + } +} +} diff --git a/src/pluginbot/main.hh b/src/pluginbot/main.hh new file mode 100644 index 0000000..aa4d9f6 --- /dev/null +++ b/src/pluginbot/main.hh @@ -0,0 +1,105 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2015 dafoxia + Copyright (c) 2015 netinetwalker + Copyright (c) 2015 Natenom + Copyright (c) 2016 Promi + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include + +#include "aither/log.hh" +#include "mumble/Mumble.pb.h" +#include "mumble/client.hh" + +namespace MumblePluginBot +{ + + class Main; + + struct CommandArgs + { + const MumbleProto::TextMessage &msg; + const std::string &command; + const std::string &arguments; + uint32_t msg_userid; + std::map settings; + std::function reply; + Mumble::Client &cli; + const Main &main; + }; + + struct Command + { + bool needs_binding; + std::function func; + }; + + class Main + { + public: + Main (const std::map &settings, + const std::string &config_filename, const Aither::Log &log); + ~Main (); + inline bool run () const + { + return m_run; + } + void init_settings (); + void disconnect (); + int calc_overall_bandwidth (int framelength, int bitrate) const; + int overall_bandwidth () const; + void mumble_start (); + private: + bool m_run = false; + bool m_duckthread_running = false; + bool m_ticktimer_running = false; + std::thread m_duckthread; + std::thread m_ticktimer; + std::unique_ptr m_cli; + std::map m_settings; + std::map m_configured_settings; + const Aither::Log &m_log; + std::string parse_cmd_options (int argc, char *argv[]); + void timertick (); + void handle_user_state_changes (const MumbleProto::UserState &msg); + void handle_text_message (const MumbleProto::TextMessage &msg); + void handle_text_message2 (const MumbleProto::TextMessage &msg, + const std::string &command, const std::string &arguments, uint32_t msg_userid); + void start_duckthread (); + void stop_duckthread (); + void init_plugins (); + + static void about (CommandArgs &ca); + static void settings (CommandArgs &ca); + static void set (CommandArgs &ca); + static void bind (CommandArgs &ca); + static void blacklist (CommandArgs &ca); + static void ducking (CommandArgs &ca); + static void duckvol (CommandArgs &ca); + static void bitrate (CommandArgs &ca); + static void framesize (CommandArgs &ca); + static void bandwidth (CommandArgs &ca); + static void plugins (CommandArgs &ca); + static void jobs (CommandArgs &ca); + static void internals (CommandArgs &ca); + static void help (CommandArgs &ca); + }; + +} diff --git a/src/pluginbot/plugin.hh b/src/pluginbot/plugin.hh new file mode 100644 index 0000000..9bfbc97 --- /dev/null +++ b/src/pluginbot/plugin.hh @@ -0,0 +1,97 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2015 dafoxia + Copyright (c) 2015 Natenom + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +class Plugin +{ +}; + +/* +class Plugin + def self.plugins + @plugins ||= [] + end + + def self.inherited(klass) + @plugins ||= [] + + @plugins << klass + end + + # Usually a good idea for debugging if you have lots of methods + def handle_chat(msg, message) + @user = msg.actor + #raise "#{self.class.name} doesn't implement `handle_chat`!" + end + + def handle_command(command) + #raise "#{self.class.name} doesn't implement `handle_command`!" + end + + def handle_response + # + end + + def handle_help(text) + text << "#{self.class.name} does'nt implement a help" + end + + def ticks(time) + #enable periodic timer for plugins + end + + def init(init) + @@bot = init + end + + private + def prozessmessage(message) + # count lines + # for future use (send long messages in smaller parts) + lines = message.count("
    ") + message.count("") + puts lines + return message + end + def privatemessage(message) + begin + @@bot[:cli].text_user(@user, message) + rescue + puts "Sending message to user #{@user} failed. Maybe left server before we try to send." + end + end + def messageto(actor, message) + begin + @@bot[:cli].text_user(actor, message) + rescue + puts "Sending message to user #{actor} failed. Maybe left server before we try to send." + end + end + def channelmessage(message) + begin + @@bot[:cli].text_channel(@@bot[:cli].me.current_channel, message) + rescue + puts "Sending message to channel #{@@bot[:cli].me.current_channel} failed. ->should never happen<-" + end + end + +end + +*/ diff --git a/src/util/base64.hh b/src/util/base64.hh new file mode 100644 index 0000000..47bc505 --- /dev/null +++ b/src/util/base64.hh @@ -0,0 +1,75 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Manuel Martinez + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include + +// Original source from stackoverflow: http://stackoverflow.com/a/34571089/426242 + +inline std::string base64_encode(const std::vector &in) +{ + std::string out; + + int val = 0, valb = -6; + for (uint8_t c : in) + { + val = (val << 8) + c; + valb += 8; + while (valb >= 0) + { + out.push_back ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(val + >> valb) & 0x3F]); + valb -= 6; + } + } + if (valb > -6) + { + out.push_back("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(( + val << 8) >> (valb + 8)) & 0x3F]); + } + while (out.size() % 4) + { + out.push_back('='); + } + return out; +} + +/* +inline std::string base64_decode(const std::string &in) { + + std::string out; + + std::vector T(256,-1); + for (int i=0; i<64; i++) T["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[i]] = i; + + int val=0, valb=-8; + for (uchar c : in) { + if (T[c] == -1) break; + val = (val<<6) + T[c]; + valb += 6; + if (valb>=0) { + out.push_back(char((val>>valb)&0xFF)); + valb-=8; + } + } + return out; +} +*/ diff --git a/src/util/endian.hh b/src/util/endian.hh new file mode 100644 index 0000000..8d8699e --- /dev/null +++ b/src/util/endian.hh @@ -0,0 +1,119 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ +/* + MRPB++ - An extensible Mumble bot + Copyright (c) 2016 Phobos (promi) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ +#pragma once + +#include +#include +#include +#include + +const int be_test_var = 1; +#define is_bigendian() ( (*(char*)&be_test_var) == 0 ) + +class EndianUtils +{ +public: + static inline std::vector from_s16le (const std::vector + &bytes) + { + auto ptr = reinterpret_cast (bytes.data ()); + if (!is_bigendian ()) + { + return std::vector(ptr, ptr + bytes.size ()); + } + else + { + std::vector v; + for (size_t i = 0; i < bytes.size () / 2; i +=2) + { + v.push_back ( + ptr[i + 1] << 8 | + ptr[i + 0] << 0 + ); + } + return v; + } + } + + static inline uint16_t value_from_u16be (const std::vector &bytes, + size_t offset) + { + assert (bytes.size () >= offset + 2); + if (is_bigendian ()) + { + return reinterpret_cast (bytes.data()) [offset]; + } + else + { + return + bytes[offset + 0] << 8 | + bytes[offset + 1] << 0; + } + } + + static inline uint32_t value_from_u32be (const std::vector &bytes, + size_t offset) + { + assert (bytes.size () >= offset + 4); + if (is_bigendian ()) + { + return reinterpret_cast (bytes.data()) [offset]; + } + else + { + return + bytes[offset + 0] << 24 | + bytes[offset + 1] << 16 | + bytes[offset + 2] << 8 | + bytes[offset + 3] << 0; + } + } + + static inline void add_to_u16be (std::vector &bytes, uint16_t value) + { + if (is_bigendian ()) + { + bytes.push_back (value >> 0); + bytes.push_back (value >> 8); + } + else + { + bytes.push_back (value >> 8); + bytes.push_back (value >> 0); + } + } + + static inline void add_to_u32be (std::vector &bytes, uint32_t value) + { + if (is_bigendian ()) + { + bytes.push_back (value >> 0); + bytes.push_back (value >> 8); + bytes.push_back (value >> 16); + bytes.push_back (value >> 24); + } + else + { + bytes.push_back (value >> 24); + bytes.push_back (value >> 16); + bytes.push_back (value >> 8); + bytes.push_back (value >> 0); + } + } +};