nbxmpp-0.5.3/0000755000175000017500000000000012552000654014202 5ustar asterixasterix00000000000000nbxmpp-0.5.3/PKG-INFO0000644000175000017500000000037012552000654015277 0ustar asterixasterix00000000000000Metadata-Version: 1.0 Name: nbxmpp Version: 0.5.3 Summary: Non blocking Jabber/XMPP module Home-page: http://python-nbxmpp.gajim.org Author: Yann Leboulanger Author-email: asterix@lagaule.org License: UNKNOWN Description: UNKNOWN Platform: UNKNOWN nbxmpp-0.5.3/COPYING0000644000175000017500000010451312321263757015252 0ustar asterixasterix00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 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 General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is 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. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. 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. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. 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 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. Use with the GNU Affero General Public License. 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 Affero 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 special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 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 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 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 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". 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 GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . nbxmpp-0.5.3/nbxmpp/0000755000175000017500000000000012552000654015506 5ustar asterixasterix00000000000000nbxmpp-0.5.3/nbxmpp/tls_nb.py0000644000175000017500000004663012321264112017345 0ustar asterixasterix00000000000000## tls_nb.py ## based on transports_nb.py ## ## Copyright (C) 2003-2004 Alexey "Snake" Nezhdanov ## modified by Dimitur Kirov ## modified by Tomas Karasek ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, 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 General Public License for more details. from __future__ import print_function import socket import ssl from .plugin import PlugIn import sys import os import time import traceback import logging log = logging.getLogger('nbxmpp.tls_nb') USE_PYOPENSSL = False PYOPENSSL = 'PYOPENSSL' PYSTDLIB = 'PYSTDLIB' try: #raise ImportError("Manually disabled PyOpenSSL") import OpenSSL.SSL import OpenSSL.crypto USE_PYOPENSSL = True log.info("PyOpenSSL loaded") except ImportError: log.debug("Import of PyOpenSSL failed:", exc_info=True) # FIXME: Remove these prints before release, replace with a warning dialog. print("=" * 79, file=sys.stderr) print("PyOpenSSL not found, falling back to Python builtin SSL objects (insecure).", file=sys.stderr) print("=" * 79, file=sys.stderr) def gattr(obj, attr, default=None): try: return getattr(obj, attr) except AttributeError: return default class SSLWrapper: """ Abstract SSLWrapper base class """ class Error(IOError): """ Generic SSL Error Wrapper """ def __init__(self, sock=None, exc=None, errno=None, strerror=None, peer=None): self.parent = IOError errno = errno or gattr(exc, 'errno') or exc.args[0] strerror = strerror or gattr(exc, 'strerror') or gattr(exc, 'args') if not isinstance(strerror, str): strerror = repr(strerror) self.sock = sock self.exc = exc self.peer = peer self.exc_name = None self.exc_args = None self.exc_str = None self.exc_repr = None if self.exc is not None: self.exc_name = str(self.exc.__class__) self.exc_args = gattr(self.exc, 'args') self.exc_str = str(self.exc) self.exc_repr = repr(self.exc) if not errno: try: if isinstance(exc, OpenSSL.SSL.SysCallError): if self.exc_args[0] > 0: errno = self.exc_args[0] strerror = self.exc_args[1] except: pass self.parent.__init__(self, errno, strerror) if self.peer is None and sock is not None: try: ppeer = self.sock.getpeername() if len(ppeer) == 2 and isinstance(ppeer[0], str) \ and isinstance(ppeer[1], int): self.peer = ppeer except: pass def __str__(self): s = str(self.__class__) if self.peer: s += " for %s:%d" % self.peer if self.errno is not None: s += ": [Errno: %d]" % self.errno if self.strerror: s += " (%s)" % self.strerror if self.exc_name: s += ", Caused by %s" % self.exc_name if self.exc_str: if self.strerror: s += "(%s)" % self.exc_str else: s += "(%s)" % str(self.exc_args) return s def __init__(self, sslobj, sock=None): self.sslobj = sslobj self.sock = sock log.debug("%s.__init__ called with %s", self.__class__, sslobj) def recv(self, data, flags=None): """ Receive wrapper for SSL object We can return None out of this function to signal that no data is available right now. Better than an exception, which differs depending on which SSL lib we're using. Unfortunately returning '' can indicate that the socket has been closed, so to be sure, we avoid this by returning None. """ raise NotImplementedError def send(self, data, flags=None, now=False): """ Send wrapper for SSL object """ raise NotImplementedError class PyOpenSSLWrapper(SSLWrapper): """ Wrapper class for PyOpenSSL's recv() and send() methods """ def __init__(self, *args): self.parent = SSLWrapper self.parent.__init__(self, *args) def is_numtoolarge(self, e): ''' Magic methods don't need documentation ''' t = ('asn1 encoding routines', 'a2d_ASN1_OBJECT', 'first num too large') return (isinstance(e.args, (list, tuple)) and len(e.args) == 1 and isinstance(e.args[0], (list, tuple)) and len(e.args[0]) == 2 and e.args[0][0] == e.args[0][1] == t) def recv(self, bufsize, flags=None): retval = None try: if flags is None: retval = self.sslobj.recv(bufsize) else: retval = self.sslobj.recv(bufsize, flags) except (OpenSSL.SSL.WantReadError, OpenSSL.SSL.WantWriteError) as e: log.debug("Recv: Want-error: " + repr(e)) except OpenSSL.SSL.SysCallError as e: log.debug("Recv: Got OpenSSL.SSL.SysCallError: " + repr(e), exc_info=True) raise SSLWrapper.Error(self.sock or self.sslobj, e) except OpenSSL.SSL.ZeroReturnError as e: # end-of-connection raises ZeroReturnError instead of having the # connection's .recv() method return a zero-sized result. raise SSLWrapper.Error(self.sock or self.sslobj, e, -1) except OpenSSL.SSL.Error as e: if self.is_numtoolarge(e): # warn, but ignore this exception log.warning("Recv: OpenSSL: asn1enc: first num too large (ignored)") else: log.debug("Recv: Caught OpenSSL.SSL.Error:", exc_info=True) raise SSLWrapper.Error(self.sock or self.sslobj, e) return retval def send(self, data, flags=None, now=False): try: if flags is None: return self.sslobj.send(data) else: return self.sslobj.send(data, flags) except (OpenSSL.SSL.WantReadError, OpenSSL.SSL.WantWriteError) as e: #log.debug("Send: " + repr(e)) time.sleep(0.1) # prevent 100% CPU usage except OpenSSL.SSL.SysCallError as e: log.error("Send: Got OpenSSL.SSL.SysCallError: " + repr(e), exc_info=True) raise SSLWrapper.Error(self.sock or self.sslobj, e) except OpenSSL.SSL.Error as e: if self.is_numtoolarge(e): # warn, but ignore this exception log.warning("Send: OpenSSL: asn1enc: first num too large (ignored)") else: log.error("Send: Caught OpenSSL.SSL.Error:", exc_info=True) raise SSLWrapper.Error(self.sock or self.sslobj, e) return 0 class StdlibSSLWrapper(SSLWrapper): """ Wrapper class for Python socket.ssl read() and write() methods """ def __init__(self, *args): self.parent = SSLWrapper self.parent.__init__(self, *args) def recv(self, bufsize, flags=None): # we simply ignore flags since ssl object doesn't support it try: return self.sslobj.read(bufsize) except ssl.SSLError as e: log.debug("Recv: Caught ssl.SSLError: " + repr(e), exc_info=True) if e.args[0] not in (ssl.SSL_ERROR_WANT_READ, ssl.SSL_ERROR_WANT_WRITE): raise SSLWrapper.Error(self.sock or self.sslobj, e) return None def send(self, data, flags=None, now=False): # we simply ignore flags since ssl object doesn't support it try: return self.sslobj.write(data) except ssl.SSLError as e: log.debug("Send: Caught socket.sslerror:", exc_info=True) if e.args[0] not in (ssl.SSL_ERROR_WANT_READ, ssl.SSL_ERROR_WANT_WRITE): raise SSLWrapper.Error(self.sock or self.sslobj, e) return 0 class NonBlockingTLS(PlugIn): """ TLS connection used to encrypts already estabilished tcp connection Can be plugged into NonBlockingTCP and will make use of StdlibSSLWrapper or PyOpenSSLWrapper. """ def __init__(self, cacerts, mycerts, tls_version, cipher_list): """ :param cacerts: path to pem file with certificates of known XMPP servers :param mycerts: path to pem file with certificates of user trusted servers :param tls_version: The lowest supported TLS version. If None is provided, version 1.0 is used. For example setting to 1.1 will enable TLS 1.1, TLS 1.2 and all further protocols :param cipher_list: list of ciphers to use when connection to server. If None is provided, a default list is used: HIGH:!aNULL:RC4-SHA """ PlugIn.__init__(self) self.cacerts = cacerts self.mycerts = mycerts if cipher_list is None: self.cipher_list = 'HIGH:!aNULL:RC4-SHA' else: self.cipher_list = cipher_list if tls_version is None: self.tls_version = '1.0' else: self.tls_version = tls_version def plugin(self, owner): """ Use to PlugIn TLS into transport and start establishing immediately. Returns True if TLS/SSL was established correctly, otherwise False """ log.info('Starting TLS estabilishing') try: res = self._startSSL() except Exception as e: log.error("PlugIn: while trying _startSSL():", exc_info=True) return False return res def _dumpX509(self, cert, stream=sys.stderr): try: print("Digest (SHA-2 256):" + cert.digest("sha256"), file=stream) except ValueError: # Old OpenSSL version pass print("Digest (SHA-1):" + cert.digest("sha1"), file=stream) print("Digest (MD5):" + cert.digest("md5"), file=stream) print("Serial #:" + cert.get_serial_number(), file=stream) print("Version:" + cert.get_version(), file=stream) print("Expired:" + ("Yes" if cert.has_expired() else "No"), file=stream) print("Subject:", file=stream) self._dumpX509Name(cert.get_subject(), stream) print("Issuer:", file=stream) self._dumpX509Name(cert.get_issuer(), stream) self._dumpPKey(cert.get_pubkey(), stream) def _dumpX509Name(self, name, stream=sys.stderr): print("X509Name:" + str(name), file=stream) def _dumpPKey(self, pkey, stream=sys.stderr): typedict = {OpenSSL.crypto.TYPE_RSA: "RSA", OpenSSL.crypto.TYPE_DSA: "DSA"} print("PKey bits:" + pkey.bits(), file=stream) print("PKey type: %s (%d)" % (typedict.get(pkey.type(), "Unknown"), pkey.type()), file=stream) def _startSSL(self): """ Immediatedly switch socket to TLS mode. Used internally """ log.debug("_startSSL called") if USE_PYOPENSSL: result = self._startSSL_pyOpenSSL() else: result = self._startSSL_stdlib() if result: log.debug('Synchronous handshake completed') return True else: return False def _load_cert_file(self, cert_path, cert_store, logg=True): if not os.path.isfile(cert_path): return try: f = open(cert_path) except IOError as e: log.warning('Unable to open certificate file %s: %s' % \ (cert_path, str(e))) return lines = f.readlines() i = 0 begin = -1 for line in lines: if 'BEGIN CERTIFICATE' in line: begin = i elif 'END CERTIFICATE' in line and begin > -1: cert = ''.join(lines[begin:i+2]) try: x509cert = OpenSSL.crypto.load_certificate( OpenSSL.crypto.FILETYPE_PEM, cert) cert_store.add_cert(x509cert) except OpenSSL.crypto.Error as exception_obj: if logg: log.warning('Unable to load a certificate from file %s: %s' %\ (cert_path, exception_obj.args[0][0][2])) except: log.warning('Unknown error while loading certificate from file ' '%s' % cert_path) begin = -1 i += 1 f.close() def _startSSL_pyOpenSSL(self): log.debug("_startSSL_pyOpenSSL called") tcpsock = self._owner # See http://docs.python.org/dev/library/ssl.html tcpsock._sslContext = OpenSSL.SSL.Context(OpenSSL.SSL.SSLv23_METHOD) flags = OpenSSL.SSL.OP_NO_SSLv2 | OpenSSL.SSL.OP_NO_SSLv3 | \ OpenSSL.SSL.OP_SINGLE_DH_USE try: flags |= OpenSSL.SSL.OP_NO_TICKET except AttributeError as e: # py-OpenSSL < 0.9 or old OpenSSL flags |= 16384 try: # OpenSSL 1.0.1d supports TLS 1.1 and TLS 1.2 and # fixes renegotiation in TLS 1.1, 1.2 by using the correct TLS version. if OpenSSL.SSL.OPENSSL_VERSION_NUMBER >= 0x1000104f: if self.tls_version != '1.0': flags |= OpenSSL.SSL.OP_NO_TLSv1 if self.tls_version not in ('1.0', '1.1'): try: flags |= OpenSSL.SSL.OP_NO_TLSv1_1 except AttributeError as e: # older py-OpenSSL flags |= 0x10000000 except AttributeError as e: pass # much older py-OpenSSL tcpsock._sslContext.set_options(flags) try: # Supported only pyOpenSSL >= 0.14 # Disable session resumption, protection against Triple Handshakes TLS attack tcpsock._sslContext.set_session_cache_mode(OpenSSL.SSL.SESS_CACHE_OFF) except AttributeError as e: pass # NonBlockingHTTPBOSH instance has no attribute _owner if hasattr(tcpsock, '_owner') and tcpsock._owner._caller.client_cert \ and os.path.exists(tcpsock._owner._caller.client_cert): conn = tcpsock._owner._caller log.debug('Using client cert and key from %s' % conn.client_cert) try: p12 = OpenSSL.crypto.load_pkcs12(open(conn.client_cert).read(), conn.client_cert_passphrase) except OpenSSL.crypto.Error as exception_obj: log.warning('Unable to load client pkcs12 certificate from ' 'file %s: %s ... Is it a valid PKCS12 cert?' % \ (conn.client_cert, exception_obj.args)) except: log.warning('Unknown error while loading certificate from file ' '%s' % conn.client_cert) else: log.info('PKCS12 Client cert loaded OK') try: tcpsock._sslContext.use_certificate(p12.get_certificate()) tcpsock._sslContext.use_privatekey(p12.get_privatekey()) log.info('p12 cert and key loaded') except OpenSSL.crypto.Error as exception_obj: log.warning('Unable to extract client certificate from ' 'file %s' % conn.client_cert) except Exception as msg: log.warning('Unknown error extracting client certificate ' 'from file %s: %s' % (conn.client_cert, msg)) else: log.info('client cert and key loaded OK') tcpsock.ssl_errnum = 0 tcpsock._sslContext.set_verify(OpenSSL.SSL.VERIFY_PEER, self._ssl_verify_callback) tcpsock._sslContext.set_cipher_list(self.cipher_list) store = tcpsock._sslContext.get_cert_store() self._load_cert_file(self.cacerts, store) self._load_cert_file(self.mycerts, store) if os.path.isdir('/etc/ssl/certs'): for f in os.listdir('/etc/ssl/certs'): # We don't logg because there is a lot a duplicated certs in this # folder self._load_cert_file(os.path.join('/etc/ssl/certs', f), store, logg=False) tcpsock._sslObj = OpenSSL.SSL.Connection(tcpsock._sslContext, tcpsock._sock) tcpsock._sslObj.set_connect_state() # set to client mode wrapper = PyOpenSSLWrapper(tcpsock._sslObj) tcpsock._recv = wrapper.recv tcpsock._send = wrapper.send log.debug("Initiating handshake...") try: tcpsock._sslObj.do_handshake() except (OpenSSL.SSL.WantReadError, OpenSSL.SSL.WantWriteError) as e: pass except: log.error('Error while TLS handshake: ', exc_info=True) return False self._owner.ssl_lib = PYOPENSSL return True def _startSSL_stdlib(self): log.debug("_startSSL_stdlib called") tcpsock=self._owner try: tcpsock._sslObj = ssl.wrap_socket(tcpsock._sock, ssl_version=ssl.PROTOCOL_TLSv1, do_handshake_on_connect=False) wrapper = StdlibSSLWrapper(tcpsock._sslObj, tcpsock._sock) tcpsock._recv = wrapper.recv tcpsock._send = wrapper.send log.debug("Initiating handshake...") try: tcpsock._sslObj.do_handshake() except (ssl.SSLError) as e: if e.args[0] in (ssl.SSL_ERROR_WANT_READ, ssl.SSL_ERROR_WANT_WRITE): pass else: log.error('Error while TLS handshake: ', exc_info=True) return False except: log.error('Error while TLS handshake: ', exc_info=True) return False except: log.error("Exception caught in _startSSL_stdlib:", exc_info=True) return False self._owner.ssl_lib = PYSTDLIB return True def _ssl_verify_callback(self, sslconn, cert, errnum, depth, ok): # Exceptions can't propagate up through this callback, so print them here. try: if depth == 0: self._owner.ssl_certificate = cert if not ok: self._owner.ssl_errnum = errnum return True except: log.error("Exception caught in _ssl_info_callback:", exc_info=True) # Make sure something is printed, even if log is disabled. traceback.print_exc() def get_channel_binding(self): """ Get channel binding data. RFC 5929 """ sslObj = self._owner._sslObj try: if USE_PYOPENSSL: return sslObj.get_finished() else: return sslObj.get_channel_binding() except AttributeError: raise NotImplementedError nbxmpp-0.5.3/nbxmpp/simplexml.py0000644000175000017500000005720412326255305020106 0ustar asterixasterix00000000000000## simplexml.py based on Mattew Allum's xmlstream.py ## ## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, 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 General Public License for more details. # $Id: simplexml.py,v 1.27 2005/04/30 07:20:27 snakeru Exp $ """ Simplexml module provides xmpppy library with all needed tools to handle XML nodes and XML streams. I'm personally using it in many other separate projects. It is designed to be as standalone as possible """ from __future__ import unicode_literals import sys import xml.parsers.expat import logging log = logging.getLogger('nbxmpp.simplexml') def XMLescape(txt): """ Return provided string with symbols & < > " replaced by their respective XML entities """ # replace also FORM FEED and ESC, because they are not valid XML chars return txt.replace("&", "&").replace("<", "<").replace(">", ">").replace('"', """).replace('\x0C', "").replace('\x1B', "") ENCODING='utf-8' if sys.version_info[0] == 2: def ustr(what): """ Converts object "what" to unicode string using it's own __str__ method if accessible or unicode method otherwise """ if isinstance(what, unicode): return what try: r = what.__str__() except AttributeError: r = unicode(what) if not isinstance(r, unicode): return unicode(r, ENCODING) return r else: def ustr(what): """ Converts object "what" to unicode string using it's own __str__ method if accessible or unicode method otherwise """ if isinstance(what, str): return what try: r = what.__str__() except AttributeError: r = str(what) if not isinstance(r, str): return str(r, ENCODING) return r class Node(object): """ Node class describes syntax of separate XML Node. It have a constructor that permits node creation from set of "namespace name", attributes and payload of text strings and other nodes. It does not natively support building node from text string and uses NodeBuilder class for that purpose. After creation node can be mangled in many ways so it can be completely changed. Also node can be serialised into string in one of two modes: default (where the textual representation of node describes it exactly) and "fancy" - with whitespace added to make indentation and thus make result more readable by human. Node class have attribute FORCE_NODE_RECREATION that is defaults to False thus enabling fast node replication from the some other node. The drawback of the fast way is that new node shares some info with the "original" node that is changing the one node may influence the other. Though it is rarely needed (in xmpppy it is never needed at all since I'm usually never using original node after replication (and using replication only to move upwards on the classes tree). """ FORCE_NODE_RECREATION = 0 def __init__(self, tag=None, attrs={}, payload=[], parent=None, nsp=None, node_built=False, node=None): """ Takes "tag" argument as the name of node (prepended by namespace, if needed and separated from it by a space), attrs dictionary as the set of arguments, payload list as the set of textual strings and child nodes that this node carries within itself and "parent" argument that is another node that this one will be the child of. Also the __init__ can be provided with "node" argument that is either a text string containing exactly one node or another Node instance to begin with. If both "node" and other arguments is provided then the node initially created as replica of "node" provided and then modified to be compliant with other arguments. """ if node: if self.FORCE_NODE_RECREATION and isinstance(node, Node): node = str(node) if not isinstance(node, Node): node = NodeBuilder(node, self) node_built = True else: self.name, self.namespace, self.attrs, self.data, self.kids, self.parent, self.nsd = node.name, node.namespace, {}, [], [], node.parent, {} for key in node.attrs.keys(): self.attrs[key] = node.attrs[key] for data in node.data: self.data.append(data) for kid in node.kids: self.kids.append(kid) for k, v in node.nsd.items(): self.nsd[k] = v else: self.name, self.namespace, self.attrs, self.data, self.kids, self.parent, self.nsd = 'tag', '', {}, [], [], None, {} if parent: self.parent = parent self.nsp_cache = {} if nsp: for k, v in nsp.items(): self.nsp_cache[k] = v for attr, val in attrs.items(): if attr == 'xmlns': self.nsd[''] = val elif attr.startswith('xmlns:'): self.nsd[attr[6:]] = val self.attrs[attr]=attrs[attr] if tag: if node_built: pfx, self.name = (['']+tag.split(':'))[-2:] self.namespace = self.lookup_nsp(pfx) else: if ' ' in tag: self.namespace, self.name = tag.split() else: self.name = tag if not isinstance(payload, list): payload = [payload] for i in payload: if isinstance(i, Node): self.addChild(node=i) else: self.data.append(ustr(i)) def lookup_nsp(self, pfx=''): ns = self.nsd.get(pfx, None) if ns is None: ns = self.nsp_cache.get(pfx, None) if ns is None: if self.parent: ns = self.parent.lookup_nsp(pfx) self.nsp_cache[pfx] = ns else: return 'http://www.gajim.org/xmlns/undeclared' return ns def __str__(self, fancy=0): """ Method used to dump node into textual representation. If "fancy" argument is set to True produces indented output for readability """ s = (fancy-1) * 2 * ' ' + "<" + self.name if self.namespace: if not self.parent or self.parent.namespace!=self.namespace: if 'xmlns' not in self.attrs: s = s + ' xmlns="%s"'%self.namespace for key in self.attrs.keys(): val = ustr(self.attrs[key]) s = s + ' %s="%s"' % ( key, XMLescape(val) ) s = s + ">" cnt = 0 if self.kids: if fancy: s = s + "\n" for a in self.kids: if not fancy and (len(self.data)-1)>=cnt: s=s+XMLescape(self.data[cnt]) elif (len(self.data)-1)>=cnt: s=s+XMLescape(self.data[cnt].strip()) if isinstance(a, str): s = s + a.__str__() else: s = s + a.__str__(fancy and fancy+1) cnt=cnt+1 if not fancy and (len(self.data)-1) >= cnt: s = s + XMLescape(self.data[cnt]) elif (len(self.data)-1) >= cnt: s = s + XMLescape(self.data[cnt].strip()) if not self.kids and s.endswith('>'): s=s[:-1]+' />' if fancy: s = s + "\n" else: if fancy and not self.data: s = s + (fancy-1) * 2 * ' ' s = s + "" if fancy: s = s + "\n" return s def addChild(self, name=None, attrs={}, payload=[], namespace=None, node=None): """ If "node" argument is provided, adds it as child node. Else creates new node from the other arguments' values and adds it as well """ if 'xmlns' in attrs: raise AttributeError("Use namespace=x instead of attrs={'xmlns':x}") if node: newnode=node node.parent = self else: newnode=Node(tag=name, parent=self, attrs=attrs, payload=payload) if namespace: newnode.setNamespace(namespace) self.kids.append(newnode) return newnode def addData(self, data): """ Add some CDATA to node """ self.data.append(ustr(data)) def clearData(self): """ Remove all CDATA from the node """ self.data = [] def delAttr(self, key): """ Delete an attribute "key" """ del self.attrs[key] def delChild(self, node, attrs={}): """ Delete the "node" from the node's childs list, if "node" is an instance. Else delete the first node that have specified name and (optionally) attributes """ if not isinstance(node, Node): node = self.getTag(node, attrs) self.kids.remove(node) return node def getAttrs(self): """ Return all node's attributes as dictionary """ return self.attrs def getAttr(self, key): """ Return value of specified attribute """ return self.attrs.get(key) def getChildren(self): """ Return all node's child nodes as list """ return self.kids def getData(self): """ Return all node CDATA as string (concatenated) """ return ''.join(self.data) def getName(self): """ Return the name of node """ return self.name def getNamespace(self): """ Return the namespace of node """ return self.namespace def getParent(self): """ Returns the parent of node (if present) """ return self.parent def getPayload(self): """ Return the payload of node i.e. list of child nodes and CDATA entries. F.e. for "text1 text2" will be returned list: ['text1', , , ' text2'] """ ret = [] for i in range(len(self.kids)+len(self.data)+1): try: if self.data[i]: ret.append(self.data[i]) except IndexError: pass try: ret.append(self.kids[i]) except IndexError: pass return ret def getTag(self, name, attrs={}, namespace=None): """ Filter all child nodes using specified arguments as filter. Return the first found or None if not found """ return self.getTags(name, attrs, namespace, one=1) def getTagAttr(self, tag, attr): """ Return attribute value of the child with specified name (or None if no such attribute) """ try: return self.getTag(tag).attrs[attr] except: return None def getTagData(self, tag): """ Return cocatenated CDATA of the child with specified name """ try: return self.getTag(tag).getData() except Exception: return None def getTags(self, name, attrs={}, namespace=None, one=0): """ Filter all child nodes using specified arguments as filter. Returns the list of nodes found """ nodes = [] for node in self.kids: if namespace and namespace != node.getNamespace(): continue if node.getName() == name: for key in attrs.keys(): if key not in node.attrs or node.attrs[key]!=attrs[key]: break else: nodes.append(node) if one and nodes: return nodes[0] if not one: return nodes def iterTags(self, name, attrs={}, namespace=None): """ Iterate over all children using specified arguments as filter """ for node in self.kids: if namespace is not None and namespace != node.getNamespace(): continue if node.getName() == name: for key in attrs.keys(): if key not in node.attrs or \ node.attrs[key]!=attrs[key]: break else: yield node def setAttr(self, key, val): """ Set attribute "key" with the value "val" """ self.attrs[key] = val def setData(self, data): """ Set node's CDATA to provided string. Resets all previous CDATA! """ self.data = [ustr(data)] def setName(self, val): """ Change the node name """ self.name = val def setNamespace(self, namespace): """ Changes the node namespace """ self.namespace = namespace def setParent(self, node): """ Set node's parent to "node". WARNING: do not checks if the parent already present and not removes the node from the list of childs of previous parent """ self.parent = node def setPayload(self, payload, add=0): """ Set node payload according to the list specified. WARNING: completely replaces all node's previous content. If you wish just to add child or CDATA - use addData or addChild methods """ if not isinstance(payload, list): payload = [payload] if add: self.kids += payload else: self.kids = payload def setTag(self, name, attrs={}, namespace=None): """ Same as getTag but if the node with specified namespace/attributes not found, creates such node and returns it """ node = self.getTags(name, attrs, namespace=namespace, one=1) if node: return node else: return self.addChild(name, attrs, namespace=namespace) def setTagAttr(self, tag, attr, val): """ Create new node (if not already present) with name "tag" and set it's attribute "attr" to value "val" """ try: self.getTag(tag).attrs[attr] = val except Exception: self.addChild(tag, attrs={attr: val}) def setTagData(self, tag, val, attrs={}): """ Creates new node (if not already present) with name "tag" and (optionally) attributes "attrs" and sets it's CDATA to string "val" """ try: self.getTag(tag, attrs).setData(ustr(val)) except Exception: self.addChild(tag, attrs, payload = [ustr(val)]) def has_attr(self, key): """ Check if node have attribute "key" """ return key in self.attrs def __getitem__(self, item): """ Return node's attribute "item" value """ return self.getAttr(item) def __setitem__(self, item, val): """ Set node's attribute "item" value """ return self.setAttr(item, val) def __delitem__(self, item): """ Delete node's attribute "item" """ return self.delAttr(item) def __contains__(self, item): """ Check if node has attribute "item" """ return self.has_attr(item) def __getattr__(self, attr): """ Reduce memory usage caused by T/NT classes - use memory only when needed """ if attr == 'T': self.T = T(self) return self.T if attr == 'NT': self.NT = NT(self) return self.NT raise AttributeError class T: """ Auxiliary class used to quick access to node's child nodes """ def __init__(self, node): self.__dict__['node'] = node def __getattr__(self, attr): return self.node.setTag(attr) def __setattr__(self, attr, val): if isinstance(val, Node): Node.__init__(self.node.setTag(attr), node=val) else: return self.node.setTagData(attr, val) def __delattr__(self, attr): return self.node.delChild(attr) class NT(T): """ Auxiliary class used to quick create node's child nodes """ def __getattr__(self, attr): return self.node.addChild(attr) def __setattr__(self, attr, val): if isinstance(val, Node): self.node.addChild(attr, node=val) else: return self.node.addChild(attr, payload=[val]) class NodeBuilder: """ Builds a Node class minidom from data parsed to it. This class used for two purposes: 1. Creation an XML Node from a textual representation. F.e. reading a config file. See an XML2Node method. 2. Handling an incoming XML stream. This is done by mangling the __dispatch_depth parameter and redefining the dispatch method. You do not need to use this class directly if you do not designing your own XML handler """ def __init__(self, data=None, initial_node=None): """ Take two optional parameters: "data" and "initial_node" By default class initialised with empty Node class instance. Though, if "initial_node" is provided it used as "starting point". You can think about it as of "node upgrade". "data" (if provided) feeded to parser immidiatedly after instance init. """ log.debug("Preparing to handle incoming XML stream.") self._parser = xml.parsers.expat.ParserCreate() self._parser.StartElementHandler = self.starttag self._parser.EndElementHandler = self.endtag self._parser.StartNamespaceDeclHandler = self.handle_namespace_start self._parser.CharacterDataHandler = self.handle_cdata self._parser.buffer_text = True self.Parse = self._parser.Parse self.__depth = 0 self.__last_depth = 0 self.__max_depth = 0 self._dispatch_depth = 1 self._document_attrs = None self._document_nsp = None self._mini_dom=initial_node self.last_is_data = 1 self._ptr=None self.data_buffer = None self.streamError = '' if data: self._parser.Parse(data, 1) def check_data_buffer(self): if self.data_buffer: self._ptr.data.append(''.join(self.data_buffer)) del self.data_buffer[:] self.data_buffer = None def destroy(self): """ Method used to allow class instance to be garbage-collected """ self.check_data_buffer() self._parser.StartElementHandler = None self._parser.EndElementHandler = None self._parser.CharacterDataHandler = None self._parser.StartNamespaceDeclHandler = None def starttag(self, tag, attrs): """ XML Parser callback. Used internally """ self.check_data_buffer() self._inc_depth() log.info("STARTTAG.. DEPTH -> %i , tag -> %s, attrs -> %s" % (self.__depth, tag, attrs)) if self.__depth == self._dispatch_depth: if not self._mini_dom : self._mini_dom = Node(tag=tag, attrs=attrs, nsp = self._document_nsp, node_built=True) else: Node.__init__(self._mini_dom, tag=tag, attrs=attrs, nsp = self._document_nsp, node_built=True) self._ptr = self._mini_dom elif self.__depth > self._dispatch_depth: self._ptr.kids.append(Node(tag=tag, parent=self._ptr, attrs=attrs, node_built=True)) self._ptr = self._ptr.kids[-1] if self.__depth == 1: self._document_attrs = {} self._document_nsp = {} nsp, name = (['']+tag.split(':'))[-2:] for attr, val in attrs.items(): if attr == 'xmlns': self._document_nsp[''] = val elif attr.startswith('xmlns:'): self._document_nsp[attr[6:]] = val else: self._document_attrs[attr] = val ns = self._document_nsp.get(nsp, 'http://www.gajim.org/xmlns/undeclared-root') try: self.stream_header_received(ns, name, attrs) except ValueError as e: self._document_attrs = None raise ValueError(str(e)) if not self.last_is_data and self._ptr.parent: self._ptr.parent.data.append('') self.last_is_data = 0 def endtag(self, tag ): """ XML Parser callback. Used internally """ log.info("DEPTH -> %i , tag -> %s" % (self.__depth, tag)) self.check_data_buffer() if self.__depth == self._dispatch_depth: if self._mini_dom.getName() == 'error': children = self._mini_dom.getChildren() if children: self.streamError = children[0].getName() else: self.streamError = self._mini_dom.getData() self.dispatch(self._mini_dom) elif self.__depth > self._dispatch_depth: self._ptr = self._ptr.parent else: log.info("Got higher than dispatch level. Stream terminated?") self._dec_depth() self.last_is_data = 0 if self.__depth == 0: self.stream_footer_received() def handle_cdata(self, data): if self.last_is_data: if self.data_buffer: self.data_buffer.append(data) elif self._ptr: self.data_buffer = [data] self.last_is_data = 1 def handle_namespace_start(self, prefix, uri): """ XML Parser callback. Used internally """ self.check_data_buffer() def getDom(self): """ Return just built Node """ self.check_data_buffer() return self._mini_dom def dispatch(self, stanza): """ Get called when the NodeBuilder reaches some level of depth on it's way up with the built node as argument. Can be redefined to convert incoming XML stanzas to program events """ pass def stream_header_received(self, ns, tag, attrs): """ Method called when stream just opened """ self.check_data_buffer() def stream_footer_received(self): """ Method called when stream just closed """ self.check_data_buffer() def has_received_endtag(self, level=0): """ Return True if at least one end tag was seen (at level) """ return self.__depth <= level and self.__max_depth > level def _inc_depth(self): self.__last_depth = self.__depth self.__depth += 1 self.__max_depth = max(self.__depth, self.__max_depth) def _dec_depth(self): self.__last_depth = self.__depth self.__depth -= 1 def XML2Node(xml): """ Convert supplied textual string into XML node. Handy f.e. for reading configuration file. Raises xml.parser.expat.parsererror if provided string is not well-formed XML """ return NodeBuilder(xml).getDom() def BadXML2Node(xml): """ Convert supplied textual string into XML node. Survives if xml data is cutted half way round. I.e. "some text
some more text". Will raise xml.parser.expat.parsererror on misplaced tags though. F.e. "some text
some more text
" will not work """ return NodeBuilder(xml).getDom() nbxmpp-0.5.3/nbxmpp/idlequeue.py0000644000175000017500000004305212321264004020041 0ustar asterixasterix00000000000000## idlequeue.py ## ## Copyright (C) 2006 Dimitur Kirov ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, 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 General Public License for more details. """ Idlequeues are Gajim's network heartbeat. Transports can be plugged as idle objects and be informed about possible IO """ from __future__ import unicode_literals import os import sys import select import logging log = logging.getLogger('nbxmpp.idlequeue') # needed for get_idleqeue try: if sys.version_info[0] == 2: import gobject else: from gi.repository import GLib HAVE_GLIB = True except ImportError: HAVE_GLIB = False # needed for idlecommand if os.name == 'nt': from subprocess import * # python24 only. we ask this for Windows elif os.name == 'posix': import fcntl if sys.version_info[0] == 2: FLAG_WRITE = 20 # write only FLAG_READ = 19 # read only FLAG_READ_WRITE = 23 # read and write FLAG_CLOSE = 16 # wait for close else: FLAG_WRITE = GLib.IOCondition.OUT | GLib.IOCondition.HUP FLAG_READ = GLib.IOCondition.IN | GLib.IOCondition.PRI | \ GLib.IOCondition.HUP FLAG_READ_WRITE = GLib.IOCondition.OUT | GLib.IOCondition.IN | \ GLib.IOCondition.PRI | GLib.IOCondition.HUP FLAG_CLOSE = GLib.IOCondition.HUP PENDING_READ = 3 # waiting read event PENDING_WRITE = 4 # waiting write event IS_CLOSED = 16 # channel closed def get_idlequeue(): """ Get an appropriate idlequeue """ if os.name == 'nt': # gobject.io_add_watch does not work on windows return SelectIdleQueue() else: if HAVE_GLIB: # Gajim's default Idlequeue return GlibIdleQueue() else: # GUI less implementation return SelectIdleQueue() class IdleObject: """ Idle listener interface. Listed methods are called by IdleQueue. """ def __init__(self): self.fd = -1 #: filedescriptor, must be unique for each IdleObject def pollend(self): """ Called on stream failure """ pass def pollin(self): """ Called on new read event """ pass def pollout(self): """ Called on new write event (connect in sockets is a pollout) """ pass def read_timeout(self): """ Called when timeout happened """ pass class IdleCommand(IdleObject): """ Can be subclassed to execute commands asynchronously by the idlequeue. Result will be optained via file descriptor of created pipe """ def __init__(self, on_result): IdleObject.__init__(self) # how long (sec.) to wait for result ( 0 - forever ) # it is a class var, instead of a constant and we can override it. self.commandtimeout = 0 # when we have some kind of result (valid, ot not) we call this handler self.result_handler = on_result # if it is True, we can safetely execute the command self.canexecute = True self.idlequeue = None self.result ='' def set_idlequeue(self, idlequeue): self.idlequeue = idlequeue def _return_result(self): if self.result_handler: self.result_handler(self.result) self.result_handler = None def _compose_command_args(self): return ['echo', 'da'] def _compose_command_line(self): """ Return one line representation of command and its arguments """ return ' '.join(self._compose_command_args()) def wait_child(self): if self.pipe.poll() is None: # result timeout if self.endtime < self.idlequeue.current_time(): self._return_result() self.pipe.stdout.close() self.pipe.stdin.close() else: # child is still active, continue to wait self.idlequeue.set_alarm(self.wait_child, 0.1) else: # child has quit self.result = self.pipe.stdout.read() self._return_result() self.pipe.stdout.close() self.pipe.stdin.close() def start(self): if not self.canexecute: self.result = '' self._return_result() return if os.name == 'nt': self._start_nt() elif os.name == 'posix': self._start_posix() def _start_nt(self): # if program is started from noninteraactive shells stdin is closed and # cannot be forwarded, so we have to keep it open self.pipe = Popen(self._compose_command_args(), stdout=PIPE, bufsize=1024, shell=True, stderr=STDOUT, stdin=PIPE) if self.commandtimeout >= 0: self.endtime = self.idlequeue.current_time() + \ (self.commandtimeout * 1e6) self.idlequeue.set_alarm(self.wait_child, 0.1) def _start_posix(self): self.pipe = os.popen(self._compose_command_line()) self.fd = self.pipe.fileno() fcntl.fcntl(self.pipe, fcntl.F_SETFL, os.O_NONBLOCK) self.idlequeue.plug_idle(self, False, True) if self.commandtimeout >= 0: self.idlequeue.set_read_timeout(self.fd, self.commandtimeout) def end(self): self.idlequeue.unplug_idle(self.fd) try: self.pipe.close() except: pass def pollend(self): self.idlequeue.remove_timeout(self.fd) self.end() self._return_result() def pollin(self): try: res = self.pipe.read() except Exception as e: res = '' if res == '': return self.pollend() else: self.result += res def read_timeout(self): self.end() self._return_result() class IdleQueue: """ IdleQueue provide three distinct time based features. Uses select.poll() 1. Alarm timeout: Execute a callback after foo seconds 2. Timeout event: Call read_timeout() of an plugged object if a timeout has been set, but not removed in time. 3. Check file descriptor of plugged objects for read, write and error events """ # (timeout, boolean) # Boolean is True if timeout is specified in seconds, False means miliseconds PROCESS_TIMEOUT = (100, False) def __init__(self): self.queue = {} # when there is a timeout it executes obj.read_timeout() # timeout is not removed automatically! # {fd1: {timeout1: func1, timeout2: func2}} # timout are unique (timeout1 must be != timeout2) # If func1 is None, read_time function is called self.read_timeouts = {} # cb, which are executed after XX sec., alarms are removed automatically self.alarms = {} self._init_idle() def _init_idle(self): """ Hook method for subclassed. Will be called by __init__ """ self.selector = select.poll() def set_alarm(self, alarm_cb, seconds): """ Set up a new alarm. alarm_cb will be called after specified seconds. """ alarm_time = self.current_time() + (seconds * 1e6) # almost impossible, but in case we have another alarm_cb at this time if alarm_time in self.alarms: self.alarms[alarm_time].append(alarm_cb) else: self.alarms[alarm_time] = [alarm_cb] return alarm_time def remove_alarm(self, alarm_cb, alarm_time): """ Remove alarm callback alarm_cb scheduled on alarm_time. Returns True if it was removed sucessfully, otherwise False """ if not alarm_time in self.alarms: return False i = -1 for i in range(len(self.alarms[alarm_time])): # let's not modify the list inside the loop if self.alarms[alarm_time][i] is alarm_cb: break if i != -1: del self.alarms[alarm_time][i] if self.alarms[alarm_time] == []: del self.alarms[alarm_time] return True else: return False def remove_timeout(self, fd, timeout=None): """ Remove the read timeout """ log.info('read timeout removed for fd %s' % fd) if fd in self.read_timeouts: if timeout: if timeout in self.read_timeouts[fd]: del(self.read_timeouts[fd][timeout]) if len(self.read_timeouts[fd]) == 0: del(self.read_timeouts[fd]) else: del(self.read_timeouts[fd]) def set_read_timeout(self, fd, seconds, func=None): """ Seta a new timeout. If it is not removed after specified seconds, func or obj.read_timeout() will be called A filedescriptor fd can have several timeouts. """ log_txt = 'read timeout set for fd %s on %s seconds' % (fd, seconds) if func: log_txt += ' with function ' + str(func) log.info(log_txt) timeout = self.current_time() + (seconds * 1e6) if fd in self.read_timeouts: self.read_timeouts[fd][timeout] = func else: self.read_timeouts[fd] = {timeout: func} def _check_time_events(self): """ Execute and remove alarm callbacks and execute func() or read_timeout() for plugged objects if specified time has ellapsed """ current_time = self.current_time() for fd, timeouts in list(self.read_timeouts.items()): if fd not in self.queue: self.remove_timeout(fd) continue for timeout, func in list(timeouts.items()): if timeout > current_time: continue if func: log.debug('Calling %s for fd %s' % (func, fd)) func() else: log.debug('Calling read_timeout for fd %s' % fd) self.queue[fd].read_timeout() self.remove_timeout(fd, timeout) times = list(self.alarms.keys()) for alarm_time in times: if alarm_time > current_time: continue if alarm_time in self.alarms: for callback in self.alarms[alarm_time]: callback() if alarm_time in self.alarms: del(self.alarms[alarm_time]) def plug_idle(self, obj, writable=True, readable=True): """ Plug an IdleObject into idlequeue. Filedescriptor fd must be set :param obj: the IdleObject :param writable: True if obj has data to sent :param readable: True if obj expects data to be reiceived """ if obj.fd == -1: return if obj.fd in self.queue: self.unplug_idle(obj.fd) self.queue[obj.fd] = obj if writable: if not readable: flags = FLAG_WRITE else: flags = FLAG_READ_WRITE else: if readable: flags = FLAG_READ else: # when we paused a FT, we expect only a close event flags = FLAG_CLOSE self._add_idle(obj.fd, flags) def _add_idle(self, fd, flags): """ Hook method for subclasses, called by plug_idle """ self.selector.register(fd, flags) def unplug_idle(self, fd): """ Remove plugged IdleObject, specified by filedescriptor fd """ if fd in self.queue: del(self.queue[fd]) self._remove_idle(fd) def current_time(self): from time import time return time() * 1e6 def _remove_idle(self, fd): """ Hook method for subclassed, called by unplug_idle """ self.selector.unregister(fd) def _process_events(self, fd, flags): obj = self.queue.get(fd) if obj is None: self.unplug_idle(fd) return False read_write = False if flags & PENDING_READ: #print 'waiting read on %d, flags are %d' % (fd, flags) obj.pollin() read_write = True elif flags & PENDING_WRITE and not flags & IS_CLOSED: obj.pollout() read_write = True if flags & IS_CLOSED: # io error, don't expect more events self.remove_timeout(obj.fd) self.unplug_idle(obj.fd) obj.pollend() return False if read_write: return True return False def process(self): """ Process idlequeue. Check for any pending timeout or alarm events. Call IdleObjects on possible and requested read, write and error events on their file descriptors Call this in regular intervals. """ if not self.queue: # check for timeouts/alert also when there are no active fds self._check_time_events() return True try: waiting_descriptors = self.selector.poll(0) except select.error as e: waiting_descriptors = [] if e[0] != 4: # interrupt raise for fd, flags in waiting_descriptors: self._process_events(fd, flags) self._check_time_events() return True class SelectIdleQueue(IdleQueue): """ Extends IdleQueue to use select.select() for polling This class exisists for the sake of gtk2.8 on windows, which doesn't seem to support io_add_watch properly (yet) """ def _init_idle(self): """ Create a dict, which maps file/pipe/sock descriptor to glib event id """ self.read_fds = {} self.write_fds = {} self.error_fds = {} def _add_idle(self, fd, flags): """ This method is called when we plug a new idle object. Remove descriptor to read/write/error lists, according flags """ if flags & 3: self.read_fds[fd] = fd if flags & 4: self.write_fds[fd] = fd self.error_fds[fd] = fd def _remove_idle(self, fd): """ This method is called when we unplug a new idle object. Remove descriptor from read/write/error lists """ if fd in self.read_fds: del(self.read_fds[fd]) if fd in self.write_fds: del(self.write_fds[fd]) if fd in self.error_fds: del(self.error_fds[fd]) def process(self): if not self.write_fds and not self.read_fds: self._check_time_events() return True try: waiting_descriptors = select.select(list(self.read_fds.keys()), list(self.write_fds.keys()), list(self.error_fds.keys()), 0) except select.error as e: waiting_descriptors = ((), (), ()) if e[0] != 4: # interrupt raise for fd in waiting_descriptors[0]: q = self.queue.get(fd) if q: q.pollin() for fd in waiting_descriptors[1]: q = self.queue.get(fd) if q: q.pollout() for fd in waiting_descriptors[2]: q = self.queue.get(fd) if q: q.pollend() self._check_time_events() return True class GlibIdleQueue(IdleQueue): """ Extends IdleQueue to use glib io_add_wath, instead of select/poll In another 'non gui' implementation of Gajim IdleQueue can be used safetly """ # (timeout, boolean) # Boolean is True if timeout is specified in seconds, False means miliseconds PROCESS_TIMEOUT = (2, True) def _init_idle(self): """ Creates a dict, which maps file/pipe/sock descriptor to glib event id """ self.events = {} def _add_idle(self, fd, flags): """ This method is called when we plug a new idle object. Start listening for events from fd """ if sys.version_info[0] == 2: res = gobject.io_add_watch(fd, flags, self._process_events, priority=gobject.PRIORITY_LOW) else: res = GLib.io_add_watch(fd, GLib.PRIORITY_LOW, flags, self._process_events) # store the id of the watch, so that we can remove it on unplug self.events[fd] = res def _process_events(self, fd, flags): try: return IdleQueue._process_events(self, fd, flags) except Exception: self._remove_idle(fd) self._add_idle(fd, flags) raise def _remove_idle(self, fd): """ This method is called when we unplug a new idle object. Stop listening for events from fd """ if not fd in self.events: return if sys.version_info[0] == 2: gobject.source_remove(self.events[fd]) else: GLib.source_remove(self.events[fd]) del(self.events[fd]) def process(self): self._check_time_events() if sys.version_info[0] == 2: def current_time(self): return gobject.get_current_time() * 1e6 else: current_time = GLib.get_real_time nbxmpp-0.5.3/nbxmpp/dispatcher_nb.py0000644000175000017500000006021412321264004020663 0ustar asterixasterix00000000000000## dispatcher_nb.py ## based on dispatcher.py ## ## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov ## modified by Dimitur Kirov ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, 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 General Public License for more details. """ Main xmpp decision making logic. Provides library with methods to assign different handlers to different XMPP stanzas and namespaces """ from __future__ import unicode_literals from . import simplexml import sys import locale import re from xml.parsers.expat import ExpatError from .plugin import PlugIn from .protocol import (NS_STREAMS, NS_XMPP_STREAMS, NS_HTTP_BIND, Iq, Presence, Message, Protocol, Node, Error, ERR_FEATURE_NOT_IMPLEMENTED, StreamError) import logging if sys.version_info[0] == 2: chr = unichr log = logging.getLogger('nbxmpp.dispatcher_nb') #: default timeout to wait for response for our id DEFAULT_TIMEOUT_SECONDS = 25 outgoingID = 0 XML_DECLARATION = '' # FIXME: ugly class Dispatcher(): """ Why is this here - I needed to redefine Dispatcher for BOSH and easiest way was to inherit original Dispatcher (now renamed to XMPPDispatcher). Trouble is that reference used to access dispatcher instance is in Client attribute named by __class__.__name__ of the dispatcher instance .. long story short: I wrote following to avoid changing each client.Dispatcher.whatever() in xmpp If having two kinds of dispatcher will go well, I will rewrite the dispatcher references in other scripts """ def PlugIn(self, client_obj, after_SASL=False, old_features=None): if client_obj.protocol_type == 'XMPP': XMPPDispatcher().PlugIn(client_obj) elif client_obj.protocol_type == 'BOSH': BOSHDispatcher().PlugIn(client_obj, after_SASL, old_features) else: assert False # should never be reached @classmethod def get_instance(cls, *args, **kwargs): """ Factory Method for object creation Use this instead of directly initializing the class in order to make unit testing much easier. """ return cls(*args, **kwargs) class XMPPDispatcher(PlugIn): """ Handles XMPP stream and is the first who takes control over a fresh stanza Is plugged into NonBlockingClient but can be replugged to restart handled stream headers (used by SASL f.e.). """ def __init__(self): PlugIn.__init__(self) self.handlers = {} self._expected = {} self._defaultHandler = None self._pendingExceptions = [] self._eventHandler = None self._cycleHandlers = [] self._exported_methods=[self.RegisterHandler, self.RegisterDefaultHandler, self.RegisterEventHandler, self.UnregisterCycleHandler, self.RegisterCycleHandler, self.RegisterHandlerOnce, self.UnregisterHandler, self.RegisterProtocol, self.SendAndWaitForResponse, self.SendAndCallForResponse, self.getAnID, self.Event, self.send] # Let the dispatcher know if there is support for stream management self.sm = None # \ufddo -> \ufdef range c = '\ufdd0' r = c while (c < '\ufdef'): c = chr(ord(c) + 1) r += '|' + c # \ufffe-\uffff, \u1fffe-\u1ffff, ..., \u10fffe-\u10ffff c = '\ufffe' r += '|' + c r += '|' + chr(ord(c) + 1) while (c < '\U0010fffe'): c = chr(ord(c) + 0x10000) r += '|' + c r += '|' + chr(ord(c) + 1) self.invalid_chars_re = re.compile(r) def getAnID(self): global outgoingID outgoingID += 1 return repr(outgoingID) def dumpHandlers(self): """ Return set of user-registered callbacks in it's internal format. Used within the library to carry user handlers set over Dispatcher replugins """ return self.handlers def restoreHandlers(self, handlers): """ Restore user-registered callbacks structure from dump previously obtained via dumpHandlers. Used within the library to carry user handlers set over Dispatcher replugins. """ self.handlers = handlers def _init(self): """ Register default namespaces/protocols/handlers. Used internally """ # FIXME: inject dependencies, do not rely that they are defined by our # owner self.RegisterNamespace('unknown') self.RegisterNamespace(NS_STREAMS) self.RegisterNamespace(self._owner.defaultNamespace) self.RegisterProtocol('iq', Iq) self.RegisterProtocol('presence', Presence) self.RegisterProtocol('message', Message) self.RegisterDefaultHandler(self.returnStanzaHandler) self.RegisterEventHandler(self._owner._caller._event_dispatcher) self.on_responses = {} def plugin(self, owner): """ Plug the Dispatcher instance into Client class instance and send initial stream header. Used internally """ self._init() self._owner.lastErrNode = None self._owner.lastErr = None self._owner.lastErrCode = None if hasattr(self._owner, 'StreamInit'): self._owner.StreamInit() else: self.StreamInit() def plugout(self): """ Prepare instance to be destructed """ self.Stream.dispatch = None self.Stream.features = None self.Stream.destroy() self._owner = None self.Stream = None def StreamInit(self): """ Send an initial stream header """ self._owner.Connection.sendqueue = [] self.Stream = simplexml.NodeBuilder() self.Stream.dispatch = self.dispatch self.Stream._dispatch_depth = 2 self.Stream.stream_header_received = self._check_stream_start self.Stream.features = None self._metastream = Node('stream:stream') self._metastream.setNamespace(self._owner.Namespace) self._metastream.setAttr('version', '1.0') self._metastream.setAttr('xmlns:stream', NS_STREAMS) self._metastream.setAttr('to', self._owner.Server) if locale.getdefaultlocale()[0]: self._metastream.setAttr('xml:lang', locale.getdefaultlocale()[0].split('_')[0]) self._owner.send("%s%s>" % (XML_DECLARATION, str(self._metastream)[:-2])) def _check_stream_start(self, ns, tag, attrs): if ns != NS_STREAMS or tag!='stream': raise ValueError('Incorrect stream start: (%s,%s). Terminating.' % (tag, ns)) def replace_non_character(self, data): return re.sub(self.invalid_chars_re, '\ufffd', data) def ProcessNonBlocking(self, data): """ Check incoming stream for data waiting :param data: data received from transports/IO sockets :return: 1) length of processed data if some data were processed; 2) '0' string if no data were processed but link is alive; 3) 0 (zero) if underlying connection is closed. """ # FIXME: # When an error occurs we disconnect the transport directly. Client's # disconnect method will never be called. # Is this intended? # also look at transports start_disconnect() data = self.replace_non_character(data) for handler in self._cycleHandlers: handler(self) if len(self._pendingExceptions) > 0: _pendingException = self._pendingExceptions.pop() sys.excepthook(*_pendingException) return try: self.Stream.Parse(data) # end stream:stream tag received if self.Stream and self.Stream.has_received_endtag(): self._owner.disconnect(self.Stream.streamError) return 0 except ExpatError: log.error('Invalid XML received from server. Forcing disconnect.') self._owner.Connection.disconnect() return 0 except ValueError as e: log.debug('ValueError: %s' % str(e)) self._owner.Connection.pollend() return 0 if len(self._pendingExceptions) > 0: _pendingException = self._pendingExceptions.pop() sys.excepthook(*_pendingException) return if len(data) == 0: return '0' return len(data) def RegisterNamespace(self, xmlns, order='info'): """ Create internal structures for newly registered namespace You can register handlers for this namespace afterwards. By default one namespace is already registered (jabber:client or jabber:component:accept depending on context. """ log.debug('Registering namespace "%s"' % xmlns) self.handlers[xmlns] = {} self.RegisterProtocol('unknown', Protocol, xmlns=xmlns) self.RegisterProtocol('default', Protocol, xmlns=xmlns) def RegisterProtocol(self, tag_name, Proto, xmlns=None, order='info'): """ Used to declare some top-level stanza name to dispatcher Needed to start registering handlers for such stanzas. Iq, message and presence protocols are registered by default. """ if not xmlns: xmlns=self._owner.defaultNamespace log.debug('Registering protocol "%s" as %s(%s)' %(tag_name, Proto, xmlns)) self.handlers[xmlns][tag_name] = {type:Proto, 'default':[]} def RegisterNamespaceHandler(self, xmlns, handler, typ='', ns='', makefirst=0, system=0): """ Register handler for processing all stanzas for specified namespace """ self.RegisterHandler('default', handler, typ, ns, xmlns, makefirst, system) def RegisterHandler(self, name, handler, typ='', ns='', xmlns=None, makefirst=False, system=False): """ Register user callback as stanzas handler of declared type Callback arguments: dispatcher instance (for replying), incoming return of previous handlers. The callback must raise xmpp.NodeProcessed just before return if it wants to prevent other callbacks to be called with the same stanza as argument _and_, more importantly library from returning stanza to sender with error set. :param name: name of stanza. F.e. "iq". :param handler: user callback. :param typ: value of stanza's "type" attribute. If not specified any value will match :param ns: namespace of child that stanza must contain. :param makefirst: insert handler in the beginning of handlers list instead of adding it to the end. Note that more common handlers i.e. w/o "typ" and " will be called first nevertheless. :param system: call handler even if NodeProcessed Exception were raised already. """ if not xmlns: xmlns=self._owner.defaultNamespace log.debug('Registering handler %s for "%s" type->%s ns->%s(%s)' % (handler, name, typ, ns, xmlns)) if not typ and not ns: typ='default' if xmlns not in self.handlers: self.RegisterNamespace(xmlns, 'warn') if name not in self.handlers[xmlns]: self.RegisterProtocol(name, Protocol, xmlns, 'warn') if typ+ns not in self.handlers[xmlns][name]: self.handlers[xmlns][name][typ+ns]=[] if makefirst: self.handlers[xmlns][name][typ+ns].insert(0, {'func':handler, 'system':system}) else: self.handlers[xmlns][name][typ+ns].append({'func':handler, 'system':system}) def RegisterHandlerOnce(self, name, handler, typ='', ns='', xmlns=None, makefirst=0, system=0): """ Unregister handler after first call (not implemented yet) """ # FIXME Drop or implement if not xmlns: xmlns = self._owner.defaultNamespace self.RegisterHandler(name, handler, typ, ns, xmlns, makefirst, system) def UnregisterHandler(self, name, handler, typ='', ns='', xmlns=None): """ Unregister handler. "typ" and "ns" must be specified exactly the same as with registering. """ if not xmlns: xmlns = self._owner.defaultNamespace if not typ and not ns: typ='default' if xmlns not in self.handlers: return if name not in self.handlers[xmlns]: return if typ+ns not in self.handlers[xmlns][name]: return for pack in self.handlers[xmlns][name][typ+ns]: if pack['func'] == handler: try: self.handlers[xmlns][name][typ+ns].remove(pack) except ValueError: pass def RegisterDefaultHandler(self, handler): """ Specify the handler that will be used if no NodeProcessed exception were raised. This is returnStanzaHandler by default. """ self._defaultHandler = handler def RegisterEventHandler(self, handler): """ Register handler that will process events. F.e. "FILERECEIVED" event. See common/connection: _event_dispatcher() """ self._eventHandler = handler def returnStanzaHandler(self, conn, stanza): """ Return stanza back to the sender with error set """ if stanza.getType() in ('get', 'set'): conn._owner.send(Error(stanza, ERR_FEATURE_NOT_IMPLEMENTED)) def RegisterCycleHandler(self, handler): """ Register handler that will be called on every Dispatcher.Process() call """ if handler not in self._cycleHandlers: self._cycleHandlers.append(handler) def UnregisterCycleHandler(self, handler): """ Unregister handler that will is called on every Dispatcher.Process() call """ if handler in self._cycleHandlers: self._cycleHandlers.remove(handler) def Event(self, realm, event, data): """ Raise some event :param realm: scope of event. Usually a namespace. :param event: the event itself. F.e. "SUCCESSFUL SEND". :param data: data that comes along with event. Depends on event. """ if self._eventHandler: self._eventHandler(realm, event, data) else: log.warning('Received unhandled event: %s' % event) def dispatch(self, stanza, session=None, direct=0): """ Main procedure that performs XMPP stanza recognition and calling apppropriate handlers for it. Called by simplexml """ # FIXME: Where do we set session and direct. Why? What are those intended # to do? #log.info('dispatch called: stanza = %s, session = %s, direct= %s' # % (stanza, session, direct)) if not session: session = self session.Stream._mini_dom = None name = stanza.getName() if name == 'features': self._owner.got_features = True session.Stream.features = stanza elif name == 'error': if stanza.getTag('see-other-host'): self._owner.got_see_other_host = stanza xmlns = stanza.getNamespace() # log.info('in dispatch, getting ns for %s, and the ns is %s' # % (stanza, xmlns)) if xmlns not in self.handlers: log.warning("Unknown namespace: " + xmlns) xmlns = 'unknown' # features stanza has been handled before if name not in self.handlers[xmlns]: if name != 'features': log.warning("Unknown stanza: " + name) else: log.debug("Got %s/%s stanza" % (xmlns, name)) name='unknown' else: log.debug("Got %s/%s stanza" % (xmlns, name)) if stanza.__class__.__name__ == 'Node': # FIXME: this cannot work stanza=self.handlers[xmlns][name][type](node=stanza) typ = stanza.getType() if not typ: typ = '' stanza.props = stanza.getProperties() ID = stanza.getID() # If server supports stream management if self.sm and self.sm.enabled and (stanza.getName() != 'r' and stanza.getName() != 'a' and stanza.getName() != 'enabled' and stanza.getName() != 'resumed'): # increments the number of stanzas that has been handled self.sm.in_h = self.sm.in_h + 1 list_ = ['default'] # we will use all handlers: if typ in self.handlers[xmlns][name]: list_.append(typ) # from very common... for prop in stanza.props: if prop in self.handlers[xmlns][name]: list_.append(prop) if typ and typ+prop in self.handlers[xmlns][name]: list_.append(typ+prop) # ...to very particular chain = self.handlers[xmlns]['default']['default'] for key in list_: if key: chain = chain + self.handlers[xmlns][name][key] if ID in session._expected: user = 0 if isinstance(session._expected[ID], tuple): cb, args = session._expected[ID] log.debug("Expected stanza arrived. Callback %s(%s) found!" % (cb, args)) try: cb(session,stanza,**args) except Exception as typ: if typ.__class__.__name__ != 'NodeProcessed': raise else: log.debug("Expected stanza arrived!") session._expected[ID] = stanza else: user = 1 for handler in chain: if user or handler['system']: try: handler['func'](session, stanza) except Exception as typ: if typ.__class__.__name__ != 'NodeProcessed': self._pendingExceptions.insert(0, sys.exc_info()) return user=0 if user and self._defaultHandler: self._defaultHandler(session, stanza) def _WaitForData(self, data): """ Internal wrapper around ProcessNonBlocking. Will check for """ if data is None: return res = self.ProcessNonBlocking(data) # 0 result indicates that we have closed the connection, e.g. # we have released dispatcher, so self._owner has no methods if not res: return for (_id, _iq) in list(self._expected.items()): if _iq is None: # If the expected Stanza would have arrived, ProcessNonBlocking # would have placed the reply stanza in there continue if _id in self.on_responses: if len(self._expected) == 1: self._owner.onreceive(None) resp, args = self.on_responses[_id] del self.on_responses[_id] if args is None: resp(_iq) else: resp(self._owner, _iq, **args) del self._expected[_id] def SendAndWaitForResponse(self, stanza, timeout=None, func=None, args=None): """ Send stanza and wait for recipient's response to it. Will call transports on_timeout callback if response is not retrieved in time Be aware: Only timeout of latest call of SendAndWait is active. """ if timeout is None: timeout = DEFAULT_TIMEOUT_SECONDS _waitid = self.send(stanza) if func: self.on_responses[_waitid] = (func, args) if timeout: self._owner.set_timeout(timeout) self._owner.onreceive(self._WaitForData) self._expected[_waitid] = None return _waitid def SendAndCallForResponse(self, stanza, func=None, args=None): """ Put stanza on the wire and call back when recipient replies. Additional callback arguments can be specified in args """ self.SendAndWaitForResponse(stanza, 0, func, args) def send(self, stanza, now=False): """ Wrap transports send method when plugged into NonBlockingClient. Makes sure stanzas get ID and from tag. """ ID = None if type(stanza) != str: if isinstance(stanza, Protocol): ID = stanza.getID() if ID is None: stanza.setID(self.getAnID()) ID = stanza.getID() if self._owner._registered_name and not stanza.getAttr('from'): stanza.setAttr('from', self._owner._registered_name) # If no ID then it is a whitespace if self.sm and self.sm.enabled and ID: self.sm.uqueue.append(stanza) self.sm.out_h = self.sm.out_h + 1 if len(self.sm.uqueue) > self.sm.max_queue: self.sm.request_ack() self._owner.Connection.send(stanza, now) return ID class BOSHDispatcher(XMPPDispatcher): def PlugIn(self, owner, after_SASL=False, old_features=None): self.old_features = old_features self.after_SASL = after_SASL XMPPDispatcher.PlugIn(self, owner) def StreamInit(self): """ Send an initial stream header """ self.Stream = simplexml.NodeBuilder() self.Stream.dispatch = self.dispatch self.Stream._dispatch_depth = 2 self.Stream.stream_header_received = self._check_stream_start self.Stream.features = self.old_features self._metastream = Node('stream:stream') self._metastream.setNamespace(self._owner.Namespace) self._metastream.setAttr('version', '1.0') self._metastream.setAttr('xmlns:stream', NS_STREAMS) self._metastream.setAttr('to', self._owner.Server) if locale.getdefaultlocale()[0]: self._metastream.setAttr('xml:lang', locale.getdefaultlocale()[0].split('_')[0]) self.restart = True self._owner.Connection.send_init(after_SASL=self.after_SASL) def StreamTerminate(self): """ Send a stream terminator """ self._owner.Connection.send_terminator() def ProcessNonBlocking(self, data=None): if self.restart: fromstream = self._metastream fromstream.setAttr('from', fromstream.getAttr('to')) fromstream.delAttr('to') data = '%s%s>%s' % (XML_DECLARATION, str(fromstream)[:-2], data) self.restart = False return XMPPDispatcher.ProcessNonBlocking(self, data) def dispatch(self, stanza, session=None, direct=0): if stanza.getName() == 'body' and stanza.getNamespace() == NS_HTTP_BIND: stanza_attrs = stanza.getAttrs() if 'authid' in stanza_attrs: # should be only in init response # auth module expects id of stream in document attributes self.Stream._document_attrs['id'] = stanza_attrs['authid'] self._owner.Connection.handle_body_attrs(stanza_attrs) children = stanza.getChildren() if children: for child in children: # if child doesn't have any ns specified, simplexml (or expat) # thinks it's of parent's (BOSH body) namespace, so we have to # rewrite it to jabber:client if child.getNamespace() == NS_HTTP_BIND: child.setNamespace(self._owner.defaultNamespace) XMPPDispatcher.dispatch(self, child, session, direct) else: XMPPDispatcher.dispatch(self, stanza, session, direct) nbxmpp-0.5.3/nbxmpp/rndg.py0000644000175000017500000000333012321264064017012 0ustar asterixasterix00000000000000## rndg.py ## ## cryptographically secure pseudo-random number generator. ## When possible use OpenSSL PRNG combined with os.random, ## if OpenSSL PRNG is not available, use only os.random. ## ## Copyright (C) 2013 Fedor Brunner ## ## This file is part of Gajim. ## ## Gajim is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published ## by the Free Software Foundation; version 3 only. ## ## Gajim 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 General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with Gajim. If not, see . USE_PYOPENSSL = False try: import OpenSSL.rand import binascii, os USE_PYOPENSSL = True except ImportError: import random if not USE_PYOPENSSL: getrandbits = random.SystemRandom().getrandbits else: def getrandbits(k): """getrandbits(k) -> x. Generates a long int with k random bits.""" if k <= 0: raise ValueError('number of bits must be greater than zero') if k != int(k): raise TypeError('number of bits should be an integer') bytes = (k + 7) // 8 # bits / 8 and rounded up # Add system entropy to OpenSSL PRNG OpenSSL.rand.add(os.urandom(bytes), bytes) # Extract random bytes from OpenSSL PRNG random_str = OpenSSL.rand.bytes(bytes) x = int(binascii.hexlify(random_str), 16) return x >> (bytes * 8 - k) # trim excess bits nbxmpp-0.5.3/nbxmpp/bosh.py0000644000175000017500000005404712321264044017024 0ustar asterixasterix00000000000000## bosh.py ## ## ## Copyright (C) 2008 Tomas Karasek ## ## This file is part of Gajim. ## ## Gajim is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published ## by the Free Software Foundation; version 3 only. ## ## Gajim 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 General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with Gajim. If not, see . import locale from hashlib import sha1 from .transports_nb import NonBlockingTransport, NonBlockingHTTPBOSH,\ CONNECTED, CONNECTING, DISCONNECTED, DISCONNECTING,\ urisplit, DISCONNECT_TIMEOUT_SECONDS from .protocol import BOSHBody, Protocol, NS_CLIENT from .simplexml import Node import logging log = logging.getLogger('nbxmpp.bosh') from . import rndg KEY_COUNT = 10 # Fake file descriptor - it's used for setting read_timeout in idlequeue for # BOSH Transport. In TCP-derived transports this is file descriptor of socket. FAKE_DESCRIPTOR = -1337 class NonBlockingBOSH(NonBlockingTransport): def __init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, certs, tls_version, cipher_list, xmpp_server, domain, bosh_dict, proxy_creds): NonBlockingTransport.__init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, certs, tls_version, cipher_list) self.bosh_sid = None if locale.getdefaultlocale()[0]: self.bosh_xml_lang = locale.getdefaultlocale()[0].split('_')[0] else: self.bosh_xml_lang = 'en' self.http_version = 'HTTP/1.1' self.http_persistent = True self.http_pipelining = bosh_dict['bosh_http_pipelining'] self.bosh_to = domain self.route_host, self.route_port = xmpp_server self.bosh_wait = bosh_dict['bosh_wait'] if not self.http_pipelining: self.bosh_hold = 1 else: self.bosh_hold = bosh_dict['bosh_hold'] self.bosh_requests = self.bosh_hold self.bosh_uri = bosh_dict['bosh_uri'] self.bosh_content = bosh_dict['bosh_content'] self.over_proxy = bosh_dict['bosh_useproxy'] if estabilish_tls: self.bosh_secure = 'true' else: self.bosh_secure = 'false' self.tls_version = tls_version self.cipher_list = cipher_list self.use_proxy_auth = bosh_dict['useauth'] self.proxy_creds = proxy_creds self.wait_cb_time = None self.http_socks = [] self.stanza_buffer = [] self.prio_bosh_stanzas = [] self.current_recv_handler = None self.current_recv_socket = None self.key_stack = None self.ack_checker = None self.after_init = False self.proxy_dict = {} if self.over_proxy and self.estabilish_tls: self.proxy_dict['type'] = 'http' # with SSL over proxy, we do HTTP CONNECT to proxy to open a channel to # BOSH Connection Manager host, port = urisplit(self.bosh_uri)[1:3] self.proxy_dict['xmpp_server'] = (host, port) self.proxy_dict['credentials'] = self.proxy_creds # ssl variables self.ssl_certificate = None self.ssl_errnum = 0 def connect(self, conn_5tuple, on_connect, on_connect_failure): NonBlockingTransport.connect(self, conn_5tuple, on_connect, on_connect_failure) global FAKE_DESCRIPTOR FAKE_DESCRIPTOR = FAKE_DESCRIPTOR - 1 self.fd = FAKE_DESCRIPTOR self.stanza_buffer = [] self.prio_bosh_stanzas = [] self.key_stack = KeyStack(KEY_COUNT) self.ack_checker = AckChecker() self.after_init = True self.http_socks.append(self.get_new_http_socket()) self._tcp_connecting_started() self.http_socks[0].connect( conn_5tuple = conn_5tuple, on_connect = self._on_connect, on_connect_failure = self._on_connect_failure) def _on_connect(self): self.peerhost = self.http_socks[0].peerhost self.ssl_lib = self.http_socks[0].ssl_lib NonBlockingTransport._on_connect(self) def set_timeout(self, timeout): if self.get_state() != DISCONNECTED and self.fd != -1: NonBlockingTransport.set_timeout(self, timeout) else: log.warning('set_timeout: TIMEOUT NOT SET: state is %s, fd is %s' % (self.get_state(), self.fd)) def on_http_request_possible(self): """ Called when HTTP request it's possible to send a HTTP request. It can be when socket is connected or when HTTP response arrived There should be always one pending request to BOSH CM. """ log.debug('on_http_req possible, state:\n%s' % self.get_current_state()) if self.get_state()==DISCONNECTED: return #Hack for making the non-secure warning dialog work if self._owner.got_features: if (hasattr(self._owner, 'NonBlockingNonSASL') or hasattr(self._owner, 'SASL')): self.send_BOSH(None) else: # If we already got features and no auth module was plugged yet, we are # probably waiting for confirmation of the "not-secure-connection" dialog. # We don't send HTTP request in that case. # see http://lists.jabber.ru/pipermail/ejabberd/2008-August/004027.html return else: self.send_BOSH(None) def get_socket_in(self, state): """ Get sockets in desired state """ for s in self.http_socks: if s.get_state()==state: return s return None def get_free_socket(self): """ Select and returns socket eligible for sending a data to """ if self.http_pipelining: return self.get_socket_in(CONNECTED) else: last_recv_time, tmpsock = 0, None for s in self.http_socks: # we're interested only in CONNECTED socket with no requests pending if s.get_state()==CONNECTED and s.pending_requests==0: # if there's more of them, we want the one with the least recent data receive # (lowest last_recv_time) if (last_recv_time==0) or (s.last_recv_time < last_recv_time): last_recv_time = s.last_recv_time tmpsock = s if tmpsock: return tmpsock else: return None def send_BOSH(self, payload): """ Tries to send a stanza in payload by appeding it to a buffer and plugging a free socket for writing. """ total_pending_reqs = sum([s.pending_requests for s in self.http_socks]) # when called after HTTP response (Payload=None) and when there are already # some pending requests and no data to send, or when the socket is # disconnected, we do nothing if payload is None and \ total_pending_reqs > 0 and \ self.stanza_buffer == [] and \ self.prio_bosh_stanzas == [] or \ self.get_state()==DISCONNECTED: return # Add xmlns to stanza to help ejabberd server if payload and isinstance(payload, Protocol): if not payload.getNamespace(): payload.setNamespace(NS_CLIENT) # now the payload is put to buffer and will be sent at some point self.append_stanza(payload) # if we're about to make more requests than allowed, we don't send - stanzas will be # sent after HTTP response from CM, exception is when we're disconnecting - then we # send anyway if total_pending_reqs >= self.bosh_requests and self.get_state()!=DISCONNECTING: log.warning('attemp to make more requests than allowed by Connection Manager:\n%s' % self.get_current_state()) return # when there's free CONNECTED socket, we plug it for write and the data will # be sent when write is possible if self.get_free_socket(): self.plug_socket() return # if there is a connecting socket, we just wait for when it connects, # payload will be sent in a sec when the socket connects if self.get_socket_in(CONNECTING): return # being here means there are either DISCONNECTED sockets or all sockets are # CONNECTED with too many pending requests s = self.get_socket_in(DISCONNECTED) # if we have DISCONNECTED socket, lets connect it and plug for send if s: self.connect_and_flush(s) else: # otherwise create and connect a new one ss = self.get_new_http_socket() self.http_socks.append(ss) self.connect_and_flush(ss) return def plug_socket(self): stanza = None s = self.get_free_socket() if s: s._plug_idle(writable=True, readable=True) else: log.error('=====!!!!!!!!====> Couldn\'t get free socket in plug_socket())') def build_stanza(self, socket): """ Build a BOSH body tag from data in buffers and adds key, rid and ack attributes to it This method is called from _do_send() of underlying transport. This is to ensure rid and keys will be processed in correct order. If I generate them before plugging a socket for write (and did it for two sockets/HTTP connections) in parallel, they might be sent in wrong order, which results in violating the BOSH session and server-side disconnect. """ if self.prio_bosh_stanzas: stanza, add_payload = self.prio_bosh_stanzas.pop(0) if add_payload: stanza.setPayload(self.stanza_buffer) self.stanza_buffer = [] else: stanza = self.boshify_stanzas(self.stanza_buffer) self.stanza_buffer = [] stanza = self.ack_checker.backup_stanza(stanza, socket) key, newkey = self.key_stack.get() if key: stanza.setAttr('key', key) if newkey: stanza.setAttr('newkey', newkey) log.info('sending msg with rid=%s to sock %s' % (stanza.getAttr('rid'), id(socket))) self.renew_bosh_wait_timeout(self.bosh_wait + 3) return stanza def on_bosh_wait_timeout(self): log.error('Connection Manager didn\'t respond within %s + 3 seconds --> forcing disconnect' % self.bosh_wait) self.disconnect() def renew_bosh_wait_timeout(self, timeout): if self.wait_cb_time is not None: self.remove_bosh_wait_timeout() sched_time = self.idlequeue.set_alarm(self.on_bosh_wait_timeout, timeout) self.wait_cb_time = sched_time def remove_bosh_wait_timeout(self): self.idlequeue.remove_alarm( self.on_bosh_wait_timeout, self.wait_cb_time) def on_persistent_fallback(self, socket): """ Called from underlying transport when server closes TCP connection :param socket: disconnected transport object """ if socket.http_persistent: log.warning('Fallback to nonpersistent HTTP (no pipelining as well)') socket.http_persistent = False self.http_persistent = False self.http_pipelining = False socket.disconnect(do_callback=False) self.connect_and_flush(socket) else: socket.disconnect() def handle_body_attrs(self, stanza_attrs): """ Called for each incoming body stanza from dispatcher. Checks body attributes. """ self.remove_bosh_wait_timeout() if self.after_init: if 'sid' in stanza_attrs: # session ID should be only in init response self.bosh_sid = stanza_attrs['sid'] if 'requests' in stanza_attrs: self.bosh_requests = int(stanza_attrs['requests']) if 'wait' in stanza_attrs: self.bosh_wait = int(stanza_attrs['wait']) self.after_init = False ack = None if 'ack' in stanza_attrs: ack = stanza_attrs['ack'] self.ack_checker.process_incoming_ack(ack=ack, socket=self.current_recv_socket) if 'type' in stanza_attrs: if stanza_attrs['type'] in ['terminate', 'terminal']: condition = 'n/a' if 'condition' in stanza_attrs: condition = stanza_attrs['condition'] if condition == 'n/a': log.info('Received sesion-ending terminating stanza') else: log.error('Received terminating stanza: %s - %s' % (condition, bosh_errors[condition])) self.disconnect() return if stanza_attrs['type'] == 'error': # recoverable error pass return def append_stanza(self, stanza): """ Append stanza to a buffer to send """ if stanza: if isinstance(stanza, tuple): # stanza is tuple of BOSH stanza and bool value for whether to add payload self.prio_bosh_stanzas.append(stanza) else: # stanza is XMPP stanza. Will be boshified before send. self.stanza_buffer.append(stanza) def send(self, stanza, now=False): self.send_BOSH(stanza) def get_current_state(self): t = '------ SOCKET_ID\tSOCKET_STATE\tPENDING_REQS\n' for s in self.http_socks: t = '%s------ %s\t%s\t%s\n' % (t, id(s), s.get_state(), s.pending_requests) t = '%s------ prio stanzas: %s, queued XMPP stanzas: %s, not_acked stanzas: %s' \ % (t, self.prio_bosh_stanzas, self.stanza_buffer, self.ack_checker.get_not_acked_rids()) return t def connect_and_flush(self, socket): socket.connect( conn_5tuple = self.conn_5tuple, on_connect = self.on_http_request_possible, on_connect_failure = self.disconnect) def boshify_stanzas(self, stanzas=[], body_attrs=None): """ Wraps zero to many stanzas by body tag with xmlns and sid """ log.debug('boshify_staza - type is: %s, stanza is %s' % (type(stanzas), stanzas)) tag = BOSHBody(attrs={'sid': self.bosh_sid}) tag.setPayload(stanzas) return tag def send_init(self, after_SASL=False): if after_SASL: t = BOSHBody( attrs={ 'to': self.bosh_to, 'sid': self.bosh_sid, 'xml:lang': self.bosh_xml_lang, 'xmpp:restart': 'true', 'secure': self.bosh_secure, 'xmlns:xmpp': 'urn:xmpp:xbosh'}) else: t = BOSHBody( attrs={ 'content': self.bosh_content, 'hold': str(self.bosh_hold), 'route': 'xmpp:%s:%s' % (self.route_host, self.route_port), 'to': self.bosh_to, 'wait': str(self.bosh_wait), 'xml:lang': self.bosh_xml_lang, 'xmpp:version': '1.0', 'ver': '1.6', 'xmlns:xmpp': 'urn:xmpp:xbosh'}) self.send_BOSH((t, True)) def start_disconnect(self): NonBlockingTransport.start_disconnect(self) self.renew_bosh_wait_timeout(DISCONNECT_TIMEOUT_SECONDS) self.send_BOSH( (BOSHBody(attrs={'sid': self.bosh_sid, 'type': 'terminate'}), True)) def get_new_http_socket(self): http_dict = {'http_uri': self.bosh_uri, 'http_version': self.http_version, 'http_persistent': self.http_persistent, 'add_proxy_headers': self.over_proxy and not self.estabilish_tls} if self.use_proxy_auth: http_dict['proxy_user'], http_dict['proxy_pass'] = self.proxy_creds s = NonBlockingHTTPBOSH( raise_event=self.raise_event, on_disconnect=self.disconnect, idlequeue = self.idlequeue, estabilish_tls = self.estabilish_tls, tls_version = self.tls_version, cipher_list = self.cipher_list, certs = self.certs, on_http_request_possible = self.on_http_request_possible, http_dict = http_dict, proxy_dict = self.proxy_dict, on_persistent_fallback = self.on_persistent_fallback) s.onreceive(self.on_received_http) s.set_stanza_build_cb(self.build_stanza) return s def onreceive(self, recv_handler): if recv_handler is None: recv_handler = self._owner.Dispatcher.ProcessNonBlocking self.current_recv_handler = recv_handler def on_received_http(self, data, socket): self.current_recv_socket = socket self.current_recv_handler(data) def disconnect(self, do_callback=True): self.remove_bosh_wait_timeout() if self.get_state() == DISCONNECTED: return self.fd = -1 for s in self.http_socks: s.disconnect(do_callback=False) NonBlockingTransport.disconnect(self, do_callback) def get_rand_number(): # with 50-bit random initial rid, session would have to go up # to 7881299347898368 messages to raise rid over 2**53 # (see http://www.xmpp.org/extensions/xep-0124.html#rids) # it's also used for sequence key initialization return rndg.getrandbits(50) class AckChecker(): """ Class for generating rids and generating and checking acknowledgements in BOSH messages """ def __init__(self): self.rid = get_rand_number() self.ack = 1 self.last_rids = {} self.not_acked = [] def get_not_acked_rids(self): return [rid for rid, st in self.not_acked] def backup_stanza(self, stanza, socket): socket.pending_requests += 1 rid = self.get_rid() self.not_acked.append((rid, stanza)) stanza.setAttr('rid', str(rid)) self.last_rids[socket]=rid if self.rid != self.ack + 1: stanza.setAttr('ack', str(self.ack)) return stanza def process_incoming_ack(self, socket, ack=None): socket.pending_requests -= 1 if ack: ack = int(ack) else: ack = self.last_rids[socket] i = len([rid for rid, st in self.not_acked if ack >= rid]) self.not_acked = self.not_acked[i:] self.ack = ack def get_rid(self): self.rid = self.rid + 1 return self.rid class KeyStack(): """ Class implementing key sequences for BOSH messages """ def __init__(self, count): self.count = count self.keys = [] self.reset() self.first_call = True def reset(self): seed = str(get_rand_number()) self.keys = [sha1(seed).hexdigest()] for i in range(self.count-1): curr_seed = self.keys[i] self.keys.append(sha1(curr_seed).hexdigest()) def get(self): if self.first_call: self.first_call = False return (None, self.keys.pop()) if len(self.keys)>1: return (self.keys.pop(), None) else: last_key = self.keys.pop() self.reset() new_key = self.keys.pop() return (last_key, new_key) # http://www.xmpp.org/extensions/xep-0124.html#errorstatus-terminal bosh_errors = { 'n/a': 'none or unknown condition in terminating body stanza', 'bad-request': 'The format of an HTTP header or binding element received from the client is unacceptable (e.g., syntax error), or Script Syntax is not supported.', 'host-gone': 'The target domain specified in the "to" attribute or the target host or port specified in the "route" attribute is no longer serviced by the connection manager.', 'host-unknown': 'The target domain specified in the "to" attribute or the target host or port specified in the "route" attribute is unknown to the connection manager.', 'improper-addressing': 'The initialization element lacks a "to" or "route" attribute (or the attribute has no value) but the connection manager requires one.', 'internal-server-error': 'The connection manager has experienced an internal error that prevents it from servicing the request.', 'item-not-found': '(1) "sid" is not valid, (2) "stream" is not valid, (3) "rid" is larger than the upper limit of the expected window, (4) connection manager is unable to resend response, (5) "key" sequence is invalid', 'other-request': 'Another request being processed at the same time as this request caused the session to terminate.', 'policy-violation': 'The client has broken the session rules (polling too frequently, requesting too frequently, too many simultaneous requests).', 'remote-connection-failed': 'The connection manager was unable to connect to, or unable to connect securely to, or has lost its connection to, the server.', 'remote-stream-error': 'Encapsulates an error in the protocol being transported.', 'see-other-uri': 'The connection manager does not operate at this URI (e.g., the connection manager accepts only SSL or TLS connections at some https: URI rather than the http: URI requested by the client). The client may try POSTing to the URI in the content of the child element.', 'system-shutdown': 'The connection manager is being shut down. All active HTTP sessions are being terminated. No new sessions can be created.', 'undefined-condition': 'The error is not one of those defined herein; the connection manager SHOULD include application-specific information in the content of the wrapper.' } nbxmpp-0.5.3/nbxmpp/transports_nb.py0000644000175000017500000007610712552000410020757 0ustar asterixasterix00000000000000## transports_nb.py ## based on transports.py ## ## Copyright (C) 2003-2004 Alexey "Snake" Nezhdanov ## modified by Dimitur Kirov ## modified by Tomas Karasek ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, 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 General Public License for more details. """ Transports are objects responsible for connecting to XMPP server and putting data to wrapped sockets in in desired form (SSL, TLS, TCP, for HTTP proxy, for SOCKS5 proxy...) Transports are not aware of XMPP stanzas and only responsible for low-level connection handling. """ from __future__ import unicode_literals from .simplexml import ustr from .plugin import PlugIn from .idlequeue import IdleObject from . import proxy_connectors from . import tls_nb import socket import errno import time import traceback import base64 import sys import locale try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse import logging log = logging.getLogger('nbxmpp.transports_nb') def urisplit(uri): """ Function for splitting URI string to tuple (protocol, host, port, path). e.g. urisplit('http://httpcm.jabber.org:123/webclient') returns ('http', 'httpcm.jabber.org', 123, '/webclient') return 443 as default port if proto is https else 80 """ splitted = urlparse(uri) proto, host, path = splitted.scheme, splitted.hostname, splitted.path try: port = splitted.port except ValueError: log.warning('port cannot be extracted from BOSH URL %s, using default port' \ % uri) port = '' if not port: if proto == 'https': port = 443 else: port = 80 return proto, host, port, path def get_proxy_data_from_dict(proxy): tcp_host, tcp_port, proxy_user, proxy_pass = None, None, None, None proxy_type = proxy['type'] if proxy_type == 'bosh' and not proxy['bosh_useproxy']: # with BOSH not over proxy we have to parse the hostname from BOSH URI proto, tcp_host, tcp_port, path = urisplit(proxy['bosh_uri']) else: # with proxy!=bosh or with bosh over HTTP proxy we're connecting to proxy # machine tcp_host, tcp_port = proxy['host'], proxy['port'] if proxy.get('useauth', False): proxy_user, proxy_pass = proxy['user'], proxy['pass'] return tcp_host, tcp_port, proxy_user, proxy_pass def decode_py2(string, encoding): # decodes string into unicode if in py2 # py3 has unicode strings by default try: string = string.decode(encoding) except AttributeError: pass return string #: timeout to connect to the server socket, it doesn't include auth CONNECT_TIMEOUT_SECONDS = 30 #: how long to wait for a disconnect to complete DISCONNECT_TIMEOUT_SECONDS = 5 #: size of the buffer which reads data from server # if lower, more stanzas will be fragmented and processed twice RECV_BUFSIZE = 32768 # 2x maximum size of ssl packet, should be plenty # it's inefficient but should work. Problem is that connect machine makes wrong # assumptions and that we only check for pending data in sockets but not in SSL # buffer... DATA_RECEIVED = 'DATA RECEIVED' DATA_SENT = 'DATA SENT' DATA_ERROR = 'DATA ERROR' DISCONNECTED = 'DISCONNECTED' DISCONNECTING = 'DISCONNECTING' CONNECTING = 'CONNECTING' PROXY_CONNECTING = 'PROXY_CONNECTING' CONNECTED = 'CONNECTED' STATES = (DISCONNECTED, CONNECTING, PROXY_CONNECTING, CONNECTED, DISCONNECTING) class NonBlockingTransport(PlugIn): """ Abstract class representing a transport Subclasses CAN have different constructor signature but connect method SHOULD be the same. """ def __init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, certs, tls_version, cipher_list): """ Each trasport class can have different constructor but it has to have at least all the arguments of NonBlockingTransport constructor :param raise_event: callback for monitoring of sent and received data :param on_disconnect: callback called on disconnection during runtime :param idlequeue: processing idlequeue :param estabilish_tls: boolean whether to estabilish TLS connection after TCP connection is done :param certs: tuple of (cacerts, mycerts) see constructor of tls_nb.NonBlockingTLS for more details :param tls_version: The lowest supported TLS version. :param cipher_list: list of ciphers used to connect to server """ PlugIn.__init__(self) self.raise_event = raise_event self.on_disconnect = on_disconnect self.on_connect = None self.on_connect_failure = None self.idlequeue = idlequeue self.on_receive = None self.server = None self.port = None self.conn_5tuple = None self.set_state(DISCONNECTED) self.estabilish_tls = estabilish_tls self.certs = certs self.tls_version = tls_version self.cipher_list = cipher_list # type of used ssl lib (if any) will be assigned to this member var self.ssl_lib = None self._exported_methods=[self.onreceive, self.set_send_timeout, self.set_send_timeout2, self.set_timeout, self.remove_timeout, self.start_disconnect] # time to wait for SOME stanza to come and then send keepalive self.sendtimeout = 0 # in case we want to something different than sending keepalives self.on_timeout = None self.on_timeout2 = None def plugin(self, owner): owner.Connection = self def plugout(self): self._owner.Connection = None self._owner = None self.disconnect(do_callback=False) def connect(self, conn_5tuple, on_connect, on_connect_failure): """ Creates and connects transport to server and port defined in conn_5tuple which should be item from list returned from getaddrinfo :param conn_5tuple: 5-tuple returned from getaddrinfo :param on_connect: callback called on successful connect to the server :param on_connect_failure: callback called on failure when connecting """ self.on_connect = on_connect self.on_connect_failure = on_connect_failure self.server, self.port = conn_5tuple[4][:2] self.conn_5tuple = conn_5tuple def set_state(self, newstate): assert(newstate in STATES) self.state = newstate def get_state(self): return self.state def _on_connect(self): """ Preceeds call of on_connect callback """ # data is reference to socket wrapper instance. We don't need it in client # because self.set_state(CONNECTED) self.on_connect() def _on_connect_failure(self, err_message): """ Preceeds call of on_connect_failure callback """ # In case of error while connecting we need to disconnect transport # but we don't want to call DisconnectHandlers from client, # thus the do_callback=False self.disconnect(do_callback=False) self.on_connect_failure(err_message=err_message) def send(self, raw_data, now=False): if self.get_state() == DISCONNECTED: log.error('Unable to send %s \n because state is %s.' % (raw_data, self.get_state())) def disconnect(self, do_callback=True): self.set_state(DISCONNECTED) if do_callback: # invoke callback given in __init__ self.on_disconnect() def onreceive(self, recv_handler): """ Set the on_receive callback. onreceive(None) sets callback to Dispatcher.ProcessNonBlocking which is the default one that will decide what to do with received stanza based on its tag name and namespace. Do not confuse it with on_receive() method, which is the callback itself. """ if not recv_handler: if hasattr(self, '_owner') and hasattr(self._owner, 'Dispatcher'): self.on_receive = self._owner.Dispatcher.ProcessNonBlocking else: log.warning('No Dispatcher plugged. Received data will not be processed') self.on_receive = None return self.on_receive = recv_handler def _tcp_connecting_started(self): self.set_state(CONNECTING) def read_timeout(self): """ Called when there's no response from server in defined timeout """ if self.on_timeout: self.on_timeout() self.renew_send_timeout() def read_timeout2(self): """ called when there's no response from server in defined timeout """ if self.on_timeout2: self.on_timeout2() self.renew_send_timeout2() def renew_send_timeout(self): if self.on_timeout and self.sendtimeout > 0: self.set_timeout(self.sendtimeout) def renew_send_timeout2(self): if self.on_timeout2 and self.sendtimeout2 > 0: self.set_timeout2(self.sendtimeout2) def set_timeout(self, timeout): self.idlequeue.set_read_timeout(self.fd, timeout) def set_timeout2(self, timeout2): self.idlequeue.set_read_timeout(self.fd, timeout2, self.read_timeout2) def get_fd(self): pass def remove_timeout(self): self.idlequeue.remove_timeout(self.fd) def set_send_timeout(self, timeout, on_timeout): self.sendtimeout = timeout if self.sendtimeout > 0: self.on_timeout = on_timeout else: self.on_timeout = None def set_send_timeout2(self, timeout2, on_timeout2): self.sendtimeout2 = timeout2 if self.sendtimeout2 > 0: self.on_timeout2 = on_timeout2 else: self.on_timeout2 = None # FIXME: where and why does this need to be called def start_disconnect(self): self.set_state(DISCONNECTING) class NonBlockingTCP(NonBlockingTransport, IdleObject): """ Non-blocking TCP socket wrapper It is used for simple XMPP connection. Can be connected via proxy and can estabilish TLS connection. """ def __init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, certs, tls_version, cipher_list, proxy_dict=None): """ :param proxy_dict: dictionary with proxy data as loaded from config file """ NonBlockingTransport.__init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, certs, tls_version, cipher_list) IdleObject.__init__(self) # queue with messages to be send self.sendqueue = [] # bytes remained from the last send message self.sendbuff = '' self.sent_bytes_buff = b'' # bytes remained from the last received message self.received_bytes_buff = b'' self.proxy_dict = proxy_dict self.on_remote_disconnect = self.disconnect # ssl variables self.ssl_certificate = None self.ssl_errnum = 0 # FIXME: transport should not be aware xmpp def start_disconnect(self): NonBlockingTransport.start_disconnect(self) self.send('', now=True) self.disconnect() def connect(self, conn_5tuple, on_connect, on_connect_failure): NonBlockingTransport.connect(self, conn_5tuple, on_connect, on_connect_failure) log.info('NonBlockingTCP Connect :: About to connect to %s:%s' % (self.server, self.port)) try: self._sock = socket.socket(*conn_5tuple[:3]) except socket.error as e: self._on_connect_failure('NonBlockingTCP Connect: Error while creating\ socket: %s' % atr(e)) return self._send = self._sock.send self._recv = self._sock.recv self.fd = self._sock.fileno() # we want to be notified when send is possible to connected socket because # it means the TCP connection is estabilished self._plug_idle(writable=True, readable=False) self.peerhost = None # variable for errno symbol that will be found from exception raised # from connect() errnum = 0 errstr = str() # set timeout for TCP connecting - if nonblocking connect() fails, pollend # is called. If if succeeds pollout is called. self.idlequeue.set_read_timeout(self.fd, CONNECT_TIMEOUT_SECONDS) try: self._sock.setblocking(False) self._sock.connect((self.server, self.port)) except Exception as exc: errnum, errstr = exc.errno, \ decode_py2(exc.strerror, locale.getpreferredencoding()) if errnum in (errno.EINPROGRESS, errno.EALREADY, errno.EWOULDBLOCK): # connecting in progress log.info('After NB connect() of %s. "%s" raised => CONNECTING' % (id(self), errstr)) self._tcp_connecting_started() return # if there was some other exception, call failure callback and unplug # transport which will also remove read_timeouts for descriptor self._on_connect_failure('Exception while connecting to %s:%s - %s %s' % (self.server, self.port, errnum, errstr)) def _connect_to_proxy(self): self.set_state(PROXY_CONNECTING) if self.proxy_dict['type'] == 'socks5': proxyclass = proxy_connectors.SOCKS5Connector elif self.proxy_dict['type'] == 'http' : proxyclass = proxy_connectors.HTTPCONNECTConnector proxyclass.get_instance( send_method=self.send, onreceive=self.onreceive, old_on_receive=self.on_receive, on_success=self._on_connect, on_failure=self._on_connect_failure, xmpp_server=self.proxy_dict['xmpp_server'], proxy_creds=self.proxy_dict['credentials']) def _on_connect(self): """ Preceed invoking of on_connect callback. TCP connection is already estabilished by this time """ if self.estabilish_tls: self.tls_init( on_succ = lambda: NonBlockingTransport._on_connect(self), on_fail = lambda: self._on_connect_failure( 'error while estabilishing TLS')) else: NonBlockingTransport._on_connect(self) def tls_init(self, on_succ, on_fail): """ Estabilishes TLS/SSL using this TCP connection by plugging a NonBlockingTLS module """ cacerts, mycerts = self.certs result = tls_nb.NonBlockingTLS.get_instance(cacerts, mycerts, self.tls_version, self.cipher_list).PlugIn(self) if result: on_succ() else: on_fail() def pollin(self): """ Called by idlequeu when receive on plugged socket is possible """ log.info('pollin called, state == %s' % self.get_state()) self._do_receive() def pollout(self): """ Called by idlequeu when send to plugged socket is possible """ log.info('pollout called, state == %s' % self.get_state()) if self.get_state() == CONNECTING: log.info('%s socket wrapper connected' % id(self)) self.idlequeue.remove_timeout(self.fd) self._plug_idle(writable=False, readable=False) self.peerhost = self._sock.getsockname() if self.proxy_dict: self._connect_to_proxy() else: self._on_connect() else: self._do_send() def pollend(self): """ Called by idlequeue on TCP connection errors """ log.info('pollend called, state == %s' % self.get_state()) if self.get_state() == CONNECTING: self._on_connect_failure('Error during connect to %s:%s' % (self.server, self.port)) else: self.disconnect() def disconnect(self, do_callback=True): if self.get_state() == DISCONNECTED: return self.set_state(DISCONNECTED) self.idlequeue.unplug_idle(self.fd) if 'NonBlockingTLS' in self.__dict__: self.NonBlockingTLS.PlugOut() try: self._sock.shutdown(socket.SHUT_RDWR) self._sock.close() except socket.error as e: errstr = decode_py2(e.strerror, locale.getpreferredencoding()) log.info('Error while disconnecting socket: %s' % errstr) self.fd = -1 NonBlockingTransport.disconnect(self, do_callback) def read_timeout(self): log.info('read_timeout called, state == %s' % self.get_state()) if self.get_state() == CONNECTING: # if read_timeout is called during connecting, connect() didn't end yet # thus we have to call the tcp failure callback self._on_connect_failure('Error during connect to %s:%s' % (self.server, self.port)) else: NonBlockingTransport.read_timeout(self) def set_timeout(self, timeout): if self.get_state() != DISCONNECTED and self.fd != -1: NonBlockingTransport.set_timeout(self, timeout) else: log.warning('set_timeout: TIMEOUT NOT SET: state is %s, fd is %s' % (self.get_state(), self.fd)) def remove_timeout(self): if self.fd: NonBlockingTransport.remove_timeout(self) else: log.warning('remove_timeout: no self.fd state is %s' % self.get_state()) def send(self, raw_data, now=False): """ Append raw_data to the queue of messages to be send. If supplied data is unicode string, encode it to utf-8. """ NonBlockingTransport.send(self, raw_data, now) if isinstance(raw_data, bytes): r = raw_data else: r = self.encode_stanza(raw_data) if now: self.sendqueue.insert(0, r) self._do_send() else: self.sendqueue.append(r) self._plug_idle(writable=True, readable=True) def encode_stanza(self, stanza): """ Encode str or unicode to utf-8 """ if isinstance(stanza, str): stanza = stanza.encode('utf-8') elif not isinstance(stanza, str): stanza = ustr(stanza).encode('utf-8') return stanza def _plug_idle(self, writable, readable): """ Plug file descriptor of socket to Idlequeue Plugged socket will be watched for "send possible" or/and "recv possible" events. pollin() callback is invoked on "recv possible", pollout() on "send_possible". Plugged socket will always be watched for "error" event - in that case, pollend() is called. """ log.info('Plugging fd %d, W:%s, R:%s' % (self.fd, writable, readable)) self.idlequeue.plug_idle(self, writable, readable) def _do_send(self): """ Called when send() to connected socket is possible. First message from sendqueue will be sent """ if not self.sendbuff: if not self.sendqueue: log.warning('calling send on empty buffer and queue') self._plug_idle(writable=False, readable=True) return None self.sendbuff = self.sendqueue.pop(0) try: send_count = self._send(self.sendbuff) if send_count: sent_data = self.sendbuff[:send_count] self.sendbuff = self.sendbuff[send_count:] self._plug_idle(writable=(self.sendqueue != []), readable=True) if self.sent_bytes_buff: sent_data = self.sent_bytes_buff + sent_data self.sent_bytes_buff = b'' # try to decode sent data try: sent_data = decode_py2(sent_data, 'utf-8') except UnicodeDecodeError: for i in range(-1, -4, -1): char = sent_data[i] if char & 0xc0 == 0xc0: self.sent_bytes_buff = sent_data[i:] sent_data = sent_data[:i] break sent_data = decode_py2(sent_data, 'utf-8') self.raise_event(DATA_SENT, sent_data) except Exception: log.error('_do_send:', exc_info=True) traceback.print_exc() self.disconnect() def _do_receive(self): """ Reads all pending incoming data. Will call owner's disconnected() method if appropriate """ received = None errnum = 0 errstr = 'No Error Set' try: # get as many bites, as possible, but not more than RECV_BUFSIZE received = self._recv(RECV_BUFSIZE) except socket.error as e: log.info("_do_receive: got %s:" % received, exc_info=True) except tls_nb.SSLWrapper.Error as e: log.info("_do_receive, caught SSL error, got %s:" % received, exc_info=True) errnum, errstr = e.errno,\ decode_py2(e.strerror, locale.getpreferredencoding()) if received == '': errstr = 'zero bytes on recv' if (self.ssl_lib is None and received == '') or \ (self.ssl_lib == tls_nb.PYSTDLIB and errnum == 8 ) or \ (self.ssl_lib == tls_nb.PYOPENSSL and errnum == -1 ): # 8 in stdlib: errstr == EOF occured in violation of protocol # -1 in pyopenssl: errstr == Unexpected EOF log.info("Disconnected by remote server: #%s, %s" % (errnum, errstr)) self.on_remote_disconnect() return if errnum: log.info("Connection to %s:%s lost: %s %s" % (self.server, self.port, errnum, errstr), exc_info=True) self.disconnect() return # this branch is for case of non-fatal SSL errors - None is returned from # recv() but no errnum is set if received is None: return # we have received some bytes, stop the timeout! self.remove_timeout() self.renew_send_timeout() self.renew_send_timeout2() if self.received_bytes_buff: received = self.received_bytes_buff + received self.received_bytes_buff = b'' # try to decode data try: received = decode_py2(received, 'utf-8') except UnicodeDecodeError: for i in range(-1, -4, -1): char = received[i] if sys.version_info[0] < 3: # with py2 we get a str char = ord(char) if char & 0xc0 == 0xc0: self.received_bytes_buff = received[i:] received = received[:i] break received = decode_py2(received, 'utf-8') # pass received data to owner if self.on_receive: self.raise_event(DATA_RECEIVED, received) self._on_receive(received) else: # This should never happen, so we need the debug. # (If there is no handler on receive specified, data is passed to # Dispatcher.ProcessNonBlocking) log.error('SOCKET %s Unhandled data received: %s' % (id(self), received)) self.disconnect() def _on_receive(self, data): """ Preceeds on_receive callback. It peels off and checks HTTP headers in HTTP classes, in here it just calls the callback """ self.on_receive(data) class NonBlockingHTTP(NonBlockingTCP): """ Socket wrapper that creates HTTP message out of sent data and peels-off HTTP headers from incoming messages """ def __init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, certs, tls_version, cipher_list, on_http_request_possible, on_persistent_fallback, http_dict, proxy_dict=None): """ :param on_http_request_possible: method to call when HTTP request to socket owned by transport is possible. :param on_persistent_fallback: callback called when server ends TCP connection. It doesn't have to be fatal for HTTP session. :param http_dict: dictionary with data for HTTP request and headers """ NonBlockingTCP.__init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, certs, tls_version, cipher_list, proxy_dict) self.http_protocol, self.http_host, self.http_port, self.http_path = \ urisplit(http_dict['http_uri']) self.http_protocol = self.http_protocol or 'http' self.http_path = self.http_path or '/' self.http_version = http_dict['http_version'] self.http_persistent = http_dict['http_persistent'] self.add_proxy_headers = http_dict['add_proxy_headers'] if 'proxy_user' in http_dict and 'proxy_pass' in http_dict: self.proxy_user, self.proxy_pass = http_dict['proxy_user'], http_dict[ 'proxy_pass'] else: self.proxy_user, self.proxy_pass = None, None # buffer for partial responses self.recvbuff = '' self.expected_length = 0 self.pending_requests = 0 self.on_http_request_possible = on_http_request_possible self.last_recv_time = 0 self.close_current_connection = False self.on_remote_disconnect = lambda: on_persistent_fallback(self) def http_send(self, raw_data, now=False): self.send(self.build_http_message(raw_data), now) def _on_receive(self, data): """ Preceeds passing received data to owner class. Gets rid of HTTP headers and checks them. """ if self.get_state() == PROXY_CONNECTING: NonBlockingTCP._on_receive(self, data) return # append currently received data to HTTP msg in buffer self.recvbuff = '%s%s' % (self.recvbuff or '', data) statusline, headers, httpbody, buffer_rest = self.parse_http_message( self.recvbuff) if not (statusline and headers and httpbody): log.debug('Received incomplete HTTP response') return if statusline[1] != '200': log.error('HTTP Error: %s %s' % (statusline[1], statusline[2])) self.disconnect() return self.expected_length = int(headers['Content-Length']) if 'Connection' in headers and headers['Connection'].strip()=='close': self.close_current_connection = True if self.expected_length > len(httpbody): # If we haven't received the whole HTTP mess yet, let's end the thread. # It will be finnished from one of following recvs on plugged socket. log.info('not enough bytes in HTTP response - %d expected, got %d' % (self.expected_length, len(httpbody))) else: # First part of buffer has been extraced and is going to be handled, # remove it from buffer self.recvbuff = buffer_rest # everything was received self.expected_length = 0 if not self.http_persistent or self.close_current_connection: # not-persistent connections disconnect after response self.disconnect(do_callback=False) self.close_current_connection = False self.last_recv_time = time.time() self.on_receive(data=httpbody, socket=self) self.on_http_request_possible() def build_http_message(self, httpbody, method='POST'): """ Builds http message with given body. Values for headers and status line fields are taken from class variables """ headers = ['%s %s %s' % (method, self.http_path, self.http_version), 'Host: %s:%s' % (self.http_host, self.http_port), 'User-Agent: Gajim', 'Content-Type: text/xml; charset=utf-8', 'Content-Length: %s' % len(str(httpbody))] if self.add_proxy_headers: headers.append('Proxy-Connection: keep-alive') headers.append('Pragma: no-cache') if self.proxy_user and self.proxy_pass: credentials = '%s:%s' % (self.proxy_user, self.proxy_pass) credentials = base64.encodestring(credentials).strip() headers.append('Proxy-Authorization: Basic %s' % credentials) else: headers.append('Connection: Keep-Alive') headers.append('\r\n') headers = '\r\n'.join(headers) return('%s%s' % (headers, httpbody)) def parse_http_message(self, message): """ Split http message into a tuple: - (statusline - list of e.g. ['HTTP/1.1', '200', 'OK'], - headers - dictionary of headers e.g. {'Content-Length': '604', 'Content-Type': 'text/xml; charset=utf-8'}, - httpbody - string with http body) - http_rest - what is left in the message after a full HTTP header + body """ splitted = message.split('\r\n\r\n') if len(splitted) < 2: # no complete http message. Keep filling the buffer until we find one buffer_rest = message return ('', '', '', buffer_rest) else: (header, httpbody) = splitted[:2] header = header.replace('\r', '') header = header.lstrip('\n') header = header.split('\n') statusline = header[0].split(' ', 2) header = header[1:] headers = {} for dummy in header: row = dummy.split(' ', 1) headers[row[0][:-1]] = row[1] body_size = headers['Content-Length'] rest_splitted = splitted[2:] while (len(httpbody) < body_size) and rest_splitted: # Complete httpbody until it has the announced size httpbody = '\n\n'.join([httpbody, rest_splitted.pop(0)]) buffer_rest = "\n\n".join(rest_splitted) return (statusline, headers, httpbody, buffer_rest) class NonBlockingHTTPBOSH(NonBlockingHTTP): """ Class for BOSH HTTP connections. Slightly redefines HTTP transport by calling bosh bodytag generating callback before putting data on wire """ def set_stanza_build_cb(self, build_cb): self.build_cb = build_cb def _do_send(self): if self.state == PROXY_CONNECTING: NonBlockingTCP._do_send(self) return if not self.sendbuff: stanza = self.build_cb(socket=self) stanza = self.encode_stanza(stanza) stanza = self.build_http_message(httpbody=stanza) self.sendbuff = stanza NonBlockingTCP._do_send(self) nbxmpp-0.5.3/nbxmpp/smacks.py0000644000175000017500000001151512321264064017345 0ustar asterixasterix00000000000000from .protocol import Acks from .protocol import NS_STREAM_MGMT import logging log = logging.getLogger('nbxmpp.smacks') class Smacks(): ''' This is Smacks is the Stream Management class. It takes care of requesting and sending acks. Also, it keeps track of the unhandled outgoing stanzas. The dispatcher has to be able to access this class to increment the number of handled stanzas ''' def __init__(self, con): self.con = con # Connection object self.out_h = 0 # Outgoing stanzas handled self.in_h = 0 # Incoming stanzas handled self.uqueue = [] # Unhandled stanzas queue self.session_id = None self.resumption = False # If server supports resume # Max number of stanzas in queue before making a request self.max_queue = 5 self._owner = None self.resuming = False self.enabled = False # If SM is enabled self.location = None self.failed_resume = False # If last resuming attempt failed self.supports_sm = False # If server supports sm def set_owner(self, owner): self._owner = owner # Register handlers owner.Dispatcher.RegisterNamespace(NS_STREAM_MGMT) owner.Dispatcher.RegisterHandler('enabled', self._neg_response, xmlns=NS_STREAM_MGMT) owner.Dispatcher.RegisterHandler('r', self.send_ack, xmlns=NS_STREAM_MGMT) owner.Dispatcher.RegisterHandler('a', self.check_ack, xmlns=NS_STREAM_MGMT) owner.Dispatcher.RegisterHandler('resumed', self.check_ack, xmlns=NS_STREAM_MGMT) owner.Dispatcher.RegisterHandler('failed', self.error_handling, xmlns=NS_STREAM_MGMT) def _neg_response(self, disp, stanza): r = stanza.getAttr('resume') if r == 'true' or r == 'True' or r == '1': self.resumption = True self.session_id = stanza.getAttr('id') if r == 'false' or r == 'False' or r == '0': self.negociate(False) l = stanza.getAttr('location') if l: self.location = l if self.failed_resume: self.con._discover_server_at_connection(self.con.connection) self.failed_resume = False def negociate(self, resume=True): # Every time we attempt to negociate, we must erase all previous info # about any previous session self.uqueue = [] self.in_h = 0 self.out_h = 0 self.session_id = None self.enabled = True stanza = Acks() stanza.buildEnable(resume) self._owner.Connection.send(stanza, now=True) def resume_request(self): if not self.session_id: self.resuming = False log.error('Attempted to resume without a valid session id ') return resume = Acks() resume.buildResume(self.in_h, self.session_id) self._owner.Connection.send(resume, False) def send_ack(self, disp, stanza): ack = Acks() ack.buildAnswer(self.in_h) self._owner.Connection.send(ack, False) def request_ack(self): r = Acks() r.buildRequest() self._owner.Connection.send(r, False) def check_ack(self, disp, stanza): ''' Checks if the number of stanzas sent are the same as the number of stanzas received by the server. Pops stanzas that were handled by the server from the queue. ''' h = stanza.getAttr('h') if not h: log.error('Server did not send h attribute') return h = int(h) diff = self.out_h - h if len(self.uqueue) < diff or diff < 0: log.error('Server and client number of stanzas handled mismatch ') else: while (len(self.uqueue) > diff): self.uqueue.pop(0) if stanza.getName() == 'resumed': self.enabled = True self.resuming = True self.con.set_oldst() if self.uqueue != []: for i in self.uqueue: self._owner.Connection.send(i, False) def error_handling(self, disp, stanza): # If the server doesn't recognize previd, forget about resuming # Ask for service discovery, etc.. if stanza.getTag('item-not-found'): self.resuming = False self.enabled = False # we need to bind a resource self._owner.NonBlockingBind.resuming = False self._owner._on_auth_bind(None) self.failed_resume = True return # Doesn't support resumption if stanza.getTag('feature-not-implemented'): self.negociate(False) return if stanza.getTag('unexpected-request'): self.enabled = False log.error('Gajim failed to negociate Stream Management') return nbxmpp-0.5.3/nbxmpp/proxy_connectors.py0000644000175000017500000002170512321264004021476 0ustar asterixasterix00000000000000## proxy_connectors.py ## based on transports_nb.py ## ## Copyright (C) 2003-2004 Alexey "Snake" Nezhdanov ## modified by Dimitur Kirov ## modified by Tomas Karasek ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, 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 General Public License for more details. """ Module containing classes for proxy connecting. So far its HTTP CONNECT and SOCKS5 proxy Authentication to NTLM (Microsoft implementation) proxies can be next. """ import struct, socket from base64 import b64encode import logging log = logging.getLogger('nbxmpp.proxy_connectors') class ProxyConnector: """ Interface for proxy-connecting object - when tunnneling XMPP over proxies, some connecting process usually has to be done before opening stream. Proxy connectors are used right after TCP connection is estabilished """ def __init__(self, send_method, onreceive, old_on_receive, on_success, on_failure, xmpp_server, proxy_creds=(None, None)): """ Creates proxy connector, starts connecting immediately and gives control back to transport afterwards :param send_method: transport send method :param onreceive: method to set on_receive callbacks :param old_on_receive: on_receive callback that should be set when proxy connection was successful :param on_success: called after proxy connection was successfully opened :param on_failure: called when errors occured while connecting :param xmpp_server: tuple of (hostname, port) :param proxy_creds: tuple of (proxy_user, proxy_credentials) """ self.send = send_method self.onreceive = onreceive self.old_on_receive = old_on_receive self.on_success = on_success self.on_failure = on_failure self.xmpp_server = xmpp_server self.proxy_user, self.proxy_pass = proxy_creds self.old_on_receive = old_on_receive self.start_connecting() @classmethod def get_instance(cls, *args, **kwargs): """ Factory Method for object creation Use this instead of directly initializing the class in order to make unit testing much easier. """ return cls(*args, **kwargs) def start_connecting(self): raise NotImplementedError def connecting_over(self): self.onreceive(self.old_on_receive) self.on_success() class HTTPCONNECTConnector(ProxyConnector): def start_connecting(self): """ Connect to a proxy, supply login and password to it (if were specified while creating instance). Instruct proxy to make connection to the target server. """ log.info('Proxy server contacted, performing authentification') connector = ['CONNECT %s:%s HTTP/1.1' % self.xmpp_server, 'Proxy-Connection: Keep-Alive', 'Pragma: no-cache', 'Host: %s:%s' % self.xmpp_server, 'User-Agent: Gajim'] if self.proxy_user and self.proxy_pass: credentials = '%s:%s' % (self.proxy_user, self.proxy_pass) credentials = b64encode(credentials.encode('utf-8')).decode( 'utf-8').strip() connector.append('Proxy-Authorization: Basic '+credentials) connector.append('\r\n') self.onreceive(self._on_headers_sent) self.send('\r\n'.join(connector)) def _on_headers_sent(self, reply): if reply is None: return self.reply = reply.replace('\r', '') try: proto, code, desc = reply.split('\n')[0].split(' ', 2) except: log.error("_on_headers_sent:", exc_info=True) #traceback.print_exc() self.on_failure('Invalid proxy reply') return if code != '200': log.error('Invalid proxy reply: %s %s %s' % (proto, code, desc)) self.on_failure('Invalid proxy reply') return if len(reply) != 2: pass self.connecting_over() class SOCKS5Connector(ProxyConnector): """ SOCKS5 proxy connection class. Allows to use SOCKS5 proxies with (optionally) simple authentication (only USERNAME/PASSWORD auth) """ def start_connecting(self): log.info('Proxy server contacted, performing authentification') if self.proxy_user and self.proxy_pass: to_send = b'\x05\x02\x00\x02' else: to_send = b'\x05\x01\x00' self.onreceive(self._on_greeting_sent) self.send(to_send) def _on_greeting_sent(self, reply): if reply is None: return if len(reply) != 2: self.on_failure('Invalid proxy reply') return if reply[0] != '\x05': log.info('Invalid proxy reply') self.on_failure('Invalid proxy reply') return if reply[1] == '\x00': return self._on_proxy_auth('\x01\x00') elif reply[1] == '\x02': to_send = '\x01' + chr(len(self.proxy_user)) + self.proxy_user +\ chr(len(self.proxy_pass)) + self.proxy_pass self.onreceive(self._on_proxy_auth) self.send(to_send) else: if reply[1] == '\xff': log.error('Authentification to proxy impossible: no acceptable ' 'auth method') self.on_failure('Authentification to proxy impossible: no ' 'acceptable authentification method') return log.error('Invalid proxy reply') self.on_failure('Invalid proxy reply') return def _on_proxy_auth(self, reply): if reply is None: return if len(reply) != 2: log.error('Invalid proxy reply') self.on_failure('Invalid proxy reply') return if reply[0] != '\x01': log.error('Invalid proxy reply') self.on_failure('Invalid proxy reply') return if reply[1] != '\x00': log.error('Authentification to proxy failed') self.on_failure('Authentification to proxy failed') return log.info('Authentification successfull. Jabber server contacted.') # Request connection req = b'\x05\x01\x00' # If the given destination address is an IP address, we'll # use the IPv4 address request even if remote resolving was specified. try: self.ipaddr = socket.inet_aton(self.xmpp_server[0]) req = req + b'\x01' + self.ipaddr except socket.error: # Well it's not an IP number, so it's probably a DNS name. # if self.__proxy[3]==True: # Resolve remotely self.ipaddr = None req = req + b'\x03' + (chr(len(self.xmpp_server[0])) + self.xmpp_server[0]).encode('utf-8') # else: # # Resolve locally # self.ipaddr = socket.inet_aton(socket.gethostbyname(self.xmpp_server[0])) # req = req + "\x01" + ipaddr req = req + struct.pack(">H", self.xmpp_server[1]) self.onreceive(self._on_req_sent) self.send(req) def _on_req_sent(self, reply): if reply is None: return if len(reply) < 10: log.error('Invalid proxy reply') self.on_failure('Invalid proxy reply') return if reply[0] != '\x05': log.error('Invalid proxy reply') self.on_failure('Invalid proxy reply') return if reply[1] != '\x00': # Connection failed if ord(reply[1])<9: errors = ['general SOCKS server failure', 'connection not allowed by ruleset', 'Network unreachable', 'Host unreachable', 'Connection refused', 'TTL expired', 'Command not supported', 'Address type not supported' ] txt = errors[ord(reply[1])-1] else: txt = 'Invalid proxy reply' log.error(txt) self.on_failure(txt) return # Get the bound address/port elif reply[3] == '\x01': begin, end = 3, 7 elif reply[3] == '\x03': begin, end = 4, 4 + reply[4] else: log.error('Invalid proxy reply') self.on_failure('Invalid proxy reply') return self.connecting_over() nbxmpp-0.5.3/nbxmpp/features_nb.py0000644000175000017500000001741312321264004020356 0ustar asterixasterix00000000000000## features.py ## ## Copyright (C) 2003-2004 Alexey "Snake" Nezhdanov ## Copyright (C) 2007 Julien Pivotto ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, 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 General Public License for more details. # $Id: features.py,v 1.22 2005/09/30 20:13:04 mikealbon Exp $ """ Different stuff that wasn't worth separating it into modules (Registration, Privacy Lists, ...) """ from .protocol import NS_REGISTER, NS_PRIVACY, NS_DATA, Iq, isResultNode, Node def _on_default_response(disp, iq, cb): def _on_response(resp): if isResultNode(resp): if cb: cb(True) elif cb: cb(False) disp.SendAndCallForResponse(iq, _on_response) ############################################################################### ### Registration ############################################################################### REGISTER_DATA_RECEIVED = 'REGISTER DATA RECEIVED' def getRegInfo(disp, host, info={}, sync=True): """ Get registration form from remote host. Info dict can be prefilled :param disp: plugged dispatcher instance :param info: dict, like {'username':'joey'}. See JEP-0077 for details. """ iq=Iq('get', NS_REGISTER, to=host) for i in info.keys(): iq.setTagData(i, info[i]) if sync: disp.SendAndCallForResponse(iq, lambda resp: _ReceivedRegInfo(disp.Dispatcher, resp, host)) else: disp.SendAndCallForResponse(iq, _ReceivedRegInfo, {'agent': host }) def _ReceivedRegInfo(con, resp, agent): Iq('get', NS_REGISTER, to=agent) if not isResultNode(resp): error_msg = resp.getErrorMsg() con.Event(NS_REGISTER, REGISTER_DATA_RECEIVED, (agent, None, False, error_msg, '')) return tag=resp.getTag('query', namespace=NS_REGISTER) if not tag: error_msg = resp.getErrorMsg() con.Event(NS_REGISTER, REGISTER_DATA_RECEIVED, (agent, None, False, error_msg, '')) return df=tag.getTag('x', namespace=NS_DATA) if df: con.Event(NS_REGISTER, REGISTER_DATA_RECEIVED, (agent, df, True, '', tag)) return df={} for i in resp.getQueryPayload(): if not isinstance(i, Node): continue df[i.getName()] = i.getData() con.Event(NS_REGISTER, REGISTER_DATA_RECEIVED, (agent, df, False, '', '')) def register(disp, host, info, cb, args=None): """ Perform registration on remote server with provided info If registration fails you can get additional info from the dispatcher's owner attributes lastErrNode, lastErr and lastErrCode. """ iq=Iq('set', NS_REGISTER, to=host) if not isinstance(info, dict): info=info.asDict() for i in info.keys(): iq.setTag('query').setTagData(i, info[i]) disp.SendAndCallForResponse(iq, cb, args) def unregister(disp, host, cb): """ Unregisters with host (permanently removes account). Returns true on success """ iq = Iq('set', NS_REGISTER, to=host, payload=[Node('remove')]) _on_default_response(disp, iq, cb) def changePasswordTo(disp, newpassword, host=None, cb = None): """ Changes password on specified or current (if not specified) server. Returns true on success. """ if not host: host = disp._owner.Server iq = Iq('set', NS_REGISTER, to=host, payload=[Node('username', payload=[disp._owner.Server]), Node('password', payload=[newpassword])]) _on_default_response(disp, iq, cb) ############################################################################### ### Privacy List ############################################################################### PL_TYPE_JID = 'jid' PL_TYPE_GROUP = 'group' PL_TYPE_SUBC = 'subscription' PL_ACT_ALLOW = 'allow' PL_ACT_DENY = 'deny' PRIVACY_LISTS_RECEIVED = 'PRIVACY LISTS RECEIVED' PRIVACY_LIST_RECEIVED = 'PRIVACY LIST RECEIVED' PRIVACY_LISTS_ACTIVE_DEFAULT = 'PRIVACY LISTS ACTIVE DEFAULT' def getPrivacyLists(disp): """ Request privacy lists from connected server. Returns dictionary of existing lists on success. """ iq = Iq('get', NS_PRIVACY) def _on_response(resp): dict_ = {'lists': []} if not isResultNode(resp): disp.Event(NS_PRIVACY, PRIVACY_LISTS_RECEIVED, (False)) return for list_ in resp.getQueryPayload(): if list_.getName()=='list': dict_['lists'].append(list_.getAttr('name')) else: dict_[list_.getName()]=list_.getAttr('name') disp.Event(NS_PRIVACY, PRIVACY_LISTS_RECEIVED, (dict_)) disp.SendAndCallForResponse(iq, _on_response) def getActiveAndDefaultPrivacyLists(disp): iq = Iq('get', NS_PRIVACY) def _on_response(resp): dict_ = {'active': '', 'default': ''} if not isResultNode(resp): disp.Event(NS_PRIVACY, PRIVACY_LISTS_ACTIVE_DEFAULT, (False)) return for list_ in resp.getQueryPayload(): if list_.getName() == 'active': dict_['active'] = list_.getAttr('name') elif list_.getName() == 'default': dict_['default'] = list_.getAttr('name') disp.Event(NS_PRIVACY, PRIVACY_LISTS_ACTIVE_DEFAULT, (dict_)) disp.SendAndCallForResponse(iq, _on_response) def getPrivacyList(disp, listname): """ Request specific privacy list listname. Returns list of XML nodes (rules) taken from the server responce. """ def _on_response(resp): if not isResultNode(resp): disp.Event(NS_PRIVACY, PRIVACY_LIST_RECEIVED, (False)) return disp.Event(NS_PRIVACY, PRIVACY_LIST_RECEIVED, (resp)) iq = Iq('get', NS_PRIVACY, payload=[Node('list', {'name': listname})]) disp.SendAndCallForResponse(iq, _on_response) def setActivePrivacyList(disp, listname=None, typ='active', cb=None): """ Switch privacy list 'listname' to specified type. By default the type is 'active'. Returns true on success. """ if listname: attrs={'name':listname} else: attrs={} iq = Iq('set', NS_PRIVACY, payload=[Node(typ, attrs)]) _on_default_response(disp, iq, cb) def setDefaultPrivacyList(disp, listname=None): """ Set the default privacy list as 'listname'. Returns true on success """ return setActivePrivacyList(disp, listname, 'default') def setPrivacyList(disp, listname, tags): """ Set the ruleset 'list' should be the simpleXML node formatted according to RFC 3921 (XMPP-IM) I.e. Node('list',{'name':listname},payload=[...]). Returns true on success. """ iq = Iq('set', NS_PRIVACY, xmlns = '') list_query = iq.getTag('query').setTag('list', {'name': listname}) for item in tags: if 'type' in item and 'value' in item: item_tag = list_query.setTag('item', {'action': item['action'], 'order': item['order'], 'type': item['type'], 'value': item['value']}) else: item_tag = list_query.setTag('item', {'action': item['action'], 'order': item['order']}) if 'child' in item: for child_tag in item['child']: item_tag.setTag(child_tag) _on_default_response(disp, iq, None) def delPrivacyList(disp, listname, cb=None): ''' Deletes privacy list 'listname'. Returns true on success. ''' iq = Iq('set', NS_PRIVACY, payload=[Node('list', {'name':listname})]) _on_default_response(disp, iq, cb) nbxmpp-0.5.3/nbxmpp/__init__.py0000644000175000017500000000140312552000216017607 0ustar asterixasterix00000000000000# $Id: __init__.py,v 1.9 2005/03/07 09:34:51 snakeru Exp $ """ This is a fork of the xmpppy jabber python library. Most of the code is inherited but has been extended by implementation of non-blocking transports and new features like BOSH. Most of the xmpp classes are ancestors of PlugIn class to share a single set of methods in order to compile a featured and extensible XMPP client. Thanks and credits to the xmpppy developers. See: http://xmpppy.sourceforge.net/ """ from .protocol import * from . import simplexml, protocol, auth_nb, transports_nb, roster_nb from . import dispatcher_nb, features_nb, idlequeue, bosh, tls_nb, proxy_connectors from .client_nb import NonBlockingClient from .plugin import PlugIn from .smacks import Smacks __version__ = "0.5.3" nbxmpp-0.5.3/nbxmpp/roster_nb.py0000644000175000017500000003131312523651351020062 0ustar asterixasterix00000000000000## roster_nb.py ## based on roster.py ## ## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov ## modified by Dimitur Kirov ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, 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 General Public License for more details. # $Id: roster.py,v 1.17 2005/05/02 08:38:49 snakeru Exp $ """ Simple roster implementation. Can be used though for different tasks like mass-renaming of contacts. """ from .protocol import JID, Iq, Presence, Node, NodeProcessed, NS_MUC_USER, NS_ROSTER from .plugin import PlugIn import logging log = logging.getLogger('nbxmpp.roster_nb') class NonBlockingRoster(PlugIn): """ Defines a plenty of methods that will allow you to manage roster. Also automatically track presences from remote JIDs taking into account that every JID can have multiple resources connected. Does not currently support 'error' presences. You can also use mapping interface for access to the internal representation of contacts in roster """ def __init__(self, version=None): """ Init internal variables """ PlugIn.__init__(self) self.version = version self._data = {} self._set=None self._exported_methods=[self.getRoster] self.received_from_server = False def Request(self, force=0): """ Request roster from server if it were not yet requested (or if the 'force' argument is set) """ if self._set is None: self._set = 0 elif not force: return iq = Iq('get', NS_ROSTER) if self.version is not None: iq.setTagAttr('query', 'ver', self.version) id_ = self._owner.getAnID() iq.setID(id_) self._owner.send(iq) log.info('Roster requested from server') return id_ def RosterIqHandler(self, dis, stanza): """ Subscription tracker. Used internally for setting items state in internal roster representation """ sender = stanza.getAttr('from') if not sender is None and not sender.bareMatch( self._owner.User + '@' + self._owner.Server): return query = stanza.getTag('query') if query: self.received_from_server = True self.version = stanza.getTagAttr('query', 'ver') if self.version is None: self.version = '' for item in query.getTags('item'): jid=item.getAttr('jid') if item.getAttr('subscription')=='remove': if jid in self._data: del self._data[jid] # Looks like we have a workaround # raise NodeProcessed # a MUST log.info('Setting roster item %s...' % jid) if jid not in self._data: self._data[jid]={} self._data[jid]['name']=item.getAttr('name') self._data[jid]['ask']=item.getAttr('ask') self._data[jid]['subscription']=item.getAttr('subscription') self._data[jid]['groups']=[] if 'resources' not in self._data[jid]: self._data[jid]['resources']={} for group in item.getTags('group'): if group.getData() not in self._data[jid]['groups']: self._data[jid]['groups'].append(group.getData()) self._data[self._owner.User+'@'+self._owner.Server]={'resources': {}, 'name': None, 'ask': None, 'subscription': None, 'groups': None,} self._set=1 # Looks like we have a workaround # raise NodeProcessed # a MUST. Otherwise you'll get back an def PresenceHandler(self, dis, pres): """ Presence tracker. Used internally for setting items' resources state in internal roster representation """ if pres.getTag('x', namespace=NS_MUC_USER): return jid=pres.getFrom() if not jid: # If no from attribue, it's from server jid=self._owner.Server jid=JID(jid) if jid.getStripped() not in self._data: self._data[jid.getStripped()]={'name':None,'ask':None,'subscription':'none','groups':['Not in roster'],'resources':{}} if type(self._data[jid.getStripped()]['resources'])!=type(dict()): self._data[jid.getStripped()]['resources']={} item=self._data[jid.getStripped()] typ=pres.getType() if not typ: log.info('Setting roster item %s for resource %s...'%(jid.getStripped(), jid.getResource())) item['resources'][jid.getResource()]=res={'show':None,'status':None,'priority':'0','timestamp':None} if pres.getTag('show'): res['show']=pres.getShow() if pres.getTag('status'): res['status']=pres.getStatus() if pres.getTag('priority'): res['priority']=pres.getPriority() if not pres.getTimestamp(): pres.setTimestamp() res['timestamp']=pres.getTimestamp() elif typ=='unavailable' and jid.getResource() in item['resources']: del item['resources'][jid.getResource()] # Need to handle type='error' also def _getItemData(self, jid, dataname): """ Return specific jid's representation in internal format. Used internally """ jid = jid[:(jid+'/').find('/')] return self._data[jid][dataname] def _getResourceData(self, jid, dataname): """ Return specific jid's resource representation in internal format. Used internally """ if jid.find('/') + 1: jid, resource = jid.split('/', 1) if resource in self._data[jid]['resources']: return self._data[jid]['resources'][resource][dataname] elif list(self._data[jid]['resources'].keys()): lastpri = -129 for r in list(self._data[jid]['resources'].keys()): if int(self._data[jid]['resources'][r]['priority']) > lastpri: resource, lastpri=r, int(self._data[jid]['resources'][r]['priority']) return self._data[jid]['resources'][resource][dataname] def delItem(self, jid): """ Delete contact 'jid' from roster """ self._owner.send(Iq('set', NS_ROSTER, payload=[Node('item', {'jid': jid, 'subscription': 'remove'})])) def getAsk(self, jid): """ Return 'ask' value of contact 'jid' """ return self._getItemData(jid, 'ask') def getGroups(self, jid): """ Return groups list that contact 'jid' belongs to """ return self._getItemData(jid, 'groups') def getName(self, jid): """ Return name of contact 'jid' """ return self._getItemData(jid, 'name') def getPriority(self, jid): """ Return priority of contact 'jid'. 'jid' should be a full (not bare) JID """ return self._getResourceData(jid, 'priority') def getRawRoster(self): """ Return roster representation in internal format """ return self._data def getRawItem(self, jid): """ Return roster item 'jid' representation in internal format """ return self._data[jid[:(jid+'/').find('/')]] def getShow(self, jid): """ Return 'show' value of contact 'jid'. 'jid' should be a full (not bare) JID """ return self._getResourceData(jid, 'show') def getStatus(self, jid): """ Return 'status' value of contact 'jid'. 'jid' should be a full (not bare) JID """ return self._getResourceData(jid, 'status') def getSubscription(self, jid): """ Return 'subscription' value of contact 'jid' """ return self._getItemData(jid, 'subscription') def getResources(self, jid): """ Return list of connected resources of contact 'jid' """ return list(self._data[jid[:(jid+'/').find('/')]]['resources'].keys()) def setItem(self, jid, name=None, groups=[]): """ Rename contact 'jid' and sets the groups list that it now belongs to """ iq = Iq('set', NS_ROSTER) query = iq.getTag('query') attrs = {'jid': jid} if name: attrs['name'] = name item = query.setTag('item', attrs) for group in groups: item.addChild(node=Node('group', payload=[group])) self._owner.send(iq) def setItemMulti(self, items): """ Rename multiple contacts and sets their group lists """ for i in items: iq = Iq('set', NS_ROSTER) query = iq.getTag('query') attrs = {'jid': i['jid']} if i['name']: attrs['name'] = i['name'] item = query.setTag('item', attrs) for group in i['groups']: item.addChild(node=Node('group', payload=[group])) self._owner.send(iq) def getItems(self): """ Return list of all [bare] JIDs that the roster is currently tracks """ return list(self._data.keys()) def keys(self): """ Same as getItems. Provided for the sake of dictionary interface """ return list(self._data.keys()) def __getitem__(self, item): """ Get the contact in the internal format. Raises KeyError if JID 'item' is not in roster """ return self._data[item] def getItem(self, item): """ Get the contact in the internal format (or None if JID 'item' is not in roster) """ if item in self._data: return self._data[item] def Subscribe(self, jid): """ Send subscription request to JID 'jid' """ self._owner.send(Presence(jid, 'subscribe')) def Unsubscribe(self, jid): """ Ask for removing our subscription for JID 'jid' """ self._owner.send(Presence(jid, 'unsubscribe')) def Authorize(self, jid): """ Authorize JID 'jid'. Works only if these JID requested auth previously """ self._owner.send(Presence(jid, 'subscribed')) def Unauthorize(self, jid): """ Unauthorise JID 'jid'. Use for declining authorisation request or for removing existing authorization """ self._owner.send(Presence(jid, 'unsubscribed')) def getRaw(self): """ Return the internal data representation of the roster """ return self._data def setRaw(self, data): """ Return the internal data representation of the roster """ self._data = data self._data[self._owner.User + '@' + self._owner.Server] = { 'resources': {}, 'name': None, 'ask': None, 'subscription': None, 'groups': None } self._set = 1 def plugin(self, owner, request=1): """ Register presence and subscription trackers in the owner's dispatcher. Also request roster from server if the 'request' argument is set. Used internally """ self._owner.RegisterHandler('iq', self.RosterIqHandler, 'result', NS_ROSTER, makefirst = 1) self._owner.RegisterHandler('iq', self.RosterIqHandler, 'set', NS_ROSTER) self._owner.RegisterHandler('presence', self.PresenceHandler) if request: return self.Request() def _on_roster_set(self, data): if data: self._owner.Dispatcher.ProcessNonBlocking(data) if not self._set: return if not hasattr(self, '_owner') or not self._owner: # Connection has been closed by receiving a for ex, return self._owner.onreceive(None) if self.on_ready: self.on_ready(self) self.on_ready = None return True def getRoster(self, on_ready=None, force=False): """ Request roster from server if neccessary and returns self """ return_self = True if not self._set: self.on_ready = on_ready self._owner.onreceive(self._on_roster_set) return_self = False elif on_ready: on_ready(self) return_self = False if return_self or force: return self return None nbxmpp-0.5.3/nbxmpp/stringprepare.py0000644000175000017500000001773212414052043020753 0ustar asterixasterix00000000000000# -*- coding:utf-8 -*- ## src/common/xmpp/stringprepare.py ## ## Copyright (C) 2001-2005 Twisted Matrix Laboratories ## Copyright (C) 2005-2012 Yann Leboulanger ## Copyright (C) 2006 Stefan Bethge ## Copyright (C) 2007 Jean-Marie Traissard ## ## This file is part of Gajim. ## ## Gajim is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published ## by the Free Software Foundation; version 3 only. ## ## Gajim 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 General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with Gajim. If not, see . ## import stringprep import unicodedata from encodings import idna class ILookupTable: """ Interface for character lookup classes """ def lookup(self, c): """ Return whether character is in this table """ pass class IMappingTable: """ Interface for character mapping classes """ def map(self, c): """ Return mapping for character """ pass class LookupTableFromFunction: __implements__ = ILookupTable def __init__(self, in_table_function): self.lookup = in_table_function class LookupTable: __implements__ = ILookupTable def __init__(self, table): self._table = table def lookup(self, c): return c in self._table class MappingTableFromFunction: __implements__ = IMappingTable def __init__(self, map_table_function): self.map = map_table_function class EmptyMappingTable: __implements__ = IMappingTable def __init__(self, in_table_function): self._in_table_function = in_table_function def map(self, c): if self._in_table_function(c): return None else: return c class Profile: def __init__(self, mappings=[], normalize=True, prohibiteds=[], check_unassigneds=True, check_bidi=True): self.mappings = mappings self.normalize = normalize self.prohibiteds = prohibiteds self.do_check_unassigneds = check_unassigneds self.do_check_bidi = check_bidi def prepare(self, string): result = self.map(string) if self.normalize: result = unicodedata.normalize("NFKC", result) self.check_prohibiteds(result) if self.do_check_unassigneds: self.check_unassigneds(result) if self.do_check_bidi: self.check_bidirectionals(result) return result def map(self, string): result = [] for c in string: result_c = c for mapping in self.mappings: result_c = mapping.map(c) if result_c != c: break if result_c is not None: result.append(result_c) return "".join(result) def check_prohibiteds(self, string): for c in string: for table in self.prohibiteds: if table.lookup(c): raise UnicodeError("Invalid character %s" % repr(c)) def check_unassigneds(self, string): for c in string: if stringprep.in_table_a1(c): raise UnicodeError("Unassigned code point %s" % repr(c)) def check_bidirectionals(self, string): found_LCat = False found_RandALCat = False for c in string: if stringprep.in_table_d1(c): found_RandALCat = True if stringprep.in_table_d2(c): found_LCat = True if found_LCat and found_RandALCat: raise UnicodeError("Violation of BIDI Requirement 2") if found_RandALCat and not (stringprep.in_table_d1(string[0]) and stringprep.in_table_d1(string[-1])): raise UnicodeError("Violation of BIDI Requirement 3") class NamePrep: """ Implements preparation of internationalized domain names This class implements preparing internationalized domain names using the rules defined in RFC 3491, section 4 (Conversion operations). We do not perform step 4 since we deal with unicode representations of domain names and do not convert from or to ASCII representations using punycode encoding. When such a conversion is needed, the L{idna} standard library provides the C{ToUnicode()} and C{ToASCII()} functions. Note that L{idna} itself assumes UseSTD3ASCIIRules to be false. The following steps are performed by C{prepare()}: * Split the domain name in labels at the dots (RFC 3490, 3.1) * Apply nameprep proper on each label (RFC 3491) * Enforce the restrictions on ASCII characters in host names by assuming STD3ASCIIRules to be true. (STD 3) * Rejoin the labels using the label separator U+002E (full stop). """ # Prohibited characters. prohibiteds = [chr(n) for n in list(range(0x00, 0x2c + 1)) + list(range(0x2e, 0x2f + 1)) + list(range(0x3a, 0x40 + 1)) + list(range(0x5b, 0x60 + 1)) + list(range(0x7b, 0x7f + 1)) ] def prepare(self, string): result = [] labels = idna.dots.split(string) if labels and len(labels[-1]) == 0: trailing_dot = '.' del labels[-1] else: trailing_dot = '' for label in labels: result.append(self.nameprep(label)) return ".".join(result)+trailing_dot def check_prohibiteds(self, string): for c in string: if c in self.prohibiteds: raise UnicodeError("Invalid character %s" % repr(c)) def nameprep(self, label): label = idna.nameprep(label) self.check_prohibiteds(label) if len(label) == 0: raise UnicodeError("Invalid empty name") if label[0] == '-': raise UnicodeError("Invalid leading hyphen-minus") if label[-1] == '-': raise UnicodeError("Invalid trailing hyphen-minus") return label C_11 = LookupTableFromFunction(stringprep.in_table_c11) C_12 = LookupTableFromFunction(stringprep.in_table_c12) C_21 = LookupTableFromFunction(stringprep.in_table_c21) C_22 = LookupTableFromFunction(stringprep.in_table_c22) C_3 = LookupTableFromFunction(stringprep.in_table_c3) C_4 = LookupTableFromFunction(stringprep.in_table_c4) C_5 = LookupTableFromFunction(stringprep.in_table_c5) C_6 = LookupTableFromFunction(stringprep.in_table_c6) C_7 = LookupTableFromFunction(stringprep.in_table_c7) C_8 = LookupTableFromFunction(stringprep.in_table_c8) C_9 = LookupTableFromFunction(stringprep.in_table_c9) B_1 = EmptyMappingTable(stringprep.in_table_b1) B_2 = MappingTableFromFunction(stringprep.map_table_b2) nodeprep = Profile(mappings=[B_1, B_2], prohibiteds=[C_11, C_12, C_21, C_22, C_3, C_4, C_5, C_6, C_7, C_8, C_9, LookupTable(['"', '&', "'", '/', ':', '<', '>', '@'])]) resourceprep = Profile(mappings=[B_1,], prohibiteds=[C_12, C_21, C_22, C_3, C_4, C_5, C_6, C_7, C_8, C_9]) nameprep = NamePrep() nbxmpp-0.5.3/nbxmpp/client_nb.py0000644000175000017500000006430312502100533020013 0ustar asterixasterix00000000000000## client_nb.py ## based on client.py, changes backported up to revision 1.60 ## ## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov ## modified by Dimitur Kirov ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, 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 General Public License for more details. # $Id: client.py,v 1.52 2006/01/02 19:40:55 normanr Exp $ """ Client class establishes connection to XMPP Server and handles authentication """ import socket from . import transports_nb, dispatcher_nb, auth_nb, roster_nb, protocol, bosh from .protocol import NS_TLS from .auth_nb import SASL_AUTHENTICATION_MECHANISMS import logging log = logging.getLogger('nbxmpp.client_nb') class NonBlockingClient: """ Client class is XMPP connection mountpoint. Objects for authentication, network communication, roster, xml parsing ... are plugged to client object. Client implements the abstract behavior - mostly negotiation and callbacks handling, whereas underlying modules take care of feature-specific logic """ def __init__(self, domain, idlequeue, caller=None): """ Caches connection data :param domain: domain - for to: attribute (from account info) :param idlequeue: processing idlequeue :param caller: calling object - it has to implement methods _event_dispatcher which is called from dispatcher instance """ self.Namespace = protocol.NS_CLIENT self.defaultNamespace = self.Namespace self.idlequeue = idlequeue self.disconnect_handlers = [] self.Server = domain self.xmpp_hostname = None # FQDN hostname to connect to # caller is who initiated this client, it is in needed to register # the EventDispatcher self._caller = caller self._owner = self self._registered_name = None # our full jid, set after successful auth self.connected = '' self.ip_addresses = [] self.socket = None self.on_connect = None self.on_proxy_failure = None self.on_connect_failure = None self.proxy = None self.got_features = False self.got_see_other_host = None self.stream_started = False self.disconnecting = False self.protocol_type = 'XMPP' def disconnect(self, message=''): """ Called on disconnection - disconnect callback is picked based on state of the client. """ # to avoid recursive calls if self.ip_addresses: self._try_next_ip() return if self.disconnecting: return log.info('Disconnecting NBClient: %s' % message) sasl_failed = False if 'NonBlockingRoster' in self.__dict__: self.NonBlockingRoster.PlugOut() if 'NonBlockingBind' in self.__dict__: self.NonBlockingBind.PlugOut() if 'NonBlockingNonSASL' in self.__dict__: self.NonBlockingNonSASL.PlugOut() if 'SASL' in self.__dict__: if 'startsasl' in self.SASL.__dict__ and \ self.SASL.startsasl == 'failure-in-process': sasl_failed = True self.SASL.startsasl = 'failure' self._on_start_sasl() else: self.SASL.PlugOut() if 'NonBlockingTCP' in self.__dict__: self.NonBlockingTCP.PlugOut() if 'NonBlockingHTTP' in self.__dict__: self.NonBlockingHTTP.PlugOut() if 'NonBlockingBOSH' in self.__dict__: self.NonBlockingBOSH.PlugOut() # FIXME: we never unplug dispatcher, only on next connect # See _xmpp_connect_machine and SASLHandler connected = self.connected stream_started = self.stream_started self.connected = '' self.stream_started = False self.disconnecting = True log.debug('Client disconnected..') # Don't call any callback when it's a SASL failure. # SASL handler is already called if connected == '' and not sasl_failed: # if we're disconnecting before connection to XMPP sever is opened, # we don't call disconnect handlers but on_connect_failure callback if self.proxy: # with proxy, we have different failure callback log.debug('calling on_proxy_failure cb') self.on_proxy_failure(reason=message) else: log.debug('calling on_connect_failure cb') self.on_connect_failure() elif not sasl_failed: # we are connected to XMPP server if not stream_started: # if error occur before XML stream was opened, e.g. no response on # init request, we call the on_connect_failure callback because # proper connection is not established yet and it's not a proxy # issue log.debug('calling on_connect_failure cb') self._caller.streamError = message self.on_connect_failure() else: # with open connection, we are calling the disconnect handlers for i in reversed(self.disconnect_handlers): log.debug('Calling disconnect handler %s' % i) i() self.disconnecting = False def connect(self, on_connect, on_connect_failure, hostname=None, port=5222, on_proxy_failure=None, on_stream_error_cb=None, proxy=None, secure_tuple=('tls', None, None, None, None)): """ Open XMPP connection (open XML streams in both directions) :param on_connect: called after stream is successfully opened :param on_connect_failure: called when error occurs during connection :param hostname: hostname of XMPP server from SRV request :param port: port number of XMPP server :param on_proxy_failure: called if error occurs during TCP connection to proxy server or during proxy connecting process :param proxy: dictionary with proxy data. It should contain at least values for keys 'host' and 'port' - connection details for proxy serve and optionally keys 'user' and 'pass' as proxy credentials :param secure_tuple: tuple of (desired connection type, cacerts, mycerts, tls_version, cipher_list) connection type can be 'ssl' - TLS established after TCP connection, 'tls' - TLS established after negotiation with starttls, or 'plain'. cacerts, mycerts, tls_version, cipher_list - see tls_nb.NonBlockingTLS constructor for more details """ self.on_connect = on_connect self.on_connect_failure=on_connect_failure self.on_proxy_failure = on_proxy_failure self.on_stream_error_cb = on_stream_error_cb self.desired_security, self.cacerts, self.mycerts, self.tls_version, \ self.cipher_list = secure_tuple self.Connection = None self.Port = port self.proxy = proxy if hostname: self.xmpp_hostname = hostname else: self.xmpp_hostname = self.Server # We only check for SSL here as for TLS we will first have to start a # PLAIN connection and negotiate TLS afterwards. # establish_tls will instruct transport to start secure connection # directly establish_tls = self.desired_security == 'ssl' certs = (self.cacerts, self.mycerts) proxy_dict = {} tcp_host = self.xmpp_hostname tcp_port = self.Port if proxy: # with proxies, client connects to proxy instead of directly to # XMPP server ((hostname, port)) # tcp_host is hostname of machine used for socket connection # (DNS request will be done for proxy or BOSH CM hostname) tcp_host, tcp_port, proxy_user, proxy_pass = \ transports_nb.get_proxy_data_from_dict(proxy) if proxy['type'] == 'bosh': # Setup BOSH transport self.socket = bosh.NonBlockingBOSH.get_instance( on_disconnect=self.disconnect, raise_event=self.raise_event, idlequeue=self.idlequeue, estabilish_tls=establish_tls, certs=certs, tls_version = self.tls_version, cipher_list = self.cipher_list, proxy_creds=(proxy_user, proxy_pass), xmpp_server=(self.xmpp_hostname, self.Port), domain=self.Server, bosh_dict=proxy) self.protocol_type = 'BOSH' self.wait_for_restart_response = \ proxy['bosh_wait_for_restart_response'] else: # http proxy proxy_dict['type'] = proxy['type'] proxy_dict['xmpp_server'] = (self.xmpp_hostname, self.Port) proxy_dict['credentials'] = (proxy_user, proxy_pass) if not proxy or proxy['type'] != 'bosh': # Setup ordinary TCP transport self.socket = transports_nb.NonBlockingTCP.get_instance( on_disconnect=self.disconnect, raise_event=self.raise_event, idlequeue=self.idlequeue, estabilish_tls=establish_tls, certs=certs, tls_version = self.tls_version, cipher_list = self.cipher_list, proxy_dict=proxy_dict) # plug transport into client as self.Connection self.socket.PlugIn(self) self._resolve_hostname( hostname=tcp_host, port=tcp_port, on_success=self._try_next_ip) def _resolve_hostname(self, hostname, port, on_success): """ Wrapper for getaddinfo call FIXME: getaddinfo blocks """ try: self.ip_addresses = socket.getaddrinfo(hostname, port, socket.AF_UNSPEC, socket.SOCK_STREAM) except socket.gaierror as exc: self.disconnect(message='Lookup failure for %s:%s, hostname: %s - %s' % (self.Server, self.Port, hostname, str(exc))) except socket.error as exc: errnum, errstr = exc.errno, exc.strerror self.disconnect(message='General socket error for %s:%s, hostname: ' '%s - %s' % (self.Server, self.Port, hostname, errstr)) else: on_success() def _try_next_ip(self, err_message=None): """ Iterate over IP addresses tries to connect to it """ if err_message: log.debug('While looping over DNS A records: %s' % err_message) if self.ip_addresses == []: msg = 'Run out of hosts for name %s:%s.' % (self.Server, self.Port) msg = msg + ' Error for last IP: %s' % err_message self.disconnect(msg) else: self.current_ip = self.ip_addresses.pop(0) self.socket.connect( conn_5tuple=self.current_ip, on_connect=lambda: self._xmpp_connect(), on_connect_failure=self._try_next_ip) def incoming_stream_version(self): """ Get version of xml stream """ if 'version' in self.Dispatcher.Stream._document_attrs: return self.Dispatcher.Stream._document_attrs['version'] else: return None def _xmpp_connect(self, socket_type=None): """ Start XMPP connecting process - open the XML stream. Is called after TCP connection is established or after switch to TLS when successfully negotiated with . """ # socket_type contains info which transport connection was established if not socket_type: if self.Connection.ssl_lib: # When ssl_lib is set we connected via SSL socket_type = 'ssl' else: # PLAIN is default socket_type = 'plain' self.connected = socket_type self._xmpp_connect_machine() def _xmpp_connect_machine(self, mode=None, data=None): """ Finite automaton taking care of stream opening and features tag handling. Calls _on_stream_start when stream is started, and disconnect() on failure. """ log.info('-------------xmpp_connect_machine() >> mode: %s, data: %s...' % (mode, str(data)[:20])) def on_next_receive(mode): """ Set desired on_receive callback on transport based on the state of connect_machine. """ log.info('setting %s on next receive' % mode) if mode is None: self.onreceive(None) # switch to Dispatcher.ProcessNonBlocking else: self.onreceive(lambda _data:self._xmpp_connect_machine(mode, _data)) if not mode: # starting state if 'Dispatcher' in self.__dict__: self.Dispatcher.PlugOut() self.got_features = False dispatcher_nb.Dispatcher.get_instance().PlugIn(self) on_next_receive('RECEIVE_DOCUMENT_ATTRIBUTES') elif mode == 'FAILURE': self.disconnect('During XMPP connect: %s' % data) elif mode == 'RECEIVE_DOCUMENT_ATTRIBUTES': if data: self.Dispatcher.ProcessNonBlocking(data) self.ip_addresses = [] if not hasattr(self, 'Dispatcher') or \ self.Dispatcher.Stream._document_attrs is None: self._xmpp_connect_machine(mode='FAILURE', data='Error on stream open') return # if terminating stanza was received after init request then client gets # disconnected from bosh transport plugin and we have to end the stream # negotiating process straight away. # fixes #4657 if not self.connected: return if self.incoming_stream_version() == '1.0': if not self.got_features: on_next_receive('RECEIVE_STREAM_FEATURES') else: log.info('got STREAM FEATURES in first recv') self._xmpp_connect_machine(mode='STREAM_STARTED') else: log.info('incoming stream version less than 1.0') self._xmpp_connect_machine(mode='STREAM_STARTED') elif mode == 'RECEIVE_STREAM_FEATURES': if data: # sometimes are received together with document # attributes and sometimes on next receive... self.Dispatcher.ProcessNonBlocking(data) if self.got_see_other_host: log.info('got see-other-host') self.onreceive(None) self.on_stream_error_cb(self, self.got_see_other_host) elif not self.got_features: self._xmpp_connect_machine(mode='FAILURE', data='Missing in 1.0 stream') else: log.info('got STREAM FEATURES in second recv') self._xmpp_connect_machine(mode='STREAM_STARTED') elif mode == 'STREAM_STARTED': self._on_stream_start() def _on_stream_start(self): """ Called after XMPP stream is opened. TLS negotiation may follow if supported and desired. """ self.stream_started = True if not hasattr(self, 'onreceive'): # we may already have been disconnected return self.onreceive(None) if self.connected == 'plain': if self.desired_security == 'plain': # if we want and have plain connection, we're done now self._on_connect() else: # try to negotiate TLS if self.incoming_stream_version() != '1.0': # if stream version is less than 1.0, we can't do more log.info('While connecting with type = "tls": stream version ' + 'is less than 1.0') self._on_connect() return if self.Dispatcher.Stream.features.getTag('starttls'): # Server advertises TLS support, start negotiation self.stream_started = False log.info('TLS supported by remote server. Requesting TLS start.') self._tls_negotiation_handler() else: log.info('While connecting with type = "tls": TLS unsupported ' + 'by remote server') self._on_connect() elif self.connected in ['ssl', 'tls']: self._on_connect() else: assert False, 'Stream opened for unsupported connection' def _tls_negotiation_handler(self, con=None, tag=None): """ Take care of TLS negotiation with """ log.info('-------------tls_negotiaton_handler() >> tag: %s' % tag) if not con and not tag: # starting state when we send the self.RegisterHandlerOnce('proceed', self._tls_negotiation_handler, xmlns=NS_TLS) self.RegisterHandlerOnce('failure', self._tls_negotiation_handler, xmlns=NS_TLS) self.send('' % NS_TLS) else: # we got or if tag.getNamespace() != NS_TLS: self.disconnect('Unknown namespace: %s' % tag.getNamespace()) return tagname = tag.getName() if tagname == 'failure': self.disconnect('TLS received: %s' % tag) return log.info('Got starttls proceed response. Switching to TLS/SSL...') # following call wouldn't work for BOSH transport but it doesn't matter # because negotiation with BOSH is forbidden self.Connection.tls_init( on_succ = lambda: self._xmpp_connect(socket_type='tls'), on_fail = lambda: self.disconnect('error while establishing TLS')) def _on_connect(self): """ Preceed call of on_connect callback """ self.onreceive(None) self.on_connect(self, self.connected) def raise_event(self, event_type, data): """ Raise event to connection instance. DATA_SENT and DATA_RECIVED events are used in XML console to show XMPP traffic """ log.info('raising event from transport: :::::%s::::\n_____________\n%s\n_____________\n' % (event_type, data)) if hasattr(self, 'Dispatcher'): self.Dispatcher.Event('', event_type, data) ############################################################################### ### follows code for authentication, resource bind, session and roster download ############################################################################### def auth(self, user, password, resource='', sasl=True, on_auth=None, auth_mechs=None): """ Authenticate connnection and bind resource. If resource is not provided random one or library name used :param user: XMPP username :param password: XMPP password :param resource: resource that shall be used for auth/connecting :param sasl: Boolean indicating if SASL shall be used. (default: True) :param on_auth: Callback, called after auth. On auth failure, argument is None. :param auth_mechs: Set of valid authentification mechanisms. If None all authentification mechanisms will be allowed. Possible entries are: 'ANONYMOUS', 'EXTERNAL', 'GSSAPI', 'SCRAM-SHA-1-PLUS', 'SCRAM-SHA-1', 'DIGEST-MD5', 'PLAIN', 'X-MESSENGER-OAUTH2', 'XEP-0078' """ self._User, self._Password = user, password self._Resource, self._sasl = resource, sasl self._channel_binding = None if self.connected in ('ssl', 'tls'): try: if self.protocol_type != 'BOSH': self._channel_binding = self.Connection.NonBlockingTLS.get_channel_binding() # TLS handshake is finished so channel binding data muss exist assert (self._channel_binding != None) except NotImplementedError: pass if auth_mechs == None: self._auth_mechs = SASL_AUTHENTICATION_MECHANISMS | set(['XEP-0078']) else: self._auth_mechs = auth_mechs self.on_auth = on_auth self._on_doc_attrs() return def _on_old_auth(self, res): """ Callback used by NON-SASL auth. On auth failure, res is None """ if res: self.connected += '+old_auth' self.on_auth(self, 'old_auth') else: self.on_auth(self, None) def _on_sasl_auth(self, res): """ Used internally. On auth failure, res is None """ self.onreceive(None) if res: self.connected += '+sasl' self.on_auth(self, 'sasl') else: self.on_auth(self, None) def _on_doc_attrs(self): """ Plug authentication objects and start auth """ if self._sasl: auth_nb.SASL.get_instance(self._User, self._Password, self._on_start_sasl, self._channel_binding, self._auth_mechs).PlugIn(self) if not hasattr(self, 'SASL'): return if ('XEP-0078' in self._auth_mechs and (not self._sasl or self.SASL.startsasl == 'not-supported')): if not self._Resource: self._Resource = 'xmpppy' auth_nb.NonBlockingNonSASL.get_instance(self._User, self._Password, self._Resource, self._on_old_auth).PlugIn(self) return self.SASL.auth() return True def _on_start_sasl(self, data=None): """ Callback used by SASL, called on each auth step """ if data: self.Dispatcher.ProcessNonBlocking(data) if not 'SASL' in self.__dict__: # SASL is pluged out, possible disconnect return if self.SASL.startsasl == 'in-process': return self.onreceive(None) if self.SASL.startsasl == 'failure': # wrong user/pass, stop auth if 'SASL' in self.__dict__: self.SASL.PlugOut() self.connected = None # FIXME: is this intended? We use ''elsewhere self._on_sasl_auth(None) elif self.SASL.startsasl == 'success': nb_bind = auth_nb.NonBlockingBind.get_instance() sm = self._caller.sm if sm._owner and sm.resumption: nb_bind.resuming = True sm.set_owner(self) self.Dispatcher.sm = sm nb_bind.PlugIn(self) self.on_auth(self, 'sasl') return nb_bind.PlugIn(self) self.onreceive(self._on_auth_bind) return True def _on_auth_bind(self, data): # FIXME: Why use this callback and not bind directly? if data: self.Dispatcher.ProcessNonBlocking(data) if self.NonBlockingBind.bound is None: return self.NonBlockingBind.NonBlockingBind(self._Resource, self._on_sasl_auth) return True def initRoster(self, version=''): """ Plug in the roster """ if 'NonBlockingRoster' not in self.__dict__: return roster_nb.NonBlockingRoster.get_instance(version=version).PlugIn(self) def getRoster(self, on_ready=None, force=False): """ Return the Roster instance, previously plugging it in and requesting roster from server if needed """ if 'NonBlockingRoster' in self.__dict__: return self.NonBlockingRoster.getRoster(on_ready, force) return None def sendPresence(self, jid=None, typ=None, requestRoster=0): """ Send some specific presence state. Can also request roster from server if according agrument is set """ if requestRoster: # FIXME: used somewhere? roster_nb.NonBlockingRoster.get_instance().PlugIn(self) self.send(dispatcher_nb.Presence(to=jid, typ=typ)) ############################################################################### ### following methods are moved from blocking client class of xmpppy ############################################################################### def RegisterDisconnectHandler(self, handler): """ Register handler that will be called on disconnect """ self.disconnect_handlers.append(handler) def UnregisterDisconnectHandler(self, handler): """ Unregister handler that is called on disconnect """ self.disconnect_handlers.remove(handler) def DisconnectHandler(self): """ Default disconnect handler. Just raises an IOError. If you choosed to use this class in your production client, override this method or at least unregister it. """ raise IOError('Disconnected from server.') def get_connect_type(self): """ Return connection state. F.e.: None / 'tls' / 'plain+non_sasl' """ return self.connected def get_peerhost(self): """ Gets the ip address of the account, from which is made connection to the server (e.g. IP and port of socket) We will create listening socket on the same ip """ # FIXME: tuple (ip, port) is expected (and checked for) but port num is # useless return self.socket.peerhost nbxmpp-0.5.3/nbxmpp/protocol.py0000644000175000017500000021436112450255655017742 0ustar asterixasterix00000000000000## protocol.py ## ## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, 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 General Public License for more details. # $Id: protocol.py,v 1.52 2006/01/09 22:08:57 normanr Exp $ """ Protocol module contains tools that are needed for processing of xmpp-related data structures, including jabber-objects like JID or different stanzas and sub- stanzas) handling routines """ from .simplexml import Node, NodeBuilder import time import string import hashlib def ascii_upper(s): return s.upper() NS_ACTIVITY = 'http://jabber.org/protocol/activity' # XEP-0108 NS_ADDRESS = 'http://jabber.org/protocol/address' # XEP-0033 NS_AGENTS = 'jabber:iq:agents' NS_AMP = 'http://jabber.org/protocol/amp' NS_AMP_ERRORS = NS_AMP + '#errors' NS_ARCHIVE = 'urn:xmpp:archive' # XEP-0136 NS_ARCHIVE_AUTO = NS_ARCHIVE + ':auto' # XEP-0136 NS_ARCHIVE_MANAGE = NS_ARCHIVE + ':manage' # XEP-0136 NS_ARCHIVE_MANUAL = NS_ARCHIVE + ':manual' # XEP-0136 NS_ARCHIVE_PREF = NS_ARCHIVE + ':pref' NS_ATOM = 'http://www.w3.org/2005/Atom' NS_ATTENTION = 'urn:xmpp:attention:0' # XEP-0224 NS_AUTH = 'jabber:iq:auth' NS_AVATAR = 'http://www.xmpp.org/extensions/xep-0084.html#ns-metadata' NS_BIND = 'urn:ietf:params:xml:ns:xmpp-bind' NS_BLOCKING = 'urn:xmpp:blocking' # XEP-0191 NS_BOB = 'urn:xmpp:bob' # XEP-0231 NS_BOOKMARKS = 'storage:bookmarks' # XEP-0048 NS_BROWSE = 'jabber:iq:browse' NS_BROWSING = 'http://jabber.org/protocol/browsing' # XEP-0195 NS_BYTESTREAM = 'http://jabber.org/protocol/bytestreams' # XEP-0065 NS_CAPS = 'http://jabber.org/protocol/caps' # XEP-0115 NS_CAPTCHA = 'urn:xmpp:captcha' # XEP-0158 NS_CARBONS = 'urn:xmpp:carbons:2' # XEP-0280 NS_CHATSTATES = 'http://jabber.org/protocol/chatstates' # XEP-0085 NS_CHATTING = 'http://jabber.org/protocol/chatting' # XEP-0194 NS_CLIENT = 'jabber:client' NS_CONDITIONS = 'urn:xmpp:muc:conditions:0' # XEP-0306 NS_COMMANDS = 'http://jabber.org/protocol/commands' NS_COMPONENT_ACCEPT = 'jabber:component:accept' NS_COMPONENT_1 = 'http://jabberd.jabberstudio.org/ns/component/1.0' NS_COMPRESS = 'http://jabber.org/protocol/compress' # XEP-0138 NS_CONFERENCE = 'jabber:x:conference' NS_CORRECT = 'urn:xmpp:message-correct:0' # XEP-0308 NS_DATA = 'jabber:x:data' # XEP-0004 NS_DATA_MEDIA = 'urn:xmpp:media-element' # XEP-0221 NS_DELAY = 'jabber:x:delay' NS_DELAY2 = 'urn:xmpp:delay' NS_DIALBACK = 'jabber:server:dialback' NS_DISCO = 'http://jabber.org/protocol/disco' NS_DISCO_INFO = NS_DISCO + '#info' NS_DISCO_ITEMS = NS_DISCO + '#items' NS_ENCRYPTED = 'jabber:x:encrypted' # XEP-0027 NS_ESESSION = 'http://www.xmpp.org/extensions/xep-0116.html#ns' NS_ESESSION_INIT = 'http://www.xmpp.org/extensions/xep-0116.html#ns-init' # XEP-0116 NS_EVENT = 'jabber:x:event' # XEP-0022 NS_FEATURE = 'http://jabber.org/protocol/feature-neg' NS_FILE = 'http://jabber.org/protocol/si/profile/file-transfer' # XEP-0096 NS_FORWARD = 'urn:xmpp:forward:0' # XEP-0297 NS_GAMING = 'http://jabber.org/protocol/gaming' # XEP-0196 NS_GATEWAY = 'jabber:iq:gateway' # XEP-0100 NS_GEOLOC = 'http://jabber.org/protocol/geoloc' # XEP-0080 NS_GROUPCHAT = 'gc-1.0' NS_MSG_HINTS = 'urn:xmpp:hints' # XEP-0280 NS_HTTP_AUTH = 'http://jabber.org/protocol/http-auth' # XEP-0070 NS_HTTP_BIND = 'http://jabber.org/protocol/httpbind' # XEP-0124 NS_IBB = 'http://jabber.org/protocol/ibb' NS_INVISIBLE = 'presence-invisible' # Jabberd2 NS_IQ = 'iq' # Jabberd2 NS_JINGLE ='urn:xmpp:jingle:1' # XEP-0166 NS_JINGLE_ERRORS = 'urn:xmpp:jingle:errors:1' # XEP-0166 NS_JINGLE_RTP = 'urn:xmpp:jingle:apps:rtp:1' # XEP-0167 NS_JINGLE_RTP_AUDIO = 'urn:xmpp:jingle:apps:rtp:audio' # XEP-0167 NS_JINGLE_RTP_VIDEO = 'urn:xmpp:jingle:apps:rtp:video' # XEP-0167 NS_JINGLE_FILE_TRANSFER ='urn:xmpp:jingle:apps:file-transfer:3' # XEP-0234 NS_JINGLE_XTLS='urn:xmpp:jingle:security:xtls:0' # XTLS: EXPERIMENTAL security layer of jingle NS_JINGLE_RAW_UDP = 'urn:xmpp:jingle:transports:raw-udp:1' # XEP-0177 NS_JINGLE_ICE_UDP = 'urn:xmpp:jingle:transports:ice-udp:1' # XEP-0176 NS_JINGLE_BYTESTREAM ='urn:xmpp:jingle:transports:s5b:1' # XEP-0260 NS_JINGLE_IBB = 'urn:xmpp:jingle:transports:ibb:1' # XEP-0261 NS_LAST = 'jabber:iq:last' NS_LOCATION = 'http://jabber.org/protocol/geoloc' # XEP-0080 NS_MAM = 'urn:xmpp:mam:0' # XEP-0313 NS_MESSAGE = 'message' # Jabberd2 NS_MOOD = 'http://jabber.org/protocol/mood' # XEP-0107 NS_MUC = 'http://jabber.org/protocol/muc' NS_MUC_USER = NS_MUC + '#user' NS_MUC_ADMIN = NS_MUC + '#admin' NS_MUC_OWNER = NS_MUC + '#owner' NS_MUC_UNIQUE = NS_MUC + '#unique' NS_MUC_CONFIG = NS_MUC + '#roomconfig' NS_NICK = 'http://jabber.org/protocol/nick' # XEP-0172 NS_OFFLINE = 'http://www.jabber.org/jeps/jep-0030.html' # XEP-0013 NS_PHYSLOC = 'http://jabber.org/protocol/physloc' # XEP-0112 NS_PING = 'urn:xmpp:ping' # XEP-0199 NS_PRESENCE = 'presence' # Jabberd2 NS_PRIVACY = 'jabber:iq:privacy' NS_PRIVATE = 'jabber:iq:private' NS_PROFILE = 'http://jabber.org/protocol/profile' # XEP-0154 NS_PUBSUB = 'http://jabber.org/protocol/pubsub' # XEP-0060 NS_PUBSUB_EVENT = 'http://jabber.org/protocol/pubsub#event' NS_PUBSUB_PUBLISH_OPTIONS = NS_PUBSUB + '#publish-options' # XEP-0060 NS_PUBSUB_OWNER = 'http://jabber.org/protocol/pubsub#owner' # XEP-0060 NS_REGISTER = 'jabber:iq:register' NS_ROSTER = 'jabber:iq:roster' NS_ROSTERNOTES = 'storage:rosternotes' NS_ROSTERX = 'http://jabber.org/protocol/rosterx' # XEP-0144 NS_ROSTER_VER = 'urn:xmpp:features:rosterver' # XEP-0273 NS_RPC = 'jabber:iq:rpc' # XEP-0009 NS_RSM = 'http://jabber.org/protocol/rsm' NS_SASL = 'urn:ietf:params:xml:ns:xmpp-sasl' NS_SECLABEL = 'urn:xmpp:sec-label:0' NS_SECLABEL_CATALOG = 'urn:xmpp:sec-label:catalog:2' NS_SEARCH = 'jabber:iq:search' NS_SERVER = 'jabber:server' NS_SESSION = 'urn:ietf:params:xml:ns:xmpp-session' NS_SI = 'http://jabber.org/protocol/si' # XEP-0096 NS_SI_PUB = 'http://jabber.org/protocol/sipub' # XEP-0137 NS_SIGNED = 'jabber:x:signed' # XEP-0027 NS_SSN = 'urn:xmpp:ssn' # XEP-0155 NS_STANZA_CRYPTO = 'http://www.xmpp.org/extensions/xep-0200.html#ns' # XEP-0200 NS_STANZAS = 'urn:ietf:params:xml:ns:xmpp-stanzas' NS_STREAM = 'http://affinix.com/jabber/stream' NS_STREAMS = 'http://etherx.jabber.org/streams' NS_TIME = 'jabber:iq:time' # XEP-0900 NS_TIME_REVISED = 'urn:xmpp:time' # XEP-0202 NS_TLS = 'urn:ietf:params:xml:ns:xmpp-tls' NS_TUNE = 'http://jabber.org/protocol/tune' # XEP-0118 NS_VACATION = 'http://jabber.org/protocol/vacation' NS_VCARD = 'vcard-temp' NS_GMAILNOTIFY = 'google:mail:notify' NS_GTALKSETTING = 'google:setting' NS_VCARD_UPDATE = NS_VCARD + ':x:update' NS_VERSION = 'jabber:iq:version' NS_VIEWING = 'http://jabber.org/protocol/viewing' # XEP--197 NS_WAITINGLIST = 'http://jabber.org/protocol/waitinglist' # XEP-0130 NS_XHTML_IM = 'http://jabber.org/protocol/xhtml-im' # XEP-0071 NS_XHTML = 'http://www.w3.org/1999/xhtml' # " NS_X_OOB = 'jabber:x:oob' # XEP-0066 NS_DATA_LAYOUT = 'http://jabber.org/protocol/xdata-layout' # XEP-0141 NS_DATA_VALIDATE = 'http://jabber.org/protocol/xdata-validate' # XEP-0122 NS_XMPP_STREAMS = 'urn:ietf:params:xml:ns:xmpp-streams' NS_RECEIPTS = 'urn:xmpp:receipts' NS_PUBKEY_PUBKEY = 'urn:xmpp:pubkey:2' # XEP-0189 NS_PUBKEY_REVOKE = 'urn:xmpp:revoke:2' NS_PUBKEY_ATTEST = 'urn:xmpp:attest:2' NS_STREAM_MGMT = 'urn:xmpp:sm:2' # XEP-198 NS_HASHES = 'urn:xmpp:hashes:1' # XEP-300 NS_HASHES_MD5 = 'urn:xmpp:hash-function-textual-names:md5' NS_HASHES_SHA1 = 'urn:xmpp:hash-function-textual-names:sha-1' NS_HASHES_SHA256 = 'urn:xmpp:hash-function-textual-names:sha-256' NS_HASHES_SHA512 = 'urn:xmpp:hash-function-textual-names:sha-512' #xmpp_stream_error_conditions = ''' #bad-format -- -- -- The entity has sent XML that cannot be processed. #bad-namespace-prefix -- -- -- The entity has sent a namespace prefix that is unsupported, or has sent no namespace prefix on an element that requires such a prefix. #conflict -- -- -- The server is closing the active stream for this entity because a new stream has been initiated that conflicts with the existing stream. #connection-timeout -- -- -- The entity has not generated any traffic over the stream for some period of time. #host-gone -- -- -- The value of the 'to' attribute provided by the initiating entity in the stream header corresponds to a hostname that is no longer hosted by the server. #host-unknown -- -- -- The value of the 'to' attribute provided by the initiating entity in the stream header does not correspond to a hostname that is hosted by the server. #improper-addressing -- -- -- A stanza sent between two servers lacks a 'to' or 'from' attribute (or the attribute has no value). #internal-server-error -- -- -- The server has experienced a misconfiguration or an otherwise-undefined internal error that prevents it from servicing the stream. #invalid-from -- cancel -- -- The JID or hostname provided in a 'from' address does not match an authorized JID or validated domain negotiated between servers via SASL or dialback, or between a client and a server via authentication and resource authorization. #invalid-id -- -- -- The stream ID or dialback ID is invalid or does not match an ID previously provided. #invalid-namespace -- -- -- The streams namespace name is something other than "http://etherx.jabber.org/streams" or the dialback namespace name is something other than "jabber:server:dialback". #invalid-xml -- -- -- The entity has sent invalid XML over the stream to a server that performs validation. #not-authorized -- -- -- The entity has attempted to send data before the stream has been authenticated, or otherwise is not authorized to perform an action related to stream negotiation. #policy-violation -- -- -- The entity has violated some local service policy. #remote-connection-failed -- -- -- The server is unable to properly connect to a remote resource that is required for authentication or authorization. #resource-constraint -- -- -- The server lacks the system resources necessary to service the stream. #restricted-xml -- -- -- The entity has attempted to send restricted XML features such as a comment, processing instruction, DTD, entity reference, or unescaped character. #see-other-host -- -- -- The server will not provide service to the initiating entity but is redirecting traffic to another host. #system-shutdown -- -- -- The server is being shut down and all active streams are being closed. #undefined-condition -- -- -- The error condition is not one of those defined by the other conditions in this list. #unsupported-encoding -- -- -- The initiating entity has encoded the stream in an encoding that is not supported by the server. #unsupported-stanza-type -- -- -- The initiating entity has sent a first-level child of the stream that is not supported by the server. #unsupported-version -- -- -- The value of the 'version' attribute provided by the initiating entity in the stream header specifies a version of XMPP that is not supported by the server. #xml-not-well-formed -- -- -- The initiating entity has sent XML that is not well-formed.''' #xmpp_stanza_error_conditions = ''' #bad-request -- 400 -- modify -- The sender has sent XML that is malformed or that cannot be processed. #conflict -- 409 -- cancel -- Access cannot be granted because an existing resource or session exists with the same name or address. #feature-not-implemented -- 501 -- cancel -- The feature requested is not implemented by the recipient or server and therefore cannot be processed. #forbidden -- 403 -- auth -- The requesting entity does not possess the required permissions to perform the action. #gone -- 302 -- modify -- The recipient or server can no longer be contacted at this address. #internal-server-error -- 500 -- wait -- The server could not process the stanza because of a misconfiguration or an otherwise-undefined internal server error. #item-not-found -- 404 -- cancel -- The addressed JID or item requested cannot be found. #jid-malformed -- 400 -- modify -- The value of the 'to' attribute in the sender's stanza does not adhere to the syntax defined in Addressing Scheme. #not-acceptable -- 406 -- cancel -- The recipient or server understands the request but is refusing to process it because it does not meet criteria defined by the recipient or server. #not-allowed -- 405 -- cancel -- The recipient or server does not allow any entity to perform the action. #not-authorized -- 401 -- auth -- The sender must provide proper credentials before being allowed to perform the action, or has provided improper credentials. #payment-required -- 402 -- auth -- The requesting entity is not authorized to access the requested service because payment is required. #recipient-unavailable -- 404 -- wait -- The intended recipient is temporarily unavailable. #redirect -- 302 -- modify -- The recipient or server is redirecting requests for this information to another entity. #registration-required -- 407 -- auth -- The requesting entity is not authorized to access the requested service because registration is required. #remote-server-not-found -- 404 -- cancel -- A remote server or service specified as part or all of the JID of the intended recipient does not exist. #remote-server-timeout -- 504 -- wait -- A remote server or service specified as part or all of the JID of the intended recipient could not be contacted within a reasonable amount of time. #resource-constraint -- 500 -- wait -- The server or recipient lacks the system resources necessary to service the request. #service-unavailable -- 503 -- cancel -- The server or recipient does not currently provide the requested service. #subscription-required -- 407 -- auth -- The requesting entity is not authorized to access the requested service because a subscription is required. #undefined-condition -- 500 -- -- Undefined Condition #unexpected-request -- 400 -- wait -- The recipient or server understood the request but was not expecting it at this time (e.g., the request was out of order).''' #sasl_error_conditions = ''' #aborted -- -- -- The receiving entity acknowledges an element sent by the initiating entity; sent in reply to the element. #incorrect-encoding -- -- -- The data provided by the initiating entity could not be processed because the [BASE64]Josefsson, S., The Base16, Base32, and Base64 Data Encodings, July 2003. encoding is incorrect (e.g., because the encoding does not adhere to the definition in Section 3 of [BASE64]Josefsson, S., The Base16, Base32, and Base64 Data Encodings, July 2003.); sent in reply to a element or an element with initial response data. #invalid-authzid -- -- -- The authzid provided by the initiating entity is invalid, either because it is incorrectly formatted or because the initiating entity does not have permissions to authorize that ID; sent in reply to a element or an element with initial response data. #invalid-mechanism -- -- -- The initiating entity did not provide a mechanism or requested a mechanism that is not supported by the receiving entity; sent in reply to an element. #mechanism-too-weak -- -- -- The mechanism requested by the initiating entity is weaker than server policy permits for that initiating entity; sent in reply to a element or an element with initial response data. #not-authorized -- -- -- The authentication failed because the initiating entity did not provide valid credentials (this includes but is not limited to the case of an unknown username); sent in reply to a element or an element with initial response data. #temporary-auth-failure -- -- -- The authentication failed because of a temporary error condition within the receiving entity; sent in reply to an element or element.''' #ERRORS, _errorcodes, loc = {}, {}, {} #for ns, errname, errpool in ((NS_XMPP_STREAMS, 'STREAM', #xmpp_stream_error_conditions), (NS_STANZAS, 'ERR', xmpp_stanza_error_conditions), #(NS_SASL, 'SASL', sasl_error_conditions)): #for err in errpool.split('\n')[1:]: #cond, code, typ, text = err.split(' -- ') #name = errname + '_' + ascii_upper(cond).replace('-', '_') #locals()[name] = ns + ' ' + cond #loc[name] = ns + ' ' + cond #ERRORS[ns + ' ' + cond] = [code, typ, text] #if code: #_errorcodes[code] = cond #del ns, errname, errpool, err, cond, code, typ, text #import pprint #pprint.pprint(ERRORS) #pprint.pprint(_errorcodes) #for (k, v) in loc.items(): #print('%s = \'%s\'' % (k, v)) ERRORS = { 'urn:ietf:params:xml:ns:xmpp-sasl aborted': ['', '', 'The receiving entity acknowledges an element sent by the initiating entity; sent in reply to the element.'], 'urn:ietf:params:xml:ns:xmpp-sasl incorrect-encoding': ['', '', 'The data provided by the initiating entity could not be processed because the [BASE64]Josefsson, S., The Base16, Base32, and Base64 Data Encodings, July 2003. encoding is incorrect (e.g., because the encoding does not adhere to the definition in Section 3 of [BASE64]Josefsson, S., The Base16, Base32, and Base64 Data Encodings, July 2003.); sent in reply to a element or an element with initial response data.'], 'urn:ietf:params:xml:ns:xmpp-sasl invalid-authzid': ['', '', 'The authzid provided by the initiating entity is invalid, either because it is incorrectly formatted or because the initiating entity does not have permissions to authorize that ID; sent in reply to a element or an element with initial response data.'], 'urn:ietf:params:xml:ns:xmpp-sasl invalid-mechanism': ['', '', 'The initiating entity did not provide a mechanism or requested a mechanism that is not supported by the receiving entity; sent in reply to an element.'], 'urn:ietf:params:xml:ns:xmpp-sasl mechanism-too-weak': ['', '', 'The mechanism requested by the initiating entity is weaker than server policy permits for that initiating entity; sent in reply to a element or an element with initial response data.'], 'urn:ietf:params:xml:ns:xmpp-sasl not-authorized': ['', '', 'The authentication failed because the initiating entity did not provide valid credentials (this includes but is not limited to the case of an unknown username); sent in reply to a element or an element with initial response data.'], 'urn:ietf:params:xml:ns:xmpp-sasl temporary-auth-failure': ['', '', 'The authentication failed because of a temporary error condition within the receiving entity; sent in reply to an element or element.'], 'urn:ietf:params:xml:ns:xmpp-stanzas bad-request': ['400', 'modify', 'The sender has sent XML that is malformed or that cannot be processed.'], 'urn:ietf:params:xml:ns:xmpp-stanzas conflict': ['409', 'cancel', 'Access cannot be granted because an existing resource or session exists with the same name or address.'], 'urn:ietf:params:xml:ns:xmpp-stanzas feature-not-implemented': ['501', 'cancel', 'The feature requested is not implemented by the recipient or server and therefore cannot be processed.'], 'urn:ietf:params:xml:ns:xmpp-stanzas forbidden': ['403', 'auth', 'The requesting entity does not possess the required permissions to perform the action.'], 'urn:ietf:params:xml:ns:xmpp-stanzas gone': ['302', 'modify', 'The recipient or server can no longer be contacted at this address.'], 'urn:ietf:params:xml:ns:xmpp-stanzas internal-server-error': ['500', 'wait', 'The server could not process the stanza because of a misconfiguration or an otherwise-undefined internal server error.'], 'urn:ietf:params:xml:ns:xmpp-stanzas item-not-found': ['404', 'cancel', 'The addressed JID or item requested cannot be found.'], 'urn:ietf:params:xml:ns:xmpp-stanzas jid-malformed': ['400', 'modify', "The value of the 'to' attribute in the sender's stanza does not adhere to the syntax defined in Addressing Scheme."], 'urn:ietf:params:xml:ns:xmpp-stanzas not-acceptable': ['406', 'cancel', 'The recipient or server understands the request but is refusing to process it because it does not meet criteria defined by the recipient or server.'], 'urn:ietf:params:xml:ns:xmpp-stanzas not-allowed': ['405', 'cancel', 'The recipient or server does not allow any entity to perform the action.'], 'urn:ietf:params:xml:ns:xmpp-stanzas not-authorized': ['401', 'auth', 'The sender must provide proper credentials before being allowed to perform the action, or has provided improper credentials.'], 'urn:ietf:params:xml:ns:xmpp-stanzas payment-required': ['402', 'auth', 'The requesting entity is not authorized to access the requested service because payment is required.'], 'urn:ietf:params:xml:ns:xmpp-stanzas recipient-unavailable': ['404', 'wait', 'The intended recipient is temporarily unavailable.'], 'urn:ietf:params:xml:ns:xmpp-stanzas redirect': ['302', 'modify', 'The recipient or server is redirecting requests for this information to another entity.'], 'urn:ietf:params:xml:ns:xmpp-stanzas registration-required': ['407', 'auth', 'The requesting entity is not authorized to access the requested service because registration is required.'], 'urn:ietf:params:xml:ns:xmpp-stanzas remote-server-not-found': ['404', 'cancel', 'A remote server or service specified as part or all of the JID of the intended recipient does not exist.'], 'urn:ietf:params:xml:ns:xmpp-stanzas remote-server-timeout': ['504', 'wait', 'A remote server or service specified as part or all of the JID of the intended recipient could not be contacted within a reasonable amount of time.'], 'urn:ietf:params:xml:ns:xmpp-stanzas resource-constraint': ['500', 'wait', 'The server or recipient lacks the system resources necessary to service the request.'], 'urn:ietf:params:xml:ns:xmpp-stanzas service-unavailable': ['503', 'cancel', 'The server or recipient does not currently provide the requested service.'], 'urn:ietf:params:xml:ns:xmpp-stanzas subscription-required': ['407', 'auth', 'The requesting entity is not authorized to access the requested service because a subscription is required.'], 'urn:ietf:params:xml:ns:xmpp-stanzas undefined-condition': ['500', '', 'Undefined Condition'], 'urn:ietf:params:xml:ns:xmpp-stanzas unexpected-request': ['400', 'wait', 'The recipient or server understood the request but was not expecting it at this time (e.g., the request was out of order).'], 'urn:ietf:params:xml:ns:xmpp-streams bad-format': ['', '', 'The entity has sent XML that cannot be processed.'], 'urn:ietf:params:xml:ns:xmpp-streams bad-namespace-prefix': ['', '', 'The entity has sent a namespace prefix that is unsupported, or has sent no namespace prefix on an element that requires such a prefix.'], 'urn:ietf:params:xml:ns:xmpp-streams conflict': ['', '', 'The server is closing the active stream for this entity because a new stream has been initiated that conflicts with the existing stream.'], 'urn:ietf:params:xml:ns:xmpp-streams connection-timeout': ['', '', 'The entity has not generated any traffic over the stream for some period of time.'], 'urn:ietf:params:xml:ns:xmpp-streams host-gone': ['', '', "The value of the 'to' attribute provided by the initiating entity in the stream header corresponds to a hostname that is no longer hosted by the server."], 'urn:ietf:params:xml:ns:xmpp-streams host-unknown': ['', '', "The value of the 'to' attribute provided by the initiating entity in the stream header does not correspond to a hostname that is hosted by the server."], 'urn:ietf:params:xml:ns:xmpp-streams improper-addressing': ['', '', "A stanza sent between two servers lacks a 'to' or 'from' attribute (or the attribute has no value)."], 'urn:ietf:params:xml:ns:xmpp-streams internal-server-error': ['', '', 'The server has experienced a misconfiguration or an otherwise-undefined internal error that prevents it from servicing the stream.'], 'urn:ietf:params:xml:ns:xmpp-streams invalid-from': ['cancel', '', "The JID or hostname provided in a 'from' address does not match an authorized JID or validated domain negotiated between servers via SASL or dialback, or between a client and a server via authentication and resource authorization."], 'urn:ietf:params:xml:ns:xmpp-streams invalid-id': ['', '', 'The stream ID or dialback ID is invalid or does not match an ID previously provided.'], 'urn:ietf:params:xml:ns:xmpp-streams invalid-namespace': ['', '', 'The streams namespace name is something other than "http://etherx.jabber.org/streams" or the dialback namespace name is something other than "jabber:server:dialback".'], 'urn:ietf:params:xml:ns:xmpp-streams invalid-xml': ['', '', 'The entity has sent invalid XML over the stream to a server that performs validation.'], 'urn:ietf:params:xml:ns:xmpp-streams not-authorized': ['', '', 'The entity has attempted to send data before the stream has been authenticated, or otherwise is not authorized to perform an action related to stream negotiation.'], 'urn:ietf:params:xml:ns:xmpp-streams policy-violation': ['', '', 'The entity has violated some local service policy.'], 'urn:ietf:params:xml:ns:xmpp-streams remote-connection-failed': ['', '', 'The server is unable to properly connect to a remote resource that is required for authentication or authorization.'], 'urn:ietf:params:xml:ns:xmpp-streams resource-constraint': ['', '', 'The server lacks the system resources necessary to service the stream.'], 'urn:ietf:params:xml:ns:xmpp-streams restricted-xml': ['', '', 'The entity has attempted to send restricted XML features such as a comment, processing instruction, DTD, entity reference, or unescaped character.'], 'urn:ietf:params:xml:ns:xmpp-streams see-other-host': ['', '', 'The server will not provide service to the initiating entity but is redirecting traffic to another host.'], 'urn:ietf:params:xml:ns:xmpp-streams system-shutdown': ['', '', 'The server is being shut down and all active streams are being closed.'], 'urn:ietf:params:xml:ns:xmpp-streams undefined-condition': ['', '', 'The error condition is not one of those defined by the other conditions in this list.'], 'urn:ietf:params:xml:ns:xmpp-streams unsupported-encoding': ['', '', 'The initiating entity has encoded the stream in an encoding that is not supported by the server.'], 'urn:ietf:params:xml:ns:xmpp-streams unsupported-stanza-type': ['', '', 'The initiating entity has sent a first-level child of the stream that is not supported by the server.'], 'urn:ietf:params:xml:ns:xmpp-streams unsupported-version': ['', '', "The value of the 'version' attribute provided by the initiating entity in the stream header specifies a version of XMPP that is not supported by the server."], 'urn:ietf:params:xml:ns:xmpp-streams xml-not-well-formed': ['', '', 'The initiating entity has sent XML that is not well-formed.'] } _errorcodes = { '302': 'redirect', '400': 'unexpected-request', '401': 'not-authorized', '402': 'payment-required', '403': 'forbidden', '404': 'remote-server-not-found', '405': 'not-allowed', '406': 'not-acceptable', '407': 'subscription-required', '409': 'conflict', '500': 'undefined-condition', '501': 'feature-not-implemented', '503': 'service-unavailable', '504': 'remote-server-timeout', 'cancel': 'invalid-from' } STREAM_NOT_AUTHORIZED = 'urn:ietf:params:xml:ns:xmpp-streams not-authorized' STREAM_REMOTE_CONNECTION_FAILED = 'urn:ietf:params:xml:ns:xmpp-streams remote-connection-failed' SASL_MECHANISM_TOO_WEAK = 'urn:ietf:params:xml:ns:xmpp-sasl mechanism-too-weak' STREAM_XML_NOT_WELL_FORMED = 'urn:ietf:params:xml:ns:xmpp-streams xml-not-well-formed' ERR_JID_MALFORMED = 'urn:ietf:params:xml:ns:xmpp-stanzas jid-malformed' STREAM_SEE_OTHER_HOST = 'urn:ietf:params:xml:ns:xmpp-streams see-other-host' STREAM_BAD_NAMESPACE_PREFIX = 'urn:ietf:params:xml:ns:xmpp-streams bad-namespace-prefix' ERR_SERVICE_UNAVAILABLE = 'urn:ietf:params:xml:ns:xmpp-stanzas service-unavailable' STREAM_CONNECTION_TIMEOUT = 'urn:ietf:params:xml:ns:xmpp-streams connection-timeout' STREAM_UNSUPPORTED_VERSION = 'urn:ietf:params:xml:ns:xmpp-streams unsupported-version' STREAM_IMPROPER_ADDRESSING = 'urn:ietf:params:xml:ns:xmpp-streams improper-addressing' STREAM_UNDEFINED_CONDITION = 'urn:ietf:params:xml:ns:xmpp-streams undefined-condition' SASL_NOT_AUTHORIZED = 'urn:ietf:params:xml:ns:xmpp-sasl not-authorized' ERR_GONE = 'urn:ietf:params:xml:ns:xmpp-stanzas gone' SASL_TEMPORARY_AUTH_FAILURE = 'urn:ietf:params:xml:ns:xmpp-sasl temporary-auth-failure' ERR_REMOTE_SERVER_NOT_FOUND = 'urn:ietf:params:xml:ns:xmpp-stanzas remote-server-not-found' ERR_UNEXPECTED_REQUEST = 'urn:ietf:params:xml:ns:xmpp-stanzas unexpected-request' ERR_RECIPIENT_UNAVAILABLE = 'urn:ietf:params:xml:ns:xmpp-stanzas recipient-unavailable' ERR_CONFLICT = 'urn:ietf:params:xml:ns:xmpp-stanzas conflict' STREAM_SYSTEM_SHUTDOWN = 'urn:ietf:params:xml:ns:xmpp-streams system-shutdown' STREAM_BAD_FORMAT = 'urn:ietf:params:xml:ns:xmpp-streams bad-format' ERR_SUBSCRIPTION_REQUIRED = 'urn:ietf:params:xml:ns:xmpp-stanzas subscription-required' STREAM_INTERNAL_SERVER_ERROR = 'urn:ietf:params:xml:ns:xmpp-streams internal-server-error' ERR_NOT_AUTHORIZED = 'urn:ietf:params:xml:ns:xmpp-stanzas not-authorized' SASL_ABORTED = 'urn:ietf:params:xml:ns:xmpp-sasl aborted' ERR_REGISTRATION_REQUIRED = 'urn:ietf:params:xml:ns:xmpp-stanzas registration-required' ERR_INTERNAL_SERVER_ERROR = 'urn:ietf:params:xml:ns:xmpp-stanzas internal-server-error' SASL_INCORRECT_ENCODING = 'urn:ietf:params:xml:ns:xmpp-sasl incorrect-encoding' STREAM_HOST_GONE = 'urn:ietf:params:xml:ns:xmpp-streams host-gone' STREAM_POLICY_VIOLATION = 'urn:ietf:params:xml:ns:xmpp-streams policy-violation' STREAM_INVALID_XML = 'urn:ietf:params:xml:ns:xmpp-streams invalid-xml' STREAM_CONFLICT = 'urn:ietf:params:xml:ns:xmpp-streams conflict' STREAM_RESOURCE_CONSTRAINT = 'urn:ietf:params:xml:ns:xmpp-streams resource-constraint' STREAM_UNSUPPORTED_ENCODING = 'urn:ietf:params:xml:ns:xmpp-streams unsupported-encoding' ERR_NOT_ALLOWED = 'urn:ietf:params:xml:ns:xmpp-stanzas not-allowed' ERR_ITEM_NOT_FOUND = 'urn:ietf:params:xml:ns:xmpp-stanzas item-not-found' ERR_NOT_ACCEPTABLE = 'urn:ietf:params:xml:ns:xmpp-stanzas not-acceptable' STREAM_INVALID_FROM = 'urn:ietf:params:xml:ns:xmpp-streams invalid-from' ERR_FEATURE_NOT_IMPLEMENTED = 'urn:ietf:params:xml:ns:xmpp-stanzas feature-not-implemented' ERR_BAD_REQUEST = 'urn:ietf:params:xml:ns:xmpp-stanzas bad-request' STREAM_INVALID_ID = 'urn:ietf:params:xml:ns:xmpp-streams invalid-id' STREAM_HOST_UNKNOWN = 'urn:ietf:params:xml:ns:xmpp-streams host-unknown' ERR_UNDEFINED_CONDITION = 'urn:ietf:params:xml:ns:xmpp-stanzas undefined-condition' SASL_INVALID_MECHANISM = 'urn:ietf:params:xml:ns:xmpp-sasl invalid-mechanism' STREAM_RESTRICTED_XML = 'urn:ietf:params:xml:ns:xmpp-streams restricted-xml' ERR_RESOURCE_CONSTRAINT = 'urn:ietf:params:xml:ns:xmpp-stanzas resource-constraint' ERR_REMOTE_SERVER_TIMEOUT = 'urn:ietf:params:xml:ns:xmpp-stanzas remote-server-timeout' SASL_INVALID_AUTHZID = 'urn:ietf:params:xml:ns:xmpp-sasl invalid-authzid' ERR_PAYMENT_REQUIRED = 'urn:ietf:params:xml:ns:xmpp-stanzas payment-required' STREAM_INVALID_NAMESPACE = 'urn:ietf:params:xml:ns:xmpp-streams invalid-namespace' ERR_REDIRECT = 'urn:ietf:params:xml:ns:xmpp-stanzas redirect' STREAM_UNSUPPORTED_STANZA_TYPE = 'urn:ietf:params:xml:ns:xmpp-streams unsupported-stanza-type' ERR_FORBIDDEN = 'urn:ietf:params:xml:ns:xmpp-stanzas forbidden' def isResultNode(node): """ Return true if the node is a positive reply """ return node and node.getType() == 'result' def isErrorNode(node): """ Return true if the node is a negative reply """ return node and node.getType() == 'error' class NodeProcessed(Exception): """ Exception that should be raised by handler when the handling should be stopped """ pass class StreamError(Exception): """ Base exception class for stream errors """ pass class BadFormat(StreamError): pass class BadNamespacePrefix(StreamError): pass class Conflict(StreamError): pass class ConnectionTimeout(StreamError): pass class HostGone(StreamError): pass class HostUnknown(StreamError): pass class ImproperAddressing(StreamError): pass class InternalServerError(StreamError): pass class InvalidFrom(StreamError): pass class InvalidID(StreamError): pass class InvalidNamespace(StreamError): pass class InvalidXML(StreamError): pass class NotAuthorized(StreamError): pass class PolicyViolation(StreamError): pass class RemoteConnectionFailed(StreamError): pass class ResourceConstraint(StreamError): pass class RestrictedXML(StreamError): pass class SeeOtherHost(StreamError): pass class SystemShutdown(StreamError): pass class UndefinedCondition(StreamError): pass class UnsupportedEncoding(StreamError): pass class UnsupportedStanzaType(StreamError): pass class UnsupportedVersion(StreamError): pass class XMLNotWellFormed(StreamError): pass stream_exceptions = {'bad-format': BadFormat, 'bad-namespace-prefix': BadNamespacePrefix, 'conflict': Conflict, 'connection-timeout': ConnectionTimeout, 'host-gone': HostGone, 'host-unknown': HostUnknown, 'improper-addressing': ImproperAddressing, 'internal-server-error': InternalServerError, 'invalid-from': InvalidFrom, 'invalid-id': InvalidID, 'invalid-namespace': InvalidNamespace, 'invalid-xml': InvalidXML, 'not-authorized': NotAuthorized, 'policy-violation': PolicyViolation, 'remote-connection-failed': RemoteConnectionFailed, 'resource-constraint': ResourceConstraint, 'restricted-xml': RestrictedXML, 'see-other-host': SeeOtherHost, 'system-shutdown': SystemShutdown, 'undefined-condition': UndefinedCondition, 'unsupported-encoding': UnsupportedEncoding, 'unsupported-stanza-type': UnsupportedStanzaType, 'unsupported-version': UnsupportedVersion, 'xml-not-well-formed': XMLNotWellFormed} class JID: """ JID can be built from string, modified, compared, serialised into string """ def __init__(self, jid=None, node='', domain='', resource=''): """ JID can be specified as string (jid argument) or as separate parts Examples: JID('node@domain/resource') JID(node='node',domain='domain.org') """ if not jid and not domain: raise ValueError('JID must contain at least domain name') elif type(jid) == type(self): self.node, self.domain = jid.node, jid.domain self.resource = jid.resource elif domain: self.node, self.domain, self.resource = node, domain, resource else: if jid.find('@') + 1: self.node, jid = jid.split('@', 1) else: self.node = '' if jid.find('/')+1: self.domain, self.resource = jid.split('/', 1) else: self.domain, self.resource = jid, '' def getNode(self): """ Return the node part of the JID """ return self.node def setNode(self, node): """ Set the node part of the JID to new value. Specify None to remove the node part """ self.node = node.lower() def getDomain(self): """ Return the domain part of the JID """ return self.domain def setDomain(self, domain): """ Set the domain part of the JID to new value """ self.domain = domain.lower() def getResource(self): """ Return the resource part of the JID """ return self.resource def setResource(self, resource): """ Set the resource part of the JID to new value. Specify None to remove the resource part """ self.resource = resource def getStripped(self): """ Return the bare representation of JID. I.e. string value w/o resource """ return self.__str__(0) def __eq__(self, other): """ Compare the JID to another instance or to string for equality """ try: other = JID(other) except ValueError: return 0 return self.resource == other.resource and \ self.__str__(0) == other.__str__(0) def __ne__(self, other): """ Compare the JID to another instance or to string for non-equality """ return not self.__eq__(other) def bareMatch(self, other): """ Compare the node and domain parts of the JID's for equality """ return self.__str__(0) == JID(other).__str__(0) def __str__(self, wresource=1): """ Serialise JID into string """ if self.node: jid = self.node + '@' + self.domain else: jid = self.domain if wresource and self.resource: return jid + '/' + self.resource return jid def __hash__(self): """ Produce hash of the JID, Allows to use JID objects as keys of the dictionary """ return hash(str(self)) class BOSHBody(Node): """ tag that wraps usual XMPP stanzas in XMPP over BOSH """ def __init__(self, attrs={}, payload=[], node=None): Node.__init__(self, tag='body', attrs=attrs, payload=payload, node=node) self.setNamespace(NS_HTTP_BIND) class Protocol(Node): """ A "stanza" object class. Contains methods that are common for presences, iqs and messages """ def __init__(self, name=None, to=None, typ=None, frm=None, attrs={}, payload=[], timestamp=None, xmlns=None, node=None): """ Constructor, name is the name of the stanza i.e. 'message' or 'presence'or 'iq' to is the value of 'to' attribure, 'typ' - 'type' attribute frn - from attribure, attrs - other attributes mapping, payload - same meaning as for simplexml payload definition timestamp - the time value that needs to be stamped over stanza xmlns - namespace of top stanza node node - parsed or unparsed stana to be taken as prototype. """ if not attrs: attrs = {} if to: attrs['to'] = to if frm: attrs['from'] = frm if typ: attrs['type'] = typ Node.__init__(self, tag=name, attrs=attrs, payload=payload, node=node) if not node and xmlns: self.setNamespace(xmlns) if self['to']: self.setTo(self['to']) if self['from']: self.setFrom(self['from']) if node and type(self) == type(node) and \ self.__class__ == node.__class__ and 'id' in self.attrs: del self.attrs['id'] self.timestamp = None for d in self.getTags('delay', namespace=NS_DELAY2): try: if d.getAttr('stamp') < self.getTimestamp2(): self.setTimestamp(d.getAttr('stamp')) except Exception: pass if not self.timestamp: for x in self.getTags('x', namespace=NS_DELAY): try: if x.getAttr('stamp') < self.getTimestamp(): self.setTimestamp(x.getAttr('stamp')) except Exception: pass if timestamp is not None: self.setTimestamp(timestamp) # To auto-timestamp stanza just pass timestamp='' def getTo(self): """ Return value of the 'to' attribute """ try: return self['to'] except: return None def getFrom(self): """ Return value of the 'from' attribute """ try: return self['from'] except: return None def getTimestamp(self): """ Return the timestamp in the 'yyyymmddThhmmss' format """ if self.timestamp: return self.timestamp return time.strftime('%Y%m%dT%H:%M:%S', time.gmtime()) def getTimestamp2(self): """ Return the timestamp in the 'yyyymmddThhmmss' format """ if self.timestamp: return self.timestamp return time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime()) def getID(self): """ Return the value of the 'id' attribute """ return self.getAttr('id') def setTo(self, val): """ Set the value of the 'to' attribute """ self.setAttr('to', JID(val)) def getType(self): """ Return the value of the 'type' attribute """ return self.getAttr('type') def setFrom(self, val): """ Set the value of the 'from' attribute """ self.setAttr('from', JID(val)) def setType(self, val): """ Set the value of the 'type' attribute """ self.setAttr('type', val) def setID(self, val): """ Set the value of the 'id' attribute """ self.setAttr('id', val) def getError(self): """ Return the error-condition (if present) or the textual description of the error (otherwise) """ errtag = self.getTag('error') if errtag: for tag in errtag.getChildren(): if tag.getName() != 'text': return tag.getName() return errtag.getData() def getErrorMsg(self): """ Return the textual description of the error (if present) or the error condition """ errtag = self.getTag('error') if errtag: for tag in errtag.getChildren(): if tag.getName() == 'text': return tag.getData() return self.getError() def getErrorCode(self): """ Return the error code. Obsolete. """ return self.getTagAttr('error', 'code') def getStatusConditions(self): """ Return the status conditions list as defined in XEP-0306. """ conds = [] condtag = self.getTag('conditions', namespace=NS_CONDITIONS) if condtag: for tag in condtag.getChildren(): conds.append(tag.getName()) return conds def setError(self, error, code=None): """ Set the error code. Obsolete. Use error-conditions instead """ if code: if str(code) in _errorcodes.keys(): error = ErrorNode(_errorcodes[str(code)], text=error) else: error = ErrorNode(ERR_UNDEFINED_CONDITION, code=code, typ='cancel', text=error) elif type(error) == str: error=ErrorNode(error) self.setType('error') self.addChild(node=error) def setTimestamp(self, val=None): """ Set the timestamp. timestamp should be the yyyymmddThhmmss string """ if not val: val = time.strftime('%Y%m%dT%H:%M:%S', time.gmtime()) self.timestamp=val self.setTag('x', {'stamp': self.timestamp}, namespace=NS_DELAY) def getProperties(self): """ Return the list of namespaces to which belongs the direct childs of element """ props = [] for child in self.getChildren(): prop = child.getNamespace() if prop not in props: props.append(prop) return props def __setitem__(self, item, val): """ Set the item 'item' to the value 'val' """ if item in ['to', 'from']: val = JID(val) return self.setAttr(item, val) class Message(Protocol): """ XMPP Message stanza - "push" mechanism """ def __init__(self, to=None, body=None, xhtml=None, typ=None, subject=None, attrs={}, frm=None, payload=[], timestamp=None, xmlns=NS_CLIENT, node=None): """ You can specify recipient, text of message, type of message any additional attributes, sender of the message, any additional payload (f.e. jabber:x:delay element) and namespace in one go. Alternatively you can pass in the other XML object as the 'node' parameted to replicate it as message """ Protocol.__init__(self, 'message', to=to, typ=typ, attrs=attrs, frm=frm, payload=payload, timestamp=timestamp, xmlns=xmlns, node=node) if body: self.setBody(body) if xhtml: self.setXHTML(xhtml) if subject is not None: self.setSubject(subject) def getBody(self): """ Return text of the message """ return self.getTagData('body') def getXHTML(self, xmllang=None): """ Return serialized xhtml-im element text of the message TODO: Returning a DOM could make rendering faster. """ xhtml = self.getTag('html') if xhtml: if xmllang: body = xhtml.getTag('body', attrs={'xml:lang': xmllang}) else: body = xhtml.getTag('body') return str(body) return None def getSubject(self): """ Return subject of the message """ return self.getTagData('subject') def getThread(self): """ Return thread of the message """ return self.getTagData('thread') def setBody(self, val): """ Set the text of the message""" self.setTagData('body', val) def setXHTML(self, val, xmllang=None): """ Sets the xhtml text of the message (XEP-0071). The parameter is the "inner html" to the body. """ try: if xmllang: dom = NodeBuilder('%s' \ % (NS_XHTML, xmllang, val)).getDom() else: dom = NodeBuilder('%s' % (NS_XHTML, val), 0).getDom() if self.getTag('html'): self.getTag('html').addChild(node=dom) else: self.setTag('html', namespace=NS_XHTML_IM).addChild(node=dom) except Exception as e: print("Error" + str(e)) # FIXME: log. we could not set xhtml (parse error, whatever) def setSubject(self, val): """ Set the subject of the message """ self.setTagData('subject', val) def setThread(self, val): """ Set the thread of the message """ self.setTagData('thread', val) def buildReply(self, text=None): """ Builds and returns another message object with specified text. The to, from, thread and type properties of new message are pre-set as reply to this message """ m = Message(to=self.getFrom(), frm=self.getTo(), body=text, typ=self.getType()) th = self.getThread() if th: m.setThread(th) return m def getStatusCode(self): """ Return the status code of the message (for groupchat config change) """ attrs = [] for xtag in self.getTags('x'): for child in xtag.getTags('status'): attrs.append(child.getAttr('code')) return attrs class Presence(Protocol): def __init__(self, to=None, typ=None, priority=None, show=None, status=None, attrs={}, frm=None, timestamp=None, payload=[], xmlns=NS_CLIENT, node=None): """ You can specify recipient, type of message, priority, show and status values any additional attributes, sender of the presence, timestamp, any additional payload (f.e. jabber:x:delay element) and namespace in one go. Alternatively you can pass in the other XML object as the 'node' parameted to replicate it as presence """ Protocol.__init__(self, 'presence', to=to, typ=typ, attrs=attrs, frm=frm, payload=payload, timestamp=timestamp, xmlns=xmlns, node=node) if priority: self.setPriority(priority) if show: self.setShow(show) if status: self.setStatus(status) def getPriority(self): """ Return the priority of the message """ return self.getTagData('priority') def getShow(self): """ Return the show value of the message """ return self.getTagData('show') def getStatus(self): """ Return the status string of the message """ return self.getTagData('status') def setPriority(self, val): """ Set the priority of the message """ self.setTagData('priority', val) def setShow(self, val): """ Set the show value of the message """ self.setTagData('show', val) def setStatus(self, val): """ Set the status string of the message """ self.setTagData('status', val) def _muc_getItemAttr(self, tag, attr): for xtag in self.getTags('x'): if xtag.getNamespace() not in (NS_MUC_USER, NS_MUC_ADMIN): continue for child in xtag.getTags(tag): return child.getAttr(attr) def _muc_getSubTagDataAttr(self, tag, attr): for xtag in self.getTags('x'): if xtag.getNamespace() not in (NS_MUC_USER, NS_MUC_ADMIN): continue for child in xtag.getTags('item'): for cchild in child.getTags(tag): return cchild.getData(), cchild.getAttr(attr) return None, None def getRole(self): """ Return the presence role (for groupchat) """ return self._muc_getItemAttr('item', 'role') def getAffiliation(self): """ Return the presence affiliation (for groupchat) """ return self._muc_getItemAttr('item', 'affiliation') def getNewNick(self): """ Return the status code of the presence (for groupchat) """ return self._muc_getItemAttr('item', 'nick') def getJid(self): """ Return the presence jid (for groupchat) """ return self._muc_getItemAttr('item', 'jid') def getReason(self): """ Returns the reason of the presence (for groupchat) """ return self._muc_getSubTagDataAttr('reason', '')[0] def getActor(self): """ Return the reason of the presence (for groupchat) """ return self._muc_getSubTagDataAttr('actor', 'jid')[1] def getStatusCode(self): """ Return the status code of the presence (for groupchat) """ attrs = [] for xtag in self.getTags('x'): for child in xtag.getTags('status'): attrs.append(child.getAttr('code')) return attrs class Iq(Protocol): """ XMPP Iq object - get/set dialog mechanism """ def __init__(self, typ=None, queryNS=None, attrs={}, to=None, frm=None, payload=[], xmlns=NS_CLIENT, node=None): """ You can specify type, query namespace any additional attributes, recipient of the iq, sender of the iq, any additional payload (f.e. jabber:x:data node) and namespace in one go. Alternatively you can pass in the other XML object as the 'node' parameted to replicate it as an iq """ Protocol.__init__(self, 'iq', to=to, typ=typ, attrs=attrs, frm=frm, xmlns=xmlns, node=node) if payload: self.setQueryPayload(payload) if queryNS: self.setQueryNS(queryNS) def getQuery(self): """ Return the IQ's child element if it exists, None otherwise. """ children = self.getChildren() if children and self.getType() != 'error' and \ children[0].getName() != 'error': return children[0] def getQueryNS(self): """ Return the namespace of the 'query' child element """ tag = self.getQuery() if tag: return tag.getNamespace() def getQuerynode(self): """ Return the 'node' attribute value of the 'query' child element """ tag = self.getQuery() if tag: return tag.getAttr('node') def getQueryPayload(self): """ Return the 'query' child element payload """ tag = self.getQuery() if tag: return tag.getPayload() def getQueryChildren(self): """ Return the 'query' child element child nodes """ tag = self.getQuery() if tag: return tag.getChildren() def setQuery(self, name=None): """ Change the name of the query node, creating it if needed. Keep the existing name if none is given (use 'query' if it's a creation). Return the query node. """ query = self.getQuery() if query is None: query = self.addChild('query') if name is not None: query.setName(name) return query def setQueryNS(self, namespace): """ Set the namespace of the 'query' child element """ self.setQuery().setNamespace(namespace) def setQueryPayload(self, payload): """ Set the 'query' child element payload """ self.setQuery().setPayload(payload) def setQuerynode(self, node): """ Set the 'node' attribute value of the 'query' child element """ self.setQuery().setAttr('node', node) def buildReply(self, typ): """ Build and return another Iq object of specified type. The to, from and query child node of new Iq are pre-set as reply to this Iq. """ iq = Iq(typ, to=self.getFrom(), frm=self.getTo(), attrs={'id': self.getID()}) iq.setQuery(self.getQuery().getName()).setNamespace(self.getQueryNS()) return iq class Hashes(Node): """ Hash elements for various XEPs as defined in XEP-300 """ """ RECOMENDED HASH USE: Algorithm Support MD2 MUST NOT MD4 MUST NOT MD5 MAY SHA-1 MUST SHA-256 MUST SHA-512 SHOULD """ supported = ('md5', 'sha-1', 'sha-256', 'sha-512') def __init__(self, nsp=NS_HASHES): Node.__init__(self, None, {}, [], None, None, False, None) self.setNamespace(nsp) self.setName('hash') def calculateHash(self, algo, file_string): """ Calculate the hash and add it. It is preferable doing it here instead of doing it all over the place in Gajim. """ hl = None hash_ = None # file_string can be a string or a file if type(file_string) == str: # if it is a string if algo == 'sha-1': hl = hashlib.sha1() elif algo == 'md5': hl = hashlib.md5() elif algo == 'sha-256': hl = hashlib.sha256() elif algo == 'sha-512': hl = hashlib.sha512() if hl: hl.update(file_string) hash_ = hl.hexdigest() else: # if it is a file if algo == 'sha-1': hl = hashlib.sha1() elif algo == 'md5': hl = hashlib.md5() elif algo == 'sha-256': hl = hashlib.sha256() elif algo == 'sha-512': hl = hashlib.sha512() if hl: for line in file_string: hl.update(line) hash_ = hl.hexdigest() return hash_ def addHash(self, hash_, algo): self.setAttr('algo', algo) self.setData(hash_) class Acks(Node): """ Acknowledgement elements for Stream Management """ def __init__(self, nsp=NS_STREAM_MGMT): Node.__init__(self, None, {}, [], None, None, False, None) self.setNamespace(nsp) def buildAnswer(self, handled): """ handled is the number of stanzas handled """ self.setName('a') self.setAttr('h', handled) def buildRequest(self): self.setName('r') def buildEnable(self, resume=False): self.setName('enable') if resume: self.setAttr('resume', 'true') def buildResume(self, handled, previd): self.setName('resume') self.setAttr('h', handled) self.setAttr('previd', previd) class ErrorNode(Node): """ XMPP-style error element In the case of stanza error should be attached to XMPP stanza. In the case of stream-level errors should be used separately. """ def __init__(self, name, code=None, typ=None, text=None): """ Mandatory parameter: name - name of error condition. Optional parameters: code, typ, text. Used for backwards compartibility with older jabber protocol. """ if name in ERRORS: cod, type_, txt = ERRORS[name] ns = name.split()[0] else: cod, ns, type_, txt = '500', NS_STANZAS, 'cancel', '' if typ: type_ = typ if code: cod = code if text: txt = text Node.__init__(self, 'error', {}, [Node(name)]) if type_: self.setAttr('type', type_) if not cod: self.setName('stream:error') if txt: self.addChild(node=Node(ns + ' text', {}, [txt])) if cod: self.setAttr('code', cod) class Error(Protocol): """ Used to quickly transform received stanza into error reply """ def __init__(self, node, error, reply=1): """ Create error reply basing on the received 'node' stanza and the 'error' error condition If the 'node' is not the received stanza but locally created ('to' and 'from' fields needs not swapping) specify the 'reply' argument as false. """ if reply: Protocol.__init__(self, to=node.getFrom(), frm=node.getTo(), node=node) else: Protocol.__init__(self, node=node) self.setError(error) if node.getType() == 'error': self.__str__ = self.__dupstr__ def __dupstr__(self, dup1=None, dup2=None): """ Dummy function used as preventor of creating error node in reply to error node. I.e. you will not be able to serialise "double" error into string. """ return '' class DataField(Node): """ This class is used in the DataForm class to describe the single data item If you are working with jabber:x:data (XEP-0004, XEP-0068, XEP-0122) then you will need to work with instances of this class. """ def __init__(self, name=None, value=None, typ=None, required=0, desc=None, options=[], node=None): """ Create new data field of specified name,value and type Also 'required','desc' and 'options' fields can be set. Alternatively other XML object can be passed in as the 'node' parameted to replicate it as a new datafiled. """ Node.__init__(self, 'field', node=node) if name: self.setVar(name) if isinstance(value, (list, tuple)): self.setValues(value) elif value: self.setValue(value) if typ: self.setType(typ) elif not typ and not node: self.setType('text-single') if required: self.setRequired(required) if desc: self.setDesc(desc) if options: self.setOptions(options) def setRequired(self, req=1): """ Change the state of the 'required' flag """ if req: self.setTag('required') else: try: self.delChild('required') except ValueError: return def isRequired(self): """ Return in this field a required one """ return self.getTag('required') def setDesc(self, desc): """ Set the description of this field """ self.setTagData('desc', desc) def getDesc(self): """ Return the description of this field """ return self.getTagData('desc') def setValue(self, val): """ Set the value of this field """ self.setTagData('value', val) def getValue(self): return self.getTagData('value') def setValues(self, lst): """ Set the values of this field as values-list. Replaces all previous filed values! If you need to just add a value - use addValue method """ while self.getTag('value'): self.delChild('value') for val in lst: self.addValue(val) def addValue(self, val): """ Add one more value to this field. Used in 'get' iq's or such """ self.addChild('value', {}, [val]) def getValues(self): """ Return the list of values associated with this field """ ret = [] for tag in self.getTags('value'): ret.append(tag.getData()) return ret def getOptions(self): """ Return label-option pairs list associated with this field """ ret = [] for tag in self.getTags('option'): ret.append([tag.getAttr('label'), tag.getTagData('value')]) return ret def setOptions(self, lst): """ Set label-option pairs list associated with this field """ while self.getTag('option'): self.delChild('option') for opt in lst: self.addOption(opt) def addOption(self, opt): """ Add one more label-option pair to this field """ if isinstance(opt, list): self.addChild('option', {'label': opt[0]}).setTagData('value', opt[1]) else: self.addChild('option').setTagData('value', opt) def getType(self): """ Get type of this field """ return self.getAttr('type') def setType(self, val): """ Set type of this field """ return self.setAttr('type', val) def getVar(self): """ Get 'var' attribute value of this field """ return self.getAttr('var') def setVar(self, val): """ Set 'var' attribute value of this field """ return self.setAttr('var', val) class DataForm(Node): """ Used for manipulating dataforms in XMPP Relevant XEPs: 0004, 0068, 0122. Can be used in disco, pub-sub and many other applications. """ def __init__(self, typ=None, data=[], title=None, node=None): """ Create new dataform of type 'typ'. 'data' is the list of DataField instances that this dataform contains, 'title' - the title string. You can specify the 'node' argument as the other node to be used as base for constructing this dataform title and instructions is optional and SHOULD NOT contain newlines. Several instructions MAY be present. 'typ' can be one of ('form' | 'submit' | 'cancel' | 'result' ) 'typ' of reply iq can be ( 'result' | 'set' | 'set' | 'result' ) respectively. 'cancel' form can not contain any fields. All other forms contains AT LEAST one field. 'title' MAY be included in forms of type "form" and "result" """ Node.__init__(self, 'x', node=node) if node: newkids = [] for n in self.getChildren(): if n.getName() == 'field': newkids.append(DataField(node=n)) else: newkids.append(n) self.kids = newkids if typ: self.setType(typ) self.setNamespace(NS_DATA) if title: self.setTitle(title) if isinstance(data, dict): newdata = [] for name in data.keys(): newdata.append(DataField(name, data[name])) data = newdata for child in data: if child.__class__.__name__ == 'DataField': self.kids.append(child) elif isinstance(child, Node): self.kids.append(DataField(node=child)) else: # Must be a string self.addInstructions(child) def getType(self): """ Return the type of dataform """ return self.getAttr('type') def setType(self, typ): """ Set the type of dataform """ self.setAttr('type', typ) def getTitle(self): """ Return the title of dataform """ return self.getTagData('title') def setTitle(self, text): """ Set the title of dataform """ self.setTagData('title', text) def getInstructions(self): """ Return the instructions of dataform """ return self.getTagData('instructions') def setInstructions(self, text): """ Set the instructions of dataform """ self.setTagData('instructions', text) def addInstructions(self, text): """ Add one more instruction to the dataform """ self.addChild('instructions', {}, [text]) def getField(self, name): """ Return the datafield object with name 'name' (if exists) """ return self.getTag('field', attrs={'var': name}) def setField(self, name): """ Create if nessessary or get the existing datafield object with name 'name' and return it """ f = self.getField(name) if f: return f return self.addChild(node=DataField(name)) def asDict(self): """ Represent dataform as simple dictionary mapping of datafield names to their values """ ret = {} for field in self.getTags('field'): name = field.getAttr('var') typ = field.getType() if typ and typ.endswith('-multi'): val = [] for i in field.getTags('value'): val.append(i.getData()) else: val = field.getTagData('value') ret[name] = val if self.getTag('instructions'): ret['instructions'] = self.getInstructions() return ret def __getitem__(self, name): """ Simple dictionary interface for getting datafields values by their names """ item = self.getField(name) if item: return item.getValue() raise IndexError('No such field') def __setitem__(self, name, val): """ Simple dictionary interface for setting datafields values by their names """ return self.setField(name).setValue(val) nbxmpp-0.5.3/nbxmpp/c14n.py0000644000175000017500000000374212321264004016626 0ustar asterixasterix00000000000000# -*- coding:utf-8 -*- ## c14n.py ## ## Copyright (C) 2007-2008 Brendan Taylor ## ## This file is part of Gajim. ## ## Gajim is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published ## by the Free Software Foundation; version 3 only. ## ## Gajim 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 General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with Gajim. If not, see . ## """ XML canonicalisation methods (for XEP-0116) """ from .simplexml import ustr def c14n(node, is_buggy): s = "<" + node.name if node.namespace: if not node.parent or node.parent.namespace != node.namespace: s = s + ' xmlns="%s"' % node.namespace sorted_attrs = sorted(node.attrs.keys()) for key in sorted_attrs: if not is_buggy and key == 'xmlns': continue val = ustr(node.attrs[key]) # like XMLescape() but with whitespace and without > s = s + ' %s="%s"' % ( key, normalise_attr(val) ) s = s + ">" cnt = 0 if node.kids: for a in node.kids: if (len(node.data)-1) >= cnt: s = s + normalise_text(node.data[cnt]) s = s + c14n(a, is_buggy) cnt=cnt+1 if (len(node.data)-1) >= cnt: s = s + normalise_text(node.data[cnt]) if not node.kids and s.endswith('>'): s=s[:-1]+' />' else: s = s + "" return s def normalise_attr(val): return val.replace('&', '&').replace('<', '<').replace('"', '"').replace('\t', ' ').replace('\n', ' ').replace('\r', ' ') def normalise_text(val): return val.replace('&', '&').replace('<', '<').replace('>', '>').replace('\r', ' ') nbxmpp-0.5.3/nbxmpp/auth_nb.py0000644000175000017500000007445612537271420017524 0ustar asterixasterix00000000000000## auth_nb.py ## based on auth.py, changes backported up to revision 1.41 ## ## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov ## modified by Dimitur Kirov ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, 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 General Public License for more details. """ Provides plugs for SASL and NON-SASL authentication mechanisms. Can be used both for client and transport authentication See client_nb.py """ from __future__ import unicode_literals from .protocol import NS_SASL, NS_SESSION, NS_STREAMS, NS_BIND, NS_AUTH from .protocol import NS_STREAM_MGMT from .protocol import Node, NodeProcessed, isResultNode, Iq, Protocol, JID from .plugin import PlugIn import sys import re import base64 from . import dispatcher_nb import hmac import hashlib import logging log = logging.getLogger('nbxmpp.auth_nb') from . import rndg def HH(some): return hashlib.md5(some).hexdigest() def H(some): return hashlib.md5(some).digest() def C(some): return b':'.join(some) try: kerberos = __import__('kerberos') have_kerberos = True except ImportError: have_kerberos = False GSS_STATE_STEP = 0 GSS_STATE_WRAP = 1 SASL_FAILURE_IN_PROGRESS = 'failure-in-process' SASL_FAILURE = 'failure' SASL_SUCCESS = 'success' SASL_UNSUPPORTED = 'not-supported' SASL_IN_PROCESS = 'in-process' # compile the search regex for _challenge_splitter _challenge_regex = re.compile(""" (\w+) # keyword = ("[^"]+"|[^,]+) # value ,? # optional comma separator """, re.VERBOSE) def _challenge_splitter(data): """ Helper function that creates a dict from challenge string. Used for DIGEST-MD5 authentication. Sample challenge string: - username="example.org",realm="somerealm", nonce="OA6MG9tEQGm2hh",cnonce="OA6MHXh6VqTrRk", nc=00000001,qop="auth,auth-int,auth-conf",charset=utf-8 Expected result for challan: - dict['qop'] = ('auth','auth-int','auth-conf') - dict['realm'] = 'somerealm' """ dict_ = {} for match in _challenge_regex.finditer(data): k = match.group(1) v = match.group(2) if v.startswith('"'): v = v[1:-1] # Remove quote if v.find(',') >= 0: v = v.split(',') # Split using comma dict_[k] = v return dict_ def _scram_parse(chatter): """Helper function. Used for SCRAM-SHA-1, SCRAM-SHA-1-PLUS authentication""" return dict(s.split('=', 1) for s in chatter.split(',')) SASL_AUTHENTICATION_MECHANISMS = \ set(['ANONYMOUS', 'EXTERNAL', 'GSSAPI', 'SCRAM-SHA-1-PLUS', 'SCRAM-SHA-1', 'DIGEST-MD5', 'PLAIN', 'X-MESSENGER-OAUTH2']) class SASL(PlugIn): """ Implements SASL authentication. Can be plugged into NonBlockingClient to start authentication """ def __init__(self, username, password, on_sasl, channel_binding, auth_mechs): """ :param username: XMPP username :param password: XMPP password :param on_sasl: Callback, will be called after each SASL auth-step. :param channel_binding: TLS channel binding data, None if the binding data is not available :param auth_mechs: Set of valid authentication mechanisms. Possible entries are: 'ANONYMOUS', 'EXTERNAL', 'GSSAPI', 'SCRAM-SHA-1-PLUS', 'SCRAM-SHA-1', 'DIGEST-MD5', 'PLAIN', 'X-MESSENGER-OAUTH2' """ PlugIn.__init__(self) self.username = username self.password = password self.on_sasl = on_sasl self.channel_binding = channel_binding self.enabled_auth_mechs = auth_mechs self.realm = None def plugin(self, owner): if 'version' not in self._owner.Dispatcher.Stream._document_attrs: self.startsasl = SASL_UNSUPPORTED elif self._owner.Dispatcher.Stream.features: try: self.FeaturesHandler(self._owner.Dispatcher, self._owner.Dispatcher.Stream.features) except NodeProcessed: pass else: self.startsasl = None def plugout(self): """ Remove SASL handlers from owner's dispatcher. Used internally """ if 'features' in self._owner.__dict__: self._owner.UnregisterHandler('features', self.FeaturesHandler, xmlns=NS_STREAMS) if 'challenge' in self._owner.__dict__: self._owner.UnregisterHandler('challenge', self.SASLHandler, xmlns=NS_SASL) if 'failure' in self._owner.__dict__: self._owner.UnregisterHandler('failure', self.SASLHandler, xmlns=NS_SASL) if 'success' in self._owner.__dict__: self._owner.UnregisterHandler('success', self.SASLHandler, xmlns=NS_SASL) def auth(self): """ Start authentication. Result can be obtained via "SASL.startsasl" attribute and will be either SASL_SUCCESS or SASL_FAILURE Note that successful auth will take at least two Dispatcher.Process() calls. """ if self.startsasl: pass elif self._owner.Dispatcher.Stream.features: try: self.FeaturesHandler(self._owner.Dispatcher, self._owner.Dispatcher.Stream.features) except NodeProcessed: pass else: self._owner.RegisterHandler('features', self.FeaturesHandler, xmlns=NS_STREAMS) def FeaturesHandler(self, conn, feats): """ Used to determine if server supports SASL auth. Used internally """ if not feats.getTag('mechanisms', namespace=NS_SASL): self.startsasl='not-supported' log.info('SASL not supported by server') return self.mecs = set( mec.getData() for mec in feats.getTag('mechanisms', namespace=NS_SASL).getTags('mechanism') ) & self.enabled_auth_mechs # Password based authentication mechanism ordered by strength. # If the server supports a mechanism disable all weaker mechanisms. password_auth_mechs_strength = ['SCRAM-SHA-1-PLUS', 'SCRAM-SHA-1', 'DIGEST-MD5', 'PLAIN', 'X-MESSENGER-OAUTH2'] if self.channel_binding == None: password_auth_mechs_strength.remove('SCRAM-SHA-1-PLUS') for i in range(0, len(password_auth_mechs_strength)): if password_auth_mechs_strength[i] in self.mecs: for m in password_auth_mechs_strength[i + 1:]: self.mecs.discard(m) break self._owner.RegisterHandler('challenge', self.SASLHandler, xmlns=NS_SASL) self._owner.RegisterHandler('failure', self.SASLHandler, xmlns=NS_SASL) self._owner.RegisterHandler('success', self.SASLHandler, xmlns=NS_SASL) self.MechanismHandler() def MechanismHandler(self): if 'ANONYMOUS' in self.mecs and self.username is None: self.mecs.remove('ANONYMOUS') node = Node('auth', attrs={'xmlns': NS_SASL, 'mechanism': 'ANONYMOUS'}) self.mechanism = 'ANONYMOUS' self.startsasl = SASL_IN_PROCESS self._owner.send(str(node)) raise NodeProcessed if "EXTERNAL" in self.mecs: self.mecs.remove('EXTERNAL') sasl_data = '%s@%s' % (self.username, self._owner.Server) sasl_data = base64.b64encode(sasl_data.encode('utf-8')).decode( 'utf-8').replace('\n', '') node = Node('auth', attrs={'xmlns': NS_SASL, 'mechanism': 'EXTERNAL'}, payload=[sasl_data]) self.mechanism = 'EXTERNAL' self.startsasl = SASL_IN_PROCESS self._owner.send(str(node)) raise NodeProcessed if 'GSSAPI' in self.mecs and have_kerberos: self.mecs.remove('GSSAPI') try: self.gss_vc = kerberos.authGSSClientInit('xmpp@' + \ self._owner.xmpp_hostname)[1] kerberos.authGSSClientStep(self.gss_vc, '') response = kerberos.authGSSClientResponse(self.gss_vc) node=Node('auth', attrs={'xmlns': NS_SASL, 'mechanism': 'GSSAPI'}, payload=(response or '')) self.mechanism = 'GSSAPI' self.gss_step = GSS_STATE_STEP self.startsasl = SASL_IN_PROCESS self._owner.send(str(node)) raise NodeProcessed except kerberos.GSSError as e: log.info('GSSAPI authentication failed: %s' % str(e)) if 'SCRAM-SHA-1-PLUS' in self.mecs and self.channel_binding != None: self.mecs.remove('SCRAM-SHA-1-PLUS') self.mechanism = 'SCRAM-SHA-1-PLUS' self._owner._caller.get_password(self.set_password, self.mechanism) self.scram_step = 0 self.startsasl = SASL_IN_PROCESS raise NodeProcessed if 'SCRAM-SHA-1' in self.mecs: self.mecs.remove('SCRAM-SHA-1') self.mechanism = 'SCRAM-SHA-1' self._owner._caller.get_password(self.set_password, self.mechanism) self.scram_step = 0 self.startsasl = SASL_IN_PROCESS raise NodeProcessed if 'DIGEST-MD5' in self.mecs: self.mecs.remove('DIGEST-MD5') node = Node('auth', attrs={'xmlns': NS_SASL, 'mechanism': 'DIGEST-MD5'}) self.mechanism = 'DIGEST-MD5' self.startsasl = SASL_IN_PROCESS self._owner.send(str(node)) raise NodeProcessed if 'PLAIN' in self.mecs: self.mecs.remove('PLAIN') self.mechanism = 'PLAIN' self._owner._caller.get_password(self.set_password, self.mechanism) self.startsasl = SASL_IN_PROCESS raise NodeProcessed if 'X-MESSENGER-OAUTH2' in self.mecs: self.mecs.remove('X-MESSENGER-OAUTH2') self.mechanism = 'X-MESSENGER-OAUTH2' self._owner._caller.get_password(self.set_password, self.mechanism) self.startsasl = SASL_IN_PROCESS raise NodeProcessed self.startsasl = SASL_FAILURE log.info('I can only use ANONYMOUS, EXTERNAL, GSSAPI, SCRAM-SHA-1-PLUS,' ' SCRAM-SHA-1, DIGEST-MD5, PLAIN and X-MESSENGER-OAUTH2' ' mechanisms.') if self.on_sasl: self.on_sasl() return def SASLHandler(self, conn, challenge): """ Perform next SASL auth step. Used internally """ if challenge.getNamespace() != NS_SASL: return def scram_base64(s): try: s = s.encode('utf-8') except: pass return ''.join(base64.b64encode(s).decode('utf-8').\ split('\n')) incoming_data = challenge.getData() data=base64.b64decode(incoming_data.encode('utf-8')) if self.mechanism != 'GSSAPI': data=data.decode('utf-8') ### Handle Auth result def on_auth_fail(reason): log.info('Failed SASL authentification: %s' % reason) self._owner.send(str(Node('abort', attrs={'xmlns': NS_SASL}))) if len(self.mecs) > 0: # There are other mechanisms to test, but wait for # answer from server self.startsasl = SASL_FAILURE_IN_PROGRESS raise NodeProcessed if self.on_sasl: self.on_sasl() raise NodeProcessed if challenge.getName() == 'failure': if self.startsasl == SASL_FAILURE_IN_PROGRESS: self.MechanismHandler() raise NodeProcessed self.startsasl = SASL_FAILURE try: reason = challenge.getChildren()[0] except Exception: reason = challenge on_auth_fail(reason) elif challenge.getName() == 'success': if self.mechanism in ('SCRAM-SHA-1', 'SCRAM-SHA-1-PLUS'): # check data-with-success data = _scram_parse(data) if data['v'] != scram_base64(self.scram_ServerSignature): on_auth_fail('ServerSignature is wrong') self.startsasl = SASL_SUCCESS log.info('Successfully authenticated with remote server.') handlers = self._owner.Dispatcher.dumpHandlers() # Bosh specific dispatcher replugging # save old features. They will be used in case we won't get response # on stream restart after SASL auth (happens with XMPP over BOSH # with Openfire) old_features = self._owner.Dispatcher.Stream.features self._owner.Dispatcher.PlugOut() dispatcher_nb.Dispatcher.get_instance().PlugIn(self._owner, after_SASL=True, old_features=old_features) self._owner.Dispatcher.restoreHandlers(handlers) self._owner.User = self.username if self.on_sasl: self.on_sasl() raise NodeProcessed ### Perform auth step if self.mechanism != 'GSSAPI': log.info('Got challenge:' + data) else: log.info('Got challenge') if self.mechanism == 'GSSAPI': if self.gss_step == GSS_STATE_STEP: rc = kerberos.authGSSClientStep(self.gss_vc, incoming_data) if rc != kerberos.AUTH_GSS_CONTINUE: self.gss_step = GSS_STATE_WRAP elif self.gss_step == GSS_STATE_WRAP: rc = kerberos.authGSSClientUnwrap(self.gss_vc, incoming_data) response = kerberos.authGSSClientResponse(self.gss_vc) rc = kerberos.authGSSClientWrap(self.gss_vc, response, kerberos.authGSSClientUserName(self.gss_vc)) response = kerberos.authGSSClientResponse(self.gss_vc) if not response: response = '' self._owner.send(Node('response', attrs={'xmlns': NS_SASL}, payload=response).__str__()) raise NodeProcessed if self.mechanism in ('SCRAM-SHA-1', 'SCRAM-SHA-1-PLUS'): hashfn = hashlib.sha1 def HMAC(k, s): return hmac.new(key=k, msg=s, digestmod=hashfn).digest() if sys.version_info[0] == 2: def XOR(x, y): r = (chr(ord(px) ^ ord(py)) for px, py in zip(x, y)) return bytes(b''.join(r)) else: def XOR(x, y): r = [px ^ py for px, py in zip(x, y)] return bytes(r) def Hi(s, salt, iters): ii = 1 try: s = s.encode('utf-8') except: pass ui_1 = HMAC(s, salt + b'\0\0\0\01') ui = ui_1 for i in range(iters - 1): ii += 1 ui_1 = HMAC(s, ui_1) ui = XOR(ui, ui_1) return ui def scram_H(s): return hashfn(s).digest() if self.scram_step == 0: self.scram_step = 1 self.scram_soup += ',' + data + ',' data = _scram_parse(data) # Check server nonce here. # The first part of server nonce muss be the nonce send by client. if (data['r'][:len(self.client_nonce)] != self.client_nonce): on_auth_fail('Server nonce is incorrect') raise NodeProcessed if self.mechanism == 'SCRAM-SHA-1': r = 'c=' + scram_base64(self.scram_gs2) else: # Channel binding data goes in here too. r = 'c=' + scram_base64(bytes(self.scram_gs2) + self.channel_binding) r += ',r=' + data['r'] self.scram_soup += r self.scram_soup = self.scram_soup.encode('utf-8') salt = base64.b64decode(data['s'].encode('utf-8')) iter = int(data['i']) SaltedPassword = Hi(self.password, salt, iter) # TODO: Could cache this, along with salt+iter. ClientKey = HMAC(SaltedPassword, b'Client Key') StoredKey = scram_H(ClientKey) ClientSignature = HMAC(StoredKey, self.scram_soup) ClientProof = XOR(ClientKey, ClientSignature) r += ',p=' + scram_base64(ClientProof) ServerKey = HMAC(SaltedPassword, b'Server Key') self.scram_ServerSignature = HMAC(ServerKey, self.scram_soup) sasl_data = scram_base64(r) node = Node('response', attrs={'xmlns': NS_SASL}, payload=[sasl_data]) self._owner.send(str(node)) raise NodeProcessed if self.scram_step == 1: data = _scram_parse(data) if base64.b64decode(data['v'].encode('utf-8')).decode('utf-8') \ != self.scram_ServerSignature: # TODO: Not clear what to do here - need to abort. raise Exception node = Node('response', attrs={'xmlns': NS_SASL}); self._owner.send(str(node)) raise NodeProcessed # DIGEST-MD5 # magic foo... chal = _challenge_splitter(data) if not self.realm and 'realm' in chal: self.realm = chal['realm'] if 'qop' in chal and ((chal['qop'] =='auth') or \ (isinstance(chal['qop'], list) and 'auth' in chal['qop'])): self.resp = {} self.resp['username'] = self.username if self.realm: self.resp['realm'] = self.realm else: self.resp['realm'] = self._owner.Server self.resp['nonce'] = chal['nonce'] self.resp['cnonce'] = '%x' % rndg.getrandbits(196) self.resp['nc'] = ('00000001') self.resp['qop'] = 'auth' self.resp['digest-uri'] = 'xmpp/' + self._owner.Server self.resp['charset'] = 'utf-8' # Password is now required self._owner._caller.get_password(self.set_password, self.mechanism) elif 'rspauth' in chal: # Check rspauth value if chal['rspauth'] != self.digest_rspauth: on_auth_fail('rspauth is wrong') self._owner.send(str(Node('response', attrs={'xmlns':NS_SASL}))) else: self.startsasl = SASL_FAILURE log.info('Failed SASL authentification: unknown challenge') if self.on_sasl: self.on_sasl() raise NodeProcessed @staticmethod def _convert_to_iso88591(string): try: string = string.encode('iso-8859-1') except UnicodeEncodeError: pass return string def set_password(self, password): self.password = '' if password is None else password if self.mechanism in ('SCRAM-SHA-1', 'SCRAM-SHA-1-PLUS'): self.client_nonce = '%x' % rndg.getrandbits(196) self.scram_soup = 'n=' + self.username + ',r=' + self.client_nonce if self.mechanism == 'SCRAM-SHA-1': if self.channel_binding == None: # Client doesn't support Channel Binding self.scram_gs2 = 'n,,' # No CB yet. else: # Client supports CB, but server doesn't support CB self.scram_gs2 = 'y,,' else: self.scram_gs2 = 'p=tls-unique,,' sasl_data = base64.b64encode((self.scram_gs2 + self.scram_soup).\ encode('utf-8')).decode('utf-8').replace('\n', '') node = Node('auth', attrs={'xmlns': NS_SASL, 'mechanism': self.mechanism}, payload=[sasl_data]) elif self.mechanism == 'DIGEST-MD5': hash_username = self._convert_to_iso88591(self.resp['username']) hash_realm = self._convert_to_iso88591(self.resp['realm']) hash_password = self._convert_to_iso88591(self.password) A1 = C([H(C([hash_username, hash_realm, hash_password])), self.resp['nonce'].encode('utf-8'), self.resp['cnonce'].encode( 'utf-8')]) A2 = C([b'AUTHENTICATE', self.resp['digest-uri'].encode('utf-8')]) response = HH(C([HH(A1).encode('utf-8'), self.resp['nonce'].encode( 'utf-8'), self.resp['nc'].encode('utf-8'), self.resp['cnonce'].\ encode('utf-8'), self.resp['qop'].encode('utf-8'), HH(A2).\ encode('utf-8')])) A2 = C([b'', self.resp['digest-uri'].encode('utf-8')]) self.digest_rspauth = HH(C([HH(A1).encode('utf-8'), self.resp[ 'nonce'].encode('utf-8'), self.resp['nc'].encode('utf-8'), self.resp['cnonce'].encode('utf-8'), self.resp['qop'].encode( 'utf-8'), HH(A2).encode('utf-8')])) self.resp['response'] = response sasl_data = '' for key in ('charset', 'username', 'realm', 'nonce', 'nc', 'cnonce', 'digest-uri', 'response', 'qop'): if key in ('nc', 'qop', 'response', 'charset'): sasl_data += "%s=%s," % (key, self.resp[key]) else: sasl_data += '%s="%s",' % (key, self.resp[key]) sasl_data = base64.b64encode(sasl_data[:-1].encode('utf-8')).\ decode('utf-8').replace('\r', '').replace('\n', '') node = Node('response', attrs={'xmlns': NS_SASL}, payload=[sasl_data]) elif self.mechanism == 'PLAIN': sasl_data = '\x00%s\x00%s' % (self.username, self.password) sasl_data = base64.b64encode(sasl_data.encode('utf-8')).decode( 'utf-8').replace('\n', '') node = Node('auth', attrs={'xmlns': NS_SASL, 'mechanism': 'PLAIN'}, payload=[sasl_data]) elif self.mechanism == 'X-MESSENGER-OAUTH2': node = Node('auth', attrs={'xmlns': NS_SASL, 'mechanism': 'X-MESSENGER-OAUTH2'}) node.addData(password) self._owner.send(str(node)) class NonBlockingNonSASL(PlugIn): """ Implements old Non-SASL (XEP-0078) authentication used in jabberd1.4 and transport authentication """ def __init__(self, user, password, resource, on_auth): """ Caches username, password and resource for auth """ PlugIn.__init__(self) self.user = user if password is None: self.password = '' else: self.password = password self.resource = resource self.on_auth = on_auth def plugin(self, owner): """ Determine the best auth method (digest/0k/plain) and use it for auth. Returns used method name on success. Used internally """ log.info('Querying server about possible auth methods') self.owner = owner owner.Dispatcher.SendAndWaitForResponse( Iq('get', NS_AUTH, payload=[Node('username', payload=[self.user])]), func=self._on_username) def _on_username(self, resp): if not isResultNode(resp): log.info('No result node arrived! Aborting...') return self.on_auth(None) iq=Iq(typ='set', node=resp) query = iq.getTag('query') query.setTagData('username', self.user) query.setTagData('resource', self.resource) if query.getTag('digest'): log.info("Performing digest authentication") query.setTagData('digest', hashlib.sha1(self.owner.Dispatcher.Stream._document_attrs['id'] + self.password).hexdigest()) if query.getTag('password'): query.delChild('password') self._method = 'digest' elif query.getTag('token'): token = query.getTagData('token') seq = query.getTagData('sequence') log.info("Performing zero-k authentication") def hasher(s): return hashlib.sha1(s).hexdigest() def hash_n_times(s, count): return count and hasher(hash_n_times(s, count-1)) or s hash_ = hash_n_times(hasher(hasher(self.password) + token), int(seq)) query.setTagData('hash', hash_) self._method='0k' else: log.warning("Secure methods unsupported, performing plain text \ authentication") self._method = 'plain' self._owner._caller.get_password(self._on_password, self._method) return resp = self.owner.Dispatcher.SendAndWaitForResponse(iq, func=self._on_auth) def _on_password(self, password): self.password = '' if password is None else password iq=Iq('set', NS_AUTH) query = iq.getTag('query') query.setTagData('username', self.user) query.setTagData('resource', self.resource) query.setTagData('password', self.password) resp = self.owner.Dispatcher.SendAndWaitForResponse(iq, func=self._on_auth) def _on_auth(self, resp): if isResultNode(resp): log.info('Sucessfully authenticated with remote host.') self.owner.User = self.user self.owner.Resource = self.resource self.owner._registered_name = self.owner.User + '@' + \ self.owner.Server+ '/' + self.owner.Resource return self.on_auth(self._method) log.info('Authentication failed!') return self.on_auth(None) class NonBlockingBind(PlugIn): """ Bind some JID to the current connection to allow router know of our location. Must be plugged after successful SASL auth """ def __init__(self): PlugIn.__init__(self) self.bound = None self.supports_sm = False self.resuming = False def plugin(self, owner): ''' Start resource binding, if allowed at this time. Used internally. ''' if self._owner.Dispatcher.Stream.features: try: self.FeaturesHandler(self._owner.Dispatcher, self._owner.Dispatcher.Stream.features) except NodeProcessed: pass else: self._owner.RegisterHandler('features', self.FeaturesHandler, xmlns=NS_STREAMS) def FeaturesHandler(self, conn, feats): """ Determine if server supports resource binding and set some internal attributes accordingly. It also checks if server supports stream management """ if feats.getTag('sm', namespace=NS_STREAM_MGMT): self.supports_sm = True # server supports stream management if self.resuming: self._owner._caller.sm.resume_request() if not feats.getTag('bind', namespace=NS_BIND): log.info('Server does not requested binding.') # we try to bind resource anyway #self.bound='failure' self.bound = [] return if feats.getTag('session', namespace=NS_SESSION): self.session = 1 else: self.session = -1 self.bound = [] def plugout(self): """ Remove Bind handler from owner's dispatcher. Used internally """ self._owner.UnregisterHandler('features', self.FeaturesHandler, xmlns=NS_STREAMS) def NonBlockingBind(self, resource=None, on_bound=None): """ Perform binding. Use provided resource name or random (if not provided). """ if self.resuming: # We don't bind if we resume the stream return self.on_bound = on_bound self._resource = resource if self._resource: self._resource = [Node('resource', payload=[self._resource])] else: self._resource = [] self._owner.onreceive(None) self._owner.Dispatcher.SendAndWaitForResponse( Protocol('iq', typ='set', payload=[Node('bind', attrs={'xmlns': NS_BIND}, payload=self._resource)]), func=self._on_bound) def _on_bound(self, resp): if isResultNode(resp): if resp.getTag('bind') and resp.getTag('bind').getTagData('jid'): self.bound.append(resp.getTag('bind').getTagData('jid')) log.info('Successfully bound %s.' % self.bound[-1]) jid = JID(resp.getTag('bind').getTagData('jid')) self._owner.User = jid.getNode() self._owner.Resource = jid.getResource() # Only negociate stream management after bounded sm = self._owner._caller.sm if self.supports_sm: # starts negociation sm.supports_sm = True sm.set_owner(self._owner) sm.negociate() self._owner.Dispatcher.sm = sm if hasattr(self, 'session') and self.session == -1: # Server don't want us to initialize a session log.info('No session required.') self.on_bound('ok') else: self._owner.SendAndWaitForResponse(Protocol('iq', typ='set', payload=[Node('session', attrs={'xmlns':NS_SESSION})]), func=self._on_session) return if resp: log.info('Binding failed: %s.' % resp.getTag('error')) self.on_bound(None) else: log.info('Binding failed: timeout expired.') self.on_bound(None) def _on_session(self, resp): self._owner.onreceive(None) if isResultNode(resp): log.info('Successfully opened session.') self.session = 1 self.on_bound('ok') else: log.error('Session open failed.') self.session = 0 self.on_bound(None) nbxmpp-0.5.3/nbxmpp/plugin.py0000644000175000017500000000665612321263757017404 0ustar asterixasterix00000000000000## plugin.py ## ## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, 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 General Public License for more details. # $Id: client.py,v 1.52 2006/01/02 19:40:55 normanr Exp $ """ Provides PlugIn class functionality to develop extentions for xmpppy """ import logging log = logging.getLogger('nbxmpp.plugin') class PlugIn: """ Abstract xmpppy plugin infrastructure code, providing plugging in/out and debugging functionality Inherit to develop pluggable objects. No code change on the owner class required (the object where we plug into) For every instance of PlugIn class the 'owner' is the class in what the plug was plugged. """ def __init__(self): self._exported_methods=[] def PlugIn(self, owner): """ Attach to owner and register ourself and our _exported_methods in it. If defined by a subclass, call self.plugin(owner) to execute hook code after plugging """ self._owner=owner log.info('Plugging %s __INTO__ %s' % (self, self._owner)) if self.__class__.__name__ in owner.__dict__: log.debug('Plugging ignored: another instance already plugged.') return self._old_owners_methods=[] for method in self._exported_methods: if method.__name__ in owner.__dict__: self._old_owners_methods.append(owner.__dict__[method.__name__]) owner.__dict__[method.__name__]=method if self.__class__.__name__.endswith('Dispatcher'): # FIXME: I need BOSHDispatcher or XMPPDispatcher on .Dispatcher # there must be a better way.. owner.__dict__['Dispatcher']=self else: owner.__dict__[self.__class__.__name__]=self # Execute hook if hasattr(self, 'plugin'): return self.plugin(owner) def PlugOut(self): """ Unregister our _exported_methods from owner and detach from it. If defined by a subclass, call self.plugout() after unplugging to execute hook code """ log.info('Plugging %s __OUT__ of %s.' % (self, self._owner)) for method in self._exported_methods: del self._owner.__dict__[method.__name__] for method in self._old_owners_methods: self._owner.__dict__[method.__name__]=method # FIXME: Dispatcher workaround if self.__class__.__name__.endswith('Dispatcher'): del self._owner.__dict__['Dispatcher'] else: del self._owner.__dict__[self.__class__.__name__] # Execute hook if hasattr(self, 'plugout'): return self.plugout() del self._owner @classmethod def get_instance(cls, *args, **kwargs): """ Factory Method for object creation Use this instead of directly initializing the class in order to make unit testing easier. For testing, this method can be patched to inject mock objects. """ return cls(*args, **kwargs) nbxmpp-0.5.3/ChangeLog0000644000175000017500000000176012552000401015746 0ustar asterixasterix00000000000000python-nbxmpp 0.5.3 (13 July 2015) * Fix receiving long utf8 strings under py3 * Fix issue with pyopenssl 0.15.1 * Fix decoding issues python-nbxmpp 0.5.2 (27 December 2014) * Fix BOSH HTTP requests * Fix handling of binary SASL data for mechanism GSSAPI * Update MAM namespace python-nbxmpp 0.5.1 (04 October 2014) * Fix printing network errors in a non-utf-8 console python-nbxmpp 0.5 (02 July 2014) * support both python2 and python3 * Fix storing server certificate when there is no error python-nbxmpp 0.4 (15 March 2014) * Ability to configure TLS protocol version * Add support for SCRAM-SHA-1-PLUS * Security improvements python-nbxmpp 0.3 (23 December 2013) * Improve security level * Ability to configure cipher list * Store only depth 0 SSL certificate python-nbxmpp 0.2 (26 July 2013) * Add some namespace * do TLS handshake without blocking * store all SSL errors instead of only last one python-nbxmpp 0.1 (05 August 2012) * Initial release nbxmpp-0.5.3/doc/0000755000175000017500000000000012552000654014747 5ustar asterixasterix00000000000000nbxmpp-0.5.3/doc/epydoc.conf0000644000175000017500000000113112321263757017106 0ustar asterixasterix00000000000000[epydoc] # Information about the project. name: python-nbxmpp url: http://python-nbxmpp.gajim.org verbosity: 3 imports: yes redundant-details: yes docformat: restructuredtext # The list of modules to document. Modules can be named using # dotted names, module filenames, or package directory names. # This option may be repeated. modules: nbxmpp/* # Write html output to the directory "apidocs" output: html target: doc/apidocs/ # Include all automatically generated graphs. These graphs are # generated using Graphviz dot. graph: all dotpath: /usr/bin/dot graph-font: Sans graph-font-size: 10 nbxmpp-0.5.3/doc/examples/0000755000175000017500000000000012552000654016565 5ustar asterixasterix00000000000000nbxmpp-0.5.3/doc/examples/xsend.py0000755000175000017500000000502212321263757020273 0ustar asterixasterix00000000000000#!/usr/bin/python import sys import os import nbxmpp import time import logging import gobject consoleloghandler = logging.StreamHandler() root_log = logging.getLogger('nbxmpp') #root_log.setLevel('DEBUG') root_log.addHandler(consoleloghandler) if len(sys.argv) < 2: print "Syntax: xsend JID text" sys.exit(0) to_jid = sys.argv[1] text = ' '.join(sys.argv[2:]) jidparams = {} if os.access(os.environ['HOME'] + '/.xsend', os.R_OK): for ln in open(os.environ['HOME'] + '/.xsend').readlines(): if not ln[0] in ('#', ';'): key, val = ln.strip().split('=', 1) jidparams[key.lower()] = val for mandatory in ['jid', 'password']: if mandatory not in jidparams.keys(): open(os.environ['HOME']+'/.xsend','w').write('#Uncomment fields before use and type in correct credentials.\n#JID=romeo@montague.net/resource (/resource is optional)\n#PASSWORD=juliet\n') print 'Please point ~/.xsend config file to valid JID for sending messages.' sys.exit(0) class Connection: def __init__(self): self.jid = nbxmpp.protocol.JID(jidparams['jid']) self.password = jidparams['password'] self.sm = nbxmpp.Smacks(self) # Stream Management self.client_cert = None def on_auth(self, con, auth): if not auth: print 'could not authenticate!' sys.exit() print 'authenticated using', auth self.send_message(to_jid, text) def on_connected(self, con, con_type): print 'connected with', con_type auth = self.client.auth(self.jid.getNode(), self.password, resource=self.jid.getResource(), sasl=1, on_auth=self.on_auth) def get_password(self, cb, mech): cb(self.password) def on_connection_failed(self): print 'could not connect!' def _event_dispatcher(self, realm, event, data): pass def connect(self): idle_queue = nbxmpp.idlequeue.get_idlequeue() self.client = nbxmpp.NonBlockingClient(self.jid.getDomain(), idle_queue, caller=self) self.con = self.client.connect(self.on_connected, self.on_connection_failed, secure_tuple=('tls', '', '', None)) def send_message(self, to_jid, text): id_ = self.client.send(nbxmpp.protocol.Message(to_jid, text, typ='chat')) print 'sent message with id', id_ gobject.timeout_add(1000, self.quit) def quit(self): self.disconnect() ml.quit() def disconnect(self): self.client.start_disconnect() con = Connection() con.connect() ml = gobject.MainLoop() ml.run() nbxmpp-0.5.3/doc/apidocs/0000755000175000017500000000000012552000654016371 5ustar asterixasterix00000000000000nbxmpp-0.5.3/doc/apidocs/toc-everything.html0000644000175000017500000014115612321263757022247 0ustar asterixasterix00000000000000 Everything

Everything


All Classes

nbxmpp.auth_nb.NonBlockingBind
nbxmpp.auth_nb.NonBlockingNonSASL
nbxmpp.auth_nb.SASL
nbxmpp.bosh.AckChecker
nbxmpp.bosh.KeyStack
nbxmpp.bosh.NonBlockingBOSH
nbxmpp.client_nb.NonBlockingClient
nbxmpp.dispatcher_nb.BOSHDispatcher
nbxmpp.dispatcher_nb.Dispatcher
nbxmpp.dispatcher_nb.XMPPDispatcher
nbxmpp.idlequeue.GlibIdleQueue
nbxmpp.idlequeue.IdleCommand
nbxmpp.idlequeue.IdleObject
nbxmpp.idlequeue.IdleQueue
nbxmpp.idlequeue.SelectIdleQueue
nbxmpp.plugin.PlugIn
nbxmpp.protocol.Acks
nbxmpp.protocol.BOSHBody
nbxmpp.protocol.BadFormat
nbxmpp.protocol.BadNamespacePrefix
nbxmpp.protocol.Conflict
nbxmpp.protocol.ConnectionTimeout
nbxmpp.protocol.DataField
nbxmpp.protocol.DataForm
nbxmpp.protocol.Error
nbxmpp.protocol.ErrorNode
nbxmpp.protocol.Hashes
nbxmpp.protocol.HostGone
nbxmpp.protocol.HostUnknown
nbxmpp.protocol.ImproperAddressing
nbxmpp.protocol.InternalServerError
nbxmpp.protocol.InvalidFrom
nbxmpp.protocol.InvalidID
nbxmpp.protocol.InvalidNamespace
nbxmpp.protocol.InvalidXML
nbxmpp.protocol.Iq
nbxmpp.protocol.JID
nbxmpp.protocol.Message
nbxmpp.protocol.NodeProcessed
nbxmpp.protocol.NotAuthorized
nbxmpp.protocol.PolicyViolation
nbxmpp.protocol.Presence
nbxmpp.protocol.Protocol
nbxmpp.protocol.RemoteConnectionFailed
nbxmpp.protocol.ResourceConstraint
nbxmpp.protocol.RestrictedXML
nbxmpp.protocol.SeeOtherHost
nbxmpp.protocol.StreamError
nbxmpp.protocol.SystemShutdown
nbxmpp.protocol.UndefinedCondition
nbxmpp.protocol.UnsupportedEncoding
nbxmpp.protocol.UnsupportedStanzaType
nbxmpp.protocol.UnsupportedVersion
nbxmpp.protocol.XMLNotWellFormed
nbxmpp.proxy_connectors.HTTPCONNECTConnector
nbxmpp.proxy_connectors.ProxyConnector
nbxmpp.proxy_connectors.SOCKS5Connector
nbxmpp.roster_nb.NonBlockingRoster
nbxmpp.simplexml.NT
nbxmpp.simplexml.Node
nbxmpp.simplexml.NodeBuilder
nbxmpp.simplexml.T
nbxmpp.smacks.Smacks
nbxmpp.stringprepare.EmptyMappingTable
nbxmpp.stringprepare.ILookupTable
nbxmpp.stringprepare.IMappingTable
nbxmpp.stringprepare.LookupTable
nbxmpp.stringprepare.LookupTableFromFunction
nbxmpp.stringprepare.MappingTableFromFunction
nbxmpp.stringprepare.NamePrep
nbxmpp.stringprepare.Profile
nbxmpp.tls_nb.NonBlockingTLS
nbxmpp.tls_nb.PyOpenSSLWrapper
nbxmpp.tls_nb.SSLWrapper
nbxmpp.tls_nb.SSLWrapper.Error
nbxmpp.tls_nb.StdlibSSLWrapper
nbxmpp.transports_nb.NonBlockingHTTP
nbxmpp.transports_nb.NonBlockingHTTPBOSH
nbxmpp.transports_nb.NonBlockingTCP
nbxmpp.transports_nb.NonBlockingTransport

All Functions

nbxmpp.auth_nb.C
nbxmpp.auth_nb.H
nbxmpp.auth_nb.HH
nbxmpp.auth_nb.challenge_splitter
nbxmpp.auth_nb.scram_parse
nbxmpp.bosh.get_rand_number
nbxmpp.c14n.c14n
nbxmpp.c14n.normalise_attr
nbxmpp.c14n.normalise_text
nbxmpp.features_nb.changePasswordTo
nbxmpp.features_nb.delPrivacyList
nbxmpp.features_nb.getActiveAndDefaultPrivacyLists
nbxmpp.features_nb.getPrivacyList
nbxmpp.features_nb.getPrivacyLists
nbxmpp.features_nb.getRegInfo
nbxmpp.features_nb.register
nbxmpp.features_nb.setActivePrivacyList
nbxmpp.features_nb.setDefaultPrivacyList
nbxmpp.features_nb.setPrivacyList
nbxmpp.features_nb.unregister
nbxmpp.idlequeue.get_idlequeue
nbxmpp.protocol.ascii_upper
nbxmpp.protocol.isErrorNode
nbxmpp.protocol.isResultNode
nbxmpp.simplexml.BadXML2Node
nbxmpp.simplexml.XML2Node
nbxmpp.simplexml.XMLescape
nbxmpp.simplexml.ustr
nbxmpp.tls_nb.gattr
nbxmpp.transports_nb.get_proxy_data_from_dict
nbxmpp.transports_nb.urisplit

All Variables

nbxmpp.__package__
nbxmpp.auth_nb.GSS_STATE_STEP
nbxmpp.auth_nb.GSS_STATE_WRAP
nbxmpp.auth_nb.SASL_FAILURE
nbxmpp.auth_nb.SASL_FAILURE_IN_PROGRESS
nbxmpp.auth_nb.SASL_IN_PROCESS
nbxmpp.auth_nb.SASL_SUCCESS
nbxmpp.auth_nb.SASL_UNSUPPORTED
nbxmpp.auth_nb.__package__
nbxmpp.auth_nb.have_kerberos
nbxmpp.auth_nb.kerberos
nbxmpp.auth_nb.log
nbxmpp.bosh.FAKE_DESCRIPTOR
nbxmpp.bosh.KEY_COUNT
nbxmpp.bosh.__package__
nbxmpp.bosh.bosh_errors
nbxmpp.bosh.log
nbxmpp.c14n.__package__
nbxmpp.client_nb.__package__
nbxmpp.client_nb.log
nbxmpp.dispatcher_nb.DEFAULT_TIMEOUT_SECONDS
nbxmpp.dispatcher_nb.XML_DECLARATION
nbxmpp.dispatcher_nb.__package__
nbxmpp.dispatcher_nb.log
nbxmpp.dispatcher_nb.outgoingID
nbxmpp.features_nb.PL_ACT_ALLOW
nbxmpp.features_nb.PL_ACT_DENY
nbxmpp.features_nb.PL_TYPE_GROUP
nbxmpp.features_nb.PL_TYPE_JID
nbxmpp.features_nb.PL_TYPE_SUBC
nbxmpp.features_nb.PRIVACY_LISTS_ACTIVE_DEFAULT
nbxmpp.features_nb.PRIVACY_LISTS_RECEIVED
nbxmpp.features_nb.PRIVACY_LIST_RECEIVED
nbxmpp.features_nb.REGISTER_DATA_RECEIVED
nbxmpp.features_nb.__package__
nbxmpp.idlequeue.FLAG_CLOSE
nbxmpp.idlequeue.FLAG_READ
nbxmpp.idlequeue.FLAG_READ_WRITE
nbxmpp.idlequeue.FLAG_WRITE
nbxmpp.idlequeue.HAVE_GOBJECT
nbxmpp.idlequeue.IS_CLOSED
nbxmpp.idlequeue.PENDING_READ
nbxmpp.idlequeue.PENDING_WRITE
nbxmpp.idlequeue.__package__
nbxmpp.idlequeue.log
nbxmpp.plugin.__package__
nbxmpp.plugin.log
nbxmpp.protocol.ERRORS
nbxmpp.protocol.ERR_BAD_REQUEST
nbxmpp.protocol.ERR_CONFLICT
nbxmpp.protocol.ERR_FEATURE_NOT_IMPLEMENTED
nbxmpp.protocol.ERR_FORBIDDEN
nbxmpp.protocol.ERR_GONE
nbxmpp.protocol.ERR_INTERNAL_SERVER_ERROR
nbxmpp.protocol.ERR_ITEM_NOT_FOUND
nbxmpp.protocol.ERR_JID_MALFORMED
nbxmpp.protocol.ERR_NOT_ACCEPTABLE
nbxmpp.protocol.ERR_NOT_ALLOWED
nbxmpp.protocol.ERR_NOT_AUTHORIZED
nbxmpp.protocol.ERR_PAYMENT_REQUIRED
nbxmpp.protocol.ERR_RECIPIENT_UNAVAILABLE
nbxmpp.protocol.ERR_REDIRECT
nbxmpp.protocol.ERR_REGISTRATION_REQUIRED
nbxmpp.protocol.ERR_REMOTE_SERVER_NOT_FOUND
nbxmpp.protocol.ERR_REMOTE_SERVER_TIMEOUT
nbxmpp.protocol.ERR_RESOURCE_CONSTRAINT
nbxmpp.protocol.ERR_SERVICE_UNAVAILABLE
nbxmpp.protocol.ERR_SUBSCRIPTION_REQUIRED
nbxmpp.protocol.ERR_UNDEFINED_CONDITION
nbxmpp.protocol.ERR_UNEXPECTED_REQUEST
nbxmpp.protocol.NS_ACTIVITY
nbxmpp.protocol.NS_ADDRESS
nbxmpp.protocol.NS_AGENTS
nbxmpp.protocol.NS_AMP
nbxmpp.protocol.NS_AMP_ERRORS
nbxmpp.protocol.NS_ARCHIVE
nbxmpp.protocol.NS_ARCHIVE_AUTO
nbxmpp.protocol.NS_ARCHIVE_MANAGE
nbxmpp.protocol.NS_ARCHIVE_MANUAL
nbxmpp.protocol.NS_ARCHIVE_PREF
nbxmpp.protocol.NS_ATOM
nbxmpp.protocol.NS_ATTENTION
nbxmpp.protocol.NS_AUTH
nbxmpp.protocol.NS_AVATAR
nbxmpp.protocol.NS_BIND
nbxmpp.protocol.NS_BLOCKING
nbxmpp.protocol.NS_BOB
nbxmpp.protocol.NS_BOOKMARKS
nbxmpp.protocol.NS_BROWSE
nbxmpp.protocol.NS_BROWSING
nbxmpp.protocol.NS_BYTESTREAM
nbxmpp.protocol.NS_CAPS
nbxmpp.protocol.NS_CAPTCHA
nbxmpp.protocol.NS_CARBONS
nbxmpp.protocol.NS_CHATSTATES
nbxmpp.protocol.NS_CHATTING
nbxmpp.protocol.NS_CLIENT
nbxmpp.protocol.NS_COMMANDS
nbxmpp.protocol.NS_COMPONENT_1
nbxmpp.protocol.NS_COMPONENT_ACCEPT
nbxmpp.protocol.NS_COMPRESS
nbxmpp.protocol.NS_CONDITIONS
nbxmpp.protocol.NS_CONFERENCE
nbxmpp.protocol.NS_CORRECT
nbxmpp.protocol.NS_DATA
nbxmpp.protocol.NS_DATA_LAYOUT
nbxmpp.protocol.NS_DATA_MEDIA
nbxmpp.protocol.NS_DATA_VALIDATE
nbxmpp.protocol.NS_DELAY
nbxmpp.protocol.NS_DELAY2
nbxmpp.protocol.NS_DIALBACK
nbxmpp.protocol.NS_DISCO
nbxmpp.protocol.NS_DISCO_INFO
nbxmpp.protocol.NS_DISCO_ITEMS
nbxmpp.protocol.NS_ENCRYPTED
nbxmpp.protocol.NS_ESESSION
nbxmpp.protocol.NS_ESESSION_INIT
nbxmpp.protocol.NS_EVENT
nbxmpp.protocol.NS_FEATURE
nbxmpp.protocol.NS_FILE
nbxmpp.protocol.NS_FORWARD
nbxmpp.protocol.NS_GAMING
nbxmpp.protocol.NS_GATEWAY
nbxmpp.protocol.NS_GEOLOC
nbxmpp.protocol.NS_GMAILNOTIFY
nbxmpp.protocol.NS_GROUPCHAT
nbxmpp.protocol.NS_GTALKSETTING
nbxmpp.protocol.NS_HASHES
nbxmpp.protocol.NS_HASHES_MD5
nbxmpp.protocol.NS_HASHES_SHA1
nbxmpp.protocol.NS_HASHES_SHA256
nbxmpp.protocol.NS_HASHES_SHA512
nbxmpp.protocol.NS_HTTP_AUTH
nbxmpp.protocol.NS_HTTP_BIND
nbxmpp.protocol.NS_IBB
nbxmpp.protocol.NS_INVISIBLE
nbxmpp.protocol.NS_IQ
nbxmpp.protocol.NS_JINGLE
nbxmpp.protocol.NS_JINGLE_BYTESTREAM
nbxmpp.protocol.NS_JINGLE_ERRORS
nbxmpp.protocol.NS_JINGLE_FILE_TRANSFER
nbxmpp.protocol.NS_JINGLE_IBB
nbxmpp.protocol.NS_JINGLE_ICE_UDP
nbxmpp.protocol.NS_JINGLE_RAW_UDP
nbxmpp.protocol.NS_JINGLE_RTP
nbxmpp.protocol.NS_JINGLE_RTP_AUDIO
nbxmpp.protocol.NS_JINGLE_RTP_VIDEO
nbxmpp.protocol.NS_JINGLE_XTLS
nbxmpp.protocol.NS_LAST
nbxmpp.protocol.NS_LOCATION
nbxmpp.protocol.NS_MAM
nbxmpp.protocol.NS_MESSAGE
nbxmpp.protocol.NS_MOOD
nbxmpp.protocol.NS_MUC
nbxmpp.protocol.NS_MUC_ADMIN
nbxmpp.protocol.NS_MUC_CONFIG
nbxmpp.protocol.NS_MUC_OWNER
nbxmpp.protocol.NS_MUC_UNIQUE
nbxmpp.protocol.NS_MUC_USER
nbxmpp.protocol.NS_NICK
nbxmpp.protocol.NS_OFFLINE
nbxmpp.protocol.NS_PHYSLOC
nbxmpp.protocol.NS_PING
nbxmpp.protocol.NS_PRESENCE
nbxmpp.protocol.NS_PRIVACY
nbxmpp.protocol.NS_PRIVATE
nbxmpp.protocol.NS_PROFILE
nbxmpp.protocol.NS_PUBKEY_ATTEST
nbxmpp.protocol.NS_PUBKEY_PUBKEY
nbxmpp.protocol.NS_PUBKEY_REVOKE
nbxmpp.protocol.NS_PUBSUB
nbxmpp.protocol.NS_PUBSUB_EVENT
nbxmpp.protocol.NS_PUBSUB_OWNER
nbxmpp.protocol.NS_PUBSUB_PUBLISH_OPTIONS
nbxmpp.protocol.NS_RECEIPTS
nbxmpp.protocol.NS_REGISTER
nbxmpp.protocol.NS_ROSTER
nbxmpp.protocol.NS_ROSTERNOTES
nbxmpp.protocol.NS_ROSTERX
nbxmpp.protocol.NS_ROSTER_VER
nbxmpp.protocol.NS_RPC
nbxmpp.protocol.NS_RSM
nbxmpp.protocol.NS_SASL
nbxmpp.protocol.NS_SEARCH
nbxmpp.protocol.NS_SECLABEL
nbxmpp.protocol.NS_SECLABEL_CATALOG
nbxmpp.protocol.NS_SERVER
nbxmpp.protocol.NS_SESSION
nbxmpp.protocol.NS_SI
nbxmpp.protocol.NS_SIGNED
nbxmpp.protocol.NS_SI_PUB
nbxmpp.protocol.NS_SSN
nbxmpp.protocol.NS_STANZAS
nbxmpp.protocol.NS_STANZA_CRYPTO
nbxmpp.protocol.NS_STREAM
nbxmpp.protocol.NS_STREAMS
nbxmpp.protocol.NS_STREAM_MGMT
nbxmpp.protocol.NS_TIME
nbxmpp.protocol.NS_TIME_REVISED
nbxmpp.protocol.NS_TLS
nbxmpp.protocol.NS_TUNE
nbxmpp.protocol.NS_VACATION
nbxmpp.protocol.NS_VCARD
nbxmpp.protocol.NS_VCARD_UPDATE
nbxmpp.protocol.NS_VERSION
nbxmpp.protocol.NS_VIEWING
nbxmpp.protocol.NS_WAITINGLIST
nbxmpp.protocol.NS_XHTML
nbxmpp.protocol.NS_XHTML_IM
nbxmpp.protocol.NS_XMPP_STREAMS
nbxmpp.protocol.NS_X_OOB
nbxmpp.protocol.SASL_ABORTED
nbxmpp.protocol.SASL_INCORRECT_ENCODING
nbxmpp.protocol.SASL_INVALID_AUTHZID
nbxmpp.protocol.SASL_INVALID_MECHANISM
nbxmpp.protocol.SASL_MECHANISM_TOO_WEAK
nbxmpp.protocol.SASL_NOT_AUTHORIZED
nbxmpp.protocol.SASL_TEMPORARY_AUTH_FAILURE
nbxmpp.protocol.STREAM_BAD_FORMAT
nbxmpp.protocol.STREAM_BAD_NAMESPACE_PREFIX
nbxmpp.protocol.STREAM_CONFLICT
nbxmpp.protocol.STREAM_CONNECTION_TIMEOUT
nbxmpp.protocol.STREAM_HOST_GONE
nbxmpp.protocol.STREAM_HOST_UNKNOWN
nbxmpp.protocol.STREAM_IMPROPER_ADDRESSING
nbxmpp.protocol.STREAM_INTERNAL_SERVER_ERROR
nbxmpp.protocol.STREAM_INVALID_FROM
nbxmpp.protocol.STREAM_INVALID_ID
nbxmpp.protocol.STREAM_INVALID_NAMESPACE
nbxmpp.protocol.STREAM_INVALID_XML
nbxmpp.protocol.STREAM_NOT_AUTHORIZED
nbxmpp.protocol.STREAM_POLICY_VIOLATION
nbxmpp.protocol.STREAM_REMOTE_CONNECTION_FAILED
nbxmpp.protocol.STREAM_RESOURCE_CONSTRAINT
nbxmpp.protocol.STREAM_RESTRICTED_XML
nbxmpp.protocol.STREAM_SEE_OTHER_HOST
nbxmpp.protocol.STREAM_SYSTEM_SHUTDOWN
nbxmpp.protocol.STREAM_UNDEFINED_CONDITION
nbxmpp.protocol.STREAM_UNSUPPORTED_ENCODING
nbxmpp.protocol.STREAM_UNSUPPORTED_STANZA_TYPE
nbxmpp.protocol.STREAM_UNSUPPORTED_VERSION
nbxmpp.protocol.STREAM_XML_NOT_WELL_FORMED
nbxmpp.protocol.__package__
nbxmpp.protocol.stream_exceptions
nbxmpp.proxy_connectors.__package__
nbxmpp.proxy_connectors.log
nbxmpp.roster_nb.__package__
nbxmpp.roster_nb.log
nbxmpp.simplexml.ENCODING
nbxmpp.simplexml.__package__
nbxmpp.simplexml.log
nbxmpp.smacks.__package__
nbxmpp.smacks.log
nbxmpp.stringprepare.B_1
nbxmpp.stringprepare.B_2
nbxmpp.stringprepare.C_11
nbxmpp.stringprepare.C_12
nbxmpp.stringprepare.C_21
nbxmpp.stringprepare.C_22
nbxmpp.stringprepare.C_3
nbxmpp.stringprepare.C_4
nbxmpp.stringprepare.C_5
nbxmpp.stringprepare.C_6
nbxmpp.stringprepare.C_7
nbxmpp.stringprepare.C_8
nbxmpp.stringprepare.C_9
nbxmpp.stringprepare.__package__
nbxmpp.stringprepare.nameprep
nbxmpp.stringprepare.nodeprep
nbxmpp.stringprepare.resourceprep
nbxmpp.tls_nb.PYOPENSSL
nbxmpp.tls_nb.PYSTDLIB
nbxmpp.tls_nb.USE_PYOPENSSL
nbxmpp.tls_nb.__package__
nbxmpp.tls_nb.log
nbxmpp.transports_nb.CONNECTED
nbxmpp.transports_nb.CONNECTING
nbxmpp.transports_nb.CONNECT_TIMEOUT_SECONDS
nbxmpp.transports_nb.DATA_ERROR
nbxmpp.transports_nb.DATA_RECEIVED
nbxmpp.transports_nb.DATA_SENT
nbxmpp.transports_nb.DISCONNECTED
nbxmpp.transports_nb.DISCONNECTING
nbxmpp.transports_nb.DISCONNECT_TIMEOUT_SECONDS
nbxmpp.transports_nb.PROXY_CONNECTING
nbxmpp.transports_nb.RECV_BUFSIZE
nbxmpp.transports_nb.STATES
nbxmpp.transports_nb.__package__
nbxmpp.transports_nb.log

[hide private] nbxmpp-0.5.3/doc/apidocs/nbxmpp.transports_nb.NonBlockingTCP-class.html0000644000175000017500000014263312321263757027356 0ustar asterixasterix00000000000000 nbxmpp.transports_nb.NonBlockingTCP
Package nbxmpp :: Module transports_nb :: Class NonBlockingTCP
[hide private]
[frames] | no frames]

Class NonBlockingTCP

source code


Non-blocking TCP socket wrapper

It is used for simple XMPP connection. Can be connected via proxy and can estabilish TLS connection.

Instance Methods [hide private]
 
__init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, certs, proxy_dict=None)
Each trasport class can have different constructor but it has to have at least all the arguments of NonBlockingTransport constructor
source code
 
start_disconnect(self) source code
 
connect(self, conn_5tuple, on_connect, on_connect_failure)
Creates and connects transport to server and port defined in conn_5tuple which should be item from list returned from getaddrinfo
source code
 
_connect_to_proxy(self) source code
 
_on_connect(self)
Preceed invoking of on_connect callback. TCP connection is already estabilished by this time
source code
 
tls_init(self, on_succ, on_fail)
Estabilishes TLS/SSL using this TCP connection by plugging a NonBlockingTLS module
source code
 
pollin(self)
Called by idlequeu when receive on plugged socket is possible
source code
 
pollout(self)
Called by idlequeu when send to plugged socket is possible
source code
 
pollend(self)
Called by idlequeue on TCP connection errors
source code
 
disconnect(self, do_callback=True) source code
 
read_timeout(self)
Called when there's no response from server in defined timeout
source code
 
set_timeout(self, timeout) source code
 
remove_timeout(self) source code
 
send(self, raw_data, now=False)
Append raw_data to the queue of messages to be send. If supplied data is unicode string, encode it to utf-8.
source code
 
encode_stanza(self, stanza)
Encode str or unicode to utf-8
source code
 
_plug_idle(self, writable, readable)
Plug file descriptor of socket to Idlequeue
source code
 
_do_send(self)
Called when send() to connected socket is possible. First message from sendqueue will be sent
source code
 
_do_receive(self)
Reads all pending incoming data. Will call owner's disconnected() method if appropriate
source code
 
_on_receive(self, data)
Preceeds on_receive callback. It peels off and checks HTTP headers in HTTP classes, in here it just calls the callback
source code

Inherited from NonBlockingTransport: get_fd, get_state, onreceive, plugin, plugout, read_timeout2, renew_send_timeout, renew_send_timeout2, set_send_timeout, set_send_timeout2, set_state, set_timeout2

Inherited from plugin.PlugIn: PlugIn, PlugOut

Class Methods [hide private]

Inherited from plugin.PlugIn: get_instance

Instance Variables [hide private]

Inherited from idlequeue.IdleObject: fd

Method Details [hide private]

__init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, certs, proxy_dict=None)
(Constructor)

source code 
Each trasport class can have different constructor but it has to have at least all the arguments of NonBlockingTransport constructor
Parameters:
  • proxy_dict - dictionary with proxy data as loaded from config file
Overrides: idlequeue.IdleObject.__init__

start_disconnect(self)

source code 
Overrides: NonBlockingTransport.start_disconnect

connect(self, conn_5tuple, on_connect, on_connect_failure)

source code 
Creates and connects transport to server and port defined in conn_5tuple which should be item from list returned from getaddrinfo
Parameters:
  • conn_5tuple - 5-tuple returned from getaddrinfo
  • on_connect - callback called on successful connect to the server
  • on_connect_failure - callback called on failure when connecting
Overrides: NonBlockingTransport.connect
(inherited documentation)

_connect_to_proxy(self)

source code 

_on_connect(self)

source code 
Preceed invoking of on_connect callback. TCP connection is already estabilished by this time
Overrides: NonBlockingTransport._on_connect

tls_init(self, on_succ, on_fail)

source code 
Estabilishes TLS/SSL using this TCP connection by plugging a NonBlockingTLS module

pollin(self)

source code 
Called by idlequeu when receive on plugged socket is possible
Overrides: idlequeue.IdleObject.pollin

pollout(self)

source code 
Called by idlequeu when send to plugged socket is possible
Overrides: idlequeue.IdleObject.pollout

pollend(self)

source code 
Called by idlequeue on TCP connection errors
Overrides: idlequeue.IdleObject.pollend

disconnect(self, do_callback=True)

source code 
Overrides: NonBlockingTransport.disconnect

read_timeout(self)

source code 
Called when there's no response from server in defined timeout
Overrides: idlequeue.IdleObject.read_timeout
(inherited documentation)

set_timeout(self, timeout)

source code 
Overrides: NonBlockingTransport.set_timeout

remove_timeout(self)

source code 
Overrides: NonBlockingTransport.remove_timeout

send(self, raw_data, now=False)

source code 
Append raw_data to the queue of messages to be send. If supplied data is unicode string, encode it to utf-8.
Overrides: NonBlockingTransport.send

encode_stanza(self, stanza)

source code 
Encode str or unicode to utf-8

_plug_idle(self, writable, readable)

source code 

Plug file descriptor of socket to Idlequeue

Plugged socket will be watched for "send possible" or/and "recv possible" events. pollin() callback is invoked on "recv possible", pollout() on "send_possible".

Plugged socket will always be watched for "error" event - in that case, pollend() is called.

_do_send(self)

source code 
Called when send() to connected socket is possible. First message from sendqueue will be sent

_do_receive(self)

source code 
Reads all pending incoming data. Will call owner's disconnected() method if appropriate

_on_receive(self, data)

source code 
Preceeds on_receive callback. It peels off and checks HTTP headers in HTTP classes, in here it just calls the callback

nbxmpp-0.5.3/doc/apidocs/index.html0000644000175000017500000000111012321263757020370 0ustar asterixasterix00000000000000 python-nbxmpp nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_d.gif0000644000175000017500000005420212321263757025277 0ustar asterixasterix00000000000000GIF89aCLB<|jdĂ$"$tbdĢlRLndd&$<2,$|ܲnl\NL z|Ė"\F4|f\dRT~|jlt^TĄ̢lVLrd<64vtԒ"$\JDԪ4*$Ğ  ̔vlD6,4 T><^\jlܮrt̒̚T:<䶴̦jd<.,$ԪdRL~t,&$|Ć|ܶĞܾ64̼~|ܔ.,fd Ď侼><|fdt^\lVT4*,vtD64!,C] H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*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mK}u\GKM(n8Q}5ֆ +V[8N3ߘ͵交 SdFrmF0857Ex7{M䴀.Xm$_csL`m,y8It"G\'E*8$`Uy`3w`J^Ky8QY;9:It)yKldk9n/N $AP~?v`B76v9Ry+cyŘ!Pix~g6hӯkoPڅ  ӈM'ڡfdBpJЄtgcVx`+6y ")?mF?l逩; LP5%$܅]X8# mA ?0lVoQK 6?Gr`Qت ɖ'Gwh1K4M~>EvQQr6qu![Z:Gt=CAE{+QAUzzKRo %!bw!QsUtlf.[Z7I} "$w2xW&k۶L ȴY)[;W"G{Cz :k;7cZf○%_lx} R$Ł$~+x“/YK 8Y]E]`Xӄ-U5v|أyoF20w  &˿/]Xʣ\g͢|E7̳|{KThyL8;VKM2cY\ɵ3w+Zcyb]kKَ9wYXџ1='ZjRJЅm^Mc#\X{Kp]K> ᎝肹xTً+SzϕΙlRuxpdϡkɤ">fЏ}:'ч8}3L9q$8@]LY9c D} %yL؝x+ew^ŖwozV>タGlZ*keӖ;TjL d:>yNg=ȩ[ nbxmpp.protocol.DataForm
Package nbxmpp :: Module protocol :: Class DataForm
[hide private]
[frames] | no frames]

Class DataForm

source code


Used for manipulating dataforms in XMPP

Relevant XEPs: 0004, 0068, 0122. Can be used in disco, pub-sub and many other applications.

Instance Methods [hide private]
 
__init__(self, typ=None, data=[], title=None, node=None)
Create new dataform of type 'typ'. 'data' is the list of DataField instances that this dataform contains, 'title' - the title string. You can specify the 'node' argument as the other node to be used as base for constructing this dataform
source code
 
getType(self)
Return the type of dataform
source code
 
setType(self, typ)
Set the type of dataform
source code
 
getTitle(self)
Return the title of dataform
source code
 
setTitle(self, text)
Set the title of dataform
source code
 
getInstructions(self)
Return the instructions of dataform
source code
 
setInstructions(self, text)
Set the instructions of dataform
source code
 
addInstructions(self, text)
Add one more instruction to the dataform
source code
 
getField(self, name)
Return the datafield object with name 'name' (if exists)
source code
 
setField(self, name)
Create if nessessary or get the existing datafield object with name 'name' and return it
source code
 
asDict(self)
Represent dataform as simple dictionary mapping of datafield names to their values
source code
 
__getitem__(self, name)
Simple dictionary interface for getting datafields values by their names
source code
 
__setitem__(self, name, val)
Simple dictionary interface for setting datafields values by their names
source code

Inherited from simplexml.Node: __contains__, __delitem__, __getattr__, __str__, addChild, addData, clearData, delAttr, delChild, getAttr, getAttrs, getChildren, getData, getName, getNamespace, getParent, getPayload, getTag, getTagAttr, getTagData, getTags, has_attr, iterTags, lookup_nsp, setAttr, setData, setName, setNamespace, setParent, setPayload, setTag, setTagAttr, setTagData

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]

Inherited from simplexml.Node: FORCE_NODE_RECREATION

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, typ=None, data=[], title=None, node=None)
(Constructor)

source code 

Create new dataform of type 'typ'. 'data' is the list of DataField instances that this dataform contains, 'title' - the title string. You can specify the 'node' argument as the other node to be used as base for constructing this dataform

title and instructions is optional and SHOULD NOT contain newlines. Several instructions MAY be present. 'typ' can be one of ('form' | 'submit' | 'cancel' | 'result' ) 'typ' of reply iq can be ( 'result' | 'set' | 'set' | 'result' ) respectively. 'cancel' form can not contain any fields. All other forms contains AT LEAST one field. 'title' MAY be included in forms of type "form" and "result"

Overrides: object.__init__

getType(self)

source code 
Return the type of dataform

setType(self, typ)

source code 
Set the type of dataform

getTitle(self)

source code 
Return the title of dataform

setTitle(self, text)

source code 
Set the title of dataform

getInstructions(self)

source code 
Return the instructions of dataform

setInstructions(self, text)

source code 
Set the instructions of dataform

addInstructions(self, text)

source code 
Add one more instruction to the dataform

getField(self, name)

source code 
Return the datafield object with name 'name' (if exists)

setField(self, name)

source code 
Create if nessessary or get the existing datafield object with name 'name' and return it

asDict(self)

source code 
Represent dataform as simple dictionary mapping of datafield names to their values

__getitem__(self, name)
(Indexing operator)

source code 
Simple dictionary interface for getting datafields values by their names
Overrides: simplexml.Node.__getitem__

__setitem__(self, name, val)
(Index assignment operator)

source code 
Simple dictionary interface for setting datafields values by their names
Overrides: simplexml.Node.__setitem__

nbxmpp-0.5.3/doc/apidocs/crarr.png0000644000175000017500000000052412321263757020222 0ustar asterixasterix00000000000000PNG  IHDR eE,tEXtCreation TimeTue 22 Aug 2006 00:43:10 -0500` XtIME)} pHYsnu>gAMA aEPLTEðf4sW ЊrD`@bCܖX{`,lNo@xdE螊dƴ~TwvtRNS@fMIDATxc`@0&+(;; /EXؑ? n  b;'+Y#(r<"IENDB`nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_37.gif0000644000175000017500000002117412321263757025626 0ustar asterixasterix00000000000000GIF89aLB<ČBDĢl$"$ĂlfdjdlRLbdĺT><<2, ĖvtdNDԦ\F<̞TB4t^Tjl lVL<64̒dRL\JD|f\$ĞzlԪ4*$z| rt:<̦LBD<24dNLԦ\FDD:<$̞TBDL:<~|tZ\jd,"$vtTFDL>D\\C bAiD,W¤<tp *î݉eQ cVDxdhf7|1BУxap4c1/O_,GXW8Z=tfm4Hנ\M? l)UIsXaC2sy`rN|r,/<Bt'0wL$Pf?C0d複\~ݰ'nC)h48_']g^#瞃βx֦G)JS<FmxR%2TꍹzLPqz~"$}0u.BkceLL=GW#եclǬH1kXŪz=hiD)R#ۍhm(3 JVAvr-%+;+uځ,_xݕ0?zW := "T 'rfƁv~# @Q,|]q3vS}q4!eR$%R(%r&"B"]V~Vr0~u1ur6tsr>U)7+;s*`EsrU`vLuG_.Ʋs U0b60Xuocu[d'#C0zQ Yet慱ImWs {x'x3<3cPhxuHoxzJam"CRP ]VzւHC[PYuA h}t|~1{L YPAW[uT7^里H|G|BQX\ѨA`7`&m<ǍT$=<򇎍ar;`DJF"n pH|qr5F.EV@&)bS#"#X"8:B.(pe*3&E&]*$n%J.A7U./s^tPS81]"|afcVJ/vVihkS~hv~!~vW4J6y&vhlCSxuxNBxxXU#;8h-~hdhCx%эtaOG8{GpC'Yg'=yғ =ٛS^IM=%zezd>fg S}qϙoVi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c/apidocs/nbxmpp.transports_nb.NonBlockingTransport-class.html0000644000175000017500000013642312321263757030724 0ustar asterixasterix00000000000000 nbxmpp.transports_nb.NonBlockingTransport
Package nbxmpp :: Module transports_nb :: Class NonBlockingTransport
[hide private]
[frames] | no frames]

Class NonBlockingTransport

source code


Abstract class representing a transport

Subclasses CAN have different constructor signature but connect method SHOULD be the same.

Instance Methods [hide private]
 
__init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, certs)
Each trasport class can have different constructor but it has to have at least all the arguments of NonBlockingTransport constructor
source code
 
plugin(self, owner) source code
 
plugout(self) source code
 
connect(self, conn_5tuple, on_connect, on_connect_failure)
Creates and connects transport to server and port defined in conn_5tuple which should be item from list returned from getaddrinfo
source code
 
set_state(self, newstate) source code
 
get_state(self) source code
 
_on_connect(self)
Preceeds call of on_connect callback
source code
 
_on_connect_failure(self, err_message)
Preceeds call of on_connect_failure callback
source code
 
send(self, raw_data, now=False) source code
 
disconnect(self, do_callback=True) source code
 
onreceive(self, recv_handler)
Set the on_receive callback.
source code
 
_tcp_connecting_started(self) source code
 
read_timeout(self)
Called when there's no response from server in defined timeout
source code
 
read_timeout2(self)
called when there's no response from server in defined timeout
source code
 
renew_send_timeout(self) source code
 
renew_send_timeout2(self) source code
 
set_timeout(self, timeout) source code
 
set_timeout2(self, timeout2) source code
 
get_fd(self) source code
 
remove_timeout(self) source code
 
set_send_timeout(self, timeout, on_timeout) source code
 
set_send_timeout2(self, timeout2, on_timeout2) source code
 
start_disconnect(self) source code

Inherited from plugin.PlugIn: PlugIn, PlugOut

Class Methods [hide private]

Inherited from plugin.PlugIn: get_instance

Method Details [hide private]

__init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, certs)
(Constructor)

source code 
Each trasport class can have different constructor but it has to have at least all the arguments of NonBlockingTransport constructor
Parameters:
  • raise_event - callback for monitoring of sent and received data
  • on_disconnect - callback called on disconnection during runtime
  • idlequeue - processing idlequeue
  • estabilish_tls - boolean whether to estabilish TLS connection after TCP connection is done
  • certs - tuple of (cacerts, mycerts) see constructor of tls_nb.NonBlockingTLS for more details
Overrides: plugin.PlugIn.__init__

plugin(self, owner)

source code 

plugout(self)

source code 

connect(self, conn_5tuple, on_connect, on_connect_failure)

source code 
Creates and connects transport to server and port defined in conn_5tuple which should be item from list returned from getaddrinfo
Parameters:
  • conn_5tuple - 5-tuple returned from getaddrinfo
  • on_connect - callback called on successful connect to the server
  • on_connect_failure - callback called on failure when connecting

set_state(self, newstate)

source code 

get_state(self)

source code 

_on_connect(self)

source code 
Preceeds call of on_connect callback

_on_connect_failure(self, err_message)

source code 
Preceeds call of on_connect_failure callback

send(self, raw_data, now=False)

source code 

disconnect(self, do_callback=True)

source code 

onreceive(self, recv_handler)

source code 

Set the on_receive callback.

onreceive(None) sets callback to Dispatcher.ProcessNonBlocking which is the default one that will decide what to do with received stanza based on its tag name and namespace.

Do not confuse it with on_receive() method, which is the callback itself.

_tcp_connecting_started(self)

source code 

read_timeout(self)

source code 
Called when there's no response from server in defined timeout

read_timeout2(self)

source code 
called when there's no response from server in defined timeout

renew_send_timeout(self)

source code 

renew_send_timeout2(self)

source code 

set_timeout(self, timeout)

source code 

set_timeout2(self, timeout2)

source code 

get_fd(self)

source code 

remove_timeout(self)

source code 

set_send_timeout(self, timeout, on_timeout)

source code 

set_send_timeout2(self, timeout2, on_timeout2)

source code 

start_disconnect(self)

source code 

nbxmpp-0.5.3/doc/apidocs/nbxmpp.client_nb.NonBlockingClient-class.html0000644000175000017500000015335612321263757027211 0ustar asterixasterix00000000000000 nbxmpp.client_nb.NonBlockingClient
Package nbxmpp :: Module client_nb :: Class NonBlockingClient
[hide private]
[frames] | no frames]

Class NonBlockingClient

source code

Client class is XMPP connection mountpoint. Objects for authentication, network communication, roster, xml parsing ... are plugged to client object. Client implements the abstract behavior - mostly negotioation and callbacks handling, whereas underlying modules take care of feature-specific logic
Instance Methods [hide private]
 
__init__(self, domain, idlequeue, caller=None)
Caches connection data
source code
 
disconnect(self, message='')
Called on disconnection - disconnect callback is picked based on state of the client.
source code
 
connect(self, on_connect, on_connect_failure, hostname=None, port=5222, on_proxy_failure=None, on_stream_error_cb=None, proxy=None, secure_tuple=('plain', None, None))
Open XMPP connection (open XML streams in both directions)
source code
 
_resolve_hostname(self, hostname, port, on_success)
Wrapper for getaddinfo call
source code
 
_try_next_ip(self, err_message=None)
Iterate over IP addresses tries to connect to it
source code
 
incoming_stream_version(self)
Get version of xml stream
source code
 
_xmpp_connect(self, socket_type=None)
Start XMPP connecting process - open the XML stream. Is called after TCP connection is established or after switch to TLS when successfully negotiated with <starttls>.
source code
 
_xmpp_connect_machine(self, mode=None, data=None)
Finite automaton taking care of stream opening and features tag handling. Calls _on_stream_start when stream is started, and disconnect() on failure.
source code
 
_on_stream_start(self)
Called after XMPP stream is opened. TLS negotiation may follow if supported and desired.
source code
 
_tls_negotiation_handler(self, con=None, tag=None)
Take care of TLS negotioation with <starttls>
source code
 
_on_connect(self)
Preceed call of on_connect callback
source code
 
raise_event(self, event_type, data)
Raise event to connection instance. DATA_SENT and DATA_RECIVED events are used in XML console to show XMPP traffic
source code
 
auth(self, user, password, resource='', sasl=True, on_auth=None)
Authenticate connnection and bind resource. If resource is not provided random one or library name used
source code
 
_on_old_auth(self, res)
Callback used by NON-SASL auth. On auth failure, res is None
source code
 
_on_sasl_auth(self, res)
Used internally. On auth failure, res is None
source code
 
_on_doc_attrs(self)
Plug authentication objects and start auth
source code
 
_on_start_sasl(self, data=None)
Callback used by SASL, called on each auth step
source code
 
_on_auth_bind(self, data) source code
 
initRoster(self, version='')
Plug in the roster
source code
 
getRoster(self, on_ready=None, force=False)
Return the Roster instance, previously plugging it in and requesting roster from server if needed
source code
 
sendPresence(self, jid=None, typ=None, requestRoster=0)
Send some specific presence state. Can also request roster from server if according agrument is set
source code
 
RegisterDisconnectHandler(self, handler)
Register handler that will be called on disconnect
source code
 
UnregisterDisconnectHandler(self, handler)
Unregister handler that is called on disconnect
source code
 
DisconnectHandler(self)
Default disconnect handler. Just raises an IOError. If you choosed to use this class in your production client, override this method or at least unregister it.
source code
 
get_connect_type(self)
Return connection state. F.e.: None / 'tls' / 'plain+non_sasl'
source code
 
get_peerhost(self)
Gets the ip address of the account, from which is made connection to the server (e.g. IP and port of socket)
source code
Method Details [hide private]

__init__(self, domain, idlequeue, caller=None)
(Constructor)

source code 
Caches connection data
Parameters:
  • domain - domain - for to: attribute (from account info)
  • idlequeue - processing idlequeue
  • caller - calling object - it has to implement methods _event_dispatcher which is called from dispatcher instance

disconnect(self, message='')

source code 
Called on disconnection - disconnect callback is picked based on state of the client.

connect(self, on_connect, on_connect_failure, hostname=None, port=5222, on_proxy_failure=None, on_stream_error_cb=None, proxy=None, secure_tuple=('plain', None, None))

source code 
Open XMPP connection (open XML streams in both directions)
Parameters:
  • on_connect - called after stream is successfully opened
  • on_connect_failure - called when error occures during connection
  • hostname - hostname of XMPP server from SRV request
  • port - port number of XMPP server
  • on_proxy_failure - called if error occurres during TCP connection to proxy server or during proxy connecting process
  • proxy - dictionary with proxy data. It should contain at least values for keys 'host' and 'port' - connection details for proxy serve and optionally keys 'user' and 'pass' as proxy credentials
  • secure_tuple - tuple of (desired connection type, cacerts, mycerts) connection type can be 'ssl' - TLS established after TCP connection, 'tls' - TLS established after negotiation with starttls, or 'plain'. cacerts, mycerts - see tls_nb.NonBlockingTLS constructor for more details

_resolve_hostname(self, hostname, port, on_success)

source code 

Wrapper for getaddinfo call

FIXME: getaddinfo blocks

_try_next_ip(self, err_message=None)

source code 
Iterate over IP addresses tries to connect to it

incoming_stream_version(self)

source code 
Get version of xml stream

_xmpp_connect(self, socket_type=None)

source code 
Start XMPP connecting process - open the XML stream. Is called after TCP connection is established or after switch to TLS when successfully negotiated with <starttls>.

_xmpp_connect_machine(self, mode=None, data=None)

source code 
Finite automaton taking care of stream opening and features tag handling. Calls _on_stream_start when stream is started, and disconnect() on failure.

_on_stream_start(self)

source code 
Called after XMPP stream is opened. TLS negotiation may follow if supported and desired.

_tls_negotiation_handler(self, con=None, tag=None)

source code 
Take care of TLS negotioation with <starttls>

_on_connect(self)

source code 
Preceed call of on_connect callback

raise_event(self, event_type, data)

source code 
Raise event to connection instance. DATA_SENT and DATA_RECIVED events are used in XML console to show XMPP traffic

auth(self, user, password, resource='', sasl=True, on_auth=None)

source code 
Authenticate connnection and bind resource. If resource is not provided random one or library name used
Parameters:
  • user - XMPP username
  • password - XMPP password
  • resource - resource that shall be used for auth/connecting
  • sasl - Boolean indicating if SASL shall be used. (default: True)
  • on_auth - Callback, called after auth. On auth failure, argument is None.

_on_old_auth(self, res)

source code 
Callback used by NON-SASL auth. On auth failure, res is None

_on_sasl_auth(self, res)

source code 
Used internally. On auth failure, res is None

_on_doc_attrs(self)

source code 
Plug authentication objects and start auth

_on_start_sasl(self, data=None)

source code 
Callback used by SASL, called on each auth step

_on_auth_bind(self, data)

source code 

initRoster(self, version='')

source code 
Plug in the roster

getRoster(self, on_ready=None, force=False)

source code 
Return the Roster instance, previously plugging it in and requesting roster from server if needed

sendPresence(self, jid=None, typ=None, requestRoster=0)

source code 
Send some specific presence state. Can also request roster from server if according agrument is set

RegisterDisconnectHandler(self, handler)

source code 
Register handler that will be called on disconnect

UnregisterDisconnectHandler(self, handler)

source code 
Unregister handler that is called on disconnect

DisconnectHandler(self)

source code 
Default disconnect handler. Just raises an IOError. If you choosed to use this class in your production client, override this method or at least unregister it.

get_connect_type(self)

source code 
Return connection state. F.e.: None / 'tls' / 'plain+non_sasl'

get_peerhost(self)

source code 

Gets the ip address of the account, from which is made connection to the server (e.g. IP and port of socket)

We will create listening socket on the same ip


nbxmpp-0.5.3/doc/apidocs/nbxmpp.proxy_connectors-module.html0000644000175000017500000002254412321263757025503 0ustar asterixasterix00000000000000 nbxmpp.proxy_connectors
Package nbxmpp :: Module proxy_connectors
[hide private]
[frames] | no frames]

Module proxy_connectors

source code

Module containing classes for proxy connecting. So far its HTTP CONNECT and SOCKS5 proxy

Authentication to NTLM (Microsoft implementation) proxies can be next.

Classes [hide private]
  ProxyConnector
Interface for proxy-connecting object - when tunnneling XMPP over proxies, some connecting process usually has to be done before opening stream. Proxy connectors are used right after TCP connection is estabilished
  HTTPCONNECTConnector
  SOCKS5Connector
SOCKS5 proxy connection class. Allows to use SOCKS5 proxies with (optionally) simple authentication (only USERNAME/PASSWORD auth)
Variables [hide private]
  log = logging.getLogger('nbxmpp.proxy_connectors')
  __package__ = 'nbxmpp'

Imports: struct, socket, base64, logging


Variables Details [hide private]

log

Value:
logging.getLogger('nbxmpp.proxy_connectors')

__package__

Value:
'nbxmpp'

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.UndefinedCondition-class.html0000644000175000017500000002273212321263757027314 0ustar asterixasterix00000000000000 nbxmpp.protocol.UndefinedCondition
Package nbxmpp :: Module protocol :: Class UndefinedCondition
[hide private]
[frames] | no frames]

Class UndefinedCondition

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_s_3.gif0000644000175000017500000000726212321263757025544 0ustar asterixasterix00000000000000GIF89aLBDĔRTdĆ$"$lZ\Ԧnl|"$ܮ,fddND<2,tjlČ24亼ľz|f\ \JLVT̖ԮԼvtlVLTJL̄4*,̦vtܶD:<TB<*,dRT|f\̌:< ĤFD̒,"$tZ\ܲrtdRLD64쾼nl^\䞜~|Ԫvl$TFD|jlĊԦrt&$䲤DjldNL<24̌64侼~|jl Z\Ģz|lVT̄<.,̪䶴L>< ,&$t^\$|fdvt!, H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ - ѣH*]ʴӧPJJUSµׯ`ÊKٳhӪ]WJȝKݻx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lplP6nAQ%nP)"wkC&a1L5 pU$!~VVwj5wbqkt $ $N7u U7 ulWhXLRUʐe0 =v]`g Wj4 h(s7{s  B QKQ7D4QWKVm}WNW L=c>\qm0g%"B |V,̤eN| "k-$#X+b,+„Q#2+1,hs q)0W:'KIc-c)PYփ@$ұub=WQFъ73)KX$o1QK҇c gOH֤H&$Mx." u4a+w/efiH)2W2>rU"_uQ2k`%xUPqbGgh Fb( B.t"xu~rlrz5`+y{R$9({e{ |'}'/aXa]h-e{9^.!YyH00]ٝum 5 :z;-%1)ڢ9z0:;zA6UL.W:Mrmq:aZyZX`:z:z:zz:z:zɺ:zٺ:z麮, ;nbxmpp-0.5.3/doc/apidocs/toc-nbxmpp.transports_nb-module.html0000644000175000017500000000631612321263757025545 0ustar asterixasterix00000000000000 transports_nb

Module transports_nb


Classes

NonBlockingHTTP
NonBlockingHTTPBOSH
NonBlockingTCP
NonBlockingTransport

Functions

get_proxy_data_from_dict
urisplit

Variables

CONNECTED
CONNECTING
CONNECT_TIMEOUT_SECONDS
DATA_ERROR
DATA_RECEIVED
DATA_SENT
DISCONNECTED
DISCONNECTING
DISCONNECT_TIMEOUT_SECONDS
PROXY_CONNECTING
RECV_BUFSIZE
STATES
__package__
log

[hide private] nbxmpp-0.5.3/doc/apidocs/nbxmpp.transports_nb.NonBlockingHTTP-class.html0000644000175000017500000007601112321263757027503 0ustar asterixasterix00000000000000 nbxmpp.transports_nb.NonBlockingHTTP
Package nbxmpp :: Module transports_nb :: Class NonBlockingHTTP
[hide private]
[frames] | no frames]

Class NonBlockingHTTP

source code


Socket wrapper that creates HTTP message out of sent data and peels-off HTTP headers from incoming messages
Instance Methods [hide private]
 
__init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, certs, on_http_request_possible, on_persistent_fallback, http_dict, proxy_dict=None)
Each trasport class can have different constructor but it has to have at least all the arguments of NonBlockingTransport constructor
source code
 
http_send(self, raw_data, now=False) source code
 
_on_receive(self, data)
Preceeds passing received data to owner class. Gets rid of HTTP headers and checks them.
source code
 
build_http_message(self, httpbody, method='POST')
Builds http message with given body. Values for headers and status line fields are taken from class variables
source code
 
parse_http_message(self, message)
(statusline - list of e.g. ['HTTP/1.1', '200', 'OK'],
source code

Inherited from NonBlockingTCP: connect, disconnect, encode_stanza, pollend, pollin, pollout, read_timeout, remove_timeout, send, set_timeout, start_disconnect, tls_init

Inherited from NonBlockingTransport: get_fd, get_state, onreceive, plugin, plugout, read_timeout2, renew_send_timeout, renew_send_timeout2, set_send_timeout, set_send_timeout2, set_state, set_timeout2

Inherited from plugin.PlugIn: PlugIn, PlugOut

Class Methods [hide private]

Inherited from plugin.PlugIn: get_instance

Instance Variables [hide private]

Inherited from idlequeue.IdleObject: fd

Method Details [hide private]

__init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, certs, on_http_request_possible, on_persistent_fallback, http_dict, proxy_dict=None)
(Constructor)

source code 
Each trasport class can have different constructor but it has to have at least all the arguments of NonBlockingTransport constructor
Parameters:
  • on_http_request_possible - method to call when HTTP request to socket owned by transport is possible.
  • on_persistent_fallback - callback called when server ends TCP connection. It doesn't have to be fatal for HTTP session.
  • http_dict - dictionary with data for HTTP request and headers
Overrides: idlequeue.IdleObject.__init__

http_send(self, raw_data, now=False)

source code 

_on_receive(self, data)

source code 
Preceeds passing received data to owner class. Gets rid of HTTP headers and checks them.
Overrides: NonBlockingTCP._on_receive

build_http_message(self, httpbody, method='POST')

source code 
Builds http message with given body. Values for headers and status line fields are taken from class variables

parse_http_message(self, message)

source code 
Split http message into a tuple:
  • (statusline - list of e.g. ['HTTP/1.1', '200', 'OK'],

  • headers - dictionary of headers e.g. {'Content-Length': '604',

    'Content-Type': 'text/xml; charset=utf-8'},

  • httpbody - string with http body)

  • http_rest - what is left in the message after a full HTTP header + body


nbxmpp-0.5.3/doc/apidocs/toc-nbxmpp.roster_nb-module.html0000644000175000017500000000246512321263757024645 0ustar asterixasterix00000000000000 roster_nb

Module roster_nb


Classes

NonBlockingRoster

Variables

__package__
log

[hide private] nbxmpp-0.5.3/doc/apidocs/nbxmpp.client_nb-module.html0000644000175000017500000002204412321263757024015 0ustar asterixasterix00000000000000 nbxmpp.client_nb
Package nbxmpp :: Module client_nb
[hide private]
[frames] | no frames]

Module client_nb

source code

Client class establishs connection to XMPP Server and handles authentication
Classes [hide private]
  NonBlockingClient
Client class is XMPP connection mountpoint. Objects for authentication, network communication, roster, xml parsing ... are plugged to client object. Client implements the abstract behavior - mostly negotioation and callbacks handling, whereas underlying modules take care of feature-specific logic
Variables [hide private]
  log = logging.getLogger('nbxmpp.client_nb')
  __package__ = 'nbxmpp'

Imports: socket, transports_nb, dispatcher_nb, auth_nb, roster_nb, protocol, bosh, NS_TLS, logging


Variables Details [hide private]

log

Value:
logging.getLogger('nbxmpp.client_nb')

__package__

Value:
'nbxmpp'

nbxmpp-0.5.3/doc/apidocs/toc.html0000644000175000017500000001031712321263757020057 0ustar asterixasterix00000000000000 Table of Contents

Table of Contents


Everything

Modules

nbxmpp
nbxmpp.auth_nb
nbxmpp.bosh
nbxmpp.c14n
nbxmpp.client_nb
nbxmpp.dispatcher_nb
nbxmpp.features_nb
nbxmpp.idlequeue
nbxmpp.plugin
nbxmpp.protocol
nbxmpp.proxy_connectors
nbxmpp.roster_nb
nbxmpp.simplexml
nbxmpp.smacks
nbxmpp.stringprepare
nbxmpp.tls_nb
nbxmpp.transports_nb

[hide private] nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.NotAuthorized-class.html0000644000175000017500000002266712321263757026352 0ustar asterixasterix00000000000000 nbxmpp.protocol.NotAuthorized
Package nbxmpp :: Module protocol :: Class NotAuthorized
[hide private]
[frames] | no frames]

Class NotAuthorized

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/nbxmpp.plugin.PlugIn-class.html0000644000175000017500000004064212321263757024377 0ustar asterixasterix00000000000000 nbxmpp.plugin.PlugIn
Package nbxmpp :: Module plugin :: Class PlugIn
[hide private]
[frames] | no frames]

Class PlugIn

source code


Abstract xmpppy plugin infrastructure code, providing plugging in/out and debugging functionality

Inherit to develop pluggable objects. No code change on the owner class required (the object where we plug into)

For every instance of PlugIn class the 'owner' is the class in what the plug was plugged.

Instance Methods [hide private]
 
__init__(self) source code
 
PlugIn(self, owner)
Attach to owner and register ourself and our _exported_methods in it. If defined by a subclass, call self.plugin(owner) to execute hook code after plugging
source code
 
PlugOut(self)
Unregister our _exported_methods from owner and detach from it. If defined by a subclass, call self.plugout() after unplugging to execute hook code
source code
Class Methods [hide private]
 
get_instance(cls, *args, **kwargs)
Factory Method for object creation
Method Details [hide private]

__init__(self)
(Constructor)

source code 

PlugIn(self, owner)

source code 
Attach to owner and register ourself and our _exported_methods in it. If defined by a subclass, call self.plugin(owner) to execute hook code after plugging

PlugOut(self)

source code 
Unregister our _exported_methods from owner and detach from it. If defined by a subclass, call self.plugout() after unplugging to execute hook code

get_instance(cls, *args, **kwargs)
Class Method

 

Factory Method for object creation

Use this instead of directly initializing the class in order to make unit testing easier. For testing, this method can be patched to inject mock objects.


nbxmpp-0.5.3/doc/apidocs/nbxmpp.tls_nb.SSLWrapper.Error-class.html0000644000175000017500000003603312321263757026255 0ustar asterixasterix00000000000000 nbxmpp.tls_nb.SSLWrapper.Error
Package nbxmpp :: Module tls_nb :: Class SSLWrapper :: Class Error
[hide private]
[frames] | no frames]

Class Error

source code


Generic SSL Error Wrapper
Instance Methods [hide private]
 
__init__(self, sock=None, exc=None, errno=None, strerror=None, peer=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__str__(self)
str(x)
source code

Inherited from exceptions.IOError: __new__

Inherited from exceptions.EnvironmentError: __reduce__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __repr__, __setattr__, __setstate__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.EnvironmentError: errno, filename, strerror

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

Method Details [hide private]

__init__(self, sock=None, exc=None, errno=None, strerror=None, peer=None)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 
str(x)
Overrides: object.__str__
(inherited documentation)

nbxmpp-0.5.3/doc/apidocs/toc-nbxmpp.client_nb-module.html0000644000175000017500000000246512321263757024605 0ustar asterixasterix00000000000000 client_nb

Module client_nb


Classes

NonBlockingClient

Variables

__package__
log

[hide private] nbxmpp-0.5.3/doc/apidocs/nbxmpp.simplexml.T-class.html0000644000175000017500000003041612321263757024116 0ustar asterixasterix00000000000000 nbxmpp.simplexml.T
Package nbxmpp :: Module simplexml :: Class T
[hide private]
[frames] | no frames]

Class T

source code


Auxiliary class used to quick access to node's child nodes
Instance Methods [hide private]
 
__init__(self, node) source code
 
__getattr__(self, attr) source code
 
__setattr__(self, attr, val) source code
 
__delattr__(self, attr) source code
Method Details [hide private]

__init__(self, node)
(Constructor)

source code 

__getattr__(self, attr)
(Qualification operator)

source code 

__setattr__(self, attr, val)

source code 

__delattr__(self, attr)

source code 

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_t_6.gif0000644000175000017500000010050612321263757025543 0ustar asterixasterix00000000000000GIF89a`|ČBD4.,ĂlfdĢbdTF<<|䲤f\"$L64BDĺԌrd$ĖzldRLlԦ,&$L>4  lRLdJD64Ě<64|rtVL|vt,RTԪlZ\|b\\NLnlrl\F<亼ԌT><̞t $"$.,\64ܲ|^T D2,d&$$jdT6,~t:<~|VTܮĎnlNLԦ̞ܾܬ^\64 ̖vtԮ.,TFDztdRTԦL><|bd\FD̞ $D64tZ\|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L{mkm{nSnI{n{p6pTquUh* ͯ~[*xQ6!`o`|X=PNuF:^ l/VPvn#_pu@pu QD\'V6p![b8"ހ7 0wTaur\*d Fd̷=Bt :>quYII79G=ykta6~aVgJTN9yrX*N7` RSYd3",*Vz}C. C񎜔!赮\9;U+9o0NUSwc#vA:/`FbCzaDΞ8'H]jΈNT @O:-!,dٯ" ]aiZGRhCVҗB0RS u. PB}OjT[JժWUUvuvZg:Vnl$kZjֹ tok\Y= wk^Wկl` Xb|2jET*7&ֱ[X.nle5[ˮ-:φִ=[Z־vlle;[՞iu:Ԛlo[RVb#nq{ܯ%WeלܴFwkkmv*1sox;)μEozջ^׽o|;_<;nbxmpp-0.5.3/doc/apidocs/toc-nbxmpp-module.html0000644000175000017500000000210112321263757022634 0ustar asterixasterix00000000000000 nbxmpp

Module nbxmpp


Variables

__package__

[hide private] nbxmpp-0.5.3/doc/apidocs/nbxmpp.transports_nb.NonBlockingHTTPBOSH-class.html0000644000175000017500000006077712321263757030173 0ustar asterixasterix00000000000000 nbxmpp.transports_nb.NonBlockingHTTPBOSH
Package nbxmpp :: Module transports_nb :: Class NonBlockingHTTPBOSH
[hide private]
[frames] | no frames]

Class NonBlockingHTTPBOSH

source code


Class for BOSH HTTP connections. Slightly redefines HTTP transport by calling bosh bodytag generating callback before putting data on wire
Instance Methods [hide private]
 
set_stanza_build_cb(self, build_cb) source code
 
_do_send(self)
Called when send() to connected socket is possible. First message from sendqueue will be sent
source code

Inherited from NonBlockingHTTP: __init__, build_http_message, http_send, parse_http_message

Inherited from NonBlockingHTTP (private): _on_receive

Inherited from NonBlockingTCP: connect, disconnect, encode_stanza, pollend, pollin, pollout, read_timeout, remove_timeout, send, set_timeout, start_disconnect, tls_init

Inherited from NonBlockingTransport: get_fd, get_state, onreceive, plugin, plugout, read_timeout2, renew_send_timeout, renew_send_timeout2, set_send_timeout, set_send_timeout2, set_state, set_timeout2

Inherited from plugin.PlugIn: PlugIn, PlugOut

Class Methods [hide private]

Inherited from plugin.PlugIn: get_instance

Instance Variables [hide private]

Inherited from idlequeue.IdleObject: fd

Method Details [hide private]

set_stanza_build_cb(self, build_cb)

source code 

_do_send(self)

source code 
Called when send() to connected socket is possible. First message from sendqueue will be sent
Overrides: NonBlockingTCP._do_send
(inherited documentation)

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_d_2.gif0000644000175000017500000004312212321263757025517 0ustar asterixasterix00000000000000GIF89atlRL4.,ĢtbdĂbdTF4lZ\~t,Ԫz|\NL24RT̞nlܺt \F<̒T><|jl$"$|^T D2,|b\Ċ$ĖJLĚԌjd4&$D6,tZTrtܪzlt<.,̪jlzt켖*,܄jlԢvt| 䲤LBD:<쾼\JL|f\D:<~|vtFDԮ 侼TFDdRTԦL><̞\FD |bd$D64tZ\zt|fdt^\lVTjdvtdNL,"$nlTBD4*,<24!,i H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻxN߿ LÈ+^̸ǍLgo2k̹ϠCMӨS^}Gʰc۸sͻoNȓ+_kУͼuǑg_KO>$uwO}Ill>?q.!| `q $\dq$΁&GD[vlpv("򙈢E@OIءmk008 2DD%+֢1$R@X ?`fc p!*pA؆BYv1#atډ|) j6J~-iBiKdnE mViǨifjmWhwb'ꧯuꆴjN6kab$&klXI(qM>mz)RsKٴjglz\GhI\0zEoG\1g[s] ov0D{t5/owF]G/Wo}{3}Pλo/Ko~Ꮿtrf q=q}?I&rPg6`M]L$JMb8Y=? p#MԮ HPb;>fmTPF"6 m6H*<0 c nY2;P8#(S|~vg)(T1]6i6"(6>x6PhK7kx+XlIb]`E1 HbJUcFyBqHVĎ Y`*{*mPV:6ޠV]`B'AeyGb@*1CWz?=P{FuAfjS"*pj @0 ܤSBANp ,bWB9 &s͆Ď e(rAq%2ac`S=;m:h `y6BM!Թ/mFbO+" <'m̀ t 8KT HLizӲ1V)`z*m8p M P%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4P6ԡ<gEPRT2Tq#gá?.*R*V5uK Ǹ9.5@BO%W9Fkd5YQP"&p" Q p SlX}8! Sx dkΒUShiYU*fxH &J`z 5DIPv INNl Df54{D;T g98ka.ζ]mԦۉᖷo\Nōq*.lukNnv]v׻oxЅ׼Eozq2׽m ؛"׾o~_׿;`w5[`7 07o'atெ+bs ^0K`C,b3Bp ,"t O`z0,fa&I^r}c\̡h2Kd1Yxjfo_/ !^"{\^Ds+|8 VYHBҴȰ2pe!òiN#ӛt} I t AA˰/ HUjWÚ"[̶rua0`Z-8V.E}}pb] lP7c5B/m_I枅$ޭû}o"仾okmeA !ǸQ>$2'%'1d쓋;577aԗL}x}Pqۗv-h['º}py@ox֑n_7dENN6Ǽw6GWE W! ØD𼮯1.w",/?w"^|motqݯ*=SLX#~fkV/g o d ӯ>'9 ;\cgqp7!FRB&?P'˻d?S@s @ Z_$4DTdLA6AYL @D #d@"<#D&D?%&t),1(u ,lLt/01 CA*DCK@ 4tCB7C[Cl:C{=D<@$DAL0-DDt;LrGHIKLMNOPԖ;nbxmpp-0.5.3/doc/apidocs/nbxmpp.plugin-pysrc.html0000644000175000017500000007135612321263757023243 0ustar asterixasterix00000000000000 nbxmpp.plugin
Package nbxmpp :: Module plugin
[hide private]
[frames] | no frames]

Source Code for Module nbxmpp.plugin

 1  ##   plugin.py 
 2  ## 
 3  ##   Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov 
 4  ## 
 5  ##   This program is free software; you can redistribute it and/or modify 
 6  ##   it under the terms of the GNU General Public License as published by 
 7  ##   the Free Software Foundation; either version 2, or (at your option) 
 8  ##   any later version. 
 9  ## 
10  ##   This program is distributed in the hope that it will be useful, 
11  ##   but WITHOUT ANY WARRANTY; without even the implied warranty of 
12  ##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
13  ##   GNU General Public License for more details. 
14   
15  # $Id: client.py,v 1.52 2006/01/02 19:40:55 normanr Exp $ 
16   
17  """ 
18  Provides PlugIn class functionality to develop extentions for xmpppy 
19  """ 
20   
21  import logging 
22  log = logging.getLogger('nbxmpp.plugin') 
23 24 -class PlugIn:
25 """ 26 Abstract xmpppy plugin infrastructure code, providing plugging in/out and 27 debugging functionality 28 29 Inherit to develop pluggable objects. No code change on the owner class 30 required (the object where we plug into) 31 32 For every instance of PlugIn class the 'owner' is the class in what the plug 33 was plugged. 34 """ 35
36 - def __init__(self):
37 self._exported_methods=[]
38
39 - def PlugIn(self, owner):
40 """ 41 Attach to owner and register ourself and our _exported_methods in it. 42 If defined by a subclass, call self.plugin(owner) to execute hook 43 code after plugging 44 """ 45 self._owner=owner 46 log.info('Plugging %s __INTO__ %s' % (self, self._owner)) 47 if self.__class__.__name__ in owner.__dict__: 48 log.debug('Plugging ignored: another instance already plugged.') 49 return 50 self._old_owners_methods=[] 51 for method in self._exported_methods: 52 if method.__name__ in owner.__dict__: 53 self._old_owners_methods.append(owner.__dict__[method.__name__]) 54 owner.__dict__[method.__name__]=method 55 if self.__class__.__name__.endswith('Dispatcher'): 56 # FIXME: I need BOSHDispatcher or XMPPDispatcher on .Dispatcher 57 # there must be a better way.. 58 owner.__dict__['Dispatcher']=self 59 else: 60 owner.__dict__[self.__class__.__name__]=self 61 62 # Execute hook 63 if hasattr(self, 'plugin'): 64 return self.plugin(owner)
65
66 - def PlugOut(self):
67 """ 68 Unregister our _exported_methods from owner and detach from it. 69 If defined by a subclass, call self.plugout() after unplugging to execute 70 hook code 71 """ 72 log.info('Plugging %s __OUT__ of %s.' % (self, self._owner)) 73 for method in self._exported_methods: 74 del self._owner.__dict__[method.__name__] 75 for method in self._old_owners_methods: 76 self._owner.__dict__[method.__name__]=method 77 # FIXME: Dispatcher workaround 78 if self.__class__.__name__.endswith('Dispatcher'): 79 del self._owner.__dict__['Dispatcher'] 80 else: 81 del self._owner.__dict__[self.__class__.__name__] 82 # Execute hook 83 if hasattr(self, 'plugout'): 84 return self.plugout() 85 del self._owner
86 87 @classmethod
88 - def get_instance(cls, *args, **kwargs):
89 """ 90 Factory Method for object creation 91 92 Use this instead of directly initializing the class in order to make 93 unit testing easier. For testing, this method can be patched to inject 94 mock objects. 95 """ 96 return cls(*args, **kwargs)
97

nbxmpp-0.5.3/doc/apidocs/nbxmpp.features_nb-pysrc.html0000644000175000017500000024721512321263757024241 0ustar asterixasterix00000000000000 nbxmpp.features_nb
Package nbxmpp :: Module features_nb
[hide private]
[frames] | no frames]

Source Code for Module nbxmpp.features_nb

  1  ##   features.py 
  2  ## 
  3  ##   Copyright (C) 2003-2004 Alexey "Snake" Nezhdanov 
  4  ##   Copyright (C) 2007 Julien Pivotto <roidelapluie@gmail.com> 
  5  ## 
  6  ##   This program is free software; you can redistribute it and/or modify 
  7  ##   it under the terms of the GNU General Public License as published by 
  8  ##   the Free Software Foundation; either version 2, or (at your option) 
  9  ##   any later version. 
 10  ## 
 11  ##   This program is distributed in the hope that it will be useful, 
 12  ##   but WITHOUT ANY WARRANTY; without even the implied warranty of 
 13  ##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 14  ##   GNU General Public License for more details. 
 15   
 16  # $Id: features.py,v 1.22 2005/09/30 20:13:04 mikealbon Exp $ 
 17   
 18  """ 
 19  Different stuff that wasn't worth separating it into modules 
 20  (Registration, Privacy Lists, ...) 
 21  """ 
 22   
 23  from protocol import NS_REGISTER, NS_PRIVACY, NS_DATA, Iq, isResultNode, Node 
 24   
25 -def _on_default_response(disp, iq, cb):
26 def _on_response(resp): 27 if isResultNode(resp): 28 if cb: 29 cb(True) 30 elif cb: 31 cb(False)
32 disp.SendAndCallForResponse(iq, _on_response) 33 34 ############################################################################### 35 ### Registration 36 ############################################################################### 37 38 REGISTER_DATA_RECEIVED = 'REGISTER DATA RECEIVED' 39
40 -def getRegInfo(disp, host, info={}, sync=True):
41 """ 42 Get registration form from remote host. Info dict can be prefilled 43 :param disp: plugged dispatcher instance 44 :param info: dict, like {'username':'joey'}. 45 46 See JEP-0077 for details. 47 """ 48 iq=Iq('get', NS_REGISTER, to=host) 49 for i in info.keys(): 50 iq.setTagData(i, info[i]) 51 if sync: 52 disp.SendAndCallForResponse(iq, lambda resp: 53 _ReceivedRegInfo(disp.Dispatcher, resp, host)) 54 else: 55 disp.SendAndCallForResponse(iq, _ReceivedRegInfo, {'agent': host })
56
57 -def _ReceivedRegInfo(con, resp, agent):
58 Iq('get', NS_REGISTER, to=agent) 59 if not isResultNode(resp): 60 error_msg = resp.getErrorMsg() 61 con.Event(NS_REGISTER, REGISTER_DATA_RECEIVED, (agent, None, False, error_msg, '')) 62 return 63 tag=resp.getTag('query', namespace=NS_REGISTER) 64 if not tag: 65 error_msg = resp.getErrorMsg() 66 con.Event(NS_REGISTER, REGISTER_DATA_RECEIVED, (agent, None, False, error_msg, '')) 67 return 68 df=tag.getTag('x', namespace=NS_DATA) 69 if df: 70 con.Event(NS_REGISTER, REGISTER_DATA_RECEIVED, (agent, df, True, '', 71 tag)) 72 return 73 df={} 74 for i in resp.getQueryPayload(): 75 if not isinstance(i, Node): 76 continue 77 df[i.getName()] = i.getData() 78 con.Event(NS_REGISTER, REGISTER_DATA_RECEIVED, (agent, df, False, '', ''))
79
80 -def register(disp, host, info, cb, args=None):
81 """ 82 Perform registration on remote server with provided info 83 84 If registration fails you can get additional info from the dispatcher's 85 owner attributes lastErrNode, lastErr and lastErrCode. 86 """ 87 iq=Iq('set', NS_REGISTER, to=host) 88 if not isinstance(info, dict): 89 info=info.asDict() 90 for i in info.keys(): 91 iq.setTag('query').setTagData(i, info[i]) 92 disp.SendAndCallForResponse(iq, cb, args)
93
94 -def unregister(disp, host, cb):
95 """ 96 Unregisters with host (permanently removes account). Returns true on success 97 """ 98 iq = Iq('set', NS_REGISTER, to=host, payload=[Node('remove')]) 99 _on_default_response(disp, iq, cb)
100
101 -def changePasswordTo(disp, newpassword, host=None, cb = None):
102 """ 103 Changes password on specified or current (if not specified) server. Returns 104 true on success. 105 """ 106 if not host: 107 host = disp._owner.Server 108 iq = Iq('set', NS_REGISTER, to=host, payload=[Node('username', 109 payload=[disp._owner.Server]), Node('password', payload=[newpassword])]) 110 _on_default_response(disp, iq, cb)
111 112 ############################################################################### 113 ### Privacy List 114 ############################################################################### 115 116 PL_TYPE_JID = 'jid' 117 PL_TYPE_GROUP = 'group' 118 PL_TYPE_SUBC = 'subscription' 119 PL_ACT_ALLOW = 'allow' 120 PL_ACT_DENY = 'deny' 121 122 PRIVACY_LISTS_RECEIVED = 'PRIVACY LISTS RECEIVED' 123 PRIVACY_LIST_RECEIVED = 'PRIVACY LIST RECEIVED' 124 PRIVACY_LISTS_ACTIVE_DEFAULT = 'PRIVACY LISTS ACTIVE DEFAULT' 125
126 -def getPrivacyLists(disp):
127 """ 128 Request privacy lists from connected server. Returns dictionary of existing 129 lists on success. 130 """ 131 iq = Iq('get', NS_PRIVACY) 132 def _on_response(resp): 133 dict_ = {'lists': []} 134 if not isResultNode(resp): 135 disp.Event(NS_PRIVACY, PRIVACY_LISTS_RECEIVED, (False)) 136 return 137 for list_ in resp.getQueryPayload(): 138 if list_.getName()=='list': 139 dict_['lists'].append(list_.getAttr('name')) 140 else: 141 dict_[list_.getName()]=list_.getAttr('name') 142 disp.Event(NS_PRIVACY, PRIVACY_LISTS_RECEIVED, (dict_))
143 disp.SendAndCallForResponse(iq, _on_response) 144
146 iq = Iq('get', NS_PRIVACY) 147 def _on_response(resp): 148 dict_ = {'active': '', 'default': ''} 149 if not isResultNode(resp): 150 disp.Event(NS_PRIVACY, PRIVACY_LISTS_ACTIVE_DEFAULT, (False)) 151 return 152 for list_ in resp.getQueryPayload(): 153 if list_.getName() == 'active': 154 dict_['active'] = list_.getAttr('name') 155 elif list_.getName() == 'default': 156 dict_['default'] = list_.getAttr('name') 157 disp.Event(NS_PRIVACY, PRIVACY_LISTS_ACTIVE_DEFAULT, (dict_))
158 disp.SendAndCallForResponse(iq, _on_response) 159
160 -def getPrivacyList(disp, listname):
161 """ 162 Request specific privacy list listname. Returns list of XML nodes (rules) 163 taken from the server responce. 164 """ 165 def _on_response(resp): 166 if not isResultNode(resp): 167 disp.Event(NS_PRIVACY, PRIVACY_LIST_RECEIVED, (False)) 168 return 169 disp.Event(NS_PRIVACY, PRIVACY_LIST_RECEIVED, (resp))
170 iq = Iq('get', NS_PRIVACY, payload=[Node('list', {'name': listname})]) 171 disp.SendAndCallForResponse(iq, _on_response) 172
173 -def setActivePrivacyList(disp, listname=None, typ='active', cb=None):
174 """ 175 Switch privacy list 'listname' to specified type. By default the type is 176 'active'. Returns true on success. 177 """ 178 if listname: 179 attrs={'name':listname} 180 else: 181 attrs={} 182 iq = Iq('set', NS_PRIVACY, payload=[Node(typ, attrs)]) 183 _on_default_response(disp, iq, cb)
184
185 -def setDefaultPrivacyList(disp, listname=None):
186 """ 187 Set the default privacy list as 'listname'. Returns true on success 188 """ 189 return setActivePrivacyList(disp, listname, 'default')
190
191 -def setPrivacyList(disp, listname, tags):
192 """ 193 Set the ruleset 194 195 'list' should be the simpleXML node formatted according to RFC 3921 196 (XMPP-IM) I.e. Node('list',{'name':listname},payload=[...]). 197 198 Returns true on success. 199 """ 200 iq = Iq('set', NS_PRIVACY, xmlns = '') 201 list_query = iq.getTag('query').setTag('list', {'name': listname}) 202 for item in tags: 203 if 'type' in item and 'value' in item: 204 item_tag = list_query.setTag('item', {'action': item['action'], 205 'order': item['order'], 'type': item['type'], 206 'value': item['value']}) 207 else: 208 item_tag = list_query.setTag('item', {'action': item['action'], 209 'order': item['order']}) 210 if 'child' in item: 211 for child_tag in item['child']: 212 item_tag.setTag(child_tag) 213 _on_default_response(disp, iq, None)
214
215 -def delPrivacyList(disp, listname, cb=None):
216 ''' Deletes privacy list 'listname'. Returns true on success. ''' 217 iq = Iq('set', NS_PRIVACY, payload=[Node('list', {'name':listname})]) 218 _on_default_response(disp, iq, cb)
219

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_9.gif0000644000175000017500000004612712321263757025552 0ustar asterixasterix00000000000000GIF89a@LB<ĤBDĆ$"$lZ\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dpV* iR3h%krJ 87Ivn쮩 F&JͩBKA&9WPZ\X v B}9IգD!nA5 H[ڄR45J@%*tQZk#(ƪL\DɺÚoO27ETvK\Xn˯p=w dEΗN=K|yL 8 \7odD*̌H,DL`O ,sa,jb)y#b3Yc77Rwd,]L YiGNCd&Pv<UQ92XɲS\; \7Ifo¸̆93ey; ;9KK׌Nv& o -5CګjEybP(H I!zRP(ehB+J_ HjRV{!؄H`.^;,~Ug{?t}w}ϟO<>  0p!0%p)-105p9=0 pIMQ0UpY]a0epimq0upy}0pm& ;nbxmpp-0.5.3/doc/apidocs/nbxmpp.stringprepare.LookupTableFromFunction-class.html0000644000175000017500000002020212321263757031331 0ustar asterixasterix00000000000000 nbxmpp.stringprepare.LookupTableFromFunction
Package nbxmpp :: Module stringprepare :: Class LookupTableFromFunction
[hide private]
[frames] | no frames]

Class LookupTableFromFunction

source code

Nested Classes [hide private]
  __implements__
Interface for character lookup classes
Instance Methods [hide private]
 
__init__(self, in_table_function) source code
Method Details [hide private]

__init__(self, in_table_function)
(Constructor)

source code 

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.Iq-class.html0000644000175000017500000011705412321263757024117 0ustar asterixasterix00000000000000 nbxmpp.protocol.Iq
Package nbxmpp :: Module protocol :: Class Iq
[hide private]
[frames] | no frames]

Class Iq

source code


XMPP Iq object - get/set dialog mechanism
Instance Methods [hide private]
 
__init__(self, typ=None, queryNS=None, attrs={}, to=None, frm=None, payload=[], xmlns='jabber:client', node=None)
You can specify type, query namespace any additional attributes, recipient of the iq, sender of the iq, any additional payload (f.e. jabber:x:data node) and namespace in one go.
source code
 
getQuery(self)
Return the IQ's child element if it exists, None otherwise.
source code
 
getQueryNS(self)
Return the namespace of the 'query' child element
source code
 
getQuerynode(self)
Return the 'node' attribute value of the 'query' child element
source code
 
getQueryPayload(self)
Return the 'query' child element payload
source code
 
getQueryChildren(self)
Return the 'query' child element child nodes
source code
 
setQuery(self, name=None)
Change the name of the query node, creating it if needed. Keep the existing name if none is given (use 'query' if it's a creation). Return the query node.
source code
 
setQueryNS(self, namespace)
Set the namespace of the 'query' child element
source code
 
setQueryPayload(self, payload)
Set the 'query' child element payload
source code
 
setQuerynode(self, node)
Set the 'node' attribute value of the 'query' child element
source code
 
buildReply(self, typ)
Build and return another Iq object of specified type. The to, from and query child node of new Iq are pre-set as reply to this Iq.
source code

Inherited from Protocol: __setitem__, getError, getErrorCode, getErrorMsg, getFrom, getID, getProperties, getStatusConditions, getTimestamp, getTimestamp2, getTo, getType, setError, setFrom, setID, setTimestamp, setTo, setType

Inherited from simplexml.Node: __contains__, __delitem__, __getattr__, __getitem__, __str__, addChild, addData, clearData, delAttr, delChild, getAttr, getAttrs, getChildren, getData, getName, getNamespace, getParent, getPayload, getTag, getTagAttr, getTagData, getTags, has_attr, iterTags, lookup_nsp, setAttr, setData, setName, setNamespace, setParent, setPayload, setTag, setTagAttr, setTagData

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]

Inherited from simplexml.Node: FORCE_NODE_RECREATION

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, typ=None, queryNS=None, attrs={}, to=None, frm=None, payload=[], xmlns='jabber:client', node=None)
(Constructor)

source code 

You can specify type, query namespace any additional attributes, recipient of the iq, sender of the iq, any additional payload (f.e. jabber:x:data node) and namespace in one go.

Alternatively you can pass in the other XML object as the 'node' parameted to replicate it as an iq

Overrides: object.__init__

getQuery(self)

source code 
Return the IQ's child element if it exists, None otherwise.

getQueryNS(self)

source code 
Return the namespace of the 'query' child element

getQuerynode(self)

source code 
Return the 'node' attribute value of the 'query' child element

getQueryPayload(self)

source code 
Return the 'query' child element payload

getQueryChildren(self)

source code 
Return the 'query' child element child nodes

setQuery(self, name=None)

source code 
Change the name of the query node, creating it if needed. Keep the existing name if none is given (use 'query' if it's a creation). Return the query node.

setQueryNS(self, namespace)

source code 
Set the namespace of the 'query' child element

setQueryPayload(self, payload)

source code 
Set the 'query' child element payload

setQuerynode(self, node)

source code 
Set the 'node' attribute value of the 'query' child element

buildReply(self, typ)

source code 
Build and return another Iq object of specified type. The to, from and query child node of new Iq are pre-set as reply to this Iq.

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_24.gif0000644000175000017500000002061412321263757025620 0ustar asterixasterix00000000000000GIF89aLB<ČBDlĢ$"$lfdjdĂlRLbdĺT>< <2,Ėvt\NL\F<"$RTԦztܲD:424|b\$ĚvtlZ\Ԫܺ|jl4&$rt TJLnd><̞tTB4ND,&$z|dRLjlfd̢䶴t$ľĆfd&$VTܶ64Ğܾvt  rdFDnl^\ܮNL.,Ԧ64侼̞ Ď̖Ԯ><!,O H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ -AѣH*]ʴӧPJJU, µׯ`ÊKٳhӪ]@AȝKݻx˷߿v Wa+^8pb; whAϤʛ7c{YqdG-ZO:sSKD$T&&1ƙcB oys擔Юq"ZJJ`t1rゃ7;uW]rHGu'v}xͅF}E<nn4!EnXGĆ8!zZ2ȐY(YL2IcL&14QD^. #3UIJb:H'!X%.^4z :#BZd\g( r Gf(9Xc(6z.r Yfeb(],!Wʅ}c}z_uu: r1RXjgaR\c\G lXEc$v('rݐE&I;t{,ˮl"]vaF] ,+]W뵣.;@\\ |AiD,W¤<tp *î݉e zjRxahf7|]1FУpap4zq,O_&*GXW8Z=tfm4Hˠ\M? 'CkHA0s}@rKdr,.)JS<FmxeR%2TꍹzLPqz~"$}0u.BkcULL=GW#եclǤH1kXŪz=hiD)R!ۍhm(3 JVAvr-%+;)uځ,_xݕ0?zW := "T 'r&Ɓn~! @Q,|]q3vS}q4!eR$%R(%r&"B"]VvVr0~u1ur6tsr>U)7+;s*|`ȰEsrU`vLuG_.Ʋkp C0b60Xuocu[d'#C0z Vet慱ImWs {x'x3<3cMhxuHoxzJam"3CRM]VzւHCYPYu h}t|~1{L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D$`1`雅g<CTZ@;_QHv(΂vч+S6Mn2//2q&pos>w+{߻}{t~'.şiE%?yW|5yO^j< ?#>p'}lz^0z>mO}x||w>q7Gӷ[zM}}^o#zµw鲫^u$@w ;nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.Hashes-class.html0000644000175000017500000006230412321263757024756 0ustar asterixasterix00000000000000 nbxmpp.protocol.Hashes
Package nbxmpp :: Module protocol :: Class Hashes
[hide private]
[frames] | no frames]

Class Hashes

source code


Hash elements for various XEPs as defined in XEP-300
Instance Methods [hide private]
 
__init__(self, nsp='urn:xmpp:hashes:1')
Takes "tag" argument as the name of node (prepended by namespace, if needed and separated from it by a space), attrs dictionary as the set of arguments, payload list as the set of textual strings and child nodes that this node carries within itself and "parent" argument that is another node that this one will be the child of. Also the __init__ can be provided with "node" argument that is either a text string containing exactly one node or another Node instance to begin with. If both "node" and other arguments is provided then the node initially created as replica of "node" provided and then modified to be compliant with other arguments.
source code
 
calculateHash(self, algo, file_string)
Calculate the hash and add it. It is preferable doing it here instead of doing it all over the place in Gajim.
source code
 
addHash(self, hash_, algo) source code

Inherited from simplexml.Node: __contains__, __delitem__, __getattr__, __getitem__, __setitem__, __str__, addChild, addData, clearData, delAttr, delChild, getAttr, getAttrs, getChildren, getData, getName, getNamespace, getParent, getPayload, getTag, getTagAttr, getTagData, getTags, has_attr, iterTags, lookup_nsp, setAttr, setData, setName, setNamespace, setParent, setPayload, setTag, setTagAttr, setTagData

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  supported = ('md5', 'sha-1', 'sha-256', 'sha-512')

Inherited from simplexml.Node: FORCE_NODE_RECREATION

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, nsp='urn:xmpp:hashes:1')
(Constructor)

source code 
Takes "tag" argument as the name of node (prepended by namespace, if needed and separated from it by a space), attrs dictionary as the set of arguments, payload list as the set of textual strings and child nodes that this node carries within itself and "parent" argument that is another node that this one will be the child of. Also the __init__ can be provided with "node" argument that is either a text string containing exactly one node or another Node instance to begin with. If both "node" and other arguments is provided then the node initially created as replica of "node" provided and then modified to be compliant with other arguments.
Overrides: object.__init__
(inherited documentation)

calculateHash(self, algo, file_string)

source code 
Calculate the hash and add it. It is preferable doing it here instead of doing it all over the place in Gajim.

addHash(self, hash_, algo)

source code 

Class Variable Details [hide private]

supported

Value:
('md5', 'sha-1', 'sha-256', 'sha-512')

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_11.gif0000644000175000017500000003230312321263757025612 0ustar asterixasterix00000000000000GIF89a@LB<ĤBDĎ$"$|b\ԪlRL|jd<2,L\NLfd Ğvtl&$ܪ\F<\JD~t䶴4*$  rlD6,dRLL>4$,&$̢z|LBDĄ|bd|<24,vtܮZ\24><䲤rt\><Ģ̚亼ĚԦnlNLԮ̤\FDD:<Ԧzt TBDdNLjdtZ\$,"$|fd̞vtTFDt^\lVTnl4*,D64L><!,@! H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷p/f@ݻx˷߿ LÈ+^̸ǐ#K"82k̹ϠCMӨS^ͺװc˞Mۥc Nȓ+_μУC 8cνDZӫ_Ͼs>߽c'[]}@Gu6gzVh-(Ԡrb( Jy$}Q1# v982 x# c N8F\Bo^Qd7c2   6\a8!A F"$+)gHx\G\Ј_F# \I+^MaD;|@l(aaF&zh Au\41Mpzݤ^箼*gF(*찿9Rio `!# nxl!͒+Ɔ:B 0\+sjҊ<h _b_&) ;0<Ǿ]p򛑿,<cHp@҈pbB4dF&׹[-V{2Wl} }4:6a0s| . 8Dkb}ֈ7^Db g51 B(!ؖ  \w crg8晝ۧE.<*o^Q7_G1/AS?܇/{/<ؠ/o HG'H Z̠7z GH(L A08!h@ x HL}=70hA':тwaNPa8aoSV)cQb-NAE-ʑx,naS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,"~:àËǞZ|s7/W /pFcIv\aF+HL+yrp 2`KAiȡɸPf,pE*M0fa!;²%.eUⲗ%%uY 0<&2e2|&4)iRH1mr&8)q<':өu|'<߉yҳ'>}'@*Ё=(BЅ2}(D#*щR(F3эr(HC*ґ&=)JS:π;nbxmpp-0.5.3/doc/apidocs/nbxmpp.simplexml-pysrc.html0000644000175000017500000064722412321263757023762 0ustar asterixasterix00000000000000 nbxmpp.simplexml
Package nbxmpp :: Module simplexml
[hide private]
[frames] | no frames]

Source Code for Module nbxmpp.simplexml

  1  ##   simplexml.py based on Mattew Allum's xmlstream.py 
  2  ## 
  3  ##   Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov 
  4  ## 
  5  ##   This program is free software; you can redistribute it and/or modify 
  6  ##   it under the terms of the GNU General Public License as published by 
  7  ##   the Free Software Foundation; either version 2, or (at your option) 
  8  ##   any later version. 
  9  ## 
 10  ##   This program is distributed in the hope that it will be useful, 
 11  ##   but WITHOUT ANY WARRANTY; without even the implied warranty of 
 12  ##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 13  ##   GNU General Public License for more details. 
 14   
 15  # $Id: simplexml.py,v 1.27 2005/04/30 07:20:27 snakeru Exp $ 
 16   
 17  """ 
 18  Simplexml module provides xmpppy library with all needed tools to handle XML 
 19  nodes and XML streams. I'm personally using it in many other separate 
 20  projects. It is designed to be as standalone as possible 
 21  """ 
 22   
 23  import xml.parsers.expat 
 24  import logging 
 25  log = logging.getLogger('nbxmpp.simplexml') 
 26   
27 -def XMLescape(txt):
28 """ 29 Return provided string with symbols & < > " replaced by their respective XML 30 entities 31 """ 32 # replace also FORM FEED and ESC, because they are not valid XML chars 33 return txt.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;").replace('"', "&quot;").replace(u'\x0C', "").replace(u'\x1B', "")
34 35 ENCODING='utf-8' 36
37 -def ustr(what):
38 """ 39 Converts object "what" to unicode string using it's own __str__ method if 40 accessible or unicode method otherwise 41 """ 42 if isinstance(what, unicode): 43 return what 44 try: 45 r = what.__str__() 46 except AttributeError: 47 r = str(what) 48 if not isinstance(r, unicode): 49 return unicode(r, ENCODING) 50 return r
51
52 -class Node(object):
53 """ 54 Node class describes syntax of separate XML Node. It have a constructor that 55 permits node creation from set of "namespace name", attributes and payload 56 of text strings and other nodes. It does not natively support building node 57 from text string and uses NodeBuilder class for that purpose. After 58 creation node can be mangled in many ways so it can be completely changed. 59 Also node can be serialised into string in one of two modes: default (where 60 the textual representation of node describes it exactly) and "fancy" - with 61 whitespace added to make indentation and thus make result more readable by 62 human. 63 64 Node class have attribute FORCE_NODE_RECREATION that is defaults to False 65 thus enabling fast node replication from the some other node. The drawback 66 of the fast way is that new node shares some info with the "original" node 67 that is changing the one node may influence the other. Though it is rarely 68 needed (in xmpppy it is never needed at all since I'm usually never using 69 original node after replication (and using replication only to move upwards 70 on the classes tree). 71 """ 72 73 FORCE_NODE_RECREATION = 0 74
75 - def __init__(self, tag=None, attrs={}, payload=[], parent=None, nsp=None, 76 node_built=False, node=None):
77 """ 78 Takes "tag" argument as the name of node (prepended by namespace, if 79 needed and separated from it by a space), attrs dictionary as the set of 80 arguments, payload list as the set of textual strings and child nodes 81 that this node carries within itself and "parent" argument that is 82 another node that this one will be the child of. Also the __init__ can be 83 provided with "node" argument that is either a text string containing 84 exactly one node or another Node instance to begin with. If both "node" 85 and other arguments is provided then the node initially created as 86 replica of "node" provided and then modified to be compliant with other 87 arguments. 88 """ 89 if node: 90 if self.FORCE_NODE_RECREATION and isinstance(node, Node): 91 node = str(node) 92 if not isinstance(node, Node): 93 node = NodeBuilder(node, self) 94 node_built = True 95 else: 96 self.name, self.namespace, self.attrs, self.data, self.kids, self.parent, self.nsd = node.name, node.namespace, {}, [], [], node.parent, {} 97 for key in node.attrs.keys(): 98 self.attrs[key] = node.attrs[key] 99 for data in node.data: 100 self.data.append(data) 101 for kid in node.kids: 102 self.kids.append(kid) 103 for k, v in node.nsd.items(): 104 self.nsd[k] = v 105 else: 106 self.name, self.namespace, self.attrs, self.data, self.kids, self.parent, self.nsd = 'tag', '', {}, [], [], None, {} 107 if parent: 108 self.parent = parent 109 self.nsp_cache = {} 110 if nsp: 111 for k, v in nsp.items(): self.nsp_cache[k] = v 112 for attr, val in attrs.items(): 113 if attr == 'xmlns': 114 self.nsd[u''] = val 115 elif attr.startswith('xmlns:'): 116 self.nsd[attr[6:]] = val 117 self.attrs[attr]=attrs[attr] 118 if tag: 119 if node_built: 120 pfx, self.name = (['']+tag.split(':'))[-2:] 121 self.namespace = self.lookup_nsp(pfx) 122 else: 123 if ' ' in tag: 124 self.namespace, self.name = tag.split() 125 else: 126 self.name = tag 127 if isinstance(payload, basestring): payload=[payload] 128 for i in payload: 129 if isinstance(i, Node): 130 self.addChild(node=i) 131 else: 132 self.data.append(ustr(i))
133
134 - def lookup_nsp(self, pfx=''):
135 ns = self.nsd.get(pfx, None) 136 if ns is None: 137 ns = self.nsp_cache.get(pfx, None) 138 if ns is None: 139 if self.parent: 140 ns = self.parent.lookup_nsp(pfx) 141 self.nsp_cache[pfx] = ns 142 else: 143 return 'http://www.gajim.org/xmlns/undeclared' 144 return ns
145
146 - def __str__(self, fancy=0):
147 """ 148 Method used to dump node into textual representation. If "fancy" argument 149 is set to True produces indented output for readability 150 """ 151 s = (fancy-1) * 2 * ' ' + "<" + self.name 152 if self.namespace: 153 if not self.parent or self.parent.namespace!=self.namespace: 154 if 'xmlns' not in self.attrs: 155 s = s + ' xmlns="%s"'%self.namespace 156 for key in self.attrs.keys(): 157 val = ustr(self.attrs[key]) 158 s = s + ' %s="%s"' % ( key, XMLescape(val) ) 159 s = s + ">" 160 cnt = 0 161 if self.kids: 162 if fancy: s = s + "\n" 163 for a in self.kids: 164 if not fancy and (len(self.data)-1)>=cnt: s=s+XMLescape(self.data[cnt]) 165 elif (len(self.data)-1)>=cnt: s=s+XMLescape(self.data[cnt].strip()) 166 if isinstance(a, str) or isinstance(a, unicode): 167 s = s + a.__str__() 168 else: 169 s = s + a.__str__(fancy and fancy+1) 170 cnt=cnt+1 171 if not fancy and (len(self.data)-1) >= cnt: s = s + XMLescape(self.data[cnt]) 172 elif (len(self.data)-1) >= cnt: s = s + XMLescape(self.data[cnt].strip()) 173 if not self.kids and s.endswith('>'): 174 s=s[:-1]+' />' 175 if fancy: s = s + "\n" 176 else: 177 if fancy and not self.data: s = s + (fancy-1) * 2 * ' ' 178 s = s + "</" + self.name + ">" 179 if fancy: s = s + "\n" 180 return s
181
182 - def addChild(self, name=None, attrs={}, payload=[], namespace=None, node=None):
183 """ 184 If "node" argument is provided, adds it as child node. Else creates new 185 node from the other arguments' values and adds it as well 186 """ 187 if 'xmlns' in attrs: 188 raise AttributeError("Use namespace=x instead of attrs={'xmlns':x}") 189 if node: 190 newnode=node 191 node.parent = self 192 else: newnode=Node(tag=name, parent=self, attrs=attrs, payload=payload) 193 if namespace: 194 newnode.setNamespace(namespace) 195 self.kids.append(newnode) 196 return newnode
197
198 - def addData(self, data):
199 """ 200 Add some CDATA to node 201 """ 202 self.data.append(ustr(data))
203
204 - def clearData(self):
205 """ 206 Remove all CDATA from the node 207 """ 208 self.data = []
209
210 - def delAttr(self, key):
211 """ 212 Delete an attribute "key" 213 """ 214 del self.attrs[key]
215
216 - def delChild(self, node, attrs={}):
217 """ 218 Delete the "node" from the node's childs list, if "node" is an instance. 219 Else delete the first node that have specified name and (optionally) 220 attributes 221 """ 222 if not isinstance(node, Node): 223 node = self.getTag(node, attrs) 224 self.kids.remove(node) 225 return node
226
227 - def getAttrs(self):
228 """ 229 Return all node's attributes as dictionary 230 """ 231 return self.attrs
232
233 - def getAttr(self, key):
234 """ 235 Return value of specified attribute 236 """ 237 return self.attrs.get(key)
238
239 - def getChildren(self):
240 """ 241 Return all node's child nodes as list 242 """ 243 return self.kids
244
245 - def getData(self):
246 """ 247 Return all node CDATA as string (concatenated) 248 """ 249 return ''.join(self.data)
250
251 - def getName(self):
252 """ 253 Return the name of node 254 """ 255 return self.name
256
257 - def getNamespace(self):
258 """ 259 Return the namespace of node 260 """ 261 return self.namespace
262
263 - def getParent(self):
264 """ 265 Returns the parent of node (if present) 266 """ 267 return self.parent
268
269 - def getPayload(self):
270 """ 271 Return the payload of node i.e. list of child nodes and CDATA entries. 272 F.e. for "<node>text1<nodea/><nodeb/> text2</node>" will be returned 273 list: ['text1', <nodea instance>, <nodeb instance>, ' text2'] 274 """ 275 ret = [] 276 for i in range(len(self.kids)+len(self.data)+1): 277 try: 278 if self.data[i]: 279 ret.append(self.data[i]) 280 except IndexError: 281 pass 282 try: 283 ret.append(self.kids[i]) 284 except IndexError: 285 pass 286 return ret
287
288 - def getTag(self, name, attrs={}, namespace=None):
289 """ 290 Filter all child nodes using specified arguments as filter. Return the 291 first found or None if not found 292 """ 293 return self.getTags(name, attrs, namespace, one=1)
294
295 - def getTagAttr(self, tag, attr):
296 """ 297 Return attribute value of the child with specified name (or None if no 298 such attribute) 299 """ 300 try: 301 return self.getTag(tag).attrs[attr] 302 except: 303 return None
304
305 - def getTagData(self, tag):
306 """ 307 Return cocatenated CDATA of the child with specified name 308 """ 309 try: 310 return self.getTag(tag).getData() 311 except Exception: 312 return None
313
314 - def getTags(self, name, attrs={}, namespace=None, one=0):
315 """ 316 Filter all child nodes using specified arguments as filter. Returns the 317 list of nodes found 318 """ 319 nodes = [] 320 for node in self.kids: 321 if namespace and namespace != node.getNamespace(): 322 continue 323 if node.getName() == name: 324 for key in attrs.keys(): 325 if key not in node.attrs or node.attrs[key]!=attrs[key]: 326 break 327 else: 328 nodes.append(node) 329 if one and nodes: 330 return nodes[0] 331 if not one: 332 return nodes
333
334 - def iterTags(self, name, attrs={}, namespace=None):
335 """ 336 Iterate over all children using specified arguments as filter 337 """ 338 for node in self.kids: 339 if namespace is not None and namespace != node.getNamespace(): 340 continue 341 if node.getName() == name: 342 for key in attrs.keys(): 343 if key not in node.attrs or \ 344 node.attrs[key]!=attrs[key]: 345 break 346 else: 347 yield node
348
349 - def setAttr(self, key, val):
350 """ 351 Set attribute "key" with the value "val" 352 """ 353 self.attrs[key] = val
354
355 - def setData(self, data):
356 """ 357 Set node's CDATA to provided string. Resets all previous CDATA! 358 """ 359 self.data = [ustr(data)]
360
361 - def setName(self, val):
362 """ 363 Change the node name 364 """ 365 self.name = val
366
367 - def setNamespace(self, namespace):
368 """ 369 Changes the node namespace 370 """ 371 self.namespace = namespace
372
373 - def setParent(self, node):
374 """ 375 Set node's parent to "node". WARNING: do not checks if the parent already 376 present and not removes the node from the list of childs of previous 377 parent 378 """ 379 self.parent = node
380
381 - def setPayload(self, payload, add=0):
382 """ 383 Set node payload according to the list specified. WARNING: completely 384 replaces all node's previous content. If you wish just to add child or 385 CDATA - use addData or addChild methods 386 """ 387 if isinstance(payload, basestring): 388 payload = [payload] 389 if add: 390 self.kids += payload 391 else: 392 self.kids = payload
393
394 - def setTag(self, name, attrs={}, namespace=None):
395 """ 396 Same as getTag but if the node with specified namespace/attributes not 397 found, creates such node and returns it 398 """ 399 node = self.getTags(name, attrs, namespace=namespace, one=1) 400 if node: 401 return node 402 else: 403 return self.addChild(name, attrs, namespace=namespace)
404
405 - def setTagAttr(self, tag, attr, val):
406 """ 407 Create new node (if not already present) with name "tag" and set it's 408 attribute "attr" to value "val" 409 """ 410 try: 411 self.getTag(tag).attrs[attr] = val 412 except Exception: 413 self.addChild(tag, attrs={attr: val})
414
415 - def setTagData(self, tag, val, attrs={}):
416 """ 417 Creates new node (if not already present) with name "tag" and 418 (optionally) attributes "attrs" and sets it's CDATA to string "val" 419 """ 420 try: 421 self.getTag(tag, attrs).setData(ustr(val)) 422 except Exception: 423 self.addChild(tag, attrs, payload = [ustr(val)])
424
425 - def has_attr(self, key):
426 """ 427 Check if node have attribute "key" 428 """ 429 return key in self.attrs
430
431 - def __getitem__(self, item):
432 """ 433 Return node's attribute "item" value 434 """ 435 return self.getAttr(item)
436
437 - def __setitem__(self, item, val):
438 """ 439 Set node's attribute "item" value 440 """ 441 return self.setAttr(item, val)
442
443 - def __delitem__(self, item):
444 """ 445 Delete node's attribute "item" 446 """ 447 return self.delAttr(item)
448
449 - def __contains__(self, item):
450 """ 451 Check if node has attribute "item" 452 """ 453 return self.has_attr(item)
454
455 - def __getattr__(self, attr):
456 """ 457 Reduce memory usage caused by T/NT classes - use memory only when needed 458 """ 459 if attr == 'T': 460 self.T = T(self) 461 return self.T 462 if attr == 'NT': 463 self.NT = NT(self) 464 return self.NT 465 raise AttributeError
466
467 -class T:
468 """ 469 Auxiliary class used to quick access to node's child nodes 470 """ 471
472 - def __init__(self, node):
473 self.__dict__['node'] = node
474
475 - def __getattr__(self, attr):
476 return self.node.setTag(attr)
477
478 - def __setattr__(self, attr, val):
479 if isinstance(val, Node): 480 Node.__init__(self.node.setTag(attr), node=val) 481 else: 482 return self.node.setTagData(attr, val)
483
484 - def __delattr__(self, attr):
485 return self.node.delChild(attr)
486
487 -class NT(T):
488 """ 489 Auxiliary class used to quick create node's child nodes 490 """ 491
492 - def __getattr__(self, attr):
493 return self.node.addChild(attr)
494
495 - def __setattr__(self, attr, val):
496 if isinstance(val, Node): 497 self.node.addChild(attr, node=val) 498 else: 499 return self.node.addChild(attr, payload=[val])
500
501 -class NodeBuilder:
502 """ 503 Builds a Node class minidom from data parsed to it. This class used for two 504 purposes: 505 506 1. Creation an XML Node from a textual representation. F.e. reading a 507 config file. See an XML2Node method. 508 2. Handling an incoming XML stream. This is done by mangling the 509 __dispatch_depth parameter and redefining the dispatch method. 510 511 You do not need to use this class directly if you do not designing your own 512 XML handler 513 """ 514
515 - def __init__(self, data=None, initial_node=None):
516 """ 517 Take two optional parameters: "data" and "initial_node" 518 519 By default class initialised with empty Node class instance. Though, if 520 "initial_node" is provided it used as "starting point". You can think 521 about it as of "node upgrade". "data" (if provided) feeded to parser 522 immidiatedly after instance init. 523 """ 524 log.debug("Preparing to handle incoming XML stream.") 525 self._parser = xml.parsers.expat.ParserCreate() 526 self._parser.StartElementHandler = self.starttag 527 self._parser.EndElementHandler = self.endtag 528 self._parser.StartNamespaceDeclHandler = self.handle_namespace_start 529 self._parser.CharacterDataHandler = self.handle_cdata 530 self._parser.buffer_text = True 531 self.Parse = self._parser.Parse 532 533 self.__depth = 0 534 self.__last_depth = 0 535 self.__max_depth = 0 536 self._dispatch_depth = 1 537 self._document_attrs = None 538 self._document_nsp = None 539 self._mini_dom=initial_node 540 self.last_is_data = 1 541 self._ptr=None 542 self.data_buffer = None 543 self.streamError = '' 544 if data: 545 self._parser.Parse(data, 1)
546
547 - def check_data_buffer(self):
548 if self.data_buffer: 549 self._ptr.data.append(''.join(self.data_buffer)) 550 del self.data_buffer[:] 551 self.data_buffer = None
552
553 - def destroy(self):
554 """ 555 Method used to allow class instance to be garbage-collected 556 """ 557 self.check_data_buffer() 558 self._parser.StartElementHandler = None 559 self._parser.EndElementHandler = None 560 self._parser.CharacterDataHandler = None 561 self._parser.StartNamespaceDeclHandler = None
562
563 - def starttag(self, tag, attrs):
564 """ 565 XML Parser callback. Used internally 566 """ 567 self.check_data_buffer() 568 self._inc_depth() 569 log.info("STARTTAG.. DEPTH -> %i , tag -> %s, attrs -> %s" % (self.__depth, tag, `attrs`)) 570 if self.__depth == self._dispatch_depth: 571 if not self._mini_dom : 572 self._mini_dom = Node(tag=tag, attrs=attrs, nsp = self._document_nsp, node_built=True) 573 else: 574 Node.__init__(self._mini_dom, tag=tag, attrs=attrs, nsp = self._document_nsp, node_built=True) 575 self._ptr = self._mini_dom 576 elif self.__depth > self._dispatch_depth: 577 self._ptr.kids.append(Node(tag=tag, parent=self._ptr, attrs=attrs, node_built=True)) 578 self._ptr = self._ptr.kids[-1] 579 if self.__depth == 1: 580 self._document_attrs = {} 581 self._document_nsp = {} 582 nsp, name = (['']+tag.split(':'))[-2:] 583 for attr, val in attrs.items(): 584 if attr == 'xmlns': 585 self._document_nsp[u''] = val 586 elif attr.startswith('xmlns:'): 587 self._document_nsp[attr[6:]] = val 588 else: 589 self._document_attrs[attr] = val 590 ns = self._document_nsp.get(nsp, 'http://www.gajim.org/xmlns/undeclared-root') 591 try: 592 self.stream_header_received(ns, name, attrs) 593 except ValueError, e: 594 self._document_attrs = None 595 raise ValueError(str(e)) 596 if not self.last_is_data and self._ptr.parent: 597 self._ptr.parent.data.append('') 598 self.last_is_data = 0
599
600 - def endtag(self, tag ):
601 """ 602 XML Parser callback. Used internally 603 """ 604 log.info("DEPTH -> %i , tag -> %s" % (self.__depth, tag)) 605 self.check_data_buffer() 606 if self.__depth == self._dispatch_depth: 607 if self._mini_dom.getName() == 'error': 608 children = self._mini_dom.getChildren() 609 if children: 610 self.streamError = children[0].getName() 611 else: 612 self.streamError = self._mini_dom.getData() 613 self.dispatch(self._mini_dom) 614 elif self.__depth > self._dispatch_depth: 615 self._ptr = self._ptr.parent 616 else: 617 log.info("Got higher than dispatch level. Stream terminated?") 618 self._dec_depth() 619 self.last_is_data = 0 620 if self.__depth == 0: self.stream_footer_received()
621
622 - def handle_cdata(self, data):
623 if self.last_is_data: 624 if self.data_buffer: 625 self.data_buffer.append(data) 626 elif self._ptr: 627 self.data_buffer = [data] 628 self.last_is_data = 1
629
630 - def handle_namespace_start(self, prefix, uri):
631 """ 632 XML Parser callback. Used internally 633 """ 634 self.check_data_buffer()
635
636 - def getDom(self):
637 """ 638 Return just built Node 639 """ 640 self.check_data_buffer() 641 return self._mini_dom
642
643 - def dispatch(self, stanza):
644 """ 645 Get called when the NodeBuilder reaches some level of depth on it's way 646 up with the built node as argument. Can be redefined to convert incoming 647 XML stanzas to program events 648 """ 649 pass
650
651 - def stream_header_received(self, ns, tag, attrs):
652 """ 653 Method called when stream just opened 654 """ 655 self.check_data_buffer()
656 662
663 - def has_received_endtag(self, level=0):
664 """ 665 Return True if at least one end tag was seen (at level) 666 """ 667 return self.__depth <= level and self.__max_depth > level
668
669 - def _inc_depth(self):
670 self.__last_depth = self.__depth 671 self.__depth += 1 672 self.__max_depth = max(self.__depth, self.__max_depth)
673
674 - def _dec_depth(self):
675 self.__last_depth = self.__depth 676 self.__depth -= 1
677
678 -def XML2Node(xml):
679 """ 680 Convert supplied textual string into XML node. Handy f.e. for reading 681 configuration file. Raises xml.parser.expat.parsererror if provided string 682 is not well-formed XML 683 """ 684 return NodeBuilder(xml).getDom()
685
686 -def BadXML2Node(xml):
687 """ 688 Convert supplied textual string into XML node. Survives if xml data is 689 cutted half way round. I.e. "<html>some text <br>some more text". Will raise 690 xml.parser.expat.parsererror on misplaced tags though. F.e. "<b>some text 691 <br>some more text</b>" will not work 692 """ 693 return NodeBuilder(xml).getDom()
694

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.InvalidFrom-class.html0000644000175000017500000002263312321263757025756 0ustar asterixasterix00000000000000 nbxmpp.protocol.InvalidFrom
Package nbxmpp :: Module protocol :: Class InvalidFrom
[hide private]
[frames] | no frames]

Class InvalidFrom

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_33.gif0000644000175000017500000002114712321263757025622 0ustar asterixasterix00000000000000GIF89aLB<ČBDlĢ$"$lfdjdĂlRLbdĺT><<2, \NLĖvlԦ\F<̞TB4,&$Ćfd&$VT64ܶĞvtܾ  FDnl^\ܮNLԦ.,64侼̞ Ďnl̖Ԯ><!,U H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ -AѣH*]ʴӧPJJUL9µׯ`ÊKٳhӪ]GȝKݻx˷߿v Wa+^8pb; whQʛ7c{YqdG-ZQŒ:sS*Y1wśjJ ofTЮ2!&tbR"J`4rC7;uW]rHGuv}xͅFq<`nvTGvXĆ !z"5԰Y(d"j*,1[Tbל0 8#%0aUIb:H(!X%.^4z :#BZd\ig) r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one

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/nbxmpp.features_nb-module.html0000644000175000017500000011543612321263757024365 0ustar asterixasterix00000000000000 nbxmpp.features_nb
Package nbxmpp :: Module features_nb
[hide private]
[frames] | no frames]

Module features_nb

source code

Different stuff that wasn't worth separating it into modules (Registration, Privacy Lists, ...)
Functions [hide private]
 
_on_default_response(disp, iq, cb) source code
 
getRegInfo(disp, host, info={}, sync=True)
Get registration form from remote host. Info dict can be prefilled :param disp: plugged dispatcher instance :param info: dict, like {'username':'joey'}.
source code
 
_ReceivedRegInfo(con, resp, agent) source code
 
register(disp, host, info, cb, args=None)
Perform registration on remote server with provided info
source code
 
unregister(disp, host, cb)
Unregisters with host (permanently removes account). Returns true on success
source code
 
changePasswordTo(disp, newpassword, host=None, cb=None)
Changes password on specified or current (if not specified) server. Returns true on success.
source code
 
getPrivacyLists(disp)
Request privacy lists from connected server. Returns dictionary of existing lists on success.
source code
 
getActiveAndDefaultPrivacyLists(disp) source code
 
getPrivacyList(disp, listname)
Request specific privacy list listname. Returns list of XML nodes (rules) taken from the server responce.
source code
 
setActivePrivacyList(disp, listname=None, typ='active', cb=None)
Switch privacy list 'listname' to specified type. By default the type is 'active'. Returns true on success.
source code
 
setDefaultPrivacyList(disp, listname=None)
Set the default privacy list as 'listname'. Returns true on success
source code
 
setPrivacyList(disp, listname, tags)
Set the ruleset
source code
 
delPrivacyList(disp, listname, cb=None)
Deletes privacy list 'listname'. Returns true on success.
source code
Variables [hide private]
  REGISTER_DATA_RECEIVED = 'REGISTER DATA RECEIVED'
  PL_TYPE_JID = 'jid'
  PL_TYPE_GROUP = 'group'
  PL_TYPE_SUBC = 'subscription'
  PL_ACT_ALLOW = 'allow'
  PL_ACT_DENY = 'deny'
  PRIVACY_LISTS_RECEIVED = 'PRIVACY LISTS RECEIVED'
  PRIVACY_LIST_RECEIVED = 'PRIVACY LIST RECEIVED'
  PRIVACY_LISTS_ACTIVE_DEFAULT = 'PRIVACY LISTS ACTIVE DEFAULT'
  __package__ = 'nbxmpp'

Imports: NS_REGISTER, NS_PRIVACY, NS_DATA, Iq, isResultNode, Node


Function Details [hide private]

_on_default_response(disp, iq, cb)

source code 

getRegInfo(disp, host, info={}, sync=True)

source code 

Get registration form from remote host. Info dict can be prefilled :param disp: plugged dispatcher instance :param info: dict, like {'username':'joey'}.

See JEP-0077 for details.

_ReceivedRegInfo(con, resp, agent)

source code 

register(disp, host, info, cb, args=None)

source code 

Perform registration on remote server with provided info

If registration fails you can get additional info from the dispatcher's owner attributes lastErrNode, lastErr and lastErrCode.

unregister(disp, host, cb)

source code 
Unregisters with host (permanently removes account). Returns true on success

changePasswordTo(disp, newpassword, host=None, cb=None)

source code 
Changes password on specified or current (if not specified) server. Returns true on success.

getPrivacyLists(disp)

source code 
Request privacy lists from connected server. Returns dictionary of existing lists on success.

getActiveAndDefaultPrivacyLists(disp)

source code 

getPrivacyList(disp, listname)

source code 
Request specific privacy list listname. Returns list of XML nodes (rules) taken from the server responce.

setActivePrivacyList(disp, listname=None, typ='active', cb=None)

source code 
Switch privacy list 'listname' to specified type. By default the type is 'active'. Returns true on success.

setDefaultPrivacyList(disp, listname=None)

source code 
Set the default privacy list as 'listname'. Returns true on success

setPrivacyList(disp, listname, tags)

source code 

Set the ruleset

'list' should be the simpleXML node formatted according to RFC 3921 (XMPP-IM) I.e. Node('list',{'name':listname},payload=[...]).

Returns true on success.

delPrivacyList(disp, listname, cb=None)

source code 
Deletes privacy list 'listname'. Returns true on success.

Variables Details [hide private]

REGISTER_DATA_RECEIVED

Value:
'REGISTER DATA RECEIVED'

PL_TYPE_JID

Value:
'jid'

PL_TYPE_GROUP

Value:
'group'

PL_TYPE_SUBC

Value:
'subscription'

PL_ACT_ALLOW

Value:
'allow'

PL_ACT_DENY

Value:
'deny'

PRIVACY_LISTS_RECEIVED

Value:
'PRIVACY LISTS RECEIVED'

PRIVACY_LIST_RECEIVED

Value:
'PRIVACY LIST RECEIVED'

PRIVACY_LISTS_ACTIVE_DEFAULT

Value:
'PRIVACY LISTS ACTIVE DEFAULT'

__package__

Value:
'nbxmpp'

nbxmpp-0.5.3/doc/apidocs/nbxmpp.proxy_connectors.ProxyConnector-class.html0000644000175000017500000004027412321263757030316 0ustar asterixasterix00000000000000 nbxmpp.proxy_connectors.ProxyConnector
Package nbxmpp :: Module proxy_connectors :: Class ProxyConnector
[hide private]
[frames] | no frames]

Class ProxyConnector

source code


Interface for proxy-connecting object - when tunnneling XMPP over proxies, some connecting process usually has to be done before opening stream. Proxy connectors are used right after TCP connection is estabilished
Instance Methods [hide private]
 
__init__(self, send_method, onreceive, old_on_receive, on_success, on_failure, xmpp_server, proxy_creds=(None, None))
Creates proxy connector, starts connecting immediately and gives control back to transport afterwards
source code
 
start_connecting(self) source code
 
connecting_over(self) source code
Class Methods [hide private]
 
get_instance(cls, *args, **kwargs)
Factory Method for object creation
source code
Method Details [hide private]

__init__(self, send_method, onreceive, old_on_receive, on_success, on_failure, xmpp_server, proxy_creds=(None, None))
(Constructor)

source code 
Creates proxy connector, starts connecting immediately and gives control back to transport afterwards
Parameters:
  • send_method - transport send method
  • onreceive - method to set on_receive callbacks
  • old_on_receive - on_receive callback that should be set when proxy connection was successful
  • on_success - called after proxy connection was successfully opened
  • on_failure - called when errors occured while connecting
  • xmpp_server - tuple of (hostname, port)
  • proxy_creds - tuple of (proxy_user, proxy_credentials)

get_instance(cls, *args, **kwargs)
Class Method

source code 

Factory Method for object creation

Use this instead of directly initializing the class in order to make unit testing much easier.

start_connecting(self)

source code 

connecting_over(self)

source code 

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_40.gif0000644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u(`f`U ߆'&x(8^-F&dOF9eWfe_9fg& fwgKc{gF:iS\:jGzhK+zj#~kf-kfqm6mS{nf;뾻pA~C"Sgx1je "$e -F(6dUTYx2%PVVXTu F I38RV0cHH=LbGE*j2xapIER k4"(Gs+?rYgzL1Z[իNؔ%^i]ғ<%:!e$>Y([ LE.|2 ?f0E_"d>o=8Pу dzL U02"sN@)yB`[2Sb$iA 1@(p_r w  姅y c<253hܻ!'9Oc\ @q2հg_}O=qTWsg[qKI:>ri|'"'9 r;)yϭ7Ois\&:lsAG:|'lC/͛tnUWԣcKI׽.5ob;]ie7v%swS={KwDFx7?yW~[><w}E?zҗMG}UzK|e?{Bu{~?|G~|7χ~?}W~;nbxmpp-0.5.3/doc/apidocs/toc-nbxmpp.auth_nb-module.html0000644000175000017500000000560412321263757024266 0ustar asterixasterix00000000000000 auth_nb

Module auth_nb


Classes

NonBlockingBind
NonBlockingNonSASL
SASL

Functions

C
H
HH
challenge_splitter
scram_parse

Variables

GSS_STATE_STEP
GSS_STATE_WRAP
SASL_FAILURE
SASL_FAILURE_IN_PROGRESS
SASL_IN_PROCESS
SASL_SUCCESS
SASL_UNSUPPORTED
__package__
have_kerberos
kerberos
log

[hide private] nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_5.gif0000644000175000017500000002132412321263757025536 0ustar asterixasterix00000000000000GIF89aLB<ČBDl̢lfd$"$jdĂlRLbdĺT>< <2,Ė\NLvtzt\F<|b\"$RTԪܲD:424$Ěvt|jllZ\ܺt4&$rt TJLnd><̞TB4fdND̦tbdz|䶴t$ľ,&$Ćfd&$VTܶ64Ğܾvt  rdFDnl^\ܮNL.,64侼̞ ԦĎnl̖Ԯ><!,U H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ -iAѣH*]ʴӧPJJU8)µׯ`ÊKٳhӪ]EȝKݻx˷߿v Wa+^8pb; whϥʛ7c{YqdG-ZQ:sSST'1fJ oyСfЮ"z"\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PBO%W9Fkd6YQ& ́P('b QZ U|BX}@a U dkΖUUhiYU*fxH* l 'Lz 6DIpv, IRN Df5@DD[Vg98ka.ζ]mԦۉᖷo\Nōq*.lukNnv]v׻ox/@EozˈԽo^^=o~{_׿p<` p20Է%/a 7 eȂP1 }QЌ2C-谌Vr- :t3l$!}<} 2`NSa(!N X3JlL4ũv5eMKCx lQ dϨ {˂ggp`Űﳣ=IҗňniSة.\B g(¾m,vme%/ 7lcpo0!o ' nߎ|X w ]" ~$ -3_`'}y#DC`g|Vu_z9!9~m/&o"PDUxea B^Jg8L~^~,w^KR~j_Ɉ02vnyϐ֐ F! d^7m|+vQ+̡-X ,?B$BA$B4EADEdH2G,K-d.lNOP7CI4E&,STmUkB{XkEmy[ŽK^lb4F̙{Qedftgb/jklmnh ;nbxmpp-0.5.3/doc/apidocs/toc-nbxmpp.bosh-module.html0000644000175000017500000000357312321263757023604 0ustar asterixasterix00000000000000 bosh

Module bosh


Classes

AckChecker
KeyStack
NonBlockingBOSH

Functions

get_rand_number

Variables

FAKE_DESCRIPTOR
KEY_COUNT
__package__
bosh_errors
log

[hide private] nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_17.gif0000644000175000017500000002042512321263757025622 0ustar asterixasterix00000000000000GIF89aLB<ČBDl̢$"$jdlfdĂbdlRLT><ĺ <2,vtĖdND̪zt"$\F<ܬRT|b\D:424$vtĚtܲ|jl4&$ndrtlZ\ܺ ><̞TB4ND,&$z|fdtjl̦Ԫ䶴t$t^TĆfd&$VT64Ğܶvtܾ  FDܮnl^\NL.,64侼̞ ԦĎnl̖><ԮLBD<24dNL\FDD:<$nl̞TBDԦ~|jd,"$vttZ\TFDlVT|fdzt4*,D64L><!,O H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ -yAѣH*]ʴӧPJJ,!µׯ`ÊKٳhӪ]@DȝKݻx˷߿v Wa+^8pb; whʛ7c{YqdG-ZOl:sSWe'OI17d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ȱY<+2S Ȁ~*y]lfS=UgS,9{f4ӛܭ=8(2pEǣӝ"g1UPNb+py+"H#V##"xRdT)IB vCuC! E4t "/jc-A F]bĤQ8i-.0$Ahd#U(0"GOEо 2dIT9"otS-ywK\R e/KD[S%IF9f6V H&I TӚf6Mnvӛߴ&SQl/9 bҘ%9ONx|g=US1LOД4P6ԡ<gEPRT2Tq#gá?؃.*R*V5uK Ǹ94AO%W9Fkd4YQ& AP( &xQ StX}αy B;0. b/!VЂdB ;8| 3h fV|YV*@ ;/bX%(5PfNiOb f~T;rE -2XW ?h4%<яu\bX"v` pzNW–u!}je&޴~+?,CE0QmtGGzҕt` yK\W8[DKu]c';NΞ}U?pЙ>wCw:Ӯv{gڣvg{O.d^?<x3n"vw{]җG}Uzַ ;nbxmpp-0.5.3/doc/apidocs/nbxmpp.stringprepare.EmptyMappingTable-class.html0000644000175000017500000002264712321263757030157 0ustar asterixasterix00000000000000 nbxmpp.stringprepare.EmptyMappingTable
Package nbxmpp :: Module stringprepare :: Class EmptyMappingTable
[hide private]
[frames] | no frames]

Class EmptyMappingTable

source code

Nested Classes [hide private]
  __implements__
Interface for character mapping classes
Instance Methods [hide private]
 
__init__(self, in_table_function) source code
 
map(self, c) source code
Method Details [hide private]

__init__(self, in_table_function)
(Constructor)

source code 

map(self, c)

source code 

nbxmpp-0.5.3/doc/apidocs/nbxmpp.roster_nb.NonBlockingRoster-class.html0000644000175000017500000017223012321263757027301 0ustar asterixasterix00000000000000 nbxmpp.roster_nb.NonBlockingRoster
Package nbxmpp :: Module roster_nb :: Class NonBlockingRoster
[hide private]
[frames] | no frames]

Class NonBlockingRoster

source code


Defines a plenty of methods that will allow you to manage roster. Also automatically track presences from remote JIDs taking into account that every JID can have multiple resources connected. Does not currently support 'error' presences. You can also use mapping interface for access to the internal representation of contacts in roster
Instance Methods [hide private]
 
__init__(self, version=None)
Init internal variables
source code
 
Request(self, force=0)
Request roster from server if it were not yet requested (or if the 'force' argument is set)
source code
 
RosterIqHandler(self, dis, stanza)
Subscription tracker. Used internally for setting items state in internal roster representation
source code
 
PresenceHandler(self, dis, pres)
Presence tracker. Used internally for setting items' resources state in internal roster representation
source code
 
_getItemData(self, jid, dataname)
Return specific jid's representation in internal format. Used internally
source code
 
_getResourceData(self, jid, dataname)
Return specific jid's resource representation in internal format. Used internally
source code
 
delItem(self, jid)
Delete contact 'jid' from roster
source code
 
getAsk(self, jid)
Return 'ask' value of contact 'jid'
source code
 
getGroups(self, jid)
Return groups list that contact 'jid' belongs to
source code
 
getName(self, jid)
Return name of contact 'jid'
source code
 
getPriority(self, jid)
Return priority of contact 'jid'. 'jid' should be a full (not bare) JID
source code
 
getRawRoster(self)
Return roster representation in internal format
source code
 
getRawItem(self, jid)
Return roster item 'jid' representation in internal format
source code
 
getShow(self, jid)
Return 'show' value of contact 'jid'. 'jid' should be a full (not bare) JID
source code
 
getStatus(self, jid)
Return 'status' value of contact 'jid'. 'jid' should be a full (not bare) JID
source code
 
getSubscription(self, jid)
Return 'subscription' value of contact 'jid'
source code
 
getResources(self, jid)
Return list of connected resources of contact 'jid'
source code
 
setItem(self, jid, name=None, groups=[])
Rename contact 'jid' and sets the groups list that it now belongs to
source code
 
setItemMulti(self, items)
Rename multiple contacts and sets their group lists
source code
 
getItems(self)
Return list of all [bare] JIDs that the roster is currently tracks
source code
 
keys(self)
Same as getItems. Provided for the sake of dictionary interface
source code
 
__getitem__(self, item)
Get the contact in the internal format. Raises KeyError if JID 'item' is not in roster
source code
 
getItem(self, item)
Get the contact in the internal format (or None if JID 'item' is not in roster)
source code
 
Subscribe(self, jid)
Send subscription request to JID 'jid'
source code
 
Unsubscribe(self, jid)
Ask for removing our subscription for JID 'jid'
source code
 
Authorize(self, jid)
Authorize JID 'jid'. Works only if these JID requested auth previously
source code
 
Unauthorize(self, jid)
Unauthorise JID 'jid'. Use for declining authorisation request or for removing existing authorization
source code
 
getRaw(self)
Return the internal data representation of the roster
source code
 
setRaw(self, data)
Return the internal data representation of the roster
source code
 
plugin(self, owner, request=1)
Register presence and subscription trackers in the owner's dispatcher. Also request roster from server if the 'request' argument is set. Used internally
source code
 
_on_roster_set(self, data) source code
 
getRoster(self, on_ready=None, force=False)
Request roster from server if neccessary and returns self
source code

Inherited from plugin.PlugIn: PlugIn, PlugOut

Class Methods [hide private]

Inherited from plugin.PlugIn: get_instance

Method Details [hide private]

__init__(self, version=None)
(Constructor)

source code 
Init internal variables
Overrides: plugin.PlugIn.__init__

Request(self, force=0)

source code 
Request roster from server if it were not yet requested (or if the 'force' argument is set)

RosterIqHandler(self, dis, stanza)

source code 
Subscription tracker. Used internally for setting items state in internal roster representation

PresenceHandler(self, dis, pres)

source code 
Presence tracker. Used internally for setting items' resources state in internal roster representation

_getItemData(self, jid, dataname)

source code 
Return specific jid's representation in internal format. Used internally

_getResourceData(self, jid, dataname)

source code 
Return specific jid's resource representation in internal format. Used internally

delItem(self, jid)

source code 
Delete contact 'jid' from roster

getAsk(self, jid)

source code 
Return 'ask' value of contact 'jid'

getGroups(self, jid)

source code 
Return groups list that contact 'jid' belongs to

getName(self, jid)

source code 
Return name of contact 'jid'

getPriority(self, jid)

source code 
Return priority of contact 'jid'. 'jid' should be a full (not bare) JID

getRawRoster(self)

source code 
Return roster representation in internal format

getRawItem(self, jid)

source code 
Return roster item 'jid' representation in internal format

getShow(self, jid)

source code 
Return 'show' value of contact 'jid'. 'jid' should be a full (not bare) JID

getStatus(self, jid)

source code 
Return 'status' value of contact 'jid'. 'jid' should be a full (not bare) JID

getSubscription(self, jid)

source code 
Return 'subscription' value of contact 'jid'

getResources(self, jid)

source code 
Return list of connected resources of contact 'jid'

setItem(self, jid, name=None, groups=[])

source code 
Rename contact 'jid' and sets the groups list that it now belongs to

setItemMulti(self, items)

source code 
Rename multiple contacts and sets their group lists

getItems(self)

source code 
Return list of all [bare] JIDs that the roster is currently tracks

keys(self)

source code 
Same as getItems. Provided for the sake of dictionary interface

__getitem__(self, item)
(Indexing operator)

source code 
Get the contact in the internal format. Raises KeyError if JID 'item' is not in roster

getItem(self, item)

source code 
Get the contact in the internal format (or None if JID 'item' is not in roster)

Subscribe(self, jid)

source code 
Send subscription request to JID 'jid'

Unsubscribe(self, jid)

source code 
Ask for removing our subscription for JID 'jid'

Authorize(self, jid)

source code 
Authorize JID 'jid'. Works only if these JID requested auth previously

Unauthorize(self, jid)

source code 
Unauthorise JID 'jid'. Use for declining authorisation request or for removing existing authorization

getRaw(self)

source code 
Return the internal data representation of the roster

setRaw(self, data)

source code 
Return the internal data representation of the roster

plugin(self, owner, request=1)

source code 
Register presence and subscription trackers in the owner's dispatcher. Also request roster from server if the 'request' argument is set. Used internally

_on_roster_set(self, data)

source code 

getRoster(self, on_ready=None, force=False)

source code 
Request roster from server if neccessary and returns self

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_39.gif0000644000175000017500000001740212321263757025627 0ustar asterixasterix00000000000000GIF89a-LB<ĤFD|Ģ$"$|b\ĆlRLjd<2,ܲfd4d*,\NL伖 |vtD:4\F<Ԧzt̞l|jl|4&$lZ\ܺzlĔ"$ԪTJLL64 TB4dRTjlt^T VTlVL<64,\JDܢ̚4*$~tĞԪ D6,̒rldRL$̢,&$z|LBD|bdĊnd<24ܶjlT>nIBkQUF:C JZ򒌔C(NzdC8 R%CNV򕰌,gIZ̥.wD(zdw 0IbL2f:d#*IjN !5n~ fA~yvǝZ7݃Nxss9Ԃ%gBy:ܳ<(h$4O@ODӠ!|<B46`Q@BhxOVqIM݅я)5o S 1@zBMJEG0L=꟤A-<}T*eg!{iȈp;`bB4ElAPdhbNUCE&,e)>*egkBejL]lC@4j5lF rVfemkPM!r[0ý.c˳\Ivca$Jhnr+YA'QhL&܊g9|ăW5b[sbkO.f*3լ6sGC`XOC5/tEg3N53(5 QGW~g(Xǂ!U 3'2se:>#=&AX.~ߡIw*C=3>WDSSRȁ~g}RC p9AMŁGfURwsxWT2VUV8~|378IP7Wq$hMvvgy1'7DI@sx~Ov牧$8Ȋ 38G( A{X+h#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tA3KoLR Sw ;qB SUyn rHL5 4U U_IaU A F TXMGOV zA]5 !E_B d`;[1Zt\s41AQOWR_CQA1m^aHu]p ;g\Iq^_P%eY%bi1.2 ټ]5: ݓB=2@ Qa%r'&y6"Il@6.?2H/N9nA1M?/i2"ig jaj}jvϱk72i; j0+&3'ڈp+2.ov8Y\az0wh #wr)rrY2sn?ofiVo'1٠.2/9M-tm/bl)Sj3(/+^%Sچsg(Yrfr1yxrboNv) sHs3Ss57L5 ^psor}/qj3Nt!tc~5}N}W+ F!{6|V 6gxڕ|]'tl B@P&@;:7;ѵ;~>7v.LUXbvamchwfKSV S{! ^ԃ?'c BjaC=TK-4x-C;?4Fu4kE Ri/΍EWH_!z&/6tYI',IqNe.#yF7Jɸ4^mXmSK͕TKgD5UOYYhU5.oON-XNyNӎ OR)um|T9 sϛΚع9y鹞9y:yBY:z!:%z)-1:5z9z`A:EzIMQ:UzY]a:- ;nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.ConnectionTimeout-class.html0000644000175000017500000002270112321263757027206 0ustar asterixasterix00000000000000 nbxmpp.protocol.ConnectionTimeout
Package nbxmpp :: Module protocol :: Class ConnectionTimeout
[hide private]
[frames] | no frames]

Class ConnectionTimeout

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_a_2.gif0000644000175000017500000001562312321263757025521 0ustar asterixasterix00000000000000GIF89a[LB<ČjdĂ$"$tbdĢlVLnd|<2,ܲnl \NLd&$Ԕz|\F4,&$dRTT><LBD ^\ܮrt̒䶴T:<̦<.,Ć|ܶԔ&$Ğ64̼~| ><!,[H*\ȰÇ#JH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` ~~. My .ʤp^KՍ _έ.N/ ]-k{>;Fp 4J@ ~X)/m:59ܺ>J`HݞPp~PEO6ߞFh`"Aܺ^:h4 B D Yn)9U CJ=ܜ@>Z~ØÛ,ODCōm 3P1? !ğUlɯO~?Ώ,|~s~i?hЮ mOX@|_a D [hTPpC8Rq#D 2-JPՃper!. NCoR0&Qάy3'DD>`SV]~VXe͞+PZjk]]2{k\T"(=DΜ=% =ޒKPYB(F8< lڵmƝڶ}pU'd1UiDcUq/P) Adƹ_D1no/V9+"LR*ހ0v⮫D#(d4\)A ' /EWd?J =ɻ4 [҈B4qH+҅!]H$}Z!^-@F"C$@4@(RcHr ID0K3E$4rD *GO@-CcP4SM3LƔ"EJa,=> Gb8 \ )ZPӈ0   ]y=/4 M6N=EhLڂPENM\ܥlem5[`](k7_}巫wu Gb=7avw ?a'b7xˋ͸cG& dWfY==A[ffo9gwg:h&hF:5qa8!jj:kk;l&l:fm߆;n离n;oo nbxmpp.protocol.RestrictedXML
Package nbxmpp :: Module protocol :: Class RestrictedXML
[hide private]
[frames] | no frames]

Class RestrictedXML

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.Message-class.html0000644000175000017500000012022212321263757025121 0ustar asterixasterix00000000000000 nbxmpp.protocol.Message
Package nbxmpp :: Module protocol :: Class Message
[hide private]
[frames] | no frames]

Class Message

source code


XMPP Message stanza - "push" mechanism
Instance Methods [hide private]
 
__init__(self, to=None, body=None, xhtml=None, typ=None, subject=None, attrs={}, frm=None, payload=[], timestamp=None, xmlns='jabber:client', node=None)
You can specify recipient, text of message, type of message any additional attributes, sender of the message, any additional payload (f.e. jabber:x:delay element) and namespace in one go.
source code
 
getBody(self)
Return text of the message
source code
 
getXHTML(self, xmllang=None)
Return serialized xhtml-im element text of the message
source code
 
getSubject(self)
Return subject of the message
source code
 
getThread(self)
Return thread of the message
source code
 
setBody(self, val)
Set the text of the message
source code
 
setXHTML(self, val, xmllang=None)
Sets the xhtml text of the message (XEP-0071). The parameter is the "inner html" to the body.
source code
 
setSubject(self, val)
Set the subject of the message
source code
 
setThread(self, val)
Set the thread of the message
source code
 
buildReply(self, text=None)
Builds and returns another message object with specified text. The to, from, thread and type properties of new message are pre-set as reply to this message
source code
 
getStatusCode(self)
Return the status code of the message (for groupchat config change)
source code

Inherited from Protocol: __setitem__, getError, getErrorCode, getErrorMsg, getFrom, getID, getProperties, getStatusConditions, getTimestamp, getTimestamp2, getTo, getType, setError, setFrom, setID, setTimestamp, setTo, setType

Inherited from simplexml.Node: __contains__, __delitem__, __getattr__, __getitem__, __str__, addChild, addData, clearData, delAttr, delChild, getAttr, getAttrs, getChildren, getData, getName, getNamespace, getParent, getPayload, getTag, getTagAttr, getTagData, getTags, has_attr, iterTags, lookup_nsp, setAttr, setData, setName, setNamespace, setParent, setPayload, setTag, setTagAttr, setTagData

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]

Inherited from simplexml.Node: FORCE_NODE_RECREATION

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, to=None, body=None, xhtml=None, typ=None, subject=None, attrs={}, frm=None, payload=[], timestamp=None, xmlns='jabber:client', node=None)
(Constructor)

source code 

You can specify recipient, text of message, type of message any additional attributes, sender of the message, any additional payload (f.e. jabber:x:delay element) and namespace in one go.

Alternatively you can pass in the other XML object as the 'node' parameted to replicate it as message

Overrides: object.__init__

getBody(self)

source code 
Return text of the message

getXHTML(self, xmllang=None)

source code 

Return serialized xhtml-im element text of the message

TODO: Returning a DOM could make rendering faster.

getSubject(self)

source code 
Return subject of the message

getThread(self)

source code 
Return thread of the message

setBody(self, val)

source code 
Set the text of the message

setXHTML(self, val, xmllang=None)

source code 
Sets the xhtml text of the message (XEP-0071). The parameter is the "inner html" to the body.

setSubject(self, val)

source code 
Set the subject of the message

setThread(self, val)

source code 
Set the thread of the message

buildReply(self, text=None)

source code 
Builds and returns another message object with specified text. The to, from, thread and type properties of new message are pre-set as reply to this message

getStatusCode(self)

source code 
Return the status code of the message (for groupchat config change)

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol-pysrc.html0000644000175000017500000211225112321263757023576 0ustar asterixasterix00000000000000 nbxmpp.protocol
Package nbxmpp :: Module protocol
[hide private]
[frames] | no frames]

Source Code for Module nbxmpp.protocol

   1  ##   protocol.py 
   2  ## 
   3  ##   Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov 
   4  ## 
   5  ##   This program is free software; you can redistribute it and/or modify 
   6  ##   it under the terms of the GNU General Public License as published by 
   7  ##   the Free Software Foundation; either version 2, or (at your option) 
   8  ##   any later version. 
   9  ## 
  10  ##   This program is distributed in the hope that it will be useful, 
  11  ##   but WITHOUT ANY WARRANTY; without even the implied warranty of 
  12  ##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  13  ##   GNU General Public License for more details. 
  14   
  15  # $Id: protocol.py,v 1.52 2006/01/09 22:08:57 normanr Exp $ 
  16   
  17  """ 
  18  Protocol module contains tools that are needed for processing of xmpp-related 
  19  data structures, including jabber-objects like JID or different stanzas and 
  20  sub- stanzas) handling routines 
  21  """ 
  22   
  23  from simplexml import Node, NodeBuilder 
  24  import time 
  25  import string 
  26  import hashlib 
  27   
28 -def ascii_upper(s):
29 trans_table = string.maketrans(string.ascii_lowercase, 30 string.ascii_uppercase) 31 return s.translate(trans_table)
32 33 NS_ACTIVITY = 'http://jabber.org/protocol/activity' # XEP-0108 34 NS_ADDRESS = 'http://jabber.org/protocol/address' # XEP-0033 35 NS_AGENTS = 'jabber:iq:agents' 36 NS_AMP = 'http://jabber.org/protocol/amp' 37 NS_AMP_ERRORS = NS_AMP + '#errors' 38 NS_ARCHIVE = 'urn:xmpp:archive' # XEP-0136 39 NS_ARCHIVE_AUTO = NS_ARCHIVE + ':auto' # XEP-0136 40 NS_ARCHIVE_MANAGE = NS_ARCHIVE + ':manage' # XEP-0136 41 NS_ARCHIVE_MANUAL = NS_ARCHIVE + ':manual' # XEP-0136 42 NS_ARCHIVE_PREF = NS_ARCHIVE + ':pref' 43 NS_ATOM = 'http://www.w3.org/2005/Atom' 44 NS_ATTENTION = 'urn:xmpp:attention:0' # XEP-0224 45 NS_AUTH = 'jabber:iq:auth' 46 NS_AVATAR = 'http://www.xmpp.org/extensions/xep-0084.html#ns-metadata' 47 NS_BIND = 'urn:ietf:params:xml:ns:xmpp-bind' 48 NS_BLOCKING = 'urn:xmpp:blocking' # XEP-0191 49 NS_BOB = 'urn:xmpp:bob' # XEP-0231 50 NS_BOOKMARKS = 'storage:bookmarks' # XEP-0048 51 NS_BROWSE = 'jabber:iq:browse' 52 NS_BROWSING = 'http://jabber.org/protocol/browsing' # XEP-0195 53 NS_BYTESTREAM = 'http://jabber.org/protocol/bytestreams' # XEP-0065 54 NS_CAPS = 'http://jabber.org/protocol/caps' # XEP-0115 55 NS_CAPTCHA = 'urn:xmpp:captcha' # XEP-0158 56 NS_CARBONS = 'urn:xmpp:carbons:2' # XEP-0280 57 NS_CHATSTATES = 'http://jabber.org/protocol/chatstates' # XEP-0085 58 NS_CHATTING = 'http://jabber.org/protocol/chatting' # XEP-0194 59 NS_CLIENT = 'jabber:client' 60 NS_CONDITIONS = 'urn:xmpp:muc:conditions:0' # XEP-0306 61 NS_COMMANDS = 'http://jabber.org/protocol/commands' 62 NS_COMPONENT_ACCEPT = 'jabber:component:accept' 63 NS_COMPONENT_1 = 'http://jabberd.jabberstudio.org/ns/component/1.0' 64 NS_COMPRESS = 'http://jabber.org/protocol/compress' # XEP-0138 65 NS_CONFERENCE = 'jabber:x:conference' 66 NS_CORRECT = 'urn:xmpp:message-correct:0' # XEP-0308 67 NS_DATA = 'jabber:x:data' # XEP-0004 68 NS_DATA_MEDIA = 'urn:xmpp:media-element' # XEP-0221 69 NS_DELAY = 'jabber:x:delay' 70 NS_DELAY2 = 'urn:xmpp:delay' 71 NS_DIALBACK = 'jabber:server:dialback' 72 NS_DISCO = 'http://jabber.org/protocol/disco' 73 NS_DISCO_INFO = NS_DISCO + '#info' 74 NS_DISCO_ITEMS = NS_DISCO + '#items' 75 NS_ENCRYPTED = 'jabber:x:encrypted' # XEP-0027 76 NS_ESESSION = 'http://www.xmpp.org/extensions/xep-0116.html#ns' 77 NS_ESESSION_INIT = 'http://www.xmpp.org/extensions/xep-0116.html#ns-init' # XEP-0116 78 NS_EVENT = 'jabber:x:event' # XEP-0022 79 NS_FEATURE = 'http://jabber.org/protocol/feature-neg' 80 NS_FILE = 'http://jabber.org/protocol/si/profile/file-transfer' # XEP-0096 81 NS_FORWARD = 'urn:xmpp:forward:0' # XEP-0297 82 NS_GAMING = 'http://jabber.org/protocol/gaming' # XEP-0196 83 NS_GATEWAY = 'jabber:iq:gateway' # XEP-0100 84 NS_GEOLOC = 'http://jabber.org/protocol/geoloc' # XEP-0080 85 NS_GROUPCHAT = 'gc-1.0' 86 NS_HTTP_AUTH = 'http://jabber.org/protocol/http-auth' # XEP-0070 87 NS_HTTP_BIND = 'http://jabber.org/protocol/httpbind' # XEP-0124 88 NS_IBB = 'http://jabber.org/protocol/ibb' 89 NS_INVISIBLE = 'presence-invisible' # Jabberd2 90 NS_IQ = 'iq' # Jabberd2 91 NS_JINGLE ='urn:xmpp:jingle:1' # XEP-0166 92 NS_JINGLE_ERRORS = 'urn:xmpp:jingle:errors:1' # XEP-0166 93 NS_JINGLE_RTP = 'urn:xmpp:jingle:apps:rtp:1' # XEP-0167 94 NS_JINGLE_RTP_AUDIO = 'urn:xmpp:jingle:apps:rtp:audio' # XEP-0167 95 NS_JINGLE_RTP_VIDEO = 'urn:xmpp:jingle:apps:rtp:video' # XEP-0167 96 NS_JINGLE_FILE_TRANSFER ='urn:xmpp:jingle:apps:file-transfer:3' # XEP-0234 97 NS_JINGLE_XTLS='urn:xmpp:jingle:security:xtls:0' # XTLS: EXPERIMENTAL security layer of jingle 98 NS_JINGLE_RAW_UDP = 'urn:xmpp:jingle:transports:raw-udp:1' # XEP-0177 99 NS_JINGLE_ICE_UDP = 'urn:xmpp:jingle:transports:ice-udp:1' # XEP-0176 100 NS_JINGLE_BYTESTREAM ='urn:xmpp:jingle:transports:s5b:1' # XEP-0260 101 NS_JINGLE_IBB = 'urn:xmpp:jingle:transports:ibb:1' # XEP-0261 102 NS_LAST = 'jabber:iq:last' 103 NS_LOCATION = 'http://jabber.org/protocol/geoloc' # XEP-0080 104 NS_MAM = 'urn:xmpp:mam:tmp' # XEP-0313 105 NS_MESSAGE = 'message' # Jabberd2 106 NS_MOOD = 'http://jabber.org/protocol/mood' # XEP-0107 107 NS_MUC = 'http://jabber.org/protocol/muc' 108 NS_MUC_USER = NS_MUC + '#user' 109 NS_MUC_ADMIN = NS_MUC + '#admin' 110 NS_MUC_OWNER = NS_MUC + '#owner' 111 NS_MUC_UNIQUE = NS_MUC + '#unique' 112 NS_MUC_CONFIG = NS_MUC + '#roomconfig' 113 NS_NICK = 'http://jabber.org/protocol/nick' # XEP-0172 114 NS_OFFLINE = 'http://www.jabber.org/jeps/jep-0030.html' # XEP-0013 115 NS_PHYSLOC = 'http://jabber.org/protocol/physloc' # XEP-0112 116 NS_PING = 'urn:xmpp:ping' # XEP-0199 117 NS_PRESENCE = 'presence' # Jabberd2 118 NS_PRIVACY = 'jabber:iq:privacy' 119 NS_PRIVATE = 'jabber:iq:private' 120 NS_PROFILE = 'http://jabber.org/protocol/profile' # XEP-0154 121 NS_PUBSUB = 'http://jabber.org/protocol/pubsub' # XEP-0060 122 NS_PUBSUB_EVENT = 'http://jabber.org/protocol/pubsub#event' 123 NS_PUBSUB_PUBLISH_OPTIONS = NS_PUBSUB + '#publish-options' # XEP-0060 124 NS_PUBSUB_OWNER = 'http://jabber.org/protocol/pubsub#owner' # XEP-0060 125 NS_REGISTER = 'jabber:iq:register' 126 NS_ROSTER = 'jabber:iq:roster' 127 NS_ROSTERNOTES = 'storage:rosternotes' 128 NS_ROSTERX = 'http://jabber.org/protocol/rosterx' # XEP-0144 129 NS_ROSTER_VER = 'urn:xmpp:features:rosterver' # XEP-0273 130 NS_RPC = 'jabber:iq:rpc' # XEP-0009 131 NS_RSM = 'http://jabber.org/protocol/rsm' 132 NS_SASL = 'urn:ietf:params:xml:ns:xmpp-sasl' 133 NS_SECLABEL = 'urn:xmpp:sec-label:0' 134 NS_SECLABEL_CATALOG = 'urn:xmpp:sec-label:catalog:2' 135 NS_SEARCH = 'jabber:iq:search' 136 NS_SERVER = 'jabber:server' 137 NS_SESSION = 'urn:ietf:params:xml:ns:xmpp-session' 138 NS_SI = 'http://jabber.org/protocol/si' # XEP-0096 139 NS_SI_PUB = 'http://jabber.org/protocol/sipub' # XEP-0137 140 NS_SIGNED = 'jabber:x:signed' # XEP-0027 141 NS_SSN = 'urn:xmpp:ssn' # XEP-0155 142 NS_STANZA_CRYPTO = 'http://www.xmpp.org/extensions/xep-0200.html#ns' # XEP-0200 143 NS_STANZAS = 'urn:ietf:params:xml:ns:xmpp-stanzas' 144 NS_STREAM = 'http://affinix.com/jabber/stream' 145 NS_STREAMS = 'http://etherx.jabber.org/streams' 146 NS_TIME = 'jabber:iq:time' # XEP-0900 147 NS_TIME_REVISED = 'urn:xmpp:time' # XEP-0202 148 NS_TLS = 'urn:ietf:params:xml:ns:xmpp-tls' 149 NS_TUNE = 'http://jabber.org/protocol/tune' # XEP-0118 150 NS_VACATION = 'http://jabber.org/protocol/vacation' 151 NS_VCARD = 'vcard-temp' 152 NS_GMAILNOTIFY = 'google:mail:notify' 153 NS_GTALKSETTING = 'google:setting' 154 NS_VCARD_UPDATE = NS_VCARD + ':x:update' 155 NS_VERSION = 'jabber:iq:version' 156 NS_VIEWING = 'http://jabber.org/protocol/viewing' # XEP--197 157 NS_WAITINGLIST = 'http://jabber.org/protocol/waitinglist' # XEP-0130 158 NS_XHTML_IM = 'http://jabber.org/protocol/xhtml-im' # XEP-0071 159 NS_XHTML = 'http://www.w3.org/1999/xhtml' # " 160 NS_X_OOB = 'jabber:x:oob' # XEP-0066 161 NS_DATA_LAYOUT = 'http://jabber.org/protocol/xdata-layout' # XEP-0141 162 NS_DATA_VALIDATE = 'http://jabber.org/protocol/xdata-validate' # XEP-0122 163 NS_XMPP_STREAMS = 'urn:ietf:params:xml:ns:xmpp-streams' 164 NS_RECEIPTS = 'urn:xmpp:receipts' 165 NS_PUBKEY_PUBKEY = 'urn:xmpp:pubkey:2' # XEP-0189 166 NS_PUBKEY_REVOKE = 'urn:xmpp:revoke:2' 167 NS_PUBKEY_ATTEST = 'urn:xmpp:attest:2' 168 NS_STREAM_MGMT = 'urn:xmpp:sm:2' # XEP-198 169 NS_HASHES = 'urn:xmpp:hashes:1' # XEP-300 170 NS_HASHES_MD5 = 'urn:xmpp:hash-function-textual-names:md5' 171 NS_HASHES_SHA1 = 'urn:xmpp:hash-function-textual-names:sha-1' 172 NS_HASHES_SHA256 = 'urn:xmpp:hash-function-textual-names:sha-256' 173 NS_HASHES_SHA512 = 'urn:xmpp:hash-function-textual-names:sha-512' 174 175 #xmpp_stream_error_conditions = ''' 176 #bad-format -- -- -- The entity has sent XML that cannot be processed. 177 #bad-namespace-prefix -- -- -- The entity has sent a namespace prefix that is unsupported, or has sent no namespace prefix on an element that requires such a prefix. 178 #conflict -- -- -- The server is closing the active stream for this entity because a new stream has been initiated that conflicts with the existing stream. 179 #connection-timeout -- -- -- The entity has not generated any traffic over the stream for some period of time. 180 #host-gone -- -- -- The value of the 'to' attribute provided by the initiating entity in the stream header corresponds to a hostname that is no longer hosted by the server. 181 #host-unknown -- -- -- The value of the 'to' attribute provided by the initiating entity in the stream header does not correspond to a hostname that is hosted by the server. 182 #improper-addressing -- -- -- A stanza sent between two servers lacks a 'to' or 'from' attribute (or the attribute has no value). 183 #internal-server-error -- -- -- The server has experienced a misconfiguration or an otherwise-undefined internal error that prevents it from servicing the stream. 184 #invalid-from -- cancel -- -- The JID or hostname provided in a 'from' address does not match an authorized JID or validated domain negotiated between servers via SASL or dialback, or between a client and a server via authentication and resource authorization. 185 #invalid-id -- -- -- The stream ID or dialback ID is invalid or does not match an ID previously provided. 186 #invalid-namespace -- -- -- The streams namespace name is something other than "http://etherx.jabber.org/streams" or the dialback namespace name is something other than "jabber:server:dialback". 187 #invalid-xml -- -- -- The entity has sent invalid XML over the stream to a server that performs validation. 188 #not-authorized -- -- -- The entity has attempted to send data before the stream has been authenticated, or otherwise is not authorized to perform an action related to stream negotiation. 189 #policy-violation -- -- -- The entity has violated some local service policy. 190 #remote-connection-failed -- -- -- The server is unable to properly connect to a remote resource that is required for authentication or authorization. 191 #resource-constraint -- -- -- The server lacks the system resources necessary to service the stream. 192 #restricted-xml -- -- -- The entity has attempted to send restricted XML features such as a comment, processing instruction, DTD, entity reference, or unescaped character. 193 #see-other-host -- -- -- The server will not provide service to the initiating entity but is redirecting traffic to another host. 194 #system-shutdown -- -- -- The server is being shut down and all active streams are being closed. 195 #undefined-condition -- -- -- The error condition is not one of those defined by the other conditions in this list. 196 #unsupported-encoding -- -- -- The initiating entity has encoded the stream in an encoding that is not supported by the server. 197 #unsupported-stanza-type -- -- -- The initiating entity has sent a first-level child of the stream that is not supported by the server. 198 #unsupported-version -- -- -- The value of the 'version' attribute provided by the initiating entity in the stream header specifies a version of XMPP that is not supported by the server. 199 #xml-not-well-formed -- -- -- The initiating entity has sent XML that is not well-formed.''' 200 201 #xmpp_stanza_error_conditions = ''' 202 #bad-request -- 400 -- modify -- The sender has sent XML that is malformed or that cannot be processed. 203 #conflict -- 409 -- cancel -- Access cannot be granted because an existing resource or session exists with the same name or address. 204 #feature-not-implemented -- 501 -- cancel -- The feature requested is not implemented by the recipient or server and therefore cannot be processed. 205 #forbidden -- 403 -- auth -- The requesting entity does not possess the required permissions to perform the action. 206 #gone -- 302 -- modify -- The recipient or server can no longer be contacted at this address. 207 #internal-server-error -- 500 -- wait -- The server could not process the stanza because of a misconfiguration or an otherwise-undefined internal server error. 208 #item-not-found -- 404 -- cancel -- The addressed JID or item requested cannot be found. 209 #jid-malformed -- 400 -- modify -- The value of the 'to' attribute in the sender's stanza does not adhere to the syntax defined in Addressing Scheme. 210 #not-acceptable -- 406 -- cancel -- The recipient or server understands the request but is refusing to process it because it does not meet criteria defined by the recipient or server. 211 #not-allowed -- 405 -- cancel -- The recipient or server does not allow any entity to perform the action. 212 #not-authorized -- 401 -- auth -- The sender must provide proper credentials before being allowed to perform the action, or has provided improper credentials. 213 #payment-required -- 402 -- auth -- The requesting entity is not authorized to access the requested service because payment is required. 214 #recipient-unavailable -- 404 -- wait -- The intended recipient is temporarily unavailable. 215 #redirect -- 302 -- modify -- The recipient or server is redirecting requests for this information to another entity. 216 #registration-required -- 407 -- auth -- The requesting entity is not authorized to access the requested service because registration is required. 217 #remote-server-not-found -- 404 -- cancel -- A remote server or service specified as part or all of the JID of the intended recipient does not exist. 218 #remote-server-timeout -- 504 -- wait -- A remote server or service specified as part or all of the JID of the intended recipient could not be contacted within a reasonable amount of time. 219 #resource-constraint -- 500 -- wait -- The server or recipient lacks the system resources necessary to service the request. 220 #service-unavailable -- 503 -- cancel -- The server or recipient does not currently provide the requested service. 221 #subscription-required -- 407 -- auth -- The requesting entity is not authorized to access the requested service because a subscription is required. 222 #undefined-condition -- 500 -- -- Undefined Condition 223 #unexpected-request -- 400 -- wait -- The recipient or server understood the request but was not expecting it at this time (e.g., the request was out of order).''' 224 225 #sasl_error_conditions = ''' 226 #aborted -- -- -- The receiving entity acknowledges an <abort/> element sent by the initiating entity; sent in reply to the <abort/> element. 227 #incorrect-encoding -- -- -- The data provided by the initiating entity could not be processed because the [BASE64]Josefsson, S., The Base16, Base32, and Base64 Data Encodings, July 2003. encoding is incorrect (e.g., because the encoding does not adhere to the definition in Section 3 of [BASE64]Josefsson, S., The Base16, Base32, and Base64 Data Encodings, July 2003.); sent in reply to a <response/> element or an <auth/> element with initial response data. 228 #invalid-authzid -- -- -- The authzid provided by the initiating entity is invalid, either because it is incorrectly formatted or because the initiating entity does not have permissions to authorize that ID; sent in reply to a <response/> element or an <auth/> element with initial response data. 229 #invalid-mechanism -- -- -- The initiating entity did not provide a mechanism or requested a mechanism that is not supported by the receiving entity; sent in reply to an <auth/> element. 230 #mechanism-too-weak -- -- -- The mechanism requested by the initiating entity is weaker than server policy permits for that initiating entity; sent in reply to a <response/> element or an <auth/> element with initial response data. 231 #not-authorized -- -- -- The authentication failed because the initiating entity did not provide valid credentials (this includes but is not limited to the case of an unknown username); sent in reply to a <response/> element or an <auth/> element with initial response data. 232 #temporary-auth-failure -- -- -- The authentication failed because of a temporary error condition within the receiving entity; sent in reply to an <auth/> element or <response/> element.''' 233 234 #ERRORS, _errorcodes, loc = {}, {}, {} 235 #for ns, errname, errpool in ((NS_XMPP_STREAMS, 'STREAM', 236 #xmpp_stream_error_conditions), (NS_STANZAS, 'ERR', xmpp_stanza_error_conditions), 237 #(NS_SASL, 'SASL', sasl_error_conditions)): 238 #for err in errpool.split('\n')[1:]: 239 #cond, code, typ, text = err.split(' -- ') 240 #name = errname + '_' + ascii_upper(cond).replace('-', '_') 241 #locals()[name] = ns + ' ' + cond 242 #loc[name] = ns + ' ' + cond 243 #ERRORS[ns + ' ' + cond] = [code, typ, text] 244 #if code: 245 #_errorcodes[code] = cond 246 #del ns, errname, errpool, err, cond, code, typ, text 247 #import pprint 248 #pprint.pprint(ERRORS) 249 #pprint.pprint(_errorcodes) 250 #for (k, v) in loc.items(): 251 #print('%s = \'%s\'' % (k, v)) 252 253 ERRORS = { 254 'urn:ietf:params:xml:ns:xmpp-sasl aborted': ['', 255 '', 256 'The receiving entity acknowledges an <abort/> element sent by the initiating entity; sent in reply to the <abort/> element.'], 257 'urn:ietf:params:xml:ns:xmpp-sasl incorrect-encoding': ['', 258 '', 259 'The data provided by the initiating entity could not be processed because the [BASE64]Josefsson, S., The Base16, Base32, and Base64 Data Encodings, July 2003. encoding is incorrect (e.g., because the encoding does not adhere to the definition in Section 3 of [BASE64]Josefsson, S., The Base16, Base32, and Base64 Data Encodings, July 2003.); sent in reply to a <response/> element or an <auth/> element with initial response data.'], 260 'urn:ietf:params:xml:ns:xmpp-sasl invalid-authzid': ['', 261 '', 262 'The authzid provided by the initiating entity is invalid, either because it is incorrectly formatted or because the initiating entity does not have permissions to authorize that ID; sent in reply to a <response/> element or an <auth/> element with initial response data.'], 263 'urn:ietf:params:xml:ns:xmpp-sasl invalid-mechanism': ['', 264 '', 265 'The initiating entity did not provide a mechanism or requested a mechanism that is not supported by the receiving entity; sent in reply to an <auth/> element.'], 266 'urn:ietf:params:xml:ns:xmpp-sasl mechanism-too-weak': ['', 267 '', 268 'The mechanism requested by the initiating entity is weaker than server policy permits for that initiating entity; sent in reply to a <response/> element or an <auth/> element with initial response data.'], 269 'urn:ietf:params:xml:ns:xmpp-sasl not-authorized': ['', 270 '', 271 'The authentication failed because the initiating entity did not provide valid credentials (this includes but is not limited to the case of an unknown username); sent in reply to a <response/> element or an <auth/> element with initial response data.'], 272 'urn:ietf:params:xml:ns:xmpp-sasl temporary-auth-failure': ['', 273 '', 274 'The authentication failed because of a temporary error condition within the receiving entity; sent in reply to an <auth/> element or <response/> element.'], 275 'urn:ietf:params:xml:ns:xmpp-stanzas bad-request': ['400', 276 'modify', 277 'The sender has sent XML that is malformed or that cannot be processed.'], 278 'urn:ietf:params:xml:ns:xmpp-stanzas conflict': ['409', 279 'cancel', 280 'Access cannot be granted because an existing resource or session exists with the same name or address.'], 281 'urn:ietf:params:xml:ns:xmpp-stanzas feature-not-implemented': ['501', 282 'cancel', 283 'The feature requested is not implemented by the recipient or server and therefore cannot be processed.'], 284 'urn:ietf:params:xml:ns:xmpp-stanzas forbidden': ['403', 285 'auth', 286 'The requesting entity does not possess the required permissions to perform the action.'], 287 'urn:ietf:params:xml:ns:xmpp-stanzas gone': ['302', 288 'modify', 289 'The recipient or server can no longer be contacted at this address.'], 290 'urn:ietf:params:xml:ns:xmpp-stanzas internal-server-error': ['500', 291 'wait', 292 'The server could not process the stanza because of a misconfiguration or an otherwise-undefined internal server error.'], 293 'urn:ietf:params:xml:ns:xmpp-stanzas item-not-found': ['404', 294 'cancel', 295 'The addressed JID or item requested cannot be found.'], 296 'urn:ietf:params:xml:ns:xmpp-stanzas jid-malformed': ['400', 297 'modify', 298 "The value of the 'to' attribute in the sender's stanza does not adhere to the syntax defined in Addressing Scheme."], 299 'urn:ietf:params:xml:ns:xmpp-stanzas not-acceptable': ['406', 300 'cancel', 301 'The recipient or server understands the request but is refusing to process it because it does not meet criteria defined by the recipient or server.'], 302 'urn:ietf:params:xml:ns:xmpp-stanzas not-allowed': ['405', 303 'cancel', 304 'The recipient or server does not allow any entity to perform the action.'], 305 'urn:ietf:params:xml:ns:xmpp-stanzas not-authorized': ['401', 306 'auth', 307 'The sender must provide proper credentials before being allowed to perform the action, or has provided improper credentials.'], 308 'urn:ietf:params:xml:ns:xmpp-stanzas payment-required': ['402', 309 'auth', 310 'The requesting entity is not authorized to access the requested service because payment is required.'], 311 'urn:ietf:params:xml:ns:xmpp-stanzas recipient-unavailable': ['404', 312 'wait', 313 'The intended recipient is temporarily unavailable.'], 314 'urn:ietf:params:xml:ns:xmpp-stanzas redirect': ['302', 315 'modify', 316 'The recipient or server is redirecting requests for this information to another entity.'], 317 'urn:ietf:params:xml:ns:xmpp-stanzas registration-required': ['407', 318 'auth', 319 'The requesting entity is not authorized to access the requested service because registration is required.'], 320 'urn:ietf:params:xml:ns:xmpp-stanzas remote-server-not-found': ['404', 321 'cancel', 322 'A remote server or service specified as part or all of the JID of the intended recipient does not exist.'], 323 'urn:ietf:params:xml:ns:xmpp-stanzas remote-server-timeout': ['504', 324 'wait', 325 'A remote server or service specified as part or all of the JID of the intended recipient could not be contacted within a reasonable amount of time.'], 326 'urn:ietf:params:xml:ns:xmpp-stanzas resource-constraint': ['500', 327 'wait', 328 'The server or recipient lacks the system resources necessary to service the request.'], 329 'urn:ietf:params:xml:ns:xmpp-stanzas service-unavailable': ['503', 330 'cancel', 331 'The server or recipient does not currently provide the requested service.'], 332 'urn:ietf:params:xml:ns:xmpp-stanzas subscription-required': ['407', 333 'auth', 334 'The requesting entity is not authorized to access the requested service because a subscription is required.'], 335 'urn:ietf:params:xml:ns:xmpp-stanzas undefined-condition': ['500', 336 '', 337 'Undefined Condition'], 338 'urn:ietf:params:xml:ns:xmpp-stanzas unexpected-request': ['400', 339 'wait', 340 'The recipient or server understood the request but was not expecting it at this time (e.g., the request was out of order).'], 341 'urn:ietf:params:xml:ns:xmpp-streams bad-format': ['', 342 '', 343 'The entity has sent XML that cannot be processed.'], 344 'urn:ietf:params:xml:ns:xmpp-streams bad-namespace-prefix': ['', 345 '', 346 'The entity has sent a namespace prefix that is unsupported, or has sent no namespace prefix on an element that requires such a prefix.'], 347 'urn:ietf:params:xml:ns:xmpp-streams conflict': ['', 348 '', 349 'The server is closing the active stream for this entity because a new stream has been initiated that conflicts with the existing stream.'], 350 'urn:ietf:params:xml:ns:xmpp-streams connection-timeout': ['', 351 '', 352 'The entity has not generated any traffic over the stream for some period of time.'], 353 'urn:ietf:params:xml:ns:xmpp-streams host-gone': ['', 354 '', 355 "The value of the 'to' attribute provided by the initiating entity in the stream header corresponds to a hostname that is no longer hosted by the server."], 356 'urn:ietf:params:xml:ns:xmpp-streams host-unknown': ['', 357 '', 358 "The value of the 'to' attribute provided by the initiating entity in the stream header does not correspond to a hostname that is hosted by the server."], 359 'urn:ietf:params:xml:ns:xmpp-streams improper-addressing': ['', 360 '', 361 "A stanza sent between two servers lacks a 'to' or 'from' attribute (or the attribute has no value)."], 362 'urn:ietf:params:xml:ns:xmpp-streams internal-server-error': ['', 363 '', 364 'The server has experienced a misconfiguration or an otherwise-undefined internal error that prevents it from servicing the stream.'], 365 'urn:ietf:params:xml:ns:xmpp-streams invalid-from': ['cancel', 366 '', 367 "The JID or hostname provided in a 'from' address does not match an authorized JID or validated domain negotiated between servers via SASL or dialback, or between a client and a server via authentication and resource authorization."], 368 'urn:ietf:params:xml:ns:xmpp-streams invalid-id': ['', 369 '', 370 'The stream ID or dialback ID is invalid or does not match an ID previously provided.'], 371 'urn:ietf:params:xml:ns:xmpp-streams invalid-namespace': ['', 372 '', 373 'The streams namespace name is something other than "http://etherx.jabber.org/streams" or the dialback namespace name is something other than "jabber:server:dialback".'], 374 'urn:ietf:params:xml:ns:xmpp-streams invalid-xml': ['', 375 '', 376 'The entity has sent invalid XML over the stream to a server that performs validation.'], 377 'urn:ietf:params:xml:ns:xmpp-streams not-authorized': ['', 378 '', 379 'The entity has attempted to send data before the stream has been authenticated, or otherwise is not authorized to perform an action related to stream negotiation.'], 380 'urn:ietf:params:xml:ns:xmpp-streams policy-violation': ['', 381 '', 382 'The entity has violated some local service policy.'], 383 'urn:ietf:params:xml:ns:xmpp-streams remote-connection-failed': ['', 384 '', 385 'The server is unable to properly connect to a remote resource that is required for authentication or authorization.'], 386 'urn:ietf:params:xml:ns:xmpp-streams resource-constraint': ['', 387 '', 388 'The server lacks the system resources necessary to service the stream.'], 389 'urn:ietf:params:xml:ns:xmpp-streams restricted-xml': ['', 390 '', 391 'The entity has attempted to send restricted XML features such as a comment, processing instruction, DTD, entity reference, or unescaped character.'], 392 'urn:ietf:params:xml:ns:xmpp-streams see-other-host': ['', 393 '', 394 'The server will not provide service to the initiating entity but is redirecting traffic to another host.'], 395 'urn:ietf:params:xml:ns:xmpp-streams system-shutdown': ['', 396 '', 397 'The server is being shut down and all active streams are being closed.'], 398 'urn:ietf:params:xml:ns:xmpp-streams undefined-condition': ['', 399 '', 400 'The error condition is not one of those defined by the other conditions in this list.'], 401 'urn:ietf:params:xml:ns:xmpp-streams unsupported-encoding': ['', 402 '', 403 'The initiating entity has encoded the stream in an encoding that is not supported by the server.'], 404 'urn:ietf:params:xml:ns:xmpp-streams unsupported-stanza-type': ['', 405 '', 406 'The initiating entity has sent a first-level child of the stream that is not supported by the server.'], 407 'urn:ietf:params:xml:ns:xmpp-streams unsupported-version': ['', 408 '', 409 "The value of the 'version' attribute provided by the initiating entity in the stream header specifies a version of XMPP that is not supported by the server."], 410 'urn:ietf:params:xml:ns:xmpp-streams xml-not-well-formed': ['', 411 '', 412 'The initiating entity has sent XML that is not well-formed.'] 413 } 414 415 _errorcodes = { 416 '302': 'redirect', 417 '400': 'unexpected-request', 418 '401': 'not-authorized', 419 '402': 'payment-required', 420 '403': 'forbidden', 421 '404': 'remote-server-not-found', 422 '405': 'not-allowed', 423 '406': 'not-acceptable', 424 '407': 'subscription-required', 425 '409': 'conflict', 426 '500': 'undefined-condition', 427 '501': 'feature-not-implemented', 428 '503': 'service-unavailable', 429 '504': 'remote-server-timeout', 430 'cancel': 'invalid-from' 431 } 432 433 STREAM_NOT_AUTHORIZED = 'urn:ietf:params:xml:ns:xmpp-streams not-authorized' 434 STREAM_REMOTE_CONNECTION_FAILED = 'urn:ietf:params:xml:ns:xmpp-streams remote-connection-failed' 435 SASL_MECHANISM_TOO_WEAK = 'urn:ietf:params:xml:ns:xmpp-sasl mechanism-too-weak' 436 STREAM_XML_NOT_WELL_FORMED = 'urn:ietf:params:xml:ns:xmpp-streams xml-not-well-formed' 437 ERR_JID_MALFORMED = 'urn:ietf:params:xml:ns:xmpp-stanzas jid-malformed' 438 STREAM_SEE_OTHER_HOST = 'urn:ietf:params:xml:ns:xmpp-streams see-other-host' 439 STREAM_BAD_NAMESPACE_PREFIX = 'urn:ietf:params:xml:ns:xmpp-streams bad-namespace-prefix' 440 ERR_SERVICE_UNAVAILABLE = 'urn:ietf:params:xml:ns:xmpp-stanzas service-unavailable' 441 STREAM_CONNECTION_TIMEOUT = 'urn:ietf:params:xml:ns:xmpp-streams connection-timeout' 442 STREAM_UNSUPPORTED_VERSION = 'urn:ietf:params:xml:ns:xmpp-streams unsupported-version' 443 STREAM_IMPROPER_ADDRESSING = 'urn:ietf:params:xml:ns:xmpp-streams improper-addressing' 444 STREAM_UNDEFINED_CONDITION = 'urn:ietf:params:xml:ns:xmpp-streams undefined-condition' 445 SASL_NOT_AUTHORIZED = 'urn:ietf:params:xml:ns:xmpp-sasl not-authorized' 446 ERR_GONE = 'urn:ietf:params:xml:ns:xmpp-stanzas gone' 447 SASL_TEMPORARY_AUTH_FAILURE = 'urn:ietf:params:xml:ns:xmpp-sasl temporary-auth-failure' 448 ERR_REMOTE_SERVER_NOT_FOUND = 'urn:ietf:params:xml:ns:xmpp-stanzas remote-server-not-found' 449 ERR_UNEXPECTED_REQUEST = 'urn:ietf:params:xml:ns:xmpp-stanzas unexpected-request' 450 ERR_RECIPIENT_UNAVAILABLE = 'urn:ietf:params:xml:ns:xmpp-stanzas recipient-unavailable' 451 ERR_CONFLICT = 'urn:ietf:params:xml:ns:xmpp-stanzas conflict' 452 STREAM_SYSTEM_SHUTDOWN = 'urn:ietf:params:xml:ns:xmpp-streams system-shutdown' 453 STREAM_BAD_FORMAT = 'urn:ietf:params:xml:ns:xmpp-streams bad-format' 454 ERR_SUBSCRIPTION_REQUIRED = 'urn:ietf:params:xml:ns:xmpp-stanzas subscription-required' 455 STREAM_INTERNAL_SERVER_ERROR = 'urn:ietf:params:xml:ns:xmpp-streams internal-server-error' 456 ERR_NOT_AUTHORIZED = 'urn:ietf:params:xml:ns:xmpp-stanzas not-authorized' 457 SASL_ABORTED = 'urn:ietf:params:xml:ns:xmpp-sasl aborted' 458 ERR_REGISTRATION_REQUIRED = 'urn:ietf:params:xml:ns:xmpp-stanzas registration-required' 459 ERR_INTERNAL_SERVER_ERROR = 'urn:ietf:params:xml:ns:xmpp-stanzas internal-server-error' 460 SASL_INCORRECT_ENCODING = 'urn:ietf:params:xml:ns:xmpp-sasl incorrect-encoding' 461 STREAM_HOST_GONE = 'urn:ietf:params:xml:ns:xmpp-streams host-gone' 462 STREAM_POLICY_VIOLATION = 'urn:ietf:params:xml:ns:xmpp-streams policy-violation' 463 STREAM_INVALID_XML = 'urn:ietf:params:xml:ns:xmpp-streams invalid-xml' 464 STREAM_CONFLICT = 'urn:ietf:params:xml:ns:xmpp-streams conflict' 465 STREAM_RESOURCE_CONSTRAINT = 'urn:ietf:params:xml:ns:xmpp-streams resource-constraint' 466 STREAM_UNSUPPORTED_ENCODING = 'urn:ietf:params:xml:ns:xmpp-streams unsupported-encoding' 467 ERR_NOT_ALLOWED = 'urn:ietf:params:xml:ns:xmpp-stanzas not-allowed' 468 ERR_ITEM_NOT_FOUND = 'urn:ietf:params:xml:ns:xmpp-stanzas item-not-found' 469 ERR_NOT_ACCEPTABLE = 'urn:ietf:params:xml:ns:xmpp-stanzas not-acceptable' 470 STREAM_INVALID_FROM = 'urn:ietf:params:xml:ns:xmpp-streams invalid-from' 471 ERR_FEATURE_NOT_IMPLEMENTED = 'urn:ietf:params:xml:ns:xmpp-stanzas feature-not-implemented' 472 ERR_BAD_REQUEST = 'urn:ietf:params:xml:ns:xmpp-stanzas bad-request' 473 STREAM_INVALID_ID = 'urn:ietf:params:xml:ns:xmpp-streams invalid-id' 474 STREAM_HOST_UNKNOWN = 'urn:ietf:params:xml:ns:xmpp-streams host-unknown' 475 ERR_UNDEFINED_CONDITION = 'urn:ietf:params:xml:ns:xmpp-stanzas undefined-condition' 476 SASL_INVALID_MECHANISM = 'urn:ietf:params:xml:ns:xmpp-sasl invalid-mechanism' 477 STREAM_RESTRICTED_XML = 'urn:ietf:params:xml:ns:xmpp-streams restricted-xml' 478 ERR_RESOURCE_CONSTRAINT = 'urn:ietf:params:xml:ns:xmpp-stanzas resource-constraint' 479 ERR_REMOTE_SERVER_TIMEOUT = 'urn:ietf:params:xml:ns:xmpp-stanzas remote-server-timeout' 480 SASL_INVALID_AUTHZID = 'urn:ietf:params:xml:ns:xmpp-sasl invalid-authzid' 481 ERR_PAYMENT_REQUIRED = 'urn:ietf:params:xml:ns:xmpp-stanzas payment-required' 482 STREAM_INVALID_NAMESPACE = 'urn:ietf:params:xml:ns:xmpp-streams invalid-namespace' 483 ERR_REDIRECT = 'urn:ietf:params:xml:ns:xmpp-stanzas redirect' 484 STREAM_UNSUPPORTED_STANZA_TYPE = 'urn:ietf:params:xml:ns:xmpp-streams unsupported-stanza-type' 485 ERR_FORBIDDEN = 'urn:ietf:params:xml:ns:xmpp-stanzas forbidden' 486
487 -def isResultNode(node):
488 """ 489 Return true if the node is a positive reply 490 """ 491 return node and node.getType() == 'result'
492
493 -def isErrorNode(node):
494 """ 495 Return true if the node is a negative reply 496 """ 497 return node and node.getType() == 'error'
498
499 -class NodeProcessed(Exception):
500 """ 501 Exception that should be raised by handler when the handling should be 502 stopped 503 """ 504 pass
505
506 -class StreamError(Exception):
507 """ 508 Base exception class for stream errors 509 """ 510 pass
511
512 -class BadFormat(StreamError):
513 pass
514
515 -class BadNamespacePrefix(StreamError):
516 pass
517
518 -class Conflict(StreamError):
519 pass
520
521 -class ConnectionTimeout(StreamError):
522 pass
523
524 -class HostGone(StreamError):
525 pass
526
527 -class HostUnknown(StreamError):
528 pass
529
530 -class ImproperAddressing(StreamError):
531 pass
532
533 -class InternalServerError(StreamError):
534 pass
535
536 -class InvalidFrom(StreamError):
537 pass
538
539 -class InvalidID(StreamError):
540 pass
541
542 -class InvalidNamespace(StreamError):
543 pass
544
545 -class InvalidXML(StreamError):
546 pass
547
548 -class NotAuthorized(StreamError):
549 pass
550
551 -class PolicyViolation(StreamError):
552 pass
553
554 -class RemoteConnectionFailed(StreamError):
555 pass
556
557 -class ResourceConstraint(StreamError):
558 pass
559
560 -class RestrictedXML(StreamError):
561 pass
562
563 -class SeeOtherHost(StreamError):
564 pass
565
566 -class SystemShutdown(StreamError):
567 pass
568
569 -class UndefinedCondition(StreamError):
570 pass
571
572 -class UnsupportedEncoding(StreamError):
573 pass
574
575 -class UnsupportedStanzaType(StreamError):
576 pass
577
578 -class UnsupportedVersion(StreamError):
579 pass
580
581 -class XMLNotWellFormed(StreamError):
582 pass
583 584 stream_exceptions = {'bad-format': BadFormat, 585 'bad-namespace-prefix': BadNamespacePrefix, 586 'conflict': Conflict, 587 'connection-timeout': ConnectionTimeout, 588 'host-gone': HostGone, 589 'host-unknown': HostUnknown, 590 'improper-addressing': ImproperAddressing, 591 'internal-server-error': InternalServerError, 592 'invalid-from': InvalidFrom, 593 'invalid-id': InvalidID, 594 'invalid-namespace': InvalidNamespace, 595 'invalid-xml': InvalidXML, 596 'not-authorized': NotAuthorized, 597 'policy-violation': PolicyViolation, 598 'remote-connection-failed': RemoteConnectionFailed, 599 'resource-constraint': ResourceConstraint, 600 'restricted-xml': RestrictedXML, 601 'see-other-host': SeeOtherHost, 602 'system-shutdown': SystemShutdown, 603 'undefined-condition': UndefinedCondition, 604 'unsupported-encoding': UnsupportedEncoding, 605 'unsupported-stanza-type': UnsupportedStanzaType, 606 'unsupported-version': UnsupportedVersion, 607 'xml-not-well-formed': XMLNotWellFormed} 608
609 -class JID:
610 """ 611 JID can be built from string, modified, compared, serialised into string 612 """ 613
614 - def __init__(self, jid=None, node='', domain='', resource=''):
615 """ 616 JID can be specified as string (jid argument) or as separate parts 617 618 Examples: 619 JID('node@domain/resource') 620 JID(node='node',domain='domain.org') 621 """ 622 if not jid and not domain: 623 raise ValueError('JID must contain at least domain name') 624 elif type(jid) == type(self): 625 self.node, self.domain = jid.node, jid.domain 626 self.resource = jid.resource 627 elif domain: 628 self.node, self.domain, self.resource = node, domain, resource 629 else: 630 if jid.find('@') + 1: 631 self.node, jid = jid.split('@', 1) 632 else: 633 self.node = '' 634 if jid.find('/')+1: 635 self.domain, self.resource = jid.split('/', 1) 636 else: 637 self.domain, self.resource = jid, ''
638
639 - def getNode(self):
640 """ 641 Return the node part of the JID 642 """ 643 return self.node
644
645 - def setNode(self, node):
646 """ 647 Set the node part of the JID to new value. Specify None to remove 648 the node part 649 """ 650 self.node = node.lower()
651
652 - def getDomain(self):
653 """ 654 Return the domain part of the JID 655 """ 656 return self.domain
657
658 - def setDomain(self, domain):
659 """ 660 Set the domain part of the JID to new value 661 """ 662 self.domain = domain.lower()
663
664 - def getResource(self):
665 """ 666 Return the resource part of the JID 667 """ 668 return self.resource
669
670 - def setResource(self, resource):
671 """ 672 Set the resource part of the JID to new value. Specify None to remove the 673 resource part 674 """ 675 self.resource = resource
676
677 - def getStripped(self):
678 """ 679 Return the bare representation of JID. I.e. string value w/o resource 680 """ 681 return self.__str__(0)
682
683 - def __eq__(self, other):
684 """ 685 Compare the JID to another instance or to string for equality 686 """ 687 try: 688 other = JID(other) 689 except ValueError: 690 return 0 691 return self.resource == other.resource and \ 692 self.__str__(0) == other.__str__(0)
693
694 - def __ne__(self, other):
695 """ 696 Compare the JID to another instance or to string for non-equality 697 """ 698 return not self.__eq__(other)
699
700 - def bareMatch(self, other):
701 """ 702 Compare the node and domain parts of the JID's for equality 703 """ 704 return self.__str__(0) == JID(other).__str__(0)
705
706 - def __str__(self, wresource=1):
707 """ 708 Serialise JID into string 709 """ 710 if self.node: 711 jid = self.node + '@' + self.domain 712 else: 713 jid = self.domain 714 if wresource and self.resource: 715 return jid + '/' + self.resource 716 return jid
717
718 - def __hash__(self):
719 """ 720 Produce hash of the JID, Allows to use JID objects as keys of the 721 dictionary 722 """ 723 return hash(str(self))
724
725 -class BOSHBody(Node):
726 """ 727 <body> tag that wraps usual XMPP stanzas in XMPP over BOSH 728 """ 729
730 - def __init__(self, attrs={}, payload=[], node=None):
731 Node.__init__(self, tag='body', attrs=attrs, payload=payload, node=node) 732 self.setNamespace(NS_HTTP_BIND)
733 734
735 -class Protocol(Node):
736 """ 737 A "stanza" object class. Contains methods that are common for presences, iqs 738 and messages 739 """ 740
741 - def __init__(self, name=None, to=None, typ=None, frm=None, attrs={}, 742 payload=[], timestamp=None, xmlns=None, node=None):
743 """ 744 Constructor, name is the name of the stanza 745 i.e. 'message' or 'presence'or 'iq' 746 747 to is the value of 'to' attribure, 'typ' - 'type' attribute 748 frn - from attribure, attrs - other attributes mapping, 749 payload - same meaning as for simplexml payload definition 750 timestamp - the time value that needs to be stamped over stanza 751 xmlns - namespace of top stanza node 752 node - parsed or unparsed stana to be taken as prototype. 753 """ 754 if not attrs: 755 attrs = {} 756 if to: 757 attrs['to'] = to 758 if frm: 759 attrs['from'] = frm 760 if typ: 761 attrs['type'] = typ 762 Node.__init__(self, tag=name, attrs=attrs, payload=payload, node=node) 763 if not node and xmlns: 764 self.setNamespace(xmlns) 765 if self['to']: 766 self.setTo(self['to']) 767 if self['from']: 768 self.setFrom(self['from']) 769 if node and type(self) == type(node) and \ 770 self.__class__ == node.__class__ and self.attrs.has_key('id'): 771 del self.attrs['id'] 772 self.timestamp = None 773 for d in self.getTags('delay', namespace=NS_DELAY2): 774 try: 775 if d.getAttr('stamp') < self.getTimestamp2(): 776 self.setTimestamp(d.getAttr('stamp')) 777 except Exception: 778 pass 779 if not self.timestamp: 780 for x in self.getTags('x', namespace=NS_DELAY): 781 try: 782 if x.getAttr('stamp') < self.getTimestamp(): 783 self.setTimestamp(x.getAttr('stamp')) 784 except Exception: 785 pass 786 if timestamp is not None: 787 self.setTimestamp(timestamp) # To auto-timestamp stanza just pass timestamp=''
788
789 - def getTo(self):
790 """ 791 Return value of the 'to' attribute 792 """ 793 try: 794 return self['to'] 795 except: 796 return None
797
798 - def getFrom(self):
799 """ 800 Return value of the 'from' attribute 801 """ 802 try: 803 return self['from'] 804 except: 805 return None
806
807 - def getTimestamp(self):
808 """ 809 Return the timestamp in the 'yyyymmddThhmmss' format 810 """ 811 if self.timestamp: 812 return self.timestamp 813 return time.strftime('%Y%m%dT%H:%M:%S', time.gmtime())
814
815 - def getTimestamp2(self):
816 """ 817 Return the timestamp in the 'yyyymmddThhmmss' format 818 """ 819 if self.timestamp: 820 return self.timestamp 821 return time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime())
822
823 - def getID(self):
824 """ 825 Return the value of the 'id' attribute 826 """ 827 return self.getAttr('id')
828
829 - def setTo(self, val):
830 """ 831 Set the value of the 'to' attribute 832 """ 833 self.setAttr('to', JID(val))
834
835 - def getType(self):
836 """ 837 Return the value of the 'type' attribute 838 """ 839 return self.getAttr('type')
840
841 - def setFrom(self, val):
842 """ 843 Set the value of the 'from' attribute 844 """ 845 self.setAttr('from', JID(val))
846
847 - def setType(self, val):
848 """ 849 Set the value of the 'type' attribute 850 """ 851 self.setAttr('type', val)
852
853 - def setID(self, val):
854 """ 855 Set the value of the 'id' attribute 856 """ 857 self.setAttr('id', val)
858
859 - def getError(self):
860 """ 861 Return the error-condition (if present) or the textual description 862 of the error (otherwise) 863 """ 864 errtag = self.getTag('error') 865 if errtag: 866 for tag in errtag.getChildren(): 867 if tag.getName() != 'text': 868 return tag.getName() 869 return errtag.getData()
870
871 - def getErrorMsg(self):
872 """ 873 Return the textual description of the error (if present) 874 or the error condition 875 """ 876 errtag = self.getTag('error') 877 if errtag: 878 for tag in errtag.getChildren(): 879 if tag.getName() == 'text': 880 return tag.getData() 881 return self.getError()
882
883 - def getErrorCode(self):
884 """ 885 Return the error code. Obsolete. 886 """ 887 return self.getTagAttr('error', 'code')
888
889 - def getStatusConditions(self):
890 """ 891 Return the status conditions list as defined in XEP-0306. 892 """ 893 conds = [] 894 condtag = self.getTag('conditions', namespace=NS_CONDITIONS) 895 if condtag: 896 for tag in condtag.getChildren(): 897 conds.append(tag.getName()) 898 return conds
899
900 - def setError(self, error, code=None):
901 """ 902 Set the error code. Obsolete. Use error-conditions instead 903 """ 904 if code: 905 if str(code) in _errorcodes.keys(): 906 error = ErrorNode(_errorcodes[str(code)], text=error) 907 else: 908 error = ErrorNode(ERR_UNDEFINED_CONDITION, code=code, 909 typ='cancel', text=error) 910 elif type(error) in [type(''), type(u'')]: 911 error=ErrorNode(error) 912 self.setType('error') 913 self.addChild(node=error)
914
915 - def setTimestamp(self, val=None):
916 """ 917 Set the timestamp. timestamp should be the yyyymmddThhmmss string 918 """ 919 if not val: 920 val = time.strftime('%Y%m%dT%H:%M:%S', time.gmtime()) 921 self.timestamp=val 922 self.setTag('x', {'stamp': self.timestamp}, namespace=NS_DELAY)
923
924 - def getProperties(self):
925 """ 926 Return the list of namespaces to which belongs the direct childs of element 927 """ 928 props = [] 929 for child in self.getChildren(): 930 prop = child.getNamespace() 931 if prop not in props: 932 props.append(prop) 933 return props
934
935 - def __setitem__(self, item, val):
936 """ 937 Set the item 'item' to the value 'val' 938 """ 939 if item in ['to', 'from']: 940 val = JID(val) 941 return self.setAttr(item, val)
942 943
944 -class Message(Protocol):
945 """ 946 XMPP Message stanza - "push" mechanism 947 """ 948
949 - def __init__(self, to=None, body=None, xhtml=None, typ=None, subject=None, 950 attrs={}, frm=None, payload=[], timestamp=None, xmlns=NS_CLIENT, 951 node=None):
952 """ 953 You can specify recipient, text of message, type of message any 954 additional attributes, sender of the message, any additional payload 955 (f.e. jabber:x:delay element) and namespace in one go. 956 957 Alternatively you can pass in the other XML object as the 'node' 958 parameted to replicate it as message 959 """ 960 Protocol.__init__(self, 'message', to=to, typ=typ, attrs=attrs, frm=frm, 961 payload=payload, timestamp=timestamp, xmlns=xmlns, node=node) 962 if body: 963 self.setBody(body) 964 if xhtml: 965 self.setXHTML(xhtml) 966 if subject is not None: 967 self.setSubject(subject)
968
969 - def getBody(self):
970 """ 971 Return text of the message 972 """ 973 return self.getTagData('body')
974
975 - def getXHTML(self, xmllang=None):
976 """ 977 Return serialized xhtml-im element text of the message 978 979 TODO: Returning a DOM could make rendering faster. 980 """ 981 xhtml = self.getTag('html') 982 if xhtml: 983 if xmllang: 984 body = xhtml.getTag('body', attrs={'xml:lang': xmllang}) 985 else: 986 body = xhtml.getTag('body') 987 return str(body) 988 return None
989
990 - def getSubject(self):
991 """ 992 Return subject of the message 993 """ 994 return self.getTagData('subject')
995
996 - def getThread(self):
997 """ 998 Return thread of the message 999 """ 1000 return self.getTagData('thread')
1001
1002 - def setBody(self, val):
1003 """ 1004 Set the text of the message""" 1005 self.setTagData('body', val)
1006
1007 - def setXHTML(self, val, xmllang=None):
1008 """ 1009 Sets the xhtml text of the message (XEP-0071). The parameter is the 1010 "inner html" to the body. 1011 """ 1012 try: 1013 if xmllang: 1014 dom = NodeBuilder('<body xmlns="%s" xml:lang="%s">%s</body>' \ 1015 % (NS_XHTML, xmllang, val)).getDom() 1016 else: 1017 dom = NodeBuilder('<body xmlns="%s">%s</body>' % (NS_XHTML, 1018 val), 0).getDom() 1019 if self.getTag('html'): 1020 self.getTag('html').addChild(node=dom) 1021 else: 1022 self.setTag('html', namespace=NS_XHTML_IM).addChild(node=dom) 1023 except Exception, e: 1024 print "Error", e
1025 # FIXME: log. we could not set xhtml (parse error, whatever) 1026
1027 - def setSubject(self, val):
1028 """ 1029 Set the subject of the message 1030 """ 1031 self.setTagData('subject', val)
1032
1033 - def setThread(self, val):
1034 """ 1035 Set the thread of the message 1036 """ 1037 self.setTagData('thread', val)
1038
1039 - def buildReply(self, text=None):
1040 """ 1041 Builds and returns another message object with specified text. The to, 1042 from, thread and type properties of new message are pre-set as reply to 1043 this message 1044 """ 1045 m = Message(to=self.getFrom(), frm=self.getTo(), body=text, 1046 typ=self.getType()) 1047 th = self.getThread() 1048 if th: 1049 m.setThread(th) 1050 return m
1051
1052 - def getStatusCode(self):
1053 """ 1054 Return the status code of the message (for groupchat config change) 1055 """ 1056 attrs = [] 1057 for xtag in self.getTags('x'): 1058 for child in xtag.getTags('status'): 1059 attrs.append(child.getAttr('code')) 1060 return attrs
1061
1062 -class Presence(Protocol):
1063
1064 - def __init__(self, to=None, typ=None, priority=None, show=None, status=None, 1065 attrs={}, frm=None, timestamp=None, payload=[], xmlns=NS_CLIENT, 1066 node=None):
1067 """ 1068 You can specify recipient, type of message, priority, show and status 1069 values any additional attributes, sender of the presence, timestamp, any 1070 additional payload (f.e. jabber:x:delay element) and namespace in one go. 1071 Alternatively you can pass in the other XML object as the 'node' 1072 parameted to replicate it as presence 1073 """ 1074 Protocol.__init__(self, 'presence', to=to, typ=typ, attrs=attrs, frm=frm, 1075 payload=payload, timestamp=timestamp, xmlns=xmlns, node=node) 1076 if priority: 1077 self.setPriority(priority) 1078 if show: 1079 self.setShow(show) 1080 if status: 1081 self.setStatus(status)
1082
1083 - def getPriority(self):
1084 """ 1085 Return the priority of the message 1086 """ 1087 return self.getTagData('priority')
1088
1089 - def getShow(self):
1090 """ 1091 Return the show value of the message 1092 """ 1093 return self.getTagData('show')
1094
1095 - def getStatus(self):
1096 """ 1097 Return the status string of the message 1098 """ 1099 return self.getTagData('status')
1100
1101 - def setPriority(self, val):
1102 """ 1103 Set the priority of the message 1104 """ 1105 self.setTagData('priority', val)
1106
1107 - def setShow(self, val):
1108 """ 1109 Set the show value of the message 1110 """ 1111 self.setTagData('show', val)
1112
1113 - def setStatus(self, val):
1114 """ 1115 Set the status string of the message 1116 """ 1117 self.setTagData('status', val)
1118
1119 - def _muc_getItemAttr(self, tag, attr):
1120 for xtag in self.getTags('x'): 1121 if xtag.getNamespace() not in (NS_MUC_USER, NS_MUC_ADMIN): 1122 continue 1123 for child in xtag.getTags(tag): 1124 return child.getAttr(attr)
1125
1126 - def _muc_getSubTagDataAttr(self, tag, attr):
1127 for xtag in self.getTags('x'): 1128 if xtag.getNamespace() not in (NS_MUC_USER, NS_MUC_ADMIN): 1129 continue 1130 for child in xtag.getTags('item'): 1131 for cchild in child.getTags(tag): 1132 return cchild.getData(), cchild.getAttr(attr) 1133 return None, None
1134
1135 - def getRole(self):
1136 """ 1137 Return the presence role (for groupchat) 1138 """ 1139 return self._muc_getItemAttr('item', 'role')
1140
1141 - def getAffiliation(self):
1142 """ 1143 Return the presence affiliation (for groupchat) 1144 """ 1145 return self._muc_getItemAttr('item', 'affiliation')
1146
1147 - def getNewNick(self):
1148 """ 1149 Return the status code of the presence (for groupchat) 1150 """ 1151 return self._muc_getItemAttr('item', 'nick')
1152
1153 - def getJid(self):
1154 """ 1155 Return the presence jid (for groupchat) 1156 """ 1157 return self._muc_getItemAttr('item', 'jid')
1158
1159 - def getReason(self):
1160 """ 1161 Returns the reason of the presence (for groupchat) 1162 """ 1163 return self._muc_getSubTagDataAttr('reason', '')[0]
1164
1165 - def getActor(self):
1166 """ 1167 Return the reason of the presence (for groupchat) 1168 """ 1169 return self._muc_getSubTagDataAttr('actor', 'jid')[1]
1170
1171 - def getStatusCode(self):
1172 """ 1173 Return the status code of the presence (for groupchat) 1174 """ 1175 attrs = [] 1176 for xtag in self.getTags('x'): 1177 for child in xtag.getTags('status'): 1178 attrs.append(child.getAttr('code')) 1179 return attrs
1180
1181 -class Iq(Protocol):
1182 """ 1183 XMPP Iq object - get/set dialog mechanism 1184 """ 1185
1186 - def __init__(self, typ=None, queryNS=None, attrs={}, to=None, frm=None, 1187 payload=[], xmlns=NS_CLIENT, node=None):
1188 """ 1189 You can specify type, query namespace any additional attributes, 1190 recipient of the iq, sender of the iq, any additional payload (f.e. 1191 jabber:x:data node) and namespace in one go. 1192 1193 Alternatively you can pass in the other XML object as the 'node' 1194 parameted to replicate it as an iq 1195 """ 1196 Protocol.__init__(self, 'iq', to=to, typ=typ, attrs=attrs, frm=frm, 1197 xmlns=xmlns, node=node) 1198 if payload: 1199 self.setQueryPayload(payload) 1200 if queryNS: 1201 self.setQueryNS(queryNS)
1202
1203 - def getQuery(self):
1204 """ 1205 Return the IQ's child element if it exists, None otherwise. 1206 """ 1207 children = self.getChildren() 1208 if children and self.getType() != 'error' and \ 1209 children[0].getName() != 'error': 1210 return children[0]
1211
1212 - def getQueryNS(self):
1213 """ 1214 Return the namespace of the 'query' child element 1215 """ 1216 tag = self.getQuery() 1217 if tag: 1218 return tag.getNamespace()
1219
1220 - def getQuerynode(self):
1221 """ 1222 Return the 'node' attribute value of the 'query' child element 1223 """ 1224 tag = self.getQuery() 1225 if tag: 1226 return tag.getAttr('node')
1227
1228 - def getQueryPayload(self):
1229 """ 1230 Return the 'query' child element payload 1231 """ 1232 tag = self.getQuery() 1233 if tag: 1234 return tag.getPayload()
1235
1236 - def getQueryChildren(self):
1237 """ 1238 Return the 'query' child element child nodes 1239 """ 1240 tag = self.getQuery() 1241 if tag: 1242 return tag.getChildren()
1243
1244 - def setQuery(self, name=None):
1245 """ 1246 Change the name of the query node, creating it if needed. Keep the 1247 existing name if none is given (use 'query' if it's a creation). 1248 Return the query node. 1249 """ 1250 query = self.getQuery() 1251 if query is None: 1252 query = self.addChild('query') 1253 if name is not None: 1254 query.setName(name) 1255 return query
1256
1257 - def setQueryNS(self, namespace):
1258 """ 1259 Set the namespace of the 'query' child element 1260 """ 1261 self.setQuery().setNamespace(namespace)
1262
1263 - def setQueryPayload(self, payload):
1264 """ 1265 Set the 'query' child element payload 1266 """ 1267 self.setQuery().setPayload(payload)
1268
1269 - def setQuerynode(self, node):
1270 """ 1271 Set the 'node' attribute value of the 'query' child element 1272 """ 1273 self.setQuery().setAttr('node', node)
1274
1275 - def buildReply(self, typ):
1276 """ 1277 Build and return another Iq object of specified type. The to, from and 1278 query child node of new Iq are pre-set as reply to this Iq. 1279 """ 1280 iq = Iq(typ, to=self.getFrom(), frm=self.getTo(), 1281 attrs={'id': self.getID()}) 1282 iq.setQuery(self.getQuery().getName()).setNamespace(self.getQueryNS()) 1283 return iq
1284
1285 -class Hashes(Node):
1286 """ 1287 Hash elements for various XEPs as defined in XEP-300 1288 """ 1289 1290 """ 1291 RECOMENDED HASH USE: 1292 Algorithm Support 1293 MD2 MUST NOT 1294 MD4 MUST NOT 1295 MD5 MAY 1296 SHA-1 MUST 1297 SHA-256 MUST 1298 SHA-512 SHOULD 1299 """ 1300 1301 supported = ('md5', 'sha-1', 'sha-256', 'sha-512') 1302
1303 - def __init__(self, nsp=NS_HASHES):
1304 Node.__init__(self, None, {}, [], None, None, False, None) 1305 self.setNamespace(nsp) 1306 self.setName('hash')
1307
1308 - def calculateHash(self, algo, file_string):
1309 """ 1310 Calculate the hash and add it. It is preferable doing it here 1311 instead of doing it all over the place in Gajim. 1312 """ 1313 hl = None 1314 hash_ = None 1315 # file_string can be a string or a file 1316 if type(file_string) == str: # if it is a string 1317 if algo == 'sha-1': 1318 hl = hashlib.sha1() 1319 elif algo == 'md5': 1320 hl = hashlib.md5() 1321 elif algo == 'sha-256': 1322 hl = hashlib.sha256() 1323 elif algo == 'sha-512': 1324 hl = hashlib.sha512() 1325 if hl: 1326 hl.update(file_string) 1327 hash_ = hl.hexdigest() 1328 else: # if it is a file 1329 if algo == 'sha-1': 1330 hl = hashlib.sha1() 1331 elif algo == 'md5': 1332 hl = hashlib.md5() 1333 elif algo == 'sha-256': 1334 hl = hashlib.sha256() 1335 elif algo == 'sha-512': 1336 hl = hashlib.sha512() 1337 if hl: 1338 for line in file_string: 1339 hl.update(line) 1340 hash_ = hl.hexdigest() 1341 return hash_
1342
1343 - def addHash(self, hash_, algo):
1344 self.setAttr('algo', algo) 1345 self.setData(hash_)
1346
1347 -class Acks(Node):
1348 """ 1349 Acknowledgement elements for Stream Management 1350 """
1351 - def __init__(self, nsp=NS_STREAM_MGMT):
1352 Node.__init__(self, None, {}, [], None, None, False, None) 1353 self.setNamespace(nsp)
1354
1355 - def buildAnswer(self, handled):
1356 """ 1357 handled is the number of stanzas handled 1358 """ 1359 self.setName('a') 1360 self.setAttr('h', handled)
1361
1362 - def buildRequest(self):
1363 self.setName('r')
1364
1365 - def buildEnable(self, resume=False):
1366 self.setName('enable') 1367 if resume: 1368 self.setAttr('resume', 'true')
1369
1370 - def buildResume(self, handled, previd):
1371 self.setName('resume') 1372 self.setAttr('h', handled) 1373 self.setAttr('previd', previd)
1374
1375 -class ErrorNode(Node):
1376 """ 1377 XMPP-style error element 1378 1379 In the case of stanza error should be attached to XMPP stanza. 1380 In the case of stream-level errors should be used separately. 1381 """ 1382
1383 - def __init__(self, name, code=None, typ=None, text=None):
1384 """ 1385 Mandatory parameter: name - name of error condition. 1386 Optional parameters: code, typ, text. 1387 Used for backwards compartibility with older jabber protocol. 1388 """ 1389 if name in ERRORS: 1390 cod, type_, txt = ERRORS[name] 1391 ns = name.split()[0] 1392 else: 1393 cod, ns, type_, txt = '500', NS_STANZAS, 'cancel', '' 1394 if typ: 1395 type_ = typ 1396 if code: 1397 cod = code 1398 if text: 1399 txt = text 1400 Node.__init__(self, 'error', {}, [Node(name)]) 1401 if type_: 1402 self.setAttr('type', type_) 1403 if not cod: 1404 self.setName('stream:error') 1405 if txt: 1406 self.addChild(node=Node(ns + ' text', {}, [txt])) 1407 if cod: 1408 self.setAttr('code', cod)
1409
1410 -class Error(Protocol):
1411 """ 1412 Used to quickly transform received stanza into error reply 1413 """ 1414
1415 - def __init__(self, node, error, reply=1):
1416 """ 1417 Create error reply basing on the received 'node' stanza and the 'error' 1418 error condition 1419 1420 If the 'node' is not the received stanza but locally created ('to' and 1421 'from' fields needs not swapping) specify the 'reply' argument as false. 1422 """ 1423 if reply: 1424 Protocol.__init__(self, to=node.getFrom(), frm=node.getTo(), node=node) 1425 else: 1426 Protocol.__init__(self, node=node) 1427 self.setError(error) 1428 if node.getType() == 'error': 1429 self.__str__ = self.__dupstr__
1430
1431 - def __dupstr__(self, dup1=None, dup2=None):
1432 """ 1433 Dummy function used as preventor of creating error node in reply to error 1434 node. I.e. you will not be able to serialise "double" error into string. 1435 """ 1436 return ''
1437
1438 -class DataField(Node):
1439 """ 1440 This class is used in the DataForm class to describe the single data item 1441 1442 If you are working with jabber:x:data (XEP-0004, XEP-0068, XEP-0122) then 1443 you will need to work with instances of this class. 1444 """ 1445
1446 - def __init__(self, name=None, value=None, typ=None, required=0, desc=None, 1447 options=[], node=None):
1448 """ 1449 Create new data field of specified name,value and type 1450 1451 Also 'required','desc' and 'options' fields can be set. Alternatively 1452 other XML object can be passed in as the 'node' parameted 1453 to replicate it as a new datafiled. 1454 """ 1455 Node.__init__(self, 'field', node=node) 1456 if name: 1457 self.setVar(name) 1458 if isinstance(value, (list, tuple)): 1459 self.setValues(value) 1460 elif value: 1461 self.setValue(value) 1462 if typ: 1463 self.setType(typ) 1464 elif not typ and not node: 1465 self.setType('text-single') 1466 if required: 1467 self.setRequired(required) 1468 if desc: 1469 self.setDesc(desc) 1470 if options: 1471 self.setOptions(options)
1472
1473 - def setRequired(self, req=1):
1474 """ 1475 Change the state of the 'required' flag 1476 """ 1477 if req: 1478 self.setTag('required') 1479 else: 1480 try: 1481 self.delChild('required') 1482 except ValueError: 1483 return
1484
1485 - def isRequired(self):
1486 """ 1487 Return in this field a required one 1488 """ 1489 return self.getTag('required')
1490
1491 - def setDesc(self, desc):
1492 """ 1493 Set the description of this field 1494 """ 1495 self.setTagData('desc', desc)
1496
1497 - def getDesc(self):
1498 """ 1499 Return the description of this field 1500 """ 1501 return self.getTagData('desc')
1502
1503 - def setValue(self, val):
1504 """ 1505 Set the value of this field 1506 """ 1507 self.setTagData('value', val)
1508
1509 - def getValue(self):
1510 return self.getTagData('value')
1511
1512 - def setValues(self, lst):
1513 """ 1514 Set the values of this field as values-list. Replaces all previous filed 1515 values! If you need to just add a value - use addValue method 1516 """ 1517 while self.getTag('value'): 1518 self.delChild('value') 1519 for val in lst: 1520 self.addValue(val)
1521
1522 - def addValue(self, val):
1523 """ 1524 Add one more value to this field. Used in 'get' iq's or such 1525 """ 1526 self.addChild('value', {}, [val])
1527
1528 - def getValues(self):
1529 """ 1530 Return the list of values associated with this field 1531 """ 1532 ret = [] 1533 for tag in self.getTags('value'): 1534 ret.append(tag.getData()) 1535 return ret
1536
1537 - def getOptions(self):
1538 """ 1539 Return label-option pairs list associated with this field 1540 """ 1541 ret = [] 1542 for tag in self.getTags('option'): 1543 ret.append([tag.getAttr('label'), tag.getTagData('value')]) 1544 return ret
1545
1546 - def setOptions(self, lst):
1547 """ 1548 Set label-option pairs list associated with this field 1549 """ 1550 while self.getTag('option'): 1551 self.delChild('option') 1552 for opt in lst: 1553 self.addOption(opt)
1554
1555 - def addOption(self, opt):
1556 """ 1557 Add one more label-option pair to this field 1558 """ 1559 if isinstance(opt, basestring): 1560 self.addChild('option').setTagData('value', opt) 1561 else: 1562 self.addChild('option', {'label': opt[0]}).setTagData('value', 1563 opt[1])
1564
1565 - def getType(self):
1566 """ 1567 Get type of this field 1568 """ 1569 return self.getAttr('type')
1570
1571 - def setType(self, val):
1572 """ 1573 Set type of this field 1574 """ 1575 return self.setAttr('type', val)
1576
1577 - def getVar(self):
1578 """ 1579 Get 'var' attribute value of this field 1580 """ 1581 return self.getAttr('var')
1582
1583 - def setVar(self, val):
1584 """ 1585 Set 'var' attribute value of this field 1586 """ 1587 return self.setAttr('var', val)
1588
1589 -class DataForm(Node):
1590 """ 1591 Used for manipulating dataforms in XMPP 1592 1593 Relevant XEPs: 0004, 0068, 0122. Can be used in disco, pub-sub and many 1594 other applications. 1595 """
1596 - def __init__(self, typ=None, data=[], title=None, node=None):
1597 """ 1598 Create new dataform of type 'typ'. 'data' is the list of DataField 1599 instances that this dataform contains, 'title' - the title string. You 1600 can specify the 'node' argument as the other node to be used as base for 1601 constructing this dataform 1602 1603 title and instructions is optional and SHOULD NOT contain newlines. 1604 Several instructions MAY be present. 1605 'typ' can be one of ('form' | 'submit' | 'cancel' | 'result' ) 1606 'typ' of reply iq can be ( 'result' | 'set' | 'set' | 'result' ) respectively. 1607 'cancel' form can not contain any fields. All other forms contains AT LEAST one field. 1608 'title' MAY be included in forms of type "form" and "result" 1609 """ 1610 Node.__init__(self, 'x', node=node) 1611 if node: 1612 newkids = [] 1613 for n in self.getChildren(): 1614 if n.getName() == 'field': 1615 newkids.append(DataField(node=n)) 1616 else: 1617 newkids.append(n) 1618 self.kids = newkids 1619 if typ: 1620 self.setType(typ) 1621 self.setNamespace(NS_DATA) 1622 if title: 1623 self.setTitle(title) 1624 if isinstance(data, dict): 1625 newdata = [] 1626 for name in data.keys(): 1627 newdata.append(DataField(name, data[name])) 1628 data = newdata 1629 for child in data: 1630 if isinstance(child, basestring): 1631 self.addInstructions(child) 1632 elif child.__class__.__name__ == 'DataField': 1633 self.kids.append(child) 1634 else: 1635 self.kids.append(DataField(node=child))
1636
1637 - def getType(self):
1638 """ 1639 Return the type of dataform 1640 """ 1641 return self.getAttr('type')
1642
1643 - def setType(self, typ):
1644 """ 1645 Set the type of dataform 1646 """ 1647 self.setAttr('type', typ)
1648
1649 - def getTitle(self):
1650 """ 1651 Return the title of dataform 1652 """ 1653 return self.getTagData('title')
1654
1655 - def setTitle(self, text):
1656 """ 1657 Set the title of dataform 1658 """ 1659 self.setTagData('title', text)
1660
1661 - def getInstructions(self):
1662 """ 1663 Return the instructions of dataform 1664 """ 1665 return self.getTagData('instructions')
1666
1667 - def setInstructions(self, text):
1668 """ 1669 Set the instructions of dataform 1670 """ 1671 self.setTagData('instructions', text)
1672
1673 - def addInstructions(self, text):
1674 """ 1675 Add one more instruction to the dataform 1676 """ 1677 self.addChild('instructions', {}, [text])
1678
1679 - def getField(self, name):
1680 """ 1681 Return the datafield object with name 'name' (if exists) 1682 """ 1683 return self.getTag('field', attrs={'var': name})
1684
1685 - def setField(self, name):
1686 """ 1687 Create if nessessary or get the existing datafield object with name 1688 'name' and return it 1689 """ 1690 f = self.getField(name) 1691 if f: 1692 return f 1693 return self.addChild(node=DataField(name))
1694
1695 - def asDict(self):
1696 """ 1697 Represent dataform as simple dictionary mapping of datafield names to 1698 their values 1699 """ 1700 ret = {} 1701 for field in self.getTags('field'): 1702 name = field.getAttr('var') 1703 typ = field.getType() 1704 if isinstance(typ, basestring) and typ.endswith('-multi'): 1705 val = [] 1706 for i in field.getTags('value'): 1707 val.append(i.getData()) 1708 else: 1709 val = field.getTagData('value') 1710 ret[name] = val 1711 if self.getTag('instructions'): 1712 ret['instructions'] = self.getInstructions() 1713 return ret
1714
1715 - def __getitem__(self, name):
1716 """ 1717 Simple dictionary interface for getting datafields values by their names 1718 """ 1719 item = self.getField(name) 1720 if item: 1721 return item.getValue() 1722 raise IndexError('No such field')
1723
1724 - def __setitem__(self, name, val):
1725 """ 1726 Simple dictionary interface for setting datafields values by their names 1727 """ 1728 return self.setField(name).setValue(val)
1729

nbxmpp-0.5.3/doc/apidocs/nbxmpp.stringprepare-module.html0000644000175000017500000005427712321263757024762 0ustar asterixasterix00000000000000 nbxmpp.stringprepare
Package nbxmpp :: Module stringprepare
[hide private]
[frames] | no frames]

Module stringprepare

source code

Classes [hide private]
  ILookupTable
Interface for character lookup classes
  IMappingTable
Interface for character mapping classes
  LookupTableFromFunction
  LookupTable
  MappingTableFromFunction
  EmptyMappingTable
  Profile
  NamePrep
Implements preparation of internationalized domain names
Variables [hide private]
  C_11 = LookupTableFromFunction(stringprep.in_table_c11)
  C_12 = LookupTableFromFunction(stringprep.in_table_c12)
  C_21 = LookupTableFromFunction(stringprep.in_table_c21)
  C_22 = LookupTableFromFunction(stringprep.in_table_c22)
  C_3 = LookupTableFromFunction(stringprep.in_table_c3)
  C_4 = LookupTableFromFunction(stringprep.in_table_c4)
  C_5 = LookupTableFromFunction(stringprep.in_table_c5)
  C_6 = LookupTableFromFunction(stringprep.in_table_c6)
  C_7 = LookupTableFromFunction(stringprep.in_table_c7)
  C_8 = LookupTableFromFunction(stringprep.in_table_c8)
  C_9 = LookupTableFromFunction(stringprep.in_table_c9)
  B_1 = EmptyMappingTable(stringprep.in_table_b1)
  B_2 = MappingTableFromFunction(stringprep.map_table_b2)
  nodeprep = Profile(mappings= [B_1, B_2], prohibiteds= [C_11, C...
  resourceprep = Profile(mappings= [B_1,], prohibiteds= [C_12, C...
  nameprep = NamePrep()
  __package__ = 'nbxmpp'

Imports: stringprep, unicodedata, idna


Variables Details [hide private]

C_11

Value:
LookupTableFromFunction(stringprep.in_table_c11)

C_12

Value:
LookupTableFromFunction(stringprep.in_table_c12)

C_21

Value:
LookupTableFromFunction(stringprep.in_table_c21)

C_22

Value:
LookupTableFromFunction(stringprep.in_table_c22)

C_3

Value:
LookupTableFromFunction(stringprep.in_table_c3)

C_4

Value:
LookupTableFromFunction(stringprep.in_table_c4)

C_5

Value:
LookupTableFromFunction(stringprep.in_table_c5)

C_6

Value:
LookupTableFromFunction(stringprep.in_table_c6)

C_7

Value:
LookupTableFromFunction(stringprep.in_table_c7)

C_8

Value:
LookupTableFromFunction(stringprep.in_table_c8)

C_9

Value:
LookupTableFromFunction(stringprep.in_table_c9)

B_1

Value:
EmptyMappingTable(stringprep.in_table_b1)

B_2

Value:
MappingTableFromFunction(stringprep.map_table_b2)

nodeprep

Value:
Profile(mappings= [B_1, B_2], prohibiteds= [C_11, C_12, C_21, C_22, C_\
3, C_4, C_5, C_6, C_7, C_8, C_9, LookupTable([u'"', u'&', u"'", u'/', \
u':', u'<', u'>', u'@'])])

resourceprep

Value:
Profile(mappings= [B_1,], prohibiteds= [C_12, C_21, C_22, C_3, C_4, C_\
5, C_6, C_7, C_8, C_9])

nameprep

Value:
NamePrep()

__package__

Value:
'nbxmpp'

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.DataField-class.html0000644000175000017500000012546212321263757025365 0ustar asterixasterix00000000000000 nbxmpp.protocol.DataField
Package nbxmpp :: Module protocol :: Class DataField
[hide private]
[frames] | no frames]

Class DataField

source code


This class is used in the DataForm class to describe the single data item

If you are working with jabber:x:data (XEP-0004, XEP-0068, XEP-0122) then you will need to work with instances of this class.

Instance Methods [hide private]
 
__init__(self, name=None, value=None, typ=None, required=0, desc=None, options=[], node=None)
Create new data field of specified name,value and type
source code
 
setRequired(self, req=1)
Change the state of the 'required' flag
source code
 
isRequired(self)
Return in this field a required one
source code
 
setDesc(self, desc)
Set the description of this field
source code
 
getDesc(self)
Return the description of this field
source code
 
setValue(self, val)
Set the value of this field
source code
 
getValue(self) source code
 
setValues(self, lst)
Set the values of this field as values-list. Replaces all previous filed values! If you need to just add a value - use addValue method
source code
 
addValue(self, val)
Add one more value to this field. Used in 'get' iq's or such
source code
 
getValues(self)
Return the list of values associated with this field
source code
 
getOptions(self)
Return label-option pairs list associated with this field
source code
 
setOptions(self, lst)
Set label-option pairs list associated with this field
source code
 
addOption(self, opt)
Add one more label-option pair to this field
source code
 
getType(self)
Get type of this field
source code
 
setType(self, val)
Set type of this field
source code
 
getVar(self)
Get 'var' attribute value of this field
source code
 
setVar(self, val)
Set 'var' attribute value of this field
source code

Inherited from simplexml.Node: __contains__, __delitem__, __getattr__, __getitem__, __setitem__, __str__, addChild, addData, clearData, delAttr, delChild, getAttr, getAttrs, getChildren, getData, getName, getNamespace, getParent, getPayload, getTag, getTagAttr, getTagData, getTags, has_attr, iterTags, lookup_nsp, setAttr, setData, setName, setNamespace, setParent, setPayload, setTag, setTagAttr, setTagData

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]

Inherited from simplexml.Node: FORCE_NODE_RECREATION

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name=None, value=None, typ=None, required=0, desc=None, options=[], node=None)
(Constructor)

source code 

Create new data field of specified name,value and type

Also 'required','desc' and 'options' fields can be set. Alternatively other XML object can be passed in as the 'node' parameted to replicate it as a new datafiled.

Overrides: object.__init__

setRequired(self, req=1)

source code 
Change the state of the 'required' flag

isRequired(self)

source code 
Return in this field a required one

setDesc(self, desc)

source code 
Set the description of this field

getDesc(self)

source code 
Return the description of this field

setValue(self, val)

source code 
Set the value of this field

getValue(self)

source code 

setValues(self, lst)

source code 
Set the values of this field as values-list. Replaces all previous filed values! If you need to just add a value - use addValue method

addValue(self, val)

source code 
Add one more value to this field. Used in 'get' iq's or such

getValues(self)

source code 
Return the list of values associated with this field

getOptions(self)

source code 
Return label-option pairs list associated with this field

setOptions(self, lst)

source code 
Set label-option pairs list associated with this field

addOption(self, opt)

source code 
Add one more label-option pair to this field

getType(self)

source code 
Get type of this field

setType(self, val)

source code 
Set type of this field

getVar(self)

source code 
Get 'var' attribute value of this field

setVar(self, val)

source code 
Set 'var' attribute value of this field

nbxmpp-0.5.3/doc/apidocs/toc-nbxmpp.stringprepare-module.html0000644000175000017500000000666012321263757025536 0ustar asterixasterix00000000000000 stringprepare

Module stringprepare


Classes

EmptyMappingTable
ILookupTable
IMappingTable
LookupTable
LookupTableFromFunction
MappingTableFromFunction
NamePrep
Profile

Variables

B_1
B_2
C_11
C_12
C_21
C_22
C_3
C_4
C_5
C_6
C_7
C_8
C_9
__package__
nameprep
nodeprep
resourceprep

[hide private] nbxmpp-0.5.3/doc/apidocs/nbxmpp.dispatcher_nb.BOSHDispatcher-class.html0000644000175000017500000006143712321263757027257 0ustar asterixasterix00000000000000 nbxmpp.dispatcher_nb.BOSHDispatcher
Package nbxmpp :: Module dispatcher_nb :: Class BOSHDispatcher
[hide private]
[frames] | no frames]

Class BOSHDispatcher

source code


Instance Methods [hide private]
 
PlugIn(self, owner, after_SASL=False, old_features=None)
Attach to owner and register ourself and our _exported_methods in it. If defined by a subclass, call self.plugin(owner) to execute hook code after plugging
source code
 
StreamInit(self)
Send an initial stream header
source code
 
StreamTerminate(self)
Send a stream terminator
source code
 
ProcessNonBlocking(self, data=None)
Check incoming stream for data waiting
source code
 
dispatch(self, stanza, session=None, direct=0)
Main procedure that performs XMPP stanza recognition and calling apppropriate handlers for it. Called by simplexml
source code

Inherited from XMPPDispatcher: Event, RegisterCycleHandler, RegisterDefaultHandler, RegisterEventHandler, RegisterHandler, RegisterHandlerOnce, RegisterNamespace, RegisterNamespaceHandler, RegisterProtocol, SendAndCallForResponse, SendAndWaitForResponse, UnregisterCycleHandler, UnregisterHandler, __init__, dumpHandlers, getAnID, plugin, plugout, replace_non_character, restoreHandlers, returnStanzaHandler, send

Inherited from plugin.PlugIn: PlugOut

Class Methods [hide private]

Inherited from plugin.PlugIn: get_instance

Method Details [hide private]

PlugIn(self, owner, after_SASL=False, old_features=None)

source code 
Attach to owner and register ourself and our _exported_methods in it. If defined by a subclass, call self.plugin(owner) to execute hook code after plugging
Overrides: plugin.PlugIn.PlugIn
(inherited documentation)

StreamInit(self)

source code 
Send an initial stream header
Overrides: XMPPDispatcher.StreamInit

StreamTerminate(self)

source code 
Send a stream terminator

ProcessNonBlocking(self, data=None)

source code 
Check incoming stream for data waiting
Parameters:
  • data - data received from transports/IO sockets
Returns:
  1. length of processed data if some data were processed;
  2. '0' string if no data were processed but link is alive;
  3. 0 (zero) if underlying connection is closed.
Overrides: XMPPDispatcher.ProcessNonBlocking
(inherited documentation)

dispatch(self, stanza, session=None, direct=0)

source code 
Main procedure that performs XMPP stanza recognition and calling apppropriate handlers for it. Called by simplexml
Overrides: XMPPDispatcher.dispatch
(inherited documentation)

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.InternalServerError-class.html0000644000175000017500000002272312321263757027521 0ustar asterixasterix00000000000000 nbxmpp.protocol.InternalServerError
Package nbxmpp :: Module protocol :: Class InternalServerError
[hide private]
[frames] | no frames]

Class InternalServerError

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_t_3.gif0000644000175000017500000001502212321263757025536 0ustar asterixasterix00000000000000GIF89a]LBDĔJLTĂ$"$lZ\Ģfd|$T><ܲfddND<2,|fd ĖvttԦTJL܄^\|D:4Ě4&$|^Tܺ&$dVTzlԪ\F<$vtnl̞24 ĔNLtbdndf\ TB4,&$\NLJLܼĆܶĞܾ ܮĎ侼̞̖Ԧ&$Ԯ><!,]Y H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJի55hʵׯ`ÊKٳhӪ]˶۴ptݻx˷߿ LÈNAn #KL˘3k̹ϠCMM<.ͺװc˞]cڸgϐs  ;xYXJNԫk =F܂{# X=ȴlOuLfF!@F7q0F.p(Üja-1~(VvR"d@%8dE*ɱK A` dpR @`3a<U3 ` 2O+*(0&d܁Ljf9Aܒx. !͐ʓ@&h8\0bI))_ȒIe铒1!0LIc!+dBFzi"e KeƂ*u8i *  E{qhq'I,}5҄_|r.^-A$ {|r".@ٮO @/=T9PF>+GJ8@"]#crG"`C< H C0NeMn^3T',g!g:gv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pp.idlequeue
Package nbxmpp :: Module idlequeue
[hide private]
[frames] | no frames]

Source Code for Module nbxmpp.idlequeue

  1  ##   idlequeue.py 
  2  ## 
  3  ##   Copyright (C) 2006 Dimitur Kirov <dkirov@gmail.com> 
  4  ## 
  5  ##   This program is free software; you can redistribute it and/or modify 
  6  ##   it under the terms of the GNU General Public License as published by 
  7  ##   the Free Software Foundation; either version 2, or (at your option) 
  8  ##   any later version. 
  9  ## 
 10  ##   This program is distributed in the hope that it will be useful, 
 11  ##   but WITHOUT ANY WARRANTY; without even the implied warranty of 
 12  ##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 13  ##   GNU General Public License for more details. 
 14   
 15   
 16  """ 
 17  Idlequeues are Gajim's network heartbeat. Transports can be plugged as idle 
 18  objects and be informed about possible IO 
 19  """ 
 20   
 21  import os 
 22  import select 
 23  import logging 
 24  log = logging.getLogger('nbxmpp.idlequeue') 
 25   
 26  # needed for get_idleqeue 
 27  try: 
 28      import gobject 
 29      HAVE_GOBJECT = True 
 30  except ImportError: 
 31      HAVE_GOBJECT = False 
 32   
 33  # needed for idlecommand 
 34  if os.name == 'nt': 
 35      from subprocess import * # python24 only. we ask this for Windows 
 36  elif os.name == 'posix': 
 37      import fcntl 
 38   
 39  FLAG_WRITE                      = 20 # write only 
 40  FLAG_READ                       = 19 # read only 
 41  FLAG_READ_WRITE = 23 # read and write 
 42  FLAG_CLOSE                      = 16 # wait for close 
 43   
 44  PENDING_READ            = 3 # waiting read event 
 45  PENDING_WRITE           = 4 # waiting write event 
 46  IS_CLOSED                       = 16 # channel closed 
 47   
 48   
49 -def get_idlequeue():
50 """ 51 Get an appropriate idlequeue 52 """ 53 if os.name == 'nt': 54 # gobject.io_add_watch does not work on windows 55 return SelectIdleQueue() 56 else: 57 if HAVE_GOBJECT: 58 # Gajim's default Idlequeue 59 return GlibIdleQueue() 60 else: 61 # GUI less implementation 62 return SelectIdleQueue()
63 64
65 -class IdleObject:
66 """ 67 Idle listener interface. Listed methods are called by IdleQueue. 68 """ 69
70 - def __init__(self):
71 self.fd = -1 #: filedescriptor, must be unique for each IdleObject
72
73 - def pollend(self):
74 """ 75 Called on stream failure 76 """ 77 pass
78
79 - def pollin(self):
80 """ 81 Called on new read event 82 """ 83 pass
84
85 - def pollout(self):
86 """ 87 Called on new write event (connect in sockets is a pollout) 88 """ 89 pass
90
91 - def read_timeout(self):
92 """ 93 Called when timeout happened 94 """ 95 pass
96 97
98 -class IdleCommand(IdleObject):
99 """ 100 Can be subclassed to execute commands asynchronously by the idlequeue. 101 Result will be optained via file descriptor of created pipe 102 """ 103
104 - def __init__(self, on_result):
105 IdleObject.__init__(self) 106 # how long (sec.) to wait for result ( 0 - forever ) 107 # it is a class var, instead of a constant and we can override it. 108 self.commandtimeout = 0 109 # when we have some kind of result (valid, ot not) we call this handler 110 self.result_handler = on_result 111 # if it is True, we can safetely execute the command 112 self.canexecute = True 113 self.idlequeue = None 114 self.result =''
115
116 - def set_idlequeue(self, idlequeue):
117 self.idlequeue = idlequeue
118
119 - def _return_result(self):
120 if self.result_handler: 121 self.result_handler(self.result) 122 self.result_handler = None
123
124 - def _compose_command_args(self):
125 return ['echo', 'da']
126
127 - def _compose_command_line(self):
128 """ 129 Return one line representation of command and its arguments 130 """ 131 return reduce(lambda left, right: left + ' ' + right, 132 self._compose_command_args())
133
134 - def wait_child(self):
135 if self.pipe.poll() is None: 136 # result timeout 137 if self.endtime < self.idlequeue.current_time(): 138 self._return_result() 139 self.pipe.stdout.close() 140 self.pipe.stdin.close() 141 else: 142 # child is still active, continue to wait 143 self.idlequeue.set_alarm(self.wait_child, 0.1) 144 else: 145 # child has quit 146 self.result = self.pipe.stdout.read() 147 self._return_result() 148 self.pipe.stdout.close() 149 self.pipe.stdin.close()
150
151 - def start(self):
152 if not self.canexecute: 153 self.result = '' 154 self._return_result() 155 return 156 if os.name == 'nt': 157 self._start_nt() 158 elif os.name == 'posix': 159 self._start_posix()
160
161 - def _start_nt(self):
162 # if program is started from noninteraactive shells stdin is closed and 163 # cannot be forwarded, so we have to keep it open 164 self.pipe = Popen(self._compose_command_args(), stdout=PIPE, 165 bufsize = 1024, shell = True, stderr = STDOUT, stdin = PIPE) 166 if self.commandtimeout >= 0: 167 self.endtime = self.idlequeue.current_time() + self.commandtimeout 168 self.idlequeue.set_alarm(self.wait_child, 0.1)
169
170 - def _start_posix(self):
171 self.pipe = os.popen(self._compose_command_line()) 172 self.fd = self.pipe.fileno() 173 fcntl.fcntl(self.pipe, fcntl.F_SETFL, os.O_NONBLOCK) 174 self.idlequeue.plug_idle(self, False, True) 175 if self.commandtimeout >= 0: 176 self.idlequeue.set_read_timeout(self.fd, self.commandtimeout)
177
178 - def end(self):
179 self.idlequeue.unplug_idle(self.fd) 180 try: 181 self.pipe.close() 182 except: 183 pass
184
185 - def pollend(self):
186 self.idlequeue.remove_timeout(self.fd) 187 self.end() 188 self._return_result()
189
190 - def pollin(self):
191 try: 192 res = self.pipe.read() 193 except Exception, e: 194 res = '' 195 if res == '': 196 return self.pollend() 197 else: 198 self.result += res
199
200 - def read_timeout(self):
201 self.end() 202 self._return_result()
203 204
205 -class IdleQueue:
206 """ 207 IdleQueue provide three distinct time based features. Uses select.poll() 208 209 1. Alarm timeout: Execute a callback after foo seconds 210 2. Timeout event: Call read_timeout() of an plugged object if a timeout 211 has been set, but not removed in time. 212 3. Check file descriptor of plugged objects for read, write and error 213 events 214 215 """ 216 217 # (timeout, boolean) 218 # Boolean is True if timeout is specified in seconds, False means miliseconds 219 PROCESS_TIMEOUT = (100, False) 220
221 - def __init__(self):
222 self.queue = {} 223 224 # when there is a timeout it executes obj.read_timeout() 225 # timeout is not removed automatically! 226 # {fd1: {timeout1: func1, timeout2: func2}} 227 # timout are unique (timeout1 must be != timeout2) 228 # If func1 is None, read_time function is called 229 self.read_timeouts = {} 230 231 # cb, which are executed after XX sec., alarms are removed automatically 232 self.alarms = {} 233 self._init_idle()
234
235 - def _init_idle(self):
236 """ 237 Hook method for subclassed. Will be called by __init__ 238 """ 239 self.selector = select.poll()
240
241 - def set_alarm(self, alarm_cb, seconds):
242 """ 243 Set up a new alarm. alarm_cb will be called after specified seconds. 244 """ 245 alarm_time = self.current_time() + seconds 246 # almost impossible, but in case we have another alarm_cb at this time 247 if alarm_time in self.alarms: 248 self.alarms[alarm_time].append(alarm_cb) 249 else: 250 self.alarms[alarm_time] = [alarm_cb] 251 return alarm_time
252
253 - def remove_alarm(self, alarm_cb, alarm_time):
254 """ 255 Remove alarm callback alarm_cb scheduled on alarm_time. Returns True if 256 it was removed sucessfully, otherwise False 257 """ 258 if not alarm_time in self.alarms: 259 return False 260 i = -1 261 for i in range(len(self.alarms[alarm_time])): 262 # let's not modify the list inside the loop 263 if self.alarms[alarm_time][i] is alarm_cb: 264 break 265 if i != -1: 266 del self.alarms[alarm_time][i] 267 if self.alarms[alarm_time] == []: 268 del self.alarms[alarm_time] 269 return True 270 else: 271 return False
272
273 - def remove_timeout(self, fd, timeout=None):
274 """ 275 Remove the read timeout 276 """ 277 log.info('read timeout removed for fd %s' % fd) 278 if fd in self.read_timeouts: 279 if timeout: 280 if timeout in self.read_timeouts[fd]: 281 del(self.read_timeouts[fd][timeout]) 282 if len(self.read_timeouts[fd]) == 0: 283 del(self.read_timeouts[fd]) 284 else: 285 del(self.read_timeouts[fd])
286
287 - def set_read_timeout(self, fd, seconds, func=None):
288 """ 289 Seta a new timeout. If it is not removed after specified seconds, 290 func or obj.read_timeout() will be called 291 292 A filedescriptor fd can have several timeouts. 293 """ 294 log_txt = 'read timeout set for fd %s on %s seconds' % (fd, seconds) 295 if func: 296 log_txt += ' with function ' + str(func) 297 log.info(log_txt) 298 timeout = self.current_time() + seconds 299 if fd in self.read_timeouts: 300 self.read_timeouts[fd][timeout] = func 301 else: 302 self.read_timeouts[fd] = {timeout: func}
303
304 - def _check_time_events(self):
305 """ 306 Execute and remove alarm callbacks and execute func() or read_timeout() 307 for plugged objects if specified time has ellapsed 308 """ 309 current_time = self.current_time() 310 311 for fd, timeouts in self.read_timeouts.items(): 312 if fd not in self.queue: 313 self.remove_timeout(fd) 314 continue 315 for timeout, func in timeouts.items(): 316 if timeout > current_time: 317 continue 318 if func: 319 log.debug('Calling %s for fd %s' % (func, fd)) 320 func() 321 else: 322 log.debug('Calling read_timeout for fd %s' % fd) 323 self.queue[fd].read_timeout() 324 self.remove_timeout(fd, timeout) 325 326 times = self.alarms.keys() 327 for alarm_time in times: 328 if alarm_time > current_time: 329 continue 330 if alarm_time in self.alarms: 331 for callback in self.alarms[alarm_time]: 332 callback() 333 if alarm_time in self.alarms: 334 del(self.alarms[alarm_time])
335
336 - def plug_idle(self, obj, writable=True, readable=True):
337 """ 338 Plug an IdleObject into idlequeue. Filedescriptor fd must be set 339 340 :param obj: the IdleObject 341 :param writable: True if obj has data to sent 342 :param readable: True if obj expects data to be reiceived 343 """ 344 if obj.fd == -1: 345 return 346 if obj.fd in self.queue: 347 self.unplug_idle(obj.fd) 348 self.queue[obj.fd] = obj 349 if writable: 350 if not readable: 351 flags = FLAG_WRITE 352 else: 353 flags = FLAG_READ_WRITE 354 else: 355 if readable: 356 flags = FLAG_READ 357 else: 358 # when we paused a FT, we expect only a close event 359 flags = FLAG_CLOSE 360 self._add_idle(obj.fd, flags)
361
362 - def _add_idle(self, fd, flags):
363 """ 364 Hook method for subclasses, called by plug_idle 365 """ 366 self.selector.register(fd, flags)
367
368 - def unplug_idle(self, fd):
369 """ 370 Remove plugged IdleObject, specified by filedescriptor fd 371 """ 372 if fd in self.queue: 373 del(self.queue[fd]) 374 self._remove_idle(fd)
375
376 - def current_time(self):
377 from time import time 378 return time()
379
380 - def _remove_idle(self, fd):
381 """ 382 Hook method for subclassed, called by unplug_idle 383 """ 384 self.selector.unregister(fd)
385
386 - def _process_events(self, fd, flags):
387 obj = self.queue.get(fd) 388 if obj is None: 389 self.unplug_idle(fd) 390 return False 391 392 read_write = False 393 if flags & PENDING_READ: 394 #print 'waiting read on %d, flags are %d' % (fd, flags) 395 obj.pollin() 396 read_write = True 397 398 elif flags & PENDING_WRITE and not flags & IS_CLOSED: 399 obj.pollout() 400 read_write = True 401 402 if flags & IS_CLOSED: 403 # io error, don't expect more events 404 self.remove_timeout(obj.fd) 405 self.unplug_idle(obj.fd) 406 obj.pollend() 407 return False 408 409 if read_write: 410 return True 411 return False
412
413 - def process(self):
414 """ 415 Process idlequeue. Check for any pending timeout or alarm events. Call 416 IdleObjects on possible and requested read, write and error events on 417 their file descriptors 418 419 Call this in regular intervals. 420 """ 421 if not self.queue: 422 # check for timeouts/alert also when there are no active fds 423 self._check_time_events() 424 return True 425 try: 426 waiting_descriptors = self.selector.poll(0) 427 except select.error, e: 428 waiting_descriptors = [] 429 if e[0] != 4: # interrupt 430 raise 431 for fd, flags in waiting_descriptors: 432 self._process_events(fd, flags) 433 self._check_time_events() 434 return True
435 436
437 -class SelectIdleQueue(IdleQueue):
438 """ 439 Extends IdleQueue to use select.select() for polling 440 441 This class exisists for the sake of gtk2.8 on windows, which doesn't seem to 442 support io_add_watch properly (yet) 443 """ 444
445 - def _init_idle(self):
446 """ 447 Create a dict, which maps file/pipe/sock descriptor to glib event id 448 """ 449 self.read_fds = {} 450 self.write_fds = {} 451 self.error_fds = {}
452
453 - def _add_idle(self, fd, flags):
454 """ 455 This method is called when we plug a new idle object. Remove descriptor 456 to read/write/error lists, according flags 457 """ 458 if flags & 3: 459 self.read_fds[fd] = fd 460 if flags & 4: 461 self.write_fds[fd] = fd 462 self.error_fds[fd] = fd
463
464 - def _remove_idle(self, fd):
465 """ 466 This method is called when we unplug a new idle object. Remove descriptor 467 from read/write/error lists 468 """ 469 if fd in self.read_fds: 470 del(self.read_fds[fd]) 471 if fd in self.write_fds: 472 del(self.write_fds[fd]) 473 if fd in self.error_fds: 474 del(self.error_fds[fd])
475
476 - def process(self):
477 if not self.write_fds and not self.read_fds: 478 self._check_time_events() 479 return True 480 try: 481 waiting_descriptors = select.select(self.read_fds.keys(), 482 self.write_fds.keys(), self.error_fds.keys(), 0) 483 except select.error, e: 484 waiting_descriptors = ((), (), ()) 485 if e[0] != 4: # interrupt 486 raise 487 for fd in waiting_descriptors[0]: 488 q = self.queue.get(fd) 489 if q: 490 q.pollin() 491 for fd in waiting_descriptors[1]: 492 q = self.queue.get(fd) 493 if q: 494 q.pollout() 495 for fd in waiting_descriptors[2]: 496 q = self.queue.get(fd) 497 if q: 498 q.pollend() 499 self._check_time_events() 500 return True
501 502
503 -class GlibIdleQueue(IdleQueue):
504 """ 505 Extends IdleQueue to use glib io_add_wath, instead of select/poll In another 506 'non gui' implementation of Gajim IdleQueue can be used safetly 507 """ 508 509 # (timeout, boolean) 510 # Boolean is True if timeout is specified in seconds, False means miliseconds 511 PROCESS_TIMEOUT = (2, True) 512
513 - def _init_idle(self):
514 """ 515 Creates a dict, which maps file/pipe/sock descriptor to glib event id 516 """ 517 self.events = {} 518 # time() is already called in glib, we just get the last value 519 # overrides IdleQueue.current_time() 520 self.current_time = gobject.get_current_time
521
522 - def _add_idle(self, fd, flags):
523 """ 524 This method is called when we plug a new idle object. Start listening for 525 events from fd 526 """ 527 res = gobject.io_add_watch(fd, flags, self._process_events, 528 priority=gobject.PRIORITY_LOW) 529 # store the id of the watch, so that we can remove it on unplug 530 self.events[fd] = res
531
532 - def _process_events(self, fd, flags):
533 try: 534 return IdleQueue._process_events(self, fd, flags) 535 except Exception: 536 self._remove_idle(fd) 537 self._add_idle(fd, flags) 538 raise
539
540 - def _remove_idle(self, fd):
541 """ 542 This method is called when we unplug a new idle object. Stop listening 543 for events from fd 544 """ 545 if not fd in self.events: 546 return 547 gobject.source_remove(self.events[fd]) 548 del(self.events[fd])
549
550 - def process(self):
551 self._check_time_events()
552

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_25.gif0000644000175000017500000002066212321263757025624 0ustar asterixasterix00000000000000GIF89aLB<ČBDl̢$"$jdĂlfdbdlRLT><ĺ<2, vtĖ\NL"$D:4\F<ܬRTԪzt24|b\ܲ$vttĚ4&$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<gEPRT2Tq#gá?.*R*V5uK Ǹ9.5AO%W9Fkd5YQAP&щ'xb Q ЊStbX}fq}\_e8c [p2_T8 P-` -`_8}s+1/g@ Z¨!P ;8t?;]_[C| fw`rqkQۗ`ro A(C-,B JoBlzƯ@ )þW0s`.3hv{Wʦ6lbśw`_7™p8 085r/KmBWq_bݯ5 Qb@~mqk0 .;##yyv(0k1?8@#|abaLI8к>w~|u-M.~|߷z}om>A?ߺп]OO>Wng?7ǿ\M{ʾJdt t;nbxmpp-0.5.3/doc/apidocs/nbxmpp.dispatcher_nb-pysrc.html0000644000175000017500000067030412321263757024550 0ustar asterixasterix00000000000000 nbxmpp.dispatcher_nb
Package nbxmpp :: Module dispatcher_nb
[hide private]
[frames] | no frames]

Source Code for Module nbxmpp.dispatcher_nb

  1  ##   dispatcher_nb.py 
  2  ##       based on dispatcher.py 
  3  ## 
  4  ##   Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov 
  5  ##       modified by Dimitur Kirov <dkirov@gmail.com> 
  6  ## 
  7  ##   This program is free software; you can redistribute it and/or modify 
  8  ##   it under the terms of the GNU General Public License as published by 
  9  ##   the Free Software Foundation; either version 2, or (at your option) 
 10  ##   any later version. 
 11  ## 
 12  ##   This program is distributed in the hope that it will be useful, 
 13  ##   but WITHOUT ANY WARRANTY; without even the implied warranty of 
 14  ##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 15  ##   GNU General Public License for more details. 
 16   
 17   
 18  """ 
 19  Main xmpp decision making logic. Provides library with methods to assign 
 20  different handlers to different XMPP stanzas and namespaces 
 21  """ 
 22   
 23  import simplexml, sys, locale 
 24  import re 
 25  from xml.parsers.expat import ExpatError 
 26  from plugin import PlugIn 
 27  from protocol import (NS_STREAMS, NS_XMPP_STREAMS, NS_HTTP_BIND, Iq, Presence, 
 28          Message, Protocol, Node, Error, ERR_FEATURE_NOT_IMPLEMENTED, StreamError) 
 29  import logging 
 30  log = logging.getLogger('nbxmpp.dispatcher_nb') 
 31   
 32  #: default timeout to wait for response for our id 
 33  DEFAULT_TIMEOUT_SECONDS = 25 
 34  outgoingID = 0 
 35   
 36  XML_DECLARATION = '<?xml version=\'1.0\'?>' 
37 38 # FIXME: ugly 39 -class Dispatcher():
40 """ 41 Why is this here - I needed to redefine Dispatcher for BOSH and easiest way 42 was to inherit original Dispatcher (now renamed to XMPPDispatcher). Trouble 43 is that reference used to access dispatcher instance is in Client attribute 44 named by __class__.__name__ of the dispatcher instance .. long story short: 45 46 I wrote following to avoid changing each client.Dispatcher.whatever() in xmpp 47 48 If having two kinds of dispatcher will go well, I will rewrite the dispatcher 49 references in other scripts 50 """ 51
52 - def PlugIn(self, client_obj, after_SASL=False, old_features=None):
53 if client_obj.protocol_type == 'XMPP': 54 XMPPDispatcher().PlugIn(client_obj) 55 elif client_obj.protocol_type == 'BOSH': 56 BOSHDispatcher().PlugIn(client_obj, after_SASL, old_features) 57 else: 58 assert False # should never be reached
59 60 @classmethod
61 - def get_instance(cls, *args, **kwargs):
62 """ 63 Factory Method for object creation 64 65 Use this instead of directly initializing the class in order to make 66 unit testing much easier. 67 """ 68 return cls(*args, **kwargs)
69
70 71 -class XMPPDispatcher(PlugIn):
72 """ 73 Handles XMPP stream and is the first who takes control over a fresh stanza 74 75 Is plugged into NonBlockingClient but can be replugged to restart handled 76 stream headers (used by SASL f.e.). 77 """ 78
79 - def __init__(self):
80 PlugIn.__init__(self) 81 self.handlers = {} 82 self._expected = {} 83 self._defaultHandler = None 84 self._pendingExceptions = [] 85 self._eventHandler = None 86 self._cycleHandlers = [] 87 self._exported_methods=[self.RegisterHandler, self.RegisterDefaultHandler, 88 self.RegisterEventHandler, self.UnregisterCycleHandler, 89 self.RegisterCycleHandler, self.RegisterHandlerOnce, 90 self.UnregisterHandler, self.RegisterProtocol, 91 self.SendAndWaitForResponse, self.SendAndCallForResponse, 92 self.getAnID, self.Event, self.send] 93 94 # Let the dispatcher know if there is support for stream management 95 self.sm = None 96 97 # \ufddo -> \ufdef range 98 c = u'\ufdd0' 99 r = c.encode('utf8') 100 while (c < u'\ufdef'): 101 c = unichr(ord(c) + 1) 102 r += '|' + c.encode('utf8') 103 104 # \ufffe-\uffff, \u1fffe-\u1ffff, ..., \u10fffe-\u10ffff 105 c = u'\ufffe' 106 r += '|' + c.encode('utf8') 107 r += '|' + unichr(ord(c) + 1).encode('utf8') 108 while (c < u'\U0010fffe'): 109 c = unichr(ord(c) + 0x10000) 110 r += '|' + c.encode('utf8') 111 r += '|' + unichr(ord(c) + 1).encode('utf8') 112 113 self.invalid_chars_re = re.compile(r)
114
115 - def getAnID(self):
116 global outgoingID 117 outgoingID += 1 118 return repr(outgoingID)
119
120 - def dumpHandlers(self):
121 """ 122 Return set of user-registered callbacks in it's internal format. Used 123 within the library to carry user handlers set over Dispatcher replugins 124 """ 125 return self.handlers
126
127 - def restoreHandlers(self, handlers):
128 """ 129 Restore user-registered callbacks structure from dump previously obtained 130 via dumpHandlers. Used within the library to carry user handlers set over 131 Dispatcher replugins. 132 """ 133 self.handlers = handlers
134
135 - def _init(self):
136 """ 137 Register default namespaces/protocols/handlers. Used internally 138 """ 139 # FIXME: inject dependencies, do not rely that they are defined by our 140 # owner 141 self.RegisterNamespace('unknown') 142 self.RegisterNamespace(NS_STREAMS) 143 self.RegisterNamespace(self._owner.defaultNamespace) 144 self.RegisterProtocol('iq', Iq) 145 self.RegisterProtocol('presence', Presence) 146 self.RegisterProtocol('message', Message) 147 self.RegisterDefaultHandler(self.returnStanzaHandler) 148 self.RegisterEventHandler(self._owner._caller._event_dispatcher) 149 self.on_responses = {}
150
151 - def plugin(self, owner):
152 """ 153 Plug the Dispatcher instance into Client class instance and send initial 154 stream header. Used internally 155 """ 156 self._init() 157 self._owner.lastErrNode = None 158 self._owner.lastErr = None 159 self._owner.lastErrCode = None 160 if hasattr(self._owner, 'StreamInit'): 161 self._owner.StreamInit() 162 else: 163 self.StreamInit()
164
165 - def plugout(self):
166 """ 167 Prepare instance to be destructed 168 """ 169 self.Stream.dispatch = None 170 self.Stream.features = None 171 self.Stream.destroy() 172 self._owner = None 173 self.Stream = None
174
175 - def StreamInit(self):
176 """ 177 Send an initial stream header 178 """ 179 self._owner.Connection.sendqueue = [] 180 self.Stream = simplexml.NodeBuilder() 181 self.Stream.dispatch = self.dispatch 182 self.Stream._dispatch_depth = 2 183 self.Stream.stream_header_received = self._check_stream_start 184 self.Stream.features = None 185 self._metastream = Node('stream:stream') 186 self._metastream.setNamespace(self._owner.Namespace) 187 self._metastream.setAttr('version', '1.0') 188 self._metastream.setAttr('xmlns:stream', NS_STREAMS) 189 self._metastream.setAttr('to', self._owner.Server) 190 if locale.getdefaultlocale()[0]: 191 self._metastream.setAttr('xml:lang', 192 locale.getdefaultlocale()[0].split('_')[0]) 193 self._owner.send("%s%s>" % (XML_DECLARATION, str(self._metastream)[:-2]))
194
195 - def _check_stream_start(self, ns, tag, attrs):
196 if ns != NS_STREAMS or tag!='stream': 197 raise ValueError('Incorrect stream start: (%s,%s). Terminating.' 198 % (tag, ns))
199
200 - def replace_non_character(self, data):
201 return re.sub(self.invalid_chars_re, u'\ufffd'.encode('utf-8'), data)
202
203 - def ProcessNonBlocking(self, data):
204 """ 205 Check incoming stream for data waiting 206 207 :param data: data received from transports/IO sockets 208 :return: 209 1) length of processed data if some data were processed; 210 2) '0' string if no data were processed but link is alive; 211 3) 0 (zero) if underlying connection is closed. 212 """ 213 # FIXME: 214 # When an error occurs we disconnect the transport directly. Client's 215 # disconnect method will never be called. 216 # Is this intended? 217 # also look at transports start_disconnect() 218 data = self.replace_non_character(data) 219 for handler in self._cycleHandlers: 220 handler(self) 221 if len(self._pendingExceptions) > 0: 222 _pendingException = self._pendingExceptions.pop() 223 raise _pendingException[0], _pendingException[1], _pendingException[2] 224 try: 225 self.Stream.Parse(data) 226 # end stream:stream tag received 227 if self.Stream and self.Stream.has_received_endtag(): 228 self._owner.disconnect(self.Stream.streamError) 229 return 0 230 except ExpatError: 231 log.error('Invalid XML received from server. Forcing disconnect.') 232 self._owner.Connection.disconnect() 233 return 0 234 except ValueError, e: 235 log.debug('ValueError: %s' % str(e)) 236 self._owner.Connection.pollend() 237 return 0 238 if len(self._pendingExceptions) > 0: 239 _pendingException = self._pendingExceptions.pop() 240 raise _pendingException[0], _pendingException[1], _pendingException[2] 241 if len(data) == 0: 242 return '0' 243 return len(data)
244
245 - def RegisterNamespace(self, xmlns, order='info'):
246 """ 247 Create internal structures for newly registered namespace 248 249 You can register handlers for this namespace afterwards. By default 250 one namespace is already registered 251 (jabber:client or jabber:component:accept depending on context. 252 """ 253 log.debug('Registering namespace "%s"' % xmlns) 254 self.handlers[xmlns] = {} 255 self.RegisterProtocol('unknown', Protocol, xmlns=xmlns) 256 self.RegisterProtocol('default', Protocol, xmlns=xmlns)
257
258 - def RegisterProtocol(self, tag_name, Proto, xmlns=None, order='info'):
259 """ 260 Used to declare some top-level stanza name to dispatcher 261 262 Needed to start registering handlers for such stanzas. Iq, message and 263 presence protocols are registered by default. 264 """ 265 if not xmlns: 266 xmlns=self._owner.defaultNamespace 267 log.debug('Registering protocol "%s" as %s(%s)' %(tag_name, Proto, xmlns)) 268 self.handlers[xmlns][tag_name] = {type:Proto, 'default':[]}
269
270 - def RegisterNamespaceHandler(self, xmlns, handler, typ='', ns='', 271 makefirst=0, system=0):
272 """ 273 Register handler for processing all stanzas for specified namespace 274 """ 275 self.RegisterHandler('default', handler, typ, ns, xmlns, makefirst, 276 system)
277
278 - def RegisterHandler(self, name, handler, typ='', ns='', xmlns=None, 279 makefirst=False, system=False):
280 """ 281 Register user callback as stanzas handler of declared type 282 283 Callback arguments: 284 dispatcher instance (for replying), incoming return of previous handlers. 285 The callback must raise xmpp.NodeProcessed just before return if it wants 286 to prevent other callbacks to be called with the same stanza as argument 287 _and_, more importantly library from returning stanza to sender with error set. 288 289 :param name: name of stanza. F.e. "iq". 290 :param handler: user callback. 291 :param typ: value of stanza's "type" attribute. If not specified any 292 value will match 293 :param ns: namespace of child that stanza must contain. 294 :param makefirst: insert handler in the beginning of handlers list instead 295 of adding it to the end. Note that more common handlers i.e. w/o "typ" 296 and " will be called first nevertheless. 297 :param system: call handler even if NodeProcessed Exception were raised 298 already. 299 """ 300 if not xmlns: 301 xmlns=self._owner.defaultNamespace 302 log.debug('Registering handler %s for "%s" type->%s ns->%s(%s)' % 303 (handler, name, typ, ns, xmlns)) 304 if not typ and not ns: 305 typ='default' 306 if xmlns not in self.handlers: 307 self.RegisterNamespace(xmlns, 'warn') 308 if name not in self.handlers[xmlns]: 309 self.RegisterProtocol(name, Protocol, xmlns, 'warn') 310 if typ+ns not in self.handlers[xmlns][name]: 311 self.handlers[xmlns][name][typ+ns]=[] 312 if makefirst: 313 self.handlers[xmlns][name][typ+ns].insert(0, {'func':handler, 314 'system':system}) 315 else: 316 self.handlers[xmlns][name][typ+ns].append({'func':handler, 317 'system':system})
318
319 - def RegisterHandlerOnce(self, name, handler, typ='', ns='', xmlns=None, 320 makefirst=0, system=0):
321 """ 322 Unregister handler after first call (not implemented yet) 323 """ 324 # FIXME Drop or implement 325 if not xmlns: 326 xmlns = self._owner.defaultNamespace 327 self.RegisterHandler(name, handler, typ, ns, xmlns, makefirst, system)
328
329 - def UnregisterHandler(self, name, handler, typ='', ns='', xmlns=None):
330 """ 331 Unregister handler. "typ" and "ns" must be specified exactly the same as 332 with registering. 333 """ 334 if not xmlns: 335 xmlns = self._owner.defaultNamespace 336 if not typ and not ns: 337 typ='default' 338 if xmlns not in self.handlers: 339 return 340 if name not in self.handlers[xmlns]: 341 return 342 if typ+ns not in self.handlers[xmlns][name]: 343 return 344 for pack in self.handlers[xmlns][name][typ+ns]: 345 if pack['func'] == handler: 346 try: 347 self.handlers[xmlns][name][typ+ns].remove(pack) 348 except ValueError: 349 pass
350
351 - def RegisterDefaultHandler(self, handler):
352 """ 353 Specify the handler that will be used if no NodeProcessed exception were 354 raised. This is returnStanzaHandler by default. 355 """ 356 self._defaultHandler = handler
357
358 - def RegisterEventHandler(self, handler):
359 """ 360 Register handler that will process events. F.e. "FILERECEIVED" event. See 361 common/connection: _event_dispatcher() 362 """ 363 self._eventHandler = handler
364
365 - def returnStanzaHandler(self, conn, stanza):
366 """ 367 Return stanza back to the sender with <feature-not-implemented/> error 368 set 369 """ 370 if stanza.getType() in ('get', 'set'): 371 conn._owner.send(Error(stanza, ERR_FEATURE_NOT_IMPLEMENTED))
372
373 - def RegisterCycleHandler(self, handler):
374 """ 375 Register handler that will be called on every Dispatcher.Process() call 376 """ 377 if handler not in self._cycleHandlers: 378 self._cycleHandlers.append(handler)
379
380 - def UnregisterCycleHandler(self, handler):
381 """ 382 Unregister handler that will is called on every Dispatcher.Process() call 383 """ 384 if handler in self._cycleHandlers: 385 self._cycleHandlers.remove(handler)
386
387 - def Event(self, realm, event, data):
388 """ 389 Raise some event 390 391 :param realm: scope of event. Usually a namespace. 392 :param event: the event itself. F.e. "SUCCESSFUL SEND". 393 :param data: data that comes along with event. Depends on event. 394 """ 395 if self._eventHandler: 396 self._eventHandler(realm, event, data) 397 else: 398 log.warning('Received unhandled event: %s' % event)
399
400 - def dispatch(self, stanza, session=None, direct=0):
401 """ 402 Main procedure that performs XMPP stanza recognition and calling 403 apppropriate handlers for it. Called by simplexml 404 """ 405 # FIXME: Where do we set session and direct. Why? What are those intended 406 # to do? 407 408 #log.info('dispatch called: stanza = %s, session = %s, direct= %s' 409 # % (stanza, session, direct)) 410 if not session: 411 session = self 412 session.Stream._mini_dom = None 413 name = stanza.getName() 414 415 if name == 'features': 416 self._owner.got_features = True 417 session.Stream.features = stanza 418 elif name == 'error': 419 if stanza.getTag('see-other-host'): 420 self._owner.got_see_other_host = stanza 421 422 xmlns = stanza.getNamespace() 423 424 # log.info('in dispatch, getting ns for %s, and the ns is %s' 425 # % (stanza, xmlns)) 426 if xmlns not in self.handlers: 427 log.warn("Unknown namespace: " + xmlns) 428 xmlns = 'unknown' 429 # features stanza has been handled before 430 if name not in self.handlers[xmlns]: 431 if name != 'features': 432 log.warn("Unknown stanza: " + name) 433 else: 434 log.debug("Got %s/%s stanza" % (xmlns, name)) 435 name='unknown' 436 else: 437 log.debug("Got %s/%s stanza" % (xmlns, name)) 438 439 if stanza.__class__.__name__ == 'Node': 440 # FIXME: this cannot work 441 stanza=self.handlers[xmlns][name][type](node=stanza) 442 443 typ = stanza.getType() 444 if not typ: 445 typ = '' 446 stanza.props = stanza.getProperties() 447 ID = stanza.getID() 448 449 # If server supports stream management 450 if self.sm and self.sm.enabled and (stanza.getName() != 'r' and 451 stanza.getName() != 'a' and stanza.getName() != 'enabled' and 452 stanza.getName() != 'resumed'): 453 # increments the number of stanzas that has been handled 454 self.sm.in_h = self.sm.in_h + 1 455 list_ = ['default'] # we will use all handlers: 456 if typ in self.handlers[xmlns][name]: 457 list_.append(typ) # from very common... 458 for prop in stanza.props: 459 if prop in self.handlers[xmlns][name]: 460 list_.append(prop) 461 if typ and typ+prop in self.handlers[xmlns][name]: 462 list_.append(typ+prop) # ...to very particular 463 464 chain = self.handlers[xmlns]['default']['default'] 465 for key in list_: 466 if key: 467 chain = chain + self.handlers[xmlns][name][key] 468 469 if ID in session._expected: 470 user = 0 471 if isinstance(session._expected[ID], tuple): 472 cb, args = session._expected[ID] 473 log.debug("Expected stanza arrived. Callback %s(%s) found!" % 474 (cb, args)) 475 try: 476 cb(session,stanza,**args) 477 except Exception, typ: 478 if typ.__class__.__name__ != 'NodeProcessed': 479 raise 480 else: 481 log.debug("Expected stanza arrived!") 482 session._expected[ID] = stanza 483 else: 484 user = 1 485 for handler in chain: 486 if user or handler['system']: 487 try: 488 handler['func'](session, stanza) 489 except Exception, typ: 490 if typ.__class__.__name__ != 'NodeProcessed': 491 self._pendingExceptions.insert(0, sys.exc_info()) 492 return 493 user=0 494 if user and self._defaultHandler: 495 self._defaultHandler(session, stanza)
496
497 - def _WaitForData(self, data):
498 """ 499 Internal wrapper around ProcessNonBlocking. Will check for 500 """ 501 if data is None: 502 return 503 res = self.ProcessNonBlocking(data) 504 # 0 result indicates that we have closed the connection, e.g. 505 # we have released dispatcher, so self._owner has no methods 506 if not res: 507 return 508 for (_id, _iq) in self._expected.items(): 509 if _iq is None: 510 # If the expected Stanza would have arrived, ProcessNonBlocking 511 # would have placed the reply stanza in there 512 continue 513 if _id in self.on_responses: 514 if len(self._expected) == 1: 515 self._owner.onreceive(None) 516 resp, args = self.on_responses[_id] 517 del self.on_responses[_id] 518 if args is None: 519 resp(_iq) 520 else: 521 resp(self._owner, _iq, **args) 522 del self._expected[_id]
523
524 - def SendAndWaitForResponse(self, stanza, timeout=None, func=None, args=None):
525 """ 526 Send stanza and wait for recipient's response to it. Will call transports 527 on_timeout callback if response is not retrieved in time 528 529 Be aware: Only timeout of latest call of SendAndWait is active. 530 """ 531 if timeout is None: 532 timeout = DEFAULT_TIMEOUT_SECONDS 533 _waitid = self.send(stanza) 534 if func: 535 self.on_responses[_waitid] = (func, args) 536 if timeout: 537 self._owner.set_timeout(timeout) 538 self._owner.onreceive(self._WaitForData) 539 self._expected[_waitid] = None 540 return _waitid
541
542 - def SendAndCallForResponse(self, stanza, func=None, args=None):
543 """ 544 Put stanza on the wire and call back when recipient replies. Additional 545 callback arguments can be specified in args 546 """ 547 self.SendAndWaitForResponse(stanza, 0, func, args)
548
549 - def send(self, stanza, now=False):
550 """ 551 Wrap transports send method when plugged into NonBlockingClient. Makes 552 sure stanzas get ID and from tag. 553 """ 554 ID = None 555 if type(stanza) not in [type(''), type(u'')]: 556 if isinstance(stanza, Protocol): 557 ID = stanza.getID() 558 if ID is None: 559 stanza.setID(self.getAnID()) 560 ID = stanza.getID() 561 if self._owner._registered_name and not stanza.getAttr('from'): 562 stanza.setAttr('from', self._owner._registered_name) 563 564 # If no ID then it is a whitespace 565 if self.sm and self.sm.enabled and ID: 566 self.sm.uqueue.append(stanza) 567 self.sm.out_h = self.sm.out_h + 1 568 if len(self.sm.uqueue) > self.sm.max_queue: 569 self.sm.request_ack() 570 571 self._owner.Connection.send(stanza, now) 572 return ID
573
574 575 -class BOSHDispatcher(XMPPDispatcher):
576
577 - def PlugIn(self, owner, after_SASL=False, old_features=None):
578 self.old_features = old_features 579 self.after_SASL = after_SASL 580 XMPPDispatcher.PlugIn(self, owner)
581
582 - def StreamInit(self):
583 """ 584 Send an initial stream header 585 """ 586 self.Stream = simplexml.NodeBuilder() 587 self.Stream.dispatch = self.dispatch 588 self.Stream._dispatch_depth = 2 589 self.Stream.stream_header_received = self._check_stream_start 590 self.Stream.features = self.old_features 591 592 self._metastream = Node('stream:stream') 593 self._metastream.setNamespace(self._owner.Namespace) 594 self._metastream.setAttr('version', '1.0') 595 self._metastream.setAttr('xmlns:stream', NS_STREAMS) 596 self._metastream.setAttr('to', self._owner.Server) 597 if locale.getdefaultlocale()[0]: 598 self._metastream.setAttr('xml:lang', 599 locale.getdefaultlocale()[0].split('_')[0]) 600 601 self.restart = True 602 self._owner.Connection.send_init(after_SASL=self.after_SASL)
603
604 - def StreamTerminate(self):
605 """ 606 Send a stream terminator 607 """ 608 self._owner.Connection.send_terminator()
609
610 - def ProcessNonBlocking(self, data=None):
611 if self.restart: 612 fromstream = self._metastream 613 fromstream.setAttr('from', fromstream.getAttr('to')) 614 fromstream.delAttr('to') 615 data = '%s%s>%s' % (XML_DECLARATION, str(fromstream)[:-2], data) 616 self.restart = False 617 return XMPPDispatcher.ProcessNonBlocking(self, data)
618
619 - def dispatch(self, stanza, session=None, direct=0):
620 if stanza.getName() == 'body' and stanza.getNamespace() == NS_HTTP_BIND: 621 622 stanza_attrs = stanza.getAttrs() 623 if 'authid' in stanza_attrs: 624 # should be only in init response 625 # auth module expects id of stream in document attributes 626 self.Stream._document_attrs['id'] = stanza_attrs['authid'] 627 self._owner.Connection.handle_body_attrs(stanza_attrs) 628 629 children = stanza.getChildren() 630 if children: 631 for child in children: 632 # if child doesn't have any ns specified, simplexml (or expat) 633 # thinks it's of parent's (BOSH body) namespace, so we have to 634 # rewrite it to jabber:client 635 if child.getNamespace() == NS_HTTP_BIND: 636 child.setNamespace(self._owner.defaultNamespace) 637 XMPPDispatcher.dispatch(self, child, session, direct) 638 else: 639 XMPPDispatcher.dispatch(self, stanza, session, direct)
640

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_b.gif0000644000175000017500000006347712321263757025313 0ustar asterixasterix00000000000000GIF89a#LB<ĤFD|Ăt^T$"$Ģjd|dJDd&$fdĺ4<2, nlvt|^TĖTJLldVT&$ԦܲD:4||f\Ě4&$zlܺ \F<24t rdvtԮf\ԞTB4ĬRTtbd̢nddND,|bd̒"$Ԫ|jlĞ4*$~t  ><\NLĬ|ܶĞܾ64܌., Ď侼 ̖&$LBDt^\<24ԦD:<|fdzt \FDTBDdRTtZ\L:<̞$,"$vt\JLlVTTFDL>A 6dК q62 U9 Xlccpujb9z*XP%]nZ,g .uz*ڹՄܜ׸ЅJoKp4]t=7=vK#Roy{]']/u )S-Fu}K`DPN/ 0p'?p~@ bHITE0Wl3 PBvN-i q8DR1\C&SqBQX!lM^/qe<{^E?YfDsM:u_ęK0P,%-IZn:<:19&N>L0oHhN !c(,:h2Z+Q}ռM"Hݫj$L[exp-, Uj[U{ٕ^Elq+%@%Ի bT'5,bXʴFw/ꉭzZOHoK/Pyo5!x|M+gPu\y͗}s/O;uϋ_yU\Nщ8xM:BWY寀ػZO;A X  Ar^<1ծv%_;X,(ec F+Ȃ?CK胉,yq W^/#)h"@)3>J}"b$Tkq%+x +,㔃;hIUGuN!{k~_r(w4~&xJJK~KHN*w}!TDMާ+0NM0X` F)iD81wvw3t/DwMw3 P@ۄMdG/h1i1$gi1Qf]O%P>\h`jXf+VnjlXrHp3d' ( P,XuWxQU}eu&xk-f+2Rti_9Ķc(uvȊ-^F(H`kES6S:E؊fXpl;}OoZEnmhXm6(`I:V~VBdTA1nV1hA JWVgVh#pX6sIuVUpoOuXā΄7yz%ZRW'y"9pXY"9#S1Y[4I. UYY#iO: XǑ]vZ"_҉#qA[qȡ1ÕAq"(5$sqDdIaMBrԑ8&cm)7th;@ŗ}9; %;iᅘSȶ]y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9mo(Bm$N',a^d{pNlHw!h:ށ7$aKk_GB!D|cn<ݵ z 98M{El<5;voiڸ- Lj B {^o mà^b.N OBo2BLGt3#!gGe]{B͊[.D8E1CIRh}ՐcH6" yIMKd_Mn$lSۖ%Nt2M@'%B␡S)Tw7Ypd͔97!!7߹Ξ}DʳB "TURxѯKfWPNXפ^QUHp8ZR34ꁽC`kBԔu|'N5+-ĥI ];uD9)Sk_DkJ˾W)Ct١Qҭ&d+!l02FdOSGzH~b1~(?hMWѣ\ߵʰ+zfPlW;q?z@k| U"z6,~%~s_6_H!cG1yh}Vbz8S?",?ADaIAn3 ;1C/5Vq#n23hnw}Q\ddZ9f|bF>/>UTZd\eifLF>PHxJa,dbYgvwm7Bh1i-$A^jb`h;PF(B>gJ>Y0ixh}Մ;jjKj&HClH=3F]- .SH6H6|x2Bʈkv߸uDN+ъ!{tJ-#ML3o)nK \`C1 ͠/MwMunoh{3RphNyU uVAOaui/"ttw-IT x*Rr.i7ɓ& = >AiGGH9OyI SwRIWYtV[sZɕ_Is^ crbIgqfk9mjɖofn s \rIQyya{ z~})RiiRfMIRE阓Re|y9\)'3i!3KW!fgO%9XM!euIh87bwx,)Q5YuAQ syPQISњvعLyh@ Hc|Y|eDyzz|žGE{U}IQ癞5[Kq-zXYwd~E+|D1})YtHH3 x5jޅ0}) w%:_1-ʝI*$'C1 (g'7x_~s7jz6HӃaJg!hacg2 g-?(4T䁦Ryc+;HӆIVY>p=N5jXHc=dJ`_=cXR=*}|ڡXsBvhl:WXXioz*BXHaizT3JjFiJxm v H3W2}fHkeH8JLf¨JLjڸalHVɬvH y:|ԐԃMjkL 9o;QzDN 6ٯǘT1 -[~fi;K-/ ʳA8iBkNG nbxmpp.transports_nb
Package nbxmpp :: Module transports_nb
[hide private]
[frames] | no frames]

Source Code for Module nbxmpp.transports_nb

  1  ##   transports_nb.py 
  2  ##       based on transports.py 
  3  ## 
  4  ##   Copyright (C) 2003-2004 Alexey "Snake" Nezhdanov 
  5  ##       modified by Dimitur Kirov <dkirov@gmail.com> 
  6  ##       modified by Tomas Karasek <tom.to.the.k@gmail.com> 
  7  ## 
  8  ##   This program is free software; you can redistribute it and/or modify 
  9  ##   it under the terms of the GNU General Public License as published by 
 10  ##   the Free Software Foundation; either version 2, or (at your option) 
 11  ##   any later version. 
 12  ## 
 13  ##   This program is distributed in the hope that it will be useful, 
 14  ##   but WITHOUT ANY WARRANTY; without even the implied warranty of 
 15  ##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 16  ##   GNU General Public License for more details. 
 17   
 18  """ 
 19  Transports are objects responsible for connecting to XMPP server and putting 
 20  data to wrapped sockets in in desired form (SSL, TLS, TCP, for HTTP proxy, 
 21  for SOCKS5 proxy...) 
 22   
 23  Transports are not aware of XMPP stanzas and only responsible for low-level 
 24  connection handling. 
 25  """ 
 26   
 27  from simplexml import ustr 
 28  from plugin import PlugIn 
 29  from idlequeue import IdleObject 
 30  import proxy_connectors 
 31  import tls_nb 
 32   
 33  import socket 
 34  import errno 
 35  import time 
 36  import traceback 
 37  import base64 
 38  import urlparse 
 39   
 40  import logging 
 41  log = logging.getLogger('nbxmpp.transports_nb') 
 42   
43 -def urisplit(uri):
44 """ 45 Function for splitting URI string to tuple (protocol, host, port, path). 46 e.g. urisplit('http://httpcm.jabber.org:123/webclient') returns ('http', 47 'httpcm.jabber.org', 123, '/webclient') return 443 as default port if proto 48 is https else 80 49 """ 50 splitted = urlparse.urlsplit(uri) 51 proto, host, path = splitted.scheme, splitted.hostname, splitted.path 52 try: 53 port = splitted.port 54 except ValueError: 55 log.warn('port cannot be extracted from BOSH URL %s, using default port' \ 56 % uri) 57 port = '' 58 if not port: 59 if proto == 'https': 60 port = 443 61 else: 62 port = 80 63 return proto, host, port, path
64
65 -def get_proxy_data_from_dict(proxy):
66 tcp_host, tcp_port, proxy_user, proxy_pass = None, None, None, None 67 proxy_type = proxy['type'] 68 if proxy_type == 'bosh' and not proxy['bosh_useproxy']: 69 # with BOSH not over proxy we have to parse the hostname from BOSH URI 70 proto, tcp_host, tcp_port, path = urisplit(proxy['bosh_uri']) 71 else: 72 # with proxy!=bosh or with bosh over HTTP proxy we're connecting to proxy 73 # machine 74 tcp_host, tcp_port = proxy['host'], proxy['port'] 75 if proxy.get('useauth', False): 76 proxy_user, proxy_pass = proxy['user'], proxy['pass'] 77 return tcp_host, tcp_port, proxy_user, proxy_pass
78 79 #: timeout to connect to the server socket, it doesn't include auth 80 CONNECT_TIMEOUT_SECONDS = 30 81 82 #: how long to wait for a disconnect to complete 83 DISCONNECT_TIMEOUT_SECONDS = 5 84 85 #: size of the buffer which reads data from server 86 # if lower, more stanzas will be fragmented and processed twice 87 RECV_BUFSIZE = 32768 # 2x maximum size of ssl packet, should be plenty 88 # it's inefficient but should work. Problem is that connect machine makes wrong 89 # assumptions and that we only check for pending data in sockets but not in SSL 90 # buffer... 91 92 DATA_RECEIVED = 'DATA RECEIVED' 93 DATA_SENT = 'DATA SENT' 94 DATA_ERROR = 'DATA ERROR' 95 96 DISCONNECTED = 'DISCONNECTED' 97 DISCONNECTING = 'DISCONNECTING' 98 CONNECTING = 'CONNECTING' 99 PROXY_CONNECTING = 'PROXY_CONNECTING' 100 CONNECTED = 'CONNECTED' 101 STATES = (DISCONNECTED, CONNECTING, PROXY_CONNECTING, CONNECTED, DISCONNECTING) 102
103 -class NonBlockingTransport(PlugIn):
104 """ 105 Abstract class representing a transport 106 107 Subclasses CAN have different constructor signature but connect method SHOULD 108 be the same. 109 """ 110
111 - def __init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, 112 certs):
113 """ 114 Each trasport class can have different constructor but it has to have at 115 least all the arguments of NonBlockingTransport constructor 116 117 :param raise_event: callback for monitoring of sent and received data 118 :param on_disconnect: callback called on disconnection during runtime 119 :param idlequeue: processing idlequeue 120 :param estabilish_tls: boolean whether to estabilish TLS connection after 121 TCP connection is done 122 :param certs: tuple of (cacerts, mycerts) see constructor of 123 tls_nb.NonBlockingTLS for more details 124 """ 125 PlugIn.__init__(self) 126 self.raise_event = raise_event 127 self.on_disconnect = on_disconnect 128 self.on_connect = None 129 self.on_connect_failure = None 130 self.idlequeue = idlequeue 131 self.on_receive = None 132 self.server = None 133 self.port = None 134 self.conn_5tuple = None 135 self.set_state(DISCONNECTED) 136 self.estabilish_tls = estabilish_tls 137 self.certs = certs 138 # type of used ssl lib (if any) will be assigned to this member var 139 self.ssl_lib = None 140 self._exported_methods=[self.onreceive, self.set_send_timeout, 141 self.set_send_timeout2, self.set_timeout, self.remove_timeout, 142 self.start_disconnect] 143 144 # time to wait for SOME stanza to come and then send keepalive 145 self.sendtimeout = 0 146 147 # in case we want to something different than sending keepalives 148 self.on_timeout = None 149 self.on_timeout2 = None
150
151 - def plugin(self, owner):
152 owner.Connection = self
153
154 - def plugout(self):
155 self._owner.Connection = None 156 self._owner = None 157 self.disconnect(do_callback=False)
158
159 - def connect(self, conn_5tuple, on_connect, on_connect_failure):
160 """ 161 Creates and connects transport to server and port defined in conn_5tuple 162 which should be item from list returned from getaddrinfo 163 164 :param conn_5tuple: 5-tuple returned from getaddrinfo 165 :param on_connect: callback called on successful connect to the server 166 :param on_connect_failure: callback called on failure when connecting 167 """ 168 self.on_connect = on_connect 169 self.on_connect_failure = on_connect_failure 170 self.server, self.port = conn_5tuple[4][:2] 171 self.conn_5tuple = conn_5tuple
172
173 - def set_state(self, newstate):
174 assert(newstate in STATES) 175 self.state = newstate
176
177 - def get_state(self):
178 return self.state
179
180 - def _on_connect(self):
181 """ 182 Preceeds call of on_connect callback 183 """ 184 # data is reference to socket wrapper instance. We don't need it in client 185 # because 186 self.set_state(CONNECTED) 187 self.on_connect()
188
189 - def _on_connect_failure(self, err_message):
190 """ 191 Preceeds call of on_connect_failure callback 192 """ 193 # In case of error while connecting we need to disconnect transport 194 # but we don't want to call DisconnectHandlers from client, 195 # thus the do_callback=False 196 self.disconnect(do_callback=False) 197 self.on_connect_failure(err_message=err_message)
198
199 - def send(self, raw_data, now=False):
200 if self.get_state() == DISCONNECTED: 201 log.error('Unable to send %s \n because state is %s.' % 202 (raw_data, self.get_state()))
203
204 - def disconnect(self, do_callback=True):
205 self.set_state(DISCONNECTED) 206 if do_callback: 207 # invoke callback given in __init__ 208 self.on_disconnect()
209
210 - def onreceive(self, recv_handler):
211 """ 212 Set the on_receive callback. 213 214 onreceive(None) sets callback to Dispatcher.ProcessNonBlocking which is 215 the default one that will decide what to do with received stanza based on 216 its tag name and namespace. 217 218 Do not confuse it with on_receive() method, which is the callback 219 itself. 220 """ 221 if not recv_handler: 222 if hasattr(self, '_owner') and hasattr(self._owner, 'Dispatcher'): 223 self.on_receive = self._owner.Dispatcher.ProcessNonBlocking 224 else: 225 log.warn('No Dispatcher plugged. Received data will not be processed') 226 self.on_receive = None 227 return 228 self.on_receive = recv_handler
229
230 - def _tcp_connecting_started(self):
232
233 - def read_timeout(self):
234 """ 235 Called when there's no response from server in defined timeout 236 """ 237 if self.on_timeout: 238 self.on_timeout() 239 self.renew_send_timeout()
240
241 - def read_timeout2(self):
242 """ 243 called when there's no response from server in defined timeout 244 """ 245 if self.on_timeout2: 246 self.on_timeout2() 247 self.renew_send_timeout2()
248
249 - def renew_send_timeout(self):
250 if self.on_timeout and self.sendtimeout > 0: 251 self.set_timeout(self.sendtimeout)
252
253 - def renew_send_timeout2(self):
254 if self.on_timeout2 and self.sendtimeout2 > 0: 255 self.set_timeout2(self.sendtimeout2)
256
257 - def set_timeout(self, timeout):
258 self.idlequeue.set_read_timeout(self.fd, timeout)
259
260 - def set_timeout2(self, timeout2):
261 self.idlequeue.set_read_timeout(self.fd, timeout2, self.read_timeout2)
262
263 - def get_fd(self):
264 pass
265
266 - def remove_timeout(self):
267 self.idlequeue.remove_timeout(self.fd)
268
269 - def set_send_timeout(self, timeout, on_timeout):
270 self.sendtimeout = timeout 271 if self.sendtimeout > 0: 272 self.on_timeout = on_timeout 273 else: 274 self.on_timeout = None
275
276 - def set_send_timeout2(self, timeout2, on_timeout2):
277 self.sendtimeout2 = timeout2 278 if self.sendtimeout2 > 0: 279 self.on_timeout2 = on_timeout2 280 else: 281 self.on_timeout2 = None
282 283 # FIXME: where and why does this need to be called
284 - def start_disconnect(self):
286 287
288 -class NonBlockingTCP(NonBlockingTransport, IdleObject):
289 """ 290 Non-blocking TCP socket wrapper 291 292 It is used for simple XMPP connection. Can be connected via proxy and can 293 estabilish TLS connection. 294 """
295 - def __init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, 296 certs, proxy_dict=None):
297 """ 298 :param proxy_dict: dictionary with proxy data as loaded from config file 299 """ 300 NonBlockingTransport.__init__(self, raise_event, on_disconnect, idlequeue, 301 estabilish_tls, certs) 302 IdleObject.__init__(self) 303 304 # queue with messages to be send 305 self.sendqueue = [] 306 307 # bytes remained from the last send message 308 self.sendbuff = '' 309 310 self.proxy_dict = proxy_dict 311 self.on_remote_disconnect = self.disconnect 312 313 # ssl variables 314 self.ssl_fingerprint_sha1 = [] 315 self.ssl_certificate = [] 316 self.ssl_errnum = [] 317 self.ssl_cert_pem = []
318 319 # FIXME: transport should not be aware xmpp
320 - def start_disconnect(self):
321 NonBlockingTransport.start_disconnect(self) 322 self.send('</stream:stream>', now=True) 323 self.disconnect()
324
325 - def connect(self, conn_5tuple, on_connect, on_connect_failure):
326 NonBlockingTransport.connect(self, conn_5tuple, on_connect, 327 on_connect_failure) 328 log.info('NonBlockingTCP Connect :: About to connect to %s:%s' % 329 (self.server, self.port)) 330 331 try: 332 self._sock = socket.socket(*conn_5tuple[:3]) 333 except socket.error, (errnum, errstr): 334 self._on_connect_failure('NonBlockingTCP Connect: Error while creating\ 335 socket: %s %s' % (errnum, errstr)) 336 return 337 338 self._send = self._sock.send 339 self._recv = self._sock.recv 340 self.fd = self._sock.fileno() 341 342 # we want to be notified when send is possible to connected socket because 343 # it means the TCP connection is estabilished 344 self._plug_idle(writable=True, readable=False) 345 self.peerhost = None 346 347 # variable for errno symbol that will be found from exception raised 348 # from connect() 349 errnum = 0 350 errstr = str() 351 352 # set timeout for TCP connecting - if nonblocking connect() fails, pollend 353 # is called. If if succeeds pollout is called. 354 self.idlequeue.set_read_timeout(self.fd, CONNECT_TIMEOUT_SECONDS) 355 356 try: 357 self._sock.setblocking(False) 358 self._sock.connect((self.server, self.port)) 359 except Exception, exc: 360 if type(exc.args) == tuple: 361 errnum, errstr = exc.args 362 else: 363 errnum = 'unknown' 364 errstr = exc.args 365 366 if errnum in (errno.EINPROGRESS, errno.EALREADY, errno.EWOULDBLOCK): 367 # connecting in progress 368 log.info('After NB connect() of %s. "%s" raised => CONNECTING' % 369 (id(self), errstr)) 370 self._tcp_connecting_started() 371 return 372 373 # if there was some other exception, call failure callback and unplug 374 # transport which will also remove read_timeouts for descriptor 375 self._on_connect_failure('Exception while connecting to %s:%s - %s %s' % 376 (self.server, self.port, errnum, errstr))
377
378 - def _connect_to_proxy(self):
379 self.set_state(PROXY_CONNECTING) 380 if self.proxy_dict['type'] == 'socks5': 381 proxyclass = proxy_connectors.SOCKS5Connector 382 elif self.proxy_dict['type'] == 'http' : 383 proxyclass = proxy_connectors.HTTPCONNECTConnector 384 proxyclass.get_instance( 385 send_method=self.send, 386 onreceive=self.onreceive, 387 old_on_receive=self.on_receive, 388 on_success=self._on_connect, 389 on_failure=self._on_connect_failure, 390 xmpp_server=self.proxy_dict['xmpp_server'], 391 proxy_creds=self.proxy_dict['credentials'])
392
393 - def _on_connect(self):
394 """ 395 Preceed invoking of on_connect callback. TCP connection is already 396 estabilished by this time 397 """ 398 if self.estabilish_tls: 399 self.tls_init( 400 on_succ = lambda: NonBlockingTransport._on_connect(self), 401 on_fail = lambda: self._on_connect_failure( 402 'error while estabilishing TLS')) 403 else: 404 NonBlockingTransport._on_connect(self)
405
406 - def tls_init(self, on_succ, on_fail):
407 """ 408 Estabilishes TLS/SSL using this TCP connection by plugging a 409 NonBlockingTLS module 410 """ 411 cacerts, mycerts = self.certs 412 result = tls_nb.NonBlockingTLS.get_instance(cacerts, mycerts).PlugIn(self) 413 if result: 414 on_succ() 415 else: 416 on_fail()
417
418 - def pollin(self):
419 """ 420 Called by idlequeu when receive on plugged socket is possible 421 """ 422 log.info('pollin called, state == %s' % self.get_state()) 423 self._do_receive()
424
425 - def pollout(self):
426 """ 427 Called by idlequeu when send to plugged socket is possible 428 """ 429 log.info('pollout called, state == %s' % self.get_state()) 430 431 if self.get_state() == CONNECTING: 432 log.info('%s socket wrapper connected' % id(self)) 433 self.idlequeue.remove_timeout(self.fd) 434 self._plug_idle(writable=False, readable=False) 435 self.peerhost = self._sock.getsockname() 436 if self.proxy_dict: 437 self._connect_to_proxy() 438 else: 439 self._on_connect() 440 else: 441 self._do_send()
442
443 - def pollend(self):
444 """ 445 Called by idlequeue on TCP connection errors 446 """ 447 log.info('pollend called, state == %s' % self.get_state()) 448 449 if self.get_state() == CONNECTING: 450 self._on_connect_failure('Error during connect to %s:%s' % 451 (self.server, self.port)) 452 else: 453 self.disconnect()
454
455 - def disconnect(self, do_callback=True):
456 if self.get_state() == DISCONNECTED: 457 return 458 self.set_state(DISCONNECTED) 459 self.idlequeue.unplug_idle(self.fd) 460 if 'NonBlockingTLS' in self.__dict__: 461 self.NonBlockingTLS.PlugOut() 462 try: 463 self._sock.shutdown(socket.SHUT_RDWR) 464 self._sock.close() 465 except socket.error, (errnum, errstr): 466 log.info('Error while disconnecting socket: %s' % errstr) 467 self.fd = -1 468 NonBlockingTransport.disconnect(self, do_callback)
469
470 - def read_timeout(self):
471 log.info('read_timeout called, state == %s' % self.get_state()) 472 if self.get_state() == CONNECTING: 473 # if read_timeout is called during connecting, connect() didn't end yet 474 # thus we have to call the tcp failure callback 475 self._on_connect_failure('Error during connect to %s:%s' % 476 (self.server, self.port)) 477 else: 478 NonBlockingTransport.read_timeout(self)
479
480 - def set_timeout(self, timeout):
481 if self.get_state() != DISCONNECTED and self.fd != -1: 482 NonBlockingTransport.set_timeout(self, timeout) 483 else: 484 log.warn('set_timeout: TIMEOUT NOT SET: state is %s, fd is %s' % 485 (self.get_state(), self.fd))
486
487 - def remove_timeout(self):
488 if self.fd: 489 NonBlockingTransport.remove_timeout(self) 490 else: 491 log.warn('remove_timeout: no self.fd state is %s' % self.get_state())
492
493 - def send(self, raw_data, now=False):
494 """ 495 Append raw_data to the queue of messages to be send. If supplied data is 496 unicode string, encode it to utf-8. 497 """ 498 NonBlockingTransport.send(self, raw_data, now) 499 500 r = self.encode_stanza(raw_data) 501 502 if now: 503 self.sendqueue.insert(0, r) 504 self._do_send() 505 else: 506 self.sendqueue.append(r) 507 508 self._plug_idle(writable=True, readable=True)
509
510 - def encode_stanza(self, stanza):
511 """ 512 Encode str or unicode to utf-8 513 """ 514 if isinstance(stanza, unicode): 515 stanza = stanza.encode('utf-8') 516 elif not isinstance(stanza, str): 517 stanza = ustr(stanza).encode('utf-8') 518 return stanza
519
520 - def _plug_idle(self, writable, readable):
521 """ 522 Plug file descriptor of socket to Idlequeue 523 524 Plugged socket will be watched for "send possible" or/and "recv possible" 525 events. pollin() callback is invoked on "recv possible", pollout() on 526 "send_possible". 527 528 Plugged socket will always be watched for "error" event - in that case, 529 pollend() is called. 530 """ 531 log.info('Plugging fd %d, W:%s, R:%s' % (self.fd, writable, readable)) 532 self.idlequeue.plug_idle(self, writable, readable)
533
534 - def _do_send(self):
535 """ 536 Called when send() to connected socket is possible. First message from 537 sendqueue will be sent 538 """ 539 if not self.sendbuff: 540 if not self.sendqueue: 541 log.warn('calling send on empty buffer and queue') 542 self._plug_idle(writable=False, readable=True) 543 return None 544 self.sendbuff = self.sendqueue.pop(0) 545 try: 546 send_count = self._send(self.sendbuff) 547 if send_count: 548 sent_data = self.sendbuff[:send_count] 549 self.sendbuff = self.sendbuff[send_count:] 550 self._plug_idle( 551 writable=((self.sendqueue!=[]) or (self.sendbuff!='')), 552 readable=True) 553 self.raise_event(DATA_SENT, sent_data) 554 555 except Exception: 556 log.error('_do_send:', exc_info=True) 557 traceback.print_exc() 558 self.disconnect()
559
560 - def _do_receive(self):
561 """ 562 Reads all pending incoming data. Will call owner's disconnected() method 563 if appropriate 564 """ 565 received = None 566 errnum = 0 567 errstr = 'No Error Set' 568 569 try: 570 # get as many bites, as possible, but not more than RECV_BUFSIZE 571 received = self._recv(RECV_BUFSIZE) 572 except socket.error, (errnum, errstr): 573 log.info("_do_receive: got %s:" % received, exc_info=True) 574 except tls_nb.SSLWrapper.Error, e: 575 log.info("_do_receive, caught SSL error, got %s:" % received, 576 exc_info=True) 577 errnum, errstr = e.errno, e.strerror 578 579 if received == '': 580 errstr = 'zero bytes on recv' 581 582 if (self.ssl_lib is None and received == '') or \ 583 (self.ssl_lib == tls_nb.PYSTDLIB and errnum == 8 ) or \ 584 (self.ssl_lib == tls_nb.PYOPENSSL and errnum == -1 ): 585 # 8 in stdlib: errstr == EOF occured in violation of protocol 586 # -1 in pyopenssl: errstr == Unexpected EOF 587 log.info("Disconnected by remote server: #%s, %s" % (errnum, errstr)) 588 self.on_remote_disconnect() 589 return 590 591 if errnum: 592 log.info("Connection to %s:%s lost: %s %s" % (self.server, self.port, 593 errnum, errstr), exc_info=True) 594 self.disconnect() 595 return 596 597 # this branch is for case of non-fatal SSL errors - None is returned from 598 # recv() but no errnum is set 599 if received is None: 600 return 601 602 # we have received some bytes, stop the timeout! 603 self.remove_timeout() 604 self.renew_send_timeout() 605 self.renew_send_timeout2() 606 # pass received data to owner 607 if self.on_receive: 608 self.raise_event(DATA_RECEIVED, received) 609 self._on_receive(received) 610 else: 611 # This should never happen, so we need the debug. 612 # (If there is no handler on receive specified, data is passed to 613 # Dispatcher.ProcessNonBlocking) 614 log.error('SOCKET %s Unhandled data received: %s' % (id(self), 615 received)) 616 self.disconnect()
617
618 - def _on_receive(self, data):
619 """ 620 Preceeds on_receive callback. It peels off and checks HTTP headers in 621 HTTP classes, in here it just calls the callback 622 """ 623 self.on_receive(data)
624 625
626 -class NonBlockingHTTP(NonBlockingTCP):
627 """ 628 Socket wrapper that creates HTTP message out of sent data and peels-off HTTP 629 headers from incoming messages 630 """ 631
632 - def __init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, 633 certs, on_http_request_possible, on_persistent_fallback, http_dict, 634 proxy_dict=None):
635 """ 636 :param on_http_request_possible: method to call when HTTP request to 637 socket owned by transport is possible. 638 :param on_persistent_fallback: callback called when server ends TCP 639 connection. It doesn't have to be fatal for HTTP session. 640 :param http_dict: dictionary with data for HTTP request and headers 641 """ 642 NonBlockingTCP.__init__(self, raise_event, on_disconnect, idlequeue, 643 estabilish_tls, certs, proxy_dict) 644 645 self.http_protocol, self.http_host, self.http_port, self.http_path = \ 646 urisplit(http_dict['http_uri']) 647 self.http_protocol = self.http_protocol or 'http' 648 self.http_path = self.http_path or '/' 649 self.http_version = http_dict['http_version'] 650 self.http_persistent = http_dict['http_persistent'] 651 self.add_proxy_headers = http_dict['add_proxy_headers'] 652 653 if 'proxy_user' in http_dict and 'proxy_pass' in http_dict: 654 self.proxy_user, self.proxy_pass = http_dict['proxy_user'], http_dict[ 655 'proxy_pass'] 656 else: 657 self.proxy_user, self.proxy_pass = None, None 658 659 # buffer for partial responses 660 self.recvbuff = '' 661 self.expected_length = 0 662 self.pending_requests = 0 663 self.on_http_request_possible = on_http_request_possible 664 self.last_recv_time = 0 665 self.close_current_connection = False 666 self.on_remote_disconnect = lambda: on_persistent_fallback(self)
667
668 - def http_send(self, raw_data, now=False):
669 self.send(self.build_http_message(raw_data), now)
670
671 - def _on_receive(self, data):
672 """ 673 Preceeds passing received data to owner class. Gets rid of HTTP headers 674 and checks them. 675 """ 676 if self.get_state() == PROXY_CONNECTING: 677 NonBlockingTCP._on_receive(self, data) 678 return 679 680 # append currently received data to HTTP msg in buffer 681 self.recvbuff = '%s%s' % (self.recvbuff or '', data) 682 statusline, headers, httpbody, buffer_rest = self.parse_http_message( 683 self.recvbuff) 684 685 if not (statusline and headers and httpbody): 686 log.debug('Received incomplete HTTP response') 687 return 688 689 if statusline[1] != '200': 690 log.error('HTTP Error: %s %s' % (statusline[1], statusline[2])) 691 self.disconnect() 692 return 693 self.expected_length = int(headers['Content-Length']) 694 if 'Connection' in headers and headers['Connection'].strip()=='close': 695 self.close_current_connection = True 696 697 if self.expected_length > len(httpbody): 698 # If we haven't received the whole HTTP mess yet, let's end the thread. 699 # It will be finnished from one of following recvs on plugged socket. 700 log.info('not enough bytes in HTTP response - %d expected, got %d' % 701 (self.expected_length, len(httpbody))) 702 else: 703 # First part of buffer has been extraced and is going to be handled, 704 # remove it from buffer 705 self.recvbuff = buffer_rest 706 707 # everything was received 708 self.expected_length = 0 709 710 if not self.http_persistent or self.close_current_connection: 711 # not-persistent connections disconnect after response 712 self.disconnect(do_callback=False) 713 self.close_current_connection = False 714 self.last_recv_time = time.time() 715 self.on_receive(data=httpbody, socket=self) 716 self.on_http_request_possible()
717
718 - def build_http_message(self, httpbody, method='POST'):
719 """ 720 Builds http message with given body. Values for headers and status line 721 fields are taken from class variables 722 """ 723 absolute_uri = '%s://%s:%s%s' % (self.http_protocol, self.http_host, 724 self.http_port, self.http_path) 725 headers = ['%s %s %s' % (method, absolute_uri, self.http_version), 726 'Host: %s:%s' % (self.http_host, self.http_port), 727 'User-Agent: Gajim', 728 'Content-Type: text/xml; charset=utf-8', 729 'Content-Length: %s' % len(str(httpbody))] 730 if self.add_proxy_headers: 731 headers.append('Proxy-Connection: keep-alive') 732 headers.append('Pragma: no-cache') 733 if self.proxy_user and self.proxy_pass: 734 credentials = '%s:%s' % (self.proxy_user, self.proxy_pass) 735 credentials = base64.encodestring(credentials).strip() 736 headers.append('Proxy-Authorization: Basic %s' % credentials) 737 else: 738 headers.append('Connection: Keep-Alive') 739 headers.append('\r\n') 740 headers = '\r\n'.join(headers) 741 return('%s%s' % (headers, httpbody))
742
743 - def parse_http_message(self, message):
744 """ 745 Split http message into a tuple: 746 - (statusline - list of e.g. ['HTTP/1.1', '200', 'OK'], 747 - headers - dictionary of headers e.g. {'Content-Length': '604', 748 'Content-Type': 'text/xml; charset=utf-8'}, 749 - httpbody - string with http body) 750 - http_rest - what is left in the message after a full HTTP header + body 751 """ 752 splitted = message.split('\r\n\r\n') 753 if len(splitted) < 2: 754 # no complete http message. Keep filling the buffer until we find one 755 buffer_rest = message 756 return ('', '', '', buffer_rest) 757 else: 758 (header, httpbody) = splitted[:2] 759 header = header.replace('\r', '') 760 header = header.lstrip('\n') 761 header = header.split('\n') 762 statusline = header[0].split(' ', 2) 763 header = header[1:] 764 headers = {} 765 for dummy in header: 766 row = dummy.split(' ', 1) 767 headers[row[0][:-1]] = row[1] 768 body_size = headers['Content-Length'] 769 rest_splitted = splitted[2:] 770 while (len(httpbody) < body_size) and rest_splitted: 771 # Complete httpbody until it has the announced size 772 httpbody = '\n\n'.join([httpbody, rest_splitted.pop(0)]) 773 buffer_rest = "\n\n".join(rest_splitted) 774 return (statusline, headers, httpbody, buffer_rest)
775 776
777 -class NonBlockingHTTPBOSH(NonBlockingHTTP):
778 """ 779 Class for BOSH HTTP connections. Slightly redefines HTTP transport by 780 calling bosh bodytag generating callback before putting data on wire 781 """ 782
783 - def set_stanza_build_cb(self, build_cb):
784 self.build_cb = build_cb
785
786 - def _do_send(self):
787 if self.state == PROXY_CONNECTING: 788 NonBlockingTCP._do_send(self) 789 return 790 if not self.sendbuff: 791 stanza = self.build_cb(socket=self) 792 stanza = self.encode_stanza(stanza) 793 stanza = self.build_http_message(httpbody=stanza) 794 self.sendbuff = stanza 795 NonBlockingTCP._do_send(self)
796

nbxmpp-0.5.3/doc/apidocs/nbxmpp.smacks-module.html0000644000175000017500000002054112321263757023341 0ustar asterixasterix00000000000000 nbxmpp.smacks
Package nbxmpp :: Module smacks
[hide private]
[frames] | no frames]

Module smacks

source code

Classes [hide private]
  Smacks
This is Smacks is the Stream Management class. It takes care of requesting and sending acks. Also, it keeps track of the unhandled outgoing stanzas.
Variables [hide private]
  log = logging.getLogger('nbxmpp.smacks')
  __package__ = 'nbxmpp'

Imports: Acks, NS_STREAM_MGMT, logging


Variables Details [hide private]

log

Value:
logging.getLogger('nbxmpp.smacks')

__package__

Value:
'nbxmpp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DxLҝ.g=7U55(B;Nz0QL~Ǻ읏kzXĊl"l vF ғ /oqY,1V7q۹=xϮ;=xUf`/E Dp?Fȃd],I{$A K@"q+P$*ɇ1ǝ!|=V"T>'́H~s 0 ]?"$杋+jK<Ձ^iPg> _uJ^RFEa - p< >Z *5`ahy`G\'` `$ [ ʠ!` f F[ %EIDIZHEћam9-T*a_UT`QwuYpD)HL\l@a@9ݎ̡Y=a6KhĜ8 L)S9T"L΁db'i K̊TyR5S )b""ҕ#VUc=VdM֕^ս aY]ؙVPL̼(cZ4cAdK4*c -֢G,Vlo/~ocߝ8"H0ױmg/K&~nYFpz *&nr⪡8-䶏N=jnpnH悮ƒ)|붮.Ʈ.֮..."Xnr{/&>/FN/V^/fn/v~//Zo@;nbxmpp-0.5.3/doc/apidocs/nbxmpp.c14n-module.html0000644000175000017500000002716712321263757022640 0ustar asterixasterix00000000000000 nbxmpp.c14n
Package nbxmpp :: Module c14n
[hide private]
[frames] | no frames]

Module c14n

source code

XML canonicalisation methods (for XEP-0116)
Functions [hide private]
 
c14n(node, is_buggy) source code
 
normalise_attr(val) source code
 
normalise_text(val) source code
Variables [hide private]
  __package__ = 'nbxmpp'

Imports: ustr


Function Details [hide private]

c14n(node, is_buggy)

source code 

normalise_attr(val)

source code 

normalise_text(val)

source code 

Variables Details [hide private]

__package__

Value:
'nbxmpp'

nbxmpp-0.5.3/doc/apidocs/nbxmpp.bosh.AckChecker-class.html0000644000175000017500000003070412321263757024617 0ustar asterixasterix00000000000000 nbxmpp.bosh.AckChecker
Package nbxmpp :: Module bosh :: Class AckChecker
[hide private]
[frames] | no frames]

Class AckChecker

source code

Class for generating rids and generating and checking acknowledgements in BOSH messages
Instance Methods [hide private]
 
__init__(self) source code
 
get_not_acked_rids(self) source code
 
backup_stanza(self, stanza, socket) source code
 
process_incoming_ack(self, socket, ack=None) source code
 
get_rid(self) source code
Method Details [hide private]

__init__(self)
(Constructor)

source code 

get_not_acked_rids(self)

source code 

backup_stanza(self, stanza, socket)

source code 

process_incoming_ack(self, socket, ack=None)

source code 

get_rid(self)

source code 

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_41.gif0000644000175000017500000001736212321263757025625 0ustar asterixasterix00000000000000GIF89a-LB<ĤFD|Ģ$"$|b\ĆlRLjd<2,ܲfd4\NLd*, |vtD:4\F<Ԧztl|jl̞|4&$lZ\ܺzlĔ"$ԪTJLL64Ğ TB4dRTjlt^T VTlVL<64,\JDܢ̚4*$~tԪ D6,̒rldRL$̢,&$z|LBD|bdĊnd<24ܶjlT>]GxG 6F(Vhfi !$NUCw(4!*h<#x1*A G`B:PF)e8rXfw D0:D|Gi&hP yf`p 矁~G @ q (A"鉦䖜v)|Unt姤jxOz f.(*0EJPƋOArP](1&묫bri$lJ 0&w@L`gJij$*Yd&J\"8(p J!')M0J&y~/*q wr% q/%$ˈnFꖬN w`J&x$BI-7|7,y5Wi^LJ)͘r ^J ,g'c`ߦR{J M8aq\2s-1Kw+5,"1 2bn8}]_7H-' m~w$*,V@ *х*F9 ގ{y[Dpfj xB`DU?Gn:%7q$4$FB)_x.?GQc^@p"lKP`̠{(j IA:H W0 gH8̡w@ H"HL&6%F*ZX̢.z` H2hL6pH:>nIBkQUF:C JZ򒌔C(NzdC8 R%CNV򕰌,gIZ̥.wD(zdw 0IbL2f:d#*IjN !5n~ fB~yvǝZ7݃Nxss9Ԃ)gBy:ܳ<'h4O@ODӠ!|<BT6`Q@Bh4xOVqIM݅я)5o S 1@zBMJEG1ȁL=꟤A-<}T*eg!{iȊ;\bB4ElAPehdNUE&,e)>*egkBejL]lC@4j5lF rVfemkPM!r[0ý.c˳\Ivca$Jhnr+YA'RhL&܊g9|ăW5b[s^*O.f<ٹlm nw+T/Et)o:_(cT ]?O#gu|sLWW u')v{*3լ6sGC`XOC5/tEg3N53(5 QGW~g(Xǂ!U03'2se:>#=&AX.~ߡJw*C=3>WDSSRȁ~g}RC p9AMŁGfURwsxWT2VUV8~|378JP7Wq$hMvvgy1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_fhjlnpl vO(@ |~?_uy%rmUTU^ŚUV]~+ Z<֢e`CQ 6tPv ڇD3ˊ\eB%ҧr5!É7C,Ob][lڵmƝ[dWO,!9TXpCu> >J>i"/Ǘ rw1~0@$6ȊO Eh#dp"*ڐp"/#oc!/f !DTCp Fo1Gwc: $H C0Ĭ 5HŘtnD.G3D3M5dF i@ 4Ă *,1i#✳;dOr PA 54SĝĜ%H0Գ̰KMO2ۄ5VYgZďU[X VVX6d;pAE6.IW^}v4CYKed0JS\iXɕd ,k!qm*wL2_8`]U_F8a^Ձ8b'P/8cvb?9ds+xcOFGfe_9Sf9gwYo:WhFFVi:jj:kޤ;lq[kF;mז߆;nYh>;poGeg|,^y[W>zwOy~z12@jAg}ýO,O}c0EYq_7?0t(p0@# p@ Vo8&ZV / Є_{pTT!&3-ڰUT 9AY &y 8Q$)IRB)H[Ap,Bp%&Aqԇ!;aH7]bkT,!cLRc%x4YH&& .t3d yY"10v<.R3"CJ3pDeޔY]}^i,Jx…\(=i{ɘ2DR&JWD= f(2 Қ׌؛B+9JE'z:wILs!$-*Q<[e. Z\6MwSo1LMV!b)9!Vù8Z Lg;%sLAh1$4OBXMԥkz֠Pti~Dߘ $;Q 3??UK:)MA5J_UM48paE 08XSE,,׼5 ].ʋ^"`E.a<XɚuyꟵUVűbcd-;Z~+4\fh,mle(PDT/! -D6empָnr{7]nt\flQ04t׻ox;^׼Eozջ^Bم/vQp[׾o~_׿o<`Fp`7p% nbxmpp.protocol
Package nbxmpp :: Module protocol
[hide private]
[frames] | no frames]

Module protocol

source code

Protocol module contains tools that are needed for processing of xmpp-related data structures, including jabber-objects like JID or different stanzas and sub- stanzas) handling routines
Classes [hide private]
  NodeProcessed
Exception that should be raised by handler when the handling should be stopped
  StreamError
Base exception class for stream errors
  BadFormat
  BadNamespacePrefix
  Conflict
  ConnectionTimeout
  HostGone
  HostUnknown
  ImproperAddressing
  InternalServerError
  InvalidFrom
  InvalidID
  InvalidNamespace
  InvalidXML
  NotAuthorized
  PolicyViolation
  RemoteConnectionFailed
  ResourceConstraint
  RestrictedXML
  SeeOtherHost
  SystemShutdown
  UndefinedCondition
  UnsupportedEncoding
  UnsupportedStanzaType
  UnsupportedVersion
  XMLNotWellFormed
  JID
JID can be built from string, modified, compared, serialised into string
  BOSHBody
<body> tag that wraps usual XMPP stanzas in XMPP over BOSH
  Protocol
A "stanza" object class. Contains methods that are common for presences, iqs and messages
  Message
XMPP Message stanza - "push" mechanism
  Presence
  Iq
XMPP Iq object - get/set dialog mechanism
  Hashes
Hash elements for various XEPs as defined in XEP-300
  Acks
Acknowledgement elements for Stream Management
  ErrorNode
XMPP-style error element
  Error
Used to quickly transform received stanza into error reply
  DataField
This class is used in the DataForm class to describe the single data item
  DataForm
Used for manipulating dataforms in XMPP
Functions [hide private]
 
ascii_upper(s) source code
 
isResultNode(node)
Return true if the node is a positive reply
source code
 
isErrorNode(node)
Return true if the node is a negative reply
source code
Variables [hide private]
  NS_ACTIVITY = 'http://jabber.org/protocol/activity'
  NS_ADDRESS = 'http://jabber.org/protocol/address'
  NS_AGENTS = 'jabber:iq:agents'
  NS_AMP = 'http://jabber.org/protocol/amp'
  NS_AMP_ERRORS = 'http://jabber.org/protocol/amp#errors'
  NS_ARCHIVE = 'urn:xmpp:archive'
  NS_ARCHIVE_AUTO = 'urn:xmpp:archive:auto'
  NS_ARCHIVE_MANAGE = 'urn:xmpp:archive:manage'
  NS_ARCHIVE_MANUAL = 'urn:xmpp:archive:manual'
  NS_ARCHIVE_PREF = 'urn:xmpp:archive:pref'
  NS_ATOM = 'http://www.w3.org/2005/Atom'
  NS_ATTENTION = 'urn:xmpp:attention:0'
  NS_AUTH = 'jabber:iq:auth'
  NS_AVATAR = 'http://www.xmpp.org/extensions/xep-0084.html#ns-m...
  NS_BIND = 'urn:ietf:params:xml:ns:xmpp-bind'
  NS_BLOCKING = 'urn:xmpp:blocking'
  NS_BOB = 'urn:xmpp:bob'
  NS_BOOKMARKS = 'storage:bookmarks'
  NS_BROWSE = 'jabber:iq:browse'
  NS_BROWSING = 'http://jabber.org/protocol/browsing'
  NS_BYTESTREAM = 'http://jabber.org/protocol/bytestreams'
  NS_CAPS = 'http://jabber.org/protocol/caps'
  NS_CAPTCHA = 'urn:xmpp:captcha'
  NS_CARBONS = 'urn:xmpp:carbons:2'
  NS_CHATSTATES = 'http://jabber.org/protocol/chatstates'
  NS_CHATTING = 'http://jabber.org/protocol/chatting'
  NS_CLIENT = 'jabber:client'
  NS_CONDITIONS = 'urn:xmpp:muc:conditions:0'
  NS_COMMANDS = 'http://jabber.org/protocol/commands'
  NS_COMPONENT_ACCEPT = 'jabber:component:accept'
  NS_COMPONENT_1 = 'http://jabberd.jabberstudio.org/ns/component...
  NS_COMPRESS = 'http://jabber.org/protocol/compress'
  NS_CONFERENCE = 'jabber:x:conference'
  NS_CORRECT = 'urn:xmpp:message-correct:0'
  NS_DATA = 'jabber:x:data'
  NS_DATA_MEDIA = 'urn:xmpp:media-element'
  NS_DELAY = 'jabber:x:delay'
  NS_DELAY2 = 'urn:xmpp:delay'
  NS_DIALBACK = 'jabber:server:dialback'
  NS_DISCO = 'http://jabber.org/protocol/disco'
  NS_DISCO_INFO = 'http://jabber.org/protocol/disco#info'
  NS_DISCO_ITEMS = 'http://jabber.org/protocol/disco#items'
  NS_ENCRYPTED = 'jabber:x:encrypted'
  NS_ESESSION = 'http://www.xmpp.org/extensions/xep-0116.html#ns'
  NS_ESESSION_INIT = 'http://www.xmpp.org/extensions/xep-0116.ht...
  NS_EVENT = 'jabber:x:event'
  NS_FEATURE = 'http://jabber.org/protocol/feature-neg'
  NS_FILE = 'http://jabber.org/protocol/si/profile/file-transfer'
  NS_FORWARD = 'urn:xmpp:forward:0'
  NS_GAMING = 'http://jabber.org/protocol/gaming'
  NS_GATEWAY = 'jabber:iq:gateway'
  NS_GEOLOC = 'http://jabber.org/protocol/geoloc'
  NS_GROUPCHAT = 'gc-1.0'
  NS_HTTP_AUTH = 'http://jabber.org/protocol/http-auth'
  NS_HTTP_BIND = 'http://jabber.org/protocol/httpbind'
  NS_IBB = 'http://jabber.org/protocol/ibb'
  NS_INVISIBLE = 'presence-invisible'
  NS_IQ = 'iq'
  NS_JINGLE = 'urn:xmpp:jingle:1'
  NS_JINGLE_ERRORS = 'urn:xmpp:jingle:errors:1'
  NS_JINGLE_RTP = 'urn:xmpp:jingle:apps:rtp:1'
  NS_JINGLE_RTP_AUDIO = 'urn:xmpp:jingle:apps:rtp:audio'
  NS_JINGLE_RTP_VIDEO = 'urn:xmpp:jingle:apps:rtp:video'
  NS_JINGLE_FILE_TRANSFER = 'urn:xmpp:jingle:apps:file-transfer:3'
  NS_JINGLE_XTLS = 'urn:xmpp:jingle:security:xtls:0'
  NS_JINGLE_RAW_UDP = 'urn:xmpp:jingle:transports:raw-udp:1'
  NS_JINGLE_ICE_UDP = 'urn:xmpp:jingle:transports:ice-udp:1'
  NS_JINGLE_BYTESTREAM = 'urn:xmpp:jingle:transports:s5b:1'
  NS_JINGLE_IBB = 'urn:xmpp:jingle:transports:ibb:1'
  NS_LAST = 'jabber:iq:last'
  NS_LOCATION = 'http://jabber.org/protocol/geoloc'
  NS_MAM = 'urn:xmpp:mam:tmp'
  NS_MESSAGE = 'message'
  NS_MOOD = 'http://jabber.org/protocol/mood'
  NS_MUC = 'http://jabber.org/protocol/muc'
  NS_MUC_USER = 'http://jabber.org/protocol/muc#user'
  NS_MUC_ADMIN = 'http://jabber.org/protocol/muc#admin'
  NS_MUC_OWNER = 'http://jabber.org/protocol/muc#owner'
  NS_MUC_UNIQUE = 'http://jabber.org/protocol/muc#unique'
  NS_MUC_CONFIG = 'http://jabber.org/protocol/muc#roomconfig'
  NS_NICK = 'http://jabber.org/protocol/nick'
  NS_OFFLINE = 'http://www.jabber.org/jeps/jep-0030.html'
  NS_PHYSLOC = 'http://jabber.org/protocol/physloc'
  NS_PING = 'urn:xmpp:ping'
  NS_PRESENCE = 'presence'
  NS_PRIVACY = 'jabber:iq:privacy'
  NS_PRIVATE = 'jabber:iq:private'
  NS_PROFILE = 'http://jabber.org/protocol/profile'
  NS_PUBSUB = 'http://jabber.org/protocol/pubsub'
  NS_PUBSUB_EVENT = 'http://jabber.org/protocol/pubsub#event'
  NS_PUBSUB_PUBLISH_OPTIONS = 'http://jabber.org/protocol/pubsub...
  NS_PUBSUB_OWNER = 'http://jabber.org/protocol/pubsub#owner'
  NS_REGISTER = 'jabber:iq:register'
  NS_ROSTER = 'jabber:iq:roster'
  NS_ROSTERNOTES = 'storage:rosternotes'
  NS_ROSTERX = 'http://jabber.org/protocol/rosterx'
  NS_ROSTER_VER = 'urn:xmpp:features:rosterver'
  NS_RPC = 'jabber:iq:rpc'
  NS_RSM = 'http://jabber.org/protocol/rsm'
  NS_SASL = 'urn:ietf:params:xml:ns:xmpp-sasl'
  NS_SECLABEL = 'urn:xmpp:sec-label:0'
  NS_SECLABEL_CATALOG = 'urn:xmpp:sec-label:catalog:2'
  NS_SEARCH = 'jabber:iq:search'
  NS_SERVER = 'jabber:server'
  NS_SESSION = 'urn:ietf:params:xml:ns:xmpp-session'
  NS_SI = 'http://jabber.org/protocol/si'
  NS_SI_PUB = 'http://jabber.org/protocol/sipub'
  NS_SIGNED = 'jabber:x:signed'
  NS_SSN = 'urn:xmpp:ssn'
  NS_STANZA_CRYPTO = 'http://www.xmpp.org/extensions/xep-0200.ht...
  NS_STANZAS = 'urn:ietf:params:xml:ns:xmpp-stanzas'
  NS_STREAM = 'http://affinix.com/jabber/stream'
  NS_STREAMS = 'http://etherx.jabber.org/streams'
  NS_TIME = 'jabber:iq:time'
  NS_TIME_REVISED = 'urn:xmpp:time'
  NS_TLS = 'urn:ietf:params:xml:ns:xmpp-tls'
  NS_TUNE = 'http://jabber.org/protocol/tune'
  NS_VACATION = 'http://jabber.org/protocol/vacation'
  NS_VCARD = 'vcard-temp'
  NS_GMAILNOTIFY = 'google:mail:notify'
  NS_GTALKSETTING = 'google:setting'
  NS_VCARD_UPDATE = 'vcard-temp:x:update'
  NS_VERSION = 'jabber:iq:version'
  NS_VIEWING = 'http://jabber.org/protocol/viewing'
  NS_WAITINGLIST = 'http://jabber.org/protocol/waitinglist'
  NS_XHTML_IM = 'http://jabber.org/protocol/xhtml-im'
  NS_XHTML = 'http://www.w3.org/1999/xhtml'
  NS_X_OOB = 'jabber:x:oob'
  NS_DATA_LAYOUT = 'http://jabber.org/protocol/xdata-layout'
  NS_DATA_VALIDATE = 'http://jabber.org/protocol/xdata-validate'
  NS_XMPP_STREAMS = 'urn:ietf:params:xml:ns:xmpp-streams'
  NS_RECEIPTS = 'urn:xmpp:receipts'
  NS_PUBKEY_PUBKEY = 'urn:xmpp:pubkey:2'
  NS_PUBKEY_REVOKE = 'urn:xmpp:revoke:2'
  NS_PUBKEY_ATTEST = 'urn:xmpp:attest:2'
  NS_STREAM_MGMT = 'urn:xmpp:sm:2'
  NS_HASHES = 'urn:xmpp:hashes:1'
  NS_HASHES_MD5 = 'urn:xmpp:hash-function-textual-names:md5'
  NS_HASHES_SHA1 = 'urn:xmpp:hash-function-textual-names:sha-1'
  NS_HASHES_SHA256 = 'urn:xmpp:hash-function-textual-names:sha-256'
  NS_HASHES_SHA512 = 'urn:xmpp:hash-function-textual-names:sha-512'
  ERRORS = {'urn:ietf:params:xml:ns:xmpp-sasl aborted': ['', '',...
  _errorcodes = {'302': 'redirect', '400': 'unexpected-request',...
  STREAM_NOT_AUTHORIZED = 'urn:ietf:params:xml:ns:xmpp-streams n...
  STREAM_REMOTE_CONNECTION_FAILED = 'urn:ietf:params:xml:ns:xmpp...
  SASL_MECHANISM_TOO_WEAK = 'urn:ietf:params:xml:ns:xmpp-sasl me...
  STREAM_XML_NOT_WELL_FORMED = 'urn:ietf:params:xml:ns:xmpp-stre...
  ERR_JID_MALFORMED = 'urn:ietf:params:xml:ns:xmpp-stanzas jid-m...
  STREAM_SEE_OTHER_HOST = 'urn:ietf:params:xml:ns:xmpp-streams s...
  STREAM_BAD_NAMESPACE_PREFIX = 'urn:ietf:params:xml:ns:xmpp-str...
  ERR_SERVICE_UNAVAILABLE = 'urn:ietf:params:xml:ns:xmpp-stanzas...
  STREAM_CONNECTION_TIMEOUT = 'urn:ietf:params:xml:ns:xmpp-strea...
  STREAM_UNSUPPORTED_VERSION = 'urn:ietf:params:xml:ns:xmpp-stre...
  STREAM_IMPROPER_ADDRESSING = 'urn:ietf:params:xml:ns:xmpp-stre...
  STREAM_UNDEFINED_CONDITION = 'urn:ietf:params:xml:ns:xmpp-stre...
  SASL_NOT_AUTHORIZED = 'urn:ietf:params:xml:ns:xmpp-sasl not-au...
  ERR_GONE = 'urn:ietf:params:xml:ns:xmpp-stanzas gone'
  SASL_TEMPORARY_AUTH_FAILURE = 'urn:ietf:params:xml:ns:xmpp-sas...
  ERR_REMOTE_SERVER_NOT_FOUND = 'urn:ietf:params:xml:ns:xmpp-sta...
  ERR_UNEXPECTED_REQUEST = 'urn:ietf:params:xml:ns:xmpp-stanzas ...
  ERR_RECIPIENT_UNAVAILABLE = 'urn:ietf:params:xml:ns:xmpp-stanz...
  ERR_CONFLICT = 'urn:ietf:params:xml:ns:xmpp-stanzas conflict'
  STREAM_SYSTEM_SHUTDOWN = 'urn:ietf:params:xml:ns:xmpp-streams ...
  STREAM_BAD_FORMAT = 'urn:ietf:params:xml:ns:xmpp-streams bad-f...
  ERR_SUBSCRIPTION_REQUIRED = 'urn:ietf:params:xml:ns:xmpp-stanz...
  STREAM_INTERNAL_SERVER_ERROR = 'urn:ietf:params:xml:ns:xmpp-st...
  ERR_NOT_AUTHORIZED = 'urn:ietf:params:xml:ns:xmpp-stanzas not-...
  SASL_ABORTED = 'urn:ietf:params:xml:ns:xmpp-sasl aborted'
  ERR_REGISTRATION_REQUIRED = 'urn:ietf:params:xml:ns:xmpp-stanz...
  ERR_INTERNAL_SERVER_ERROR = 'urn:ietf:params:xml:ns:xmpp-stanz...
  SASL_INCORRECT_ENCODING = 'urn:ietf:params:xml:ns:xmpp-sasl in...
  STREAM_HOST_GONE = 'urn:ietf:params:xml:ns:xmpp-streams host-g...
  STREAM_POLICY_VIOLATION = 'urn:ietf:params:xml:ns:xmpp-streams...
  STREAM_INVALID_XML = 'urn:ietf:params:xml:ns:xmpp-streams inva...
  STREAM_CONFLICT = 'urn:ietf:params:xml:ns:xmpp-streams conflict'
  STREAM_RESOURCE_CONSTRAINT = 'urn:ietf:params:xml:ns:xmpp-stre...
  STREAM_UNSUPPORTED_ENCODING = 'urn:ietf:params:xml:ns:xmpp-str...
  ERR_NOT_ALLOWED = 'urn:ietf:params:xml:ns:xmpp-stanzas not-all...
  ERR_ITEM_NOT_FOUND = 'urn:ietf:params:xml:ns:xmpp-stanzas item...
  ERR_NOT_ACCEPTABLE = 'urn:ietf:params:xml:ns:xmpp-stanzas not-...
  STREAM_INVALID_FROM = 'urn:ietf:params:xml:ns:xmpp-streams inv...
  ERR_FEATURE_NOT_IMPLEMENTED = 'urn:ietf:params:xml:ns:xmpp-sta...
  ERR_BAD_REQUEST = 'urn:ietf:params:xml:ns:xmpp-stanzas bad-req...
  STREAM_INVALID_ID = 'urn:ietf:params:xml:ns:xmpp-streams inval...
  STREAM_HOST_UNKNOWN = 'urn:ietf:params:xml:ns:xmpp-streams hos...
  ERR_UNDEFINED_CONDITION = 'urn:ietf:params:xml:ns:xmpp-stanzas...
  SASL_INVALID_MECHANISM = 'urn:ietf:params:xml:ns:xmpp-sasl inv...
  STREAM_RESTRICTED_XML = 'urn:ietf:params:xml:ns:xmpp-streams r...
  ERR_RESOURCE_CONSTRAINT = 'urn:ietf:params:xml:ns:xmpp-stanzas...
  ERR_REMOTE_SERVER_TIMEOUT = 'urn:ietf:params:xml:ns:xmpp-stanz...
  SASL_INVALID_AUTHZID = 'urn:ietf:params:xml:ns:xmpp-sasl inval...
  ERR_PAYMENT_REQUIRED = 'urn:ietf:params:xml:ns:xmpp-stanzas pa...
  STREAM_INVALID_NAMESPACE = 'urn:ietf:params:xml:ns:xmpp-stream...
  ERR_REDIRECT = 'urn:ietf:params:xml:ns:xmpp-stanzas redirect'
  STREAM_UNSUPPORTED_STANZA_TYPE = 'urn:ietf:params:xml:ns:xmpp-...
  ERR_FORBIDDEN = 'urn:ietf:params:xml:ns:xmpp-stanzas forbidden'
  stream_exceptions = {'bad-format': <class 'nbxmpp.protocol.Bad...
  __package__ = 'nbxmpp'

Imports: Node, NodeBuilder, time, string, hashlib


Function Details [hide private]

ascii_upper(s)

source code 

isResultNode(node)

source code 
Return true if the node is a positive reply

isErrorNode(node)

source code 
Return true if the node is a negative reply

Variables Details [hide private]

NS_ACTIVITY

Value:
'http://jabber.org/protocol/activity'

NS_ADDRESS

Value:
'http://jabber.org/protocol/address'

NS_AGENTS

Value:
'jabber:iq:agents'

NS_AMP

Value:
'http://jabber.org/protocol/amp'

NS_AMP_ERRORS

Value:
'http://jabber.org/protocol/amp#errors'

NS_ARCHIVE

Value:
'urn:xmpp:archive'

NS_ARCHIVE_AUTO

Value:
'urn:xmpp:archive:auto'

NS_ARCHIVE_MANAGE

Value:
'urn:xmpp:archive:manage'

NS_ARCHIVE_MANUAL

Value:
'urn:xmpp:archive:manual'

NS_ARCHIVE_PREF

Value:
'urn:xmpp:archive:pref'

NS_ATOM

Value:
'http://www.w3.org/2005/Atom'

NS_ATTENTION

Value:
'urn:xmpp:attention:0'

NS_AUTH

Value:
'jabber:iq:auth'

NS_AVATAR

Value:
'http://www.xmpp.org/extensions/xep-0084.html#ns-metadata'

NS_BIND

Value:
'urn:ietf:params:xml:ns:xmpp-bind'

NS_BLOCKING

Value:
'urn:xmpp:blocking'

NS_BOB

Value:
'urn:xmpp:bob'

NS_BOOKMARKS

Value:
'storage:bookmarks'

NS_BROWSE

Value:
'jabber:iq:browse'

NS_BROWSING

Value:
'http://jabber.org/protocol/browsing'

NS_BYTESTREAM

Value:
'http://jabber.org/protocol/bytestreams'

NS_CAPS

Value:
'http://jabber.org/protocol/caps'

NS_CAPTCHA

Value:
'urn:xmpp:captcha'

NS_CARBONS

Value:
'urn:xmpp:carbons:2'

NS_CHATSTATES

Value:
'http://jabber.org/protocol/chatstates'

NS_CHATTING

Value:
'http://jabber.org/protocol/chatting'

NS_CLIENT

Value:
'jabber:client'

NS_CONDITIONS

Value:
'urn:xmpp:muc:conditions:0'

NS_COMMANDS

Value:
'http://jabber.org/protocol/commands'

NS_COMPONENT_ACCEPT

Value:
'jabber:component:accept'

NS_COMPONENT_1

Value:
'http://jabberd.jabberstudio.org/ns/component/1.0'

NS_COMPRESS

Value:
'http://jabber.org/protocol/compress'

NS_CONFERENCE

Value:
'jabber:x:conference'

NS_CORRECT

Value:
'urn:xmpp:message-correct:0'

NS_DATA

Value:
'jabber:x:data'

NS_DATA_MEDIA

Value:
'urn:xmpp:media-element'

NS_DELAY

Value:
'jabber:x:delay'

NS_DELAY2

Value:
'urn:xmpp:delay'

NS_DIALBACK

Value:
'jabber:server:dialback'

NS_DISCO

Value:
'http://jabber.org/protocol/disco'

NS_DISCO_INFO

Value:
'http://jabber.org/protocol/disco#info'

NS_DISCO_ITEMS

Value:
'http://jabber.org/protocol/disco#items'

NS_ENCRYPTED

Value:
'jabber:x:encrypted'

NS_ESESSION

Value:
'http://www.xmpp.org/extensions/xep-0116.html#ns'

NS_ESESSION_INIT

Value:
'http://www.xmpp.org/extensions/xep-0116.html#ns-init'

NS_EVENT

Value:
'jabber:x:event'

NS_FEATURE

Value:
'http://jabber.org/protocol/feature-neg'

NS_FILE

Value:
'http://jabber.org/protocol/si/profile/file-transfer'

NS_FORWARD

Value:
'urn:xmpp:forward:0'

NS_GAMING

Value:
'http://jabber.org/protocol/gaming'

NS_GATEWAY

Value:
'jabber:iq:gateway'

NS_GEOLOC

Value:
'http://jabber.org/protocol/geoloc'

NS_GROUPCHAT

Value:
'gc-1.0'

NS_HTTP_AUTH

Value:
'http://jabber.org/protocol/http-auth'

NS_HTTP_BIND

Value:
'http://jabber.org/protocol/httpbind'

NS_IBB

Value:
'http://jabber.org/protocol/ibb'

NS_INVISIBLE

Value:
'presence-invisible'

NS_IQ

Value:
'iq'

NS_JINGLE

Value:
'urn:xmpp:jingle:1'

NS_JINGLE_ERRORS

Value:
'urn:xmpp:jingle:errors:1'

NS_JINGLE_RTP

Value:
'urn:xmpp:jingle:apps:rtp:1'

NS_JINGLE_RTP_AUDIO

Value:
'urn:xmpp:jingle:apps:rtp:audio'

NS_JINGLE_RTP_VIDEO

Value:
'urn:xmpp:jingle:apps:rtp:video'

NS_JINGLE_FILE_TRANSFER

Value:
'urn:xmpp:jingle:apps:file-transfer:3'

NS_JINGLE_XTLS

Value:
'urn:xmpp:jingle:security:xtls:0'

NS_JINGLE_RAW_UDP

Value:
'urn:xmpp:jingle:transports:raw-udp:1'

NS_JINGLE_ICE_UDP

Value:
'urn:xmpp:jingle:transports:ice-udp:1'

NS_JINGLE_BYTESTREAM

Value:
'urn:xmpp:jingle:transports:s5b:1'

NS_JINGLE_IBB

Value:
'urn:xmpp:jingle:transports:ibb:1'

NS_LAST

Value:
'jabber:iq:last'

NS_LOCATION

Value:
'http://jabber.org/protocol/geoloc'

NS_MAM

Value:
'urn:xmpp:mam:tmp'

NS_MESSAGE

Value:
'message'

NS_MOOD

Value:
'http://jabber.org/protocol/mood'

NS_MUC

Value:
'http://jabber.org/protocol/muc'

NS_MUC_USER

Value:
'http://jabber.org/protocol/muc#user'

NS_MUC_ADMIN

Value:
'http://jabber.org/protocol/muc#admin'

NS_MUC_OWNER

Value:
'http://jabber.org/protocol/muc#owner'

NS_MUC_UNIQUE

Value:
'http://jabber.org/protocol/muc#unique'

NS_MUC_CONFIG

Value:
'http://jabber.org/protocol/muc#roomconfig'

NS_NICK

Value:
'http://jabber.org/protocol/nick'

NS_OFFLINE

Value:
'http://www.jabber.org/jeps/jep-0030.html'

NS_PHYSLOC

Value:
'http://jabber.org/protocol/physloc'

NS_PING

Value:
'urn:xmpp:ping'

NS_PRESENCE

Value:
'presence'

NS_PRIVACY

Value:
'jabber:iq:privacy'

NS_PRIVATE

Value:
'jabber:iq:private'

NS_PROFILE

Value:
'http://jabber.org/protocol/profile'

NS_PUBSUB

Value:
'http://jabber.org/protocol/pubsub'

NS_PUBSUB_EVENT

Value:
'http://jabber.org/protocol/pubsub#event'

NS_PUBSUB_PUBLISH_OPTIONS

Value:
'http://jabber.org/protocol/pubsub#publish-options'

NS_PUBSUB_OWNER

Value:
'http://jabber.org/protocol/pubsub#owner'

NS_REGISTER

Value:
'jabber:iq:register'

NS_ROSTER

Value:
'jabber:iq:roster'

NS_ROSTERNOTES

Value:
'storage:rosternotes'

NS_ROSTERX

Value:
'http://jabber.org/protocol/rosterx'

NS_ROSTER_VER

Value:
'urn:xmpp:features:rosterver'

NS_RPC

Value:
'jabber:iq:rpc'

NS_RSM

Value:
'http://jabber.org/protocol/rsm'

NS_SASL

Value:
'urn:ietf:params:xml:ns:xmpp-sasl'

NS_SECLABEL

Value:
'urn:xmpp:sec-label:0'

NS_SECLABEL_CATALOG

Value:
'urn:xmpp:sec-label:catalog:2'

NS_SEARCH

Value:
'jabber:iq:search'

NS_SERVER

Value:
'jabber:server'

NS_SESSION

Value:
'urn:ietf:params:xml:ns:xmpp-session'

NS_SI

Value:
'http://jabber.org/protocol/si'

NS_SI_PUB

Value:
'http://jabber.org/protocol/sipub'

NS_SIGNED

Value:
'jabber:x:signed'

NS_SSN

Value:
'urn:xmpp:ssn'

NS_STANZA_CRYPTO

Value:
'http://www.xmpp.org/extensions/xep-0200.html#ns'

NS_STANZAS

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas'

NS_STREAM

Value:
'http://affinix.com/jabber/stream'

NS_STREAMS

Value:
'http://etherx.jabber.org/streams'

NS_TIME

Value:
'jabber:iq:time'

NS_TIME_REVISED

Value:
'urn:xmpp:time'

NS_TLS

Value:
'urn:ietf:params:xml:ns:xmpp-tls'

NS_TUNE

Value:
'http://jabber.org/protocol/tune'

NS_VACATION

Value:
'http://jabber.org/protocol/vacation'

NS_VCARD

Value:
'vcard-temp'

NS_GMAILNOTIFY

Value:
'google:mail:notify'

NS_GTALKSETTING

Value:
'google:setting'

NS_VCARD_UPDATE

Value:
'vcard-temp:x:update'

NS_VERSION

Value:
'jabber:iq:version'

NS_VIEWING

Value:
'http://jabber.org/protocol/viewing'

NS_WAITINGLIST

Value:
'http://jabber.org/protocol/waitinglist'

NS_XHTML_IM

Value:
'http://jabber.org/protocol/xhtml-im'

NS_XHTML

Value:
'http://www.w3.org/1999/xhtml'

NS_X_OOB

Value:
'jabber:x:oob'

NS_DATA_LAYOUT

Value:
'http://jabber.org/protocol/xdata-layout'

NS_DATA_VALIDATE

Value:
'http://jabber.org/protocol/xdata-validate'

NS_XMPP_STREAMS

Value:
'urn:ietf:params:xml:ns:xmpp-streams'

NS_RECEIPTS

Value:
'urn:xmpp:receipts'

NS_PUBKEY_PUBKEY

Value:
'urn:xmpp:pubkey:2'

NS_PUBKEY_REVOKE

Value:
'urn:xmpp:revoke:2'

NS_PUBKEY_ATTEST

Value:
'urn:xmpp:attest:2'

NS_STREAM_MGMT

Value:
'urn:xmpp:sm:2'

NS_HASHES

Value:
'urn:xmpp:hashes:1'

NS_HASHES_MD5

Value:
'urn:xmpp:hash-function-textual-names:md5'

NS_HASHES_SHA1

Value:
'urn:xmpp:hash-function-textual-names:sha-1'

NS_HASHES_SHA256

Value:
'urn:xmpp:hash-function-textual-names:sha-256'

NS_HASHES_SHA512

Value:
'urn:xmpp:hash-function-textual-names:sha-512'

ERRORS

Value:
{'urn:ietf:params:xml:ns:xmpp-sasl aborted': ['',
                                              '',
                                              'The receiving entity ac\
knowledges an <abort/> element sent by the initiating entity; sent in \
reply to the <abort/> element.'],
 'urn:ietf:params:xml:ns:xmpp-sasl incorrect-encoding': ['',
                                                         '',
                                                         'The data pro\
...

_errorcodes

Value:
{'302': 'redirect',
 '400': 'unexpected-request',
 '401': 'not-authorized',
 '402': 'payment-required',
 '403': 'forbidden',
 '404': 'remote-server-not-found',
 '405': 'not-allowed',
 '406': 'not-acceptable',
...

STREAM_NOT_AUTHORIZED

Value:
'urn:ietf:params:xml:ns:xmpp-streams not-authorized'

STREAM_REMOTE_CONNECTION_FAILED

Value:
'urn:ietf:params:xml:ns:xmpp-streams remote-connection-failed'

SASL_MECHANISM_TOO_WEAK

Value:
'urn:ietf:params:xml:ns:xmpp-sasl mechanism-too-weak'

STREAM_XML_NOT_WELL_FORMED

Value:
'urn:ietf:params:xml:ns:xmpp-streams xml-not-well-formed'

ERR_JID_MALFORMED

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas jid-malformed'

STREAM_SEE_OTHER_HOST

Value:
'urn:ietf:params:xml:ns:xmpp-streams see-other-host'

STREAM_BAD_NAMESPACE_PREFIX

Value:
'urn:ietf:params:xml:ns:xmpp-streams bad-namespace-prefix'

ERR_SERVICE_UNAVAILABLE

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas service-unavailable'

STREAM_CONNECTION_TIMEOUT

Value:
'urn:ietf:params:xml:ns:xmpp-streams connection-timeout'

STREAM_UNSUPPORTED_VERSION

Value:
'urn:ietf:params:xml:ns:xmpp-streams unsupported-version'

STREAM_IMPROPER_ADDRESSING

Value:
'urn:ietf:params:xml:ns:xmpp-streams improper-addressing'

STREAM_UNDEFINED_CONDITION

Value:
'urn:ietf:params:xml:ns:xmpp-streams undefined-condition'

SASL_NOT_AUTHORIZED

Value:
'urn:ietf:params:xml:ns:xmpp-sasl not-authorized'

ERR_GONE

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas gone'

SASL_TEMPORARY_AUTH_FAILURE

Value:
'urn:ietf:params:xml:ns:xmpp-sasl temporary-auth-failure'

ERR_REMOTE_SERVER_NOT_FOUND

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas remote-server-not-found'

ERR_UNEXPECTED_REQUEST

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas unexpected-request'

ERR_RECIPIENT_UNAVAILABLE

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas recipient-unavailable'

ERR_CONFLICT

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas conflict'

STREAM_SYSTEM_SHUTDOWN

Value:
'urn:ietf:params:xml:ns:xmpp-streams system-shutdown'

STREAM_BAD_FORMAT

Value:
'urn:ietf:params:xml:ns:xmpp-streams bad-format'

ERR_SUBSCRIPTION_REQUIRED

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas subscription-required'

STREAM_INTERNAL_SERVER_ERROR

Value:
'urn:ietf:params:xml:ns:xmpp-streams internal-server-error'

ERR_NOT_AUTHORIZED

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas not-authorized'

SASL_ABORTED

Value:
'urn:ietf:params:xml:ns:xmpp-sasl aborted'

ERR_REGISTRATION_REQUIRED

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas registration-required'

ERR_INTERNAL_SERVER_ERROR

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas internal-server-error'

SASL_INCORRECT_ENCODING

Value:
'urn:ietf:params:xml:ns:xmpp-sasl incorrect-encoding'

STREAM_HOST_GONE

Value:
'urn:ietf:params:xml:ns:xmpp-streams host-gone'

STREAM_POLICY_VIOLATION

Value:
'urn:ietf:params:xml:ns:xmpp-streams policy-violation'

STREAM_INVALID_XML

Value:
'urn:ietf:params:xml:ns:xmpp-streams invalid-xml'

STREAM_CONFLICT

Value:
'urn:ietf:params:xml:ns:xmpp-streams conflict'

STREAM_RESOURCE_CONSTRAINT

Value:
'urn:ietf:params:xml:ns:xmpp-streams resource-constraint'

STREAM_UNSUPPORTED_ENCODING

Value:
'urn:ietf:params:xml:ns:xmpp-streams unsupported-encoding'

ERR_NOT_ALLOWED

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas not-allowed'

ERR_ITEM_NOT_FOUND

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas item-not-found'

ERR_NOT_ACCEPTABLE

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas not-acceptable'

STREAM_INVALID_FROM

Value:
'urn:ietf:params:xml:ns:xmpp-streams invalid-from'

ERR_FEATURE_NOT_IMPLEMENTED

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas feature-not-implemented'

ERR_BAD_REQUEST

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas bad-request'

STREAM_INVALID_ID

Value:
'urn:ietf:params:xml:ns:xmpp-streams invalid-id'

STREAM_HOST_UNKNOWN

Value:
'urn:ietf:params:xml:ns:xmpp-streams host-unknown'

ERR_UNDEFINED_CONDITION

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas undefined-condition'

SASL_INVALID_MECHANISM

Value:
'urn:ietf:params:xml:ns:xmpp-sasl invalid-mechanism'

STREAM_RESTRICTED_XML

Value:
'urn:ietf:params:xml:ns:xmpp-streams restricted-xml'

ERR_RESOURCE_CONSTRAINT

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas resource-constraint'

ERR_REMOTE_SERVER_TIMEOUT

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas remote-server-timeout'

SASL_INVALID_AUTHZID

Value:
'urn:ietf:params:xml:ns:xmpp-sasl invalid-authzid'

ERR_PAYMENT_REQUIRED

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas payment-required'

STREAM_INVALID_NAMESPACE

Value:
'urn:ietf:params:xml:ns:xmpp-streams invalid-namespace'

ERR_REDIRECT

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas redirect'

STREAM_UNSUPPORTED_STANZA_TYPE

Value:
'urn:ietf:params:xml:ns:xmpp-streams unsupported-stanza-type'

ERR_FORBIDDEN

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas forbidden'

stream_exceptions

Value:
{'bad-format': <class 'nbxmpp.protocol.BadFormat'>,
 'bad-namespace-prefix': <class 'nbxmpp.protocol.BadNamespacePrefix'>,
 'conflict': <class 'nbxmpp.protocol.Conflict'>,
 'connection-timeout': <class 'nbxmpp.protocol.ConnectionTimeout'>,
 'host-gone': <class 'nbxmpp.protocol.HostGone'>,
 'host-unknown': <class 'nbxmpp.protocol.HostUnknown'>,
 'improper-addressing': <class 'nbxmpp.protocol.ImproperAddressing'>,
 'internal-server-error': <class 'nbxmpp.protocol.InternalServerError'\
...

__package__

Value:
'nbxmpp'

nbxmpp-0.5.3/doc/apidocs/nbxmpp.plugin-module.html0000644000175000017500000002033312321263757023355 0ustar asterixasterix00000000000000 nbxmpp.plugin
Package nbxmpp :: Module plugin
[hide private]
[frames] | no frames]

Module plugin

source code

Provides PlugIn class functionality to develop extentions for xmpppy
Classes [hide private]
  PlugIn
Abstract xmpppy plugin infrastructure code, providing plugging in/out and debugging functionality
Variables [hide private]
  log = logging.getLogger('nbxmpp.plugin')
  __package__ = 'nbxmpp'

Imports: logging


Variables Details [hide private]

log

Value:
logging.getLogger('nbxmpp.plugin')

__package__

Value:
'nbxmpp'

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_16.gif0000644000175000017500000002102612321263757025617 0ustar asterixasterix00000000000000GIF89aLB< <2,\NLvtĖԦ\F<"$RTztܲD:424|b\$vtlZ\ĚԪܺj\4&$ndrt tTJL>4,&$Ćfd&$VTܶ64Ğܾvt  FDnl^\ܮNLԦ.,64侼nl Ď̞̖Ԯ><!,U H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ -AѣH*]ʴӧPJJ@)µׯ`ÊKٳhӪ]EȝKݻx˷߿v Wa+^8pb; whʛ7c{YqdG-ZP†:sS[ d''Y1wEiF oyر&Ю&$SzB\OJ`3r7;uW]rHGugv}xͅF}Ѕ <0nsHasXĆ!zZ=Y(W]`Ii ' 1H aל0 0#0$aAUIZb:HW(!X%.^4z :#BZdь\h( r Gf 8X(6z0rYfqb(]@!Wʅ}c}z_uu: r1VXjgaV\i\G lXEc8c{('r'Y;t{,ˮl"]vaFb]@+]W뵣.;@\\ bAiD,W¤<tp *î݉e V,xfhf7|]1FУvap4̌q-O_F*GXW؅8Z=tfm4H\M? l(GpXA/s}@rPpr,/)JS<FmxuR%2TꍹzLPqz~"$}0u.BkcLL=GW#եclǬH1kXŪz=hiD)R&ۍhm(3 JVAvr-%+;+uځ,_xݕ0?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M l y 0 6 =+A Q r@ۼm. 0L]"1b1@ 1 }a۲M] @l`m@M bPL6`>~ >^} =$&~Ɲ*, 1׈=45:N׊@*" MF] }ɈHM~I~ɦn%MN̻9:Iaُp "rU!Vͨhf? !'A򉃮S,!+:s0)) Bz7+qѸ*E)7mWn7ھD7쉦"v|bVNn2d[m4BSqwK}=N.s,ЮSvk8)ʌsl;ښy$ 3ԅX#o3;@}𓳭 9BMN]$\ɜ;ͮ2t8o]<\@B/ѥ1_35/bK?^LT7Z;Cb?S<BG|}0\FÒh`̽9ƾZ</|ތ-k}ȃg4ɂy/̷wQ&z~i)}O ™L}T/v?G2tojSկBMԏI(xq]Mp!q.¿̩, ; @Ld#aȸ/d#U2 eb%/ ݱ7%E-J2?C-J 8}J ɰ0-_BэhQ2p0F?:ғVF/ bԎ%e`ֲ-l85[hmblJ ald+ qF rmN,0]LZFa'yo2,`oN43D$WO!ax3KXFx}@0/..rAFH~}PoPfA/kn_0t]pBi^ƹw}~W80o-lc8}2hu#B}2zn >(aЁĹu.3}Ny}w_S8s'xD#0x0g؅2 nbxmpp.auth_nb
Package nbxmpp :: Module auth_nb
[hide private]
[frames] | no frames]

Module auth_nb

source code

Provides plugs for SASL and NON-SASL authentication mechanisms. Can be used both for client and transport authentication

See client_nb.py

Classes [hide private]
  SASL
Implements SASL authentication. Can be plugged into NonBlockingClient to start authentication
  NonBlockingNonSASL
Implements old Non-SASL (JEP-0078) authentication used in jabberd1.4 and transport authentication
  NonBlockingBind
Bind some JID to the current connection to allow router know of our location. Must be plugged after successful SASL auth
Functions [hide private]
 
HH(some) source code
 
H(some) source code
 
C(some) source code
 
challenge_splitter(data)
Helper function that creates a dict from challenge string
source code
 
scram_parse(chatter) source code
Variables [hide private]
  log = logging.getLogger('nbxmpp.auth_nb')
  kerberos = __import__('kerberos')
  have_kerberos = False
  GSS_STATE_STEP = 0
  GSS_STATE_WRAP = 1
  SASL_FAILURE_IN_PROGRESS = 'failure-in-process'
  SASL_FAILURE = 'failure'
  SASL_SUCCESS = 'success'
  SASL_UNSUPPORTED = 'not-supported'
  SASL_IN_PROCESS = 'in-process'
  __package__ = 'nbxmpp'

Imports: NS_SASL, NS_SESSION, NS_STREAMS, NS_BIND, NS_AUTH, NS_STREAM_MGMT, Node, NodeProcessed, isResultNode, Iq, Protocol, JID, PlugIn, Smacks, base64, random, itertools, dispatcher_nb, hmac, hashlib, logging


Function Details [hide private]

HH(some)

source code 

H(some)

source code 

C(some)

source code 

challenge_splitter(data)

source code 

Helper function that creates a dict from challenge string

Sample challenge string:
  • username="example.org",realm="somerealm", nonce="OA6MG9tEQGm2hh",cnonce="OA6MHXh6VqTrRk", nc=00000001,qop="auth,auth-int,auth-conf",charset=utf-8
Expected result for challan:
  • dict['qop'] = ('auth','auth-int','auth-conf')
  • dict['realm'] = 'somerealm'

scram_parse(chatter)

source code 

Variables Details [hide private]

log

Value:
logging.getLogger('nbxmpp.auth_nb')

kerberos

Value:
__import__('kerberos')

have_kerberos

Value:
False

GSS_STATE_STEP

Value:
0

GSS_STATE_WRAP

Value:
1

SASL_FAILURE_IN_PROGRESS

Value:
'failure-in-process'

SASL_FAILURE

Value:
'failure'

SASL_SUCCESS

Value:
'success'

SASL_UNSUPPORTED

Value:
'not-supported'

SASL_IN_PROCESS

Value:
'in-process'

__package__

Value:
'nbxmpp'

nbxmpp-0.5.3/doc/apidocs/nbxmpp.stringprepare.LookupTable-class.html0000644000175000017500000002253512321263757027012 0ustar asterixasterix00000000000000 nbxmpp.stringprepare.LookupTable
Package nbxmpp :: Module stringprepare :: Class LookupTable
[hide private]
[frames] | no frames]

Class LookupTable

source code

Nested Classes [hide private]
  __implements__
Interface for character lookup classes
Instance Methods [hide private]
 
__init__(self, table) source code
 
lookup(self, c) source code
Method Details [hide private]

__init__(self, table)
(Constructor)

source code 

lookup(self, c)

source code 

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.Error-class.html0000644000175000017500000005721612321263757024642 0ustar asterixasterix00000000000000 nbxmpp.protocol.Error
Package nbxmpp :: Module protocol :: Class Error
[hide private]
[frames] | no frames]

Class Error

source code


Used to quickly transform received stanza into error reply
Instance Methods [hide private]
 
__init__(self, node, error, reply=1)
Create error reply basing on the received 'node' stanza and the 'error' error condition
source code
 
__dupstr__(self, dup1=None, dup2=None)
Dummy function used as preventor of creating error node in reply to error node. I.e. you will not be able to serialise "double" error into string.
source code

Inherited from Protocol: __setitem__, getError, getErrorCode, getErrorMsg, getFrom, getID, getProperties, getStatusConditions, getTimestamp, getTimestamp2, getTo, getType, setError, setFrom, setID, setTimestamp, setTo, setType

Inherited from simplexml.Node: __contains__, __delitem__, __getattr__, __getitem__, __str__, addChild, addData, clearData, delAttr, delChild, getAttr, getAttrs, getChildren, getData, getName, getNamespace, getParent, getPayload, getTag, getTagAttr, getTagData, getTags, has_attr, iterTags, lookup_nsp, setAttr, setData, setName, setNamespace, setParent, setPayload, setTag, setTagAttr, setTagData

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]

Inherited from simplexml.Node: FORCE_NODE_RECREATION

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, node, error, reply=1)
(Constructor)

source code 

Create error reply basing on the received 'node' stanza and the 'error' error condition

If the 'node' is not the received stanza but locally created ('to' and 'from' fields needs not swapping) specify the 'reply' argument as false.

Overrides: object.__init__

__dupstr__(self, dup1=None, dup2=None)

source code 
Dummy function used as preventor of creating error node in reply to error node. I.e. you will not be able to serialise "double" error into string.

nbxmpp-0.5.3/doc/apidocs/nbxmpp.roster_nb-pysrc.html0000644000175000017500000042644712321263757023747 0ustar asterixasterix00000000000000 nbxmpp.roster_nb
Package nbxmpp :: Module roster_nb
[hide private]
[frames] | no frames]

Source Code for Module nbxmpp.roster_nb

  1  ##   roster_nb.py 
  2  ##         based on roster.py 
  3  ## 
  4  ##   Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov 
  5  ##         modified by Dimitur Kirov <dkirov@gmail.com> 
  6  ## 
  7  ##   This program is free software; you can redistribute it and/or modify 
  8  ##   it under the terms of the GNU General Public License as published by 
  9  ##   the Free Software Foundation; either version 2, or (at your option) 
 10  ##   any later version. 
 11  ## 
 12  ##   This program is distributed in the hope that it will be useful, 
 13  ##   but WITHOUT ANY WARRANTY; without even the implied warranty of 
 14  ##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 15  ##   GNU General Public License for more details. 
 16   
 17  # $Id: roster.py,v 1.17 2005/05/02 08:38:49 snakeru Exp $ 
 18   
 19   
 20  """ 
 21  Simple roster implementation. Can be used though for different tasks like 
 22  mass-renaming of contacts. 
 23  """ 
 24   
 25  from protocol import JID, Iq, Presence, Node, NodeProcessed, NS_MUC_USER, NS_ROSTER 
 26  from plugin import PlugIn 
 27   
 28  import logging 
 29  log = logging.getLogger('nbxmpp.roster_nb') 
 30   
 31   
32 -class NonBlockingRoster(PlugIn):
33 """ 34 Defines a plenty of methods that will allow you to manage roster. Also 35 automatically track presences from remote JIDs taking into account that 36 every JID can have multiple resources connected. Does not currently support 37 'error' presences. You can also use mapping interface for access to the 38 internal representation of contacts in roster 39 """ 40
41 - def __init__(self, version=None):
42 """ 43 Init internal variables 44 """ 45 PlugIn.__init__(self) 46 self.version = version 47 self._data = {} 48 self._set=None 49 self._exported_methods=[self.getRoster] 50 self.received_from_server = False
51
52 - def Request(self, force=0):
53 """ 54 Request roster from server if it were not yet requested (or if the 55 'force' argument is set) 56 """ 57 if self._set is None: 58 self._set = 0 59 elif not force: 60 return 61 62 iq = Iq('get', NS_ROSTER) 63 if self.version is not None: 64 iq.setTagAttr('query', 'ver', self.version) 65 id_ = self._owner.getAnID() 66 iq.setID(id_) 67 self._owner.send(iq) 68 log.info('Roster requested from server') 69 return id_
70
71 - def RosterIqHandler(self, dis, stanza):
72 """ 73 Subscription tracker. Used internally for setting items state in internal 74 roster representation 75 """ 76 sender = stanza.getAttr('from') 77 if not sender is None and not sender.bareMatch( 78 self._owner.User + '@' + self._owner.Server): 79 return 80 query = stanza.getTag('query') 81 if query: 82 self.received_from_server = True 83 self.version = stanza.getTagAttr('query', 'ver') 84 if self.version is None: 85 self.version = '' 86 for item in query.getTags('item'): 87 jid=item.getAttr('jid') 88 if item.getAttr('subscription')=='remove': 89 if self._data.has_key(jid): del self._data[jid] 90 # Looks like we have a workaround 91 # raise NodeProcessed # a MUST 92 log.info('Setting roster item %s...' % jid) 93 if not self._data.has_key(jid): self._data[jid]={} 94 self._data[jid]['name']=item.getAttr('name') 95 self._data[jid]['ask']=item.getAttr('ask') 96 self._data[jid]['subscription']=item.getAttr('subscription') 97 self._data[jid]['groups']=[] 98 if not self._data[jid].has_key('resources'): self._data[jid]['resources']={} 99 for group in item.getTags('group'): 100 if group.getData() not in self._data[jid]['groups']: 101 self._data[jid]['groups'].append(group.getData()) 102 self._data[self._owner.User+'@'+self._owner.Server]={'resources': {}, 'name': None, 'ask': None, 'subscription': None, 'groups': None,} 103 self._set=1
104 # Looks like we have a workaround 105 # raise NodeProcessed # a MUST. Otherwise you'll get back an <iq type='error'/> 106
107 - def PresenceHandler(self, dis, pres):
108 """ 109 Presence tracker. Used internally for setting items' resources state in 110 internal roster representation 111 """ 112 if pres.getTag('x', namespace=NS_MUC_USER): 113 return 114 jid=pres.getFrom() 115 if not jid: 116 # If no from attribue, it's from server 117 jid=self._owner.Server 118 jid=JID(jid) 119 if not self._data.has_key(jid.getStripped()): self._data[jid.getStripped()]={'name':None,'ask':None,'subscription':'none','groups':['Not in roster'],'resources':{}} 120 if type(self._data[jid.getStripped()]['resources'])!=type(dict()): 121 self._data[jid.getStripped()]['resources']={} 122 item=self._data[jid.getStripped()] 123 typ=pres.getType() 124 125 if not typ: 126 log.info('Setting roster item %s for resource %s...'%(jid.getStripped(), jid.getResource())) 127 item['resources'][jid.getResource()]=res={'show':None,'status':None,'priority':'0','timestamp':None} 128 if pres.getTag('show'): res['show']=pres.getShow() 129 if pres.getTag('status'): res['status']=pres.getStatus() 130 if pres.getTag('priority'): res['priority']=pres.getPriority() 131 if not pres.getTimestamp(): pres.setTimestamp() 132 res['timestamp']=pres.getTimestamp() 133 elif typ=='unavailable' and item['resources'].has_key(jid.getResource()): del item['resources'][jid.getResource()]
134 # Need to handle type='error' also 135
136 - def _getItemData(self, jid, dataname):
137 """ 138 Return specific jid's representation in internal format. Used internally 139 """ 140 jid = jid[:(jid+'/').find('/')] 141 return self._data[jid][dataname]
142
143 - def _getResourceData(self, jid, dataname):
144 """ 145 Return specific jid's resource representation in internal format. Used 146 internally 147 """ 148 if jid.find('/') + 1: 149 jid, resource = jid.split('/', 1) 150 if self._data[jid]['resources'].has_key(resource): 151 return self._data[jid]['resources'][resource][dataname] 152 elif self._data[jid]['resources'].keys(): 153 lastpri = -129 154 for r in self._data[jid]['resources'].keys(): 155 if int(self._data[jid]['resources'][r]['priority']) > lastpri: 156 resource, lastpri=r, int(self._data[jid]['resources'][r]['priority']) 157 return self._data[jid]['resources'][resource][dataname]
158
159 - def delItem(self, jid):
160 """ 161 Delete contact 'jid' from roster 162 """ 163 self._owner.send(Iq('set', NS_ROSTER, payload=[Node('item', {'jid': jid, 'subscription': 'remove'})]))
164
165 - def getAsk(self, jid):
166 """ 167 Return 'ask' value of contact 'jid' 168 """ 169 return self._getItemData(jid, 'ask')
170
171 - def getGroups(self, jid):
172 """ 173 Return groups list that contact 'jid' belongs to 174 """ 175 return self._getItemData(jid, 'groups')
176
177 - def getName(self, jid):
178 """ 179 Return name of contact 'jid' 180 """ 181 return self._getItemData(jid, 'name')
182
183 - def getPriority(self, jid):
184 """ 185 Return priority of contact 'jid'. 'jid' should be a full (not bare) JID 186 """ 187 return self._getResourceData(jid, 'priority')
188
189 - def getRawRoster(self):
190 """ 191 Return roster representation in internal format 192 """ 193 return self._data
194
195 - def getRawItem(self, jid):
196 """ 197 Return roster item 'jid' representation in internal format 198 """ 199 return self._data[jid[:(jid+'/').find('/')]]
200
201 - def getShow(self, jid):
202 """ 203 Return 'show' value of contact 'jid'. 'jid' should be a full (not bare) 204 JID 205 """ 206 return self._getResourceData(jid, 'show')
207
208 - def getStatus(self, jid):
209 """ 210 Return 'status' value of contact 'jid'. 'jid' should be a full (not bare) 211 JID 212 """ 213 return self._getResourceData(jid, 'status')
214
215 - def getSubscription(self, jid):
216 """ 217 Return 'subscription' value of contact 'jid' 218 """ 219 return self._getItemData(jid, 'subscription')
220
221 - def getResources(self, jid):
222 """ 223 Return list of connected resources of contact 'jid' 224 """ 225 return self._data[jid[:(jid+'/').find('/')]]['resources'].keys()
226
227 - def setItem(self, jid, name=None, groups=[]):
228 """ 229 Rename contact 'jid' and sets the groups list that it now belongs to 230 """ 231 iq = Iq('set', NS_ROSTER) 232 query = iq.getTag('query') 233 attrs = {'jid': jid} 234 if name: 235 attrs['name'] = name 236 item = query.setTag('item', attrs) 237 for group in groups: 238 item.addChild(node=Node('group', payload=[group])) 239 self._owner.send(iq)
240
241 - def setItemMulti(self, items):
242 """ 243 Rename multiple contacts and sets their group lists 244 """ 245 iq = Iq('set', NS_ROSTER) 246 query = iq.getTag('query') 247 for i in items: 248 attrs = {'jid': i['jid']} 249 if i['name']: 250 attrs['name'] = i['name'] 251 item = query.setTag('item', attrs) 252 for group in i['groups']: 253 item.addChild(node=Node('group', payload=[group])) 254 self._owner.send(iq)
255
256 - def getItems(self):
257 """ 258 Return list of all [bare] JIDs that the roster is currently tracks 259 """ 260 return self._data.keys()
261
262 - def keys(self):
263 """ 264 Same as getItems. Provided for the sake of dictionary interface 265 """ 266 return self._data.keys()
267
268 - def __getitem__(self, item):
269 """ 270 Get the contact in the internal format. Raises KeyError if JID 'item' is 271 not in roster 272 """ 273 return self._data[item]
274
275 - def getItem(self, item):
276 """ 277 Get the contact in the internal format (or None if JID 'item' is not in 278 roster) 279 """ 280 if self._data.has_key(item): 281 return self._data[item]
282
283 - def Subscribe(self, jid):
284 """ 285 Send subscription request to JID 'jid' 286 """ 287 self._owner.send(Presence(jid, 'subscribe'))
288
289 - def Unsubscribe(self, jid):
290 """ 291 Ask for removing our subscription for JID 'jid' 292 """ 293 self._owner.send(Presence(jid, 'unsubscribe'))
294
295 - def Authorize(self, jid):
296 """ 297 Authorize JID 'jid'. Works only if these JID requested auth previously 298 """ 299 self._owner.send(Presence(jid, 'subscribed'))
300
301 - def Unauthorize(self, jid):
302 """ 303 Unauthorise JID 'jid'. Use for declining authorisation request or for 304 removing existing authorization 305 """ 306 self._owner.send(Presence(jid, 'unsubscribed'))
307
308 - def getRaw(self):
309 """ 310 Return the internal data representation of the roster 311 """ 312 return self._data
313
314 - def setRaw(self, data):
315 """ 316 Return the internal data representation of the roster 317 """ 318 self._data = data 319 self._data[self._owner.User + '@' + self._owner.Server] = { 320 'resources': {}, 321 'name': None, 322 'ask': None, 323 'subscription': None, 324 'groups': None 325 } 326 self._set = 1
327
328 - def plugin(self, owner, request=1):
329 """ 330 Register presence and subscription trackers in the owner's dispatcher. 331 Also request roster from server if the 'request' argument is set. Used 332 internally 333 """ 334 self._owner.RegisterHandler('iq', self.RosterIqHandler, 'result', NS_ROSTER, makefirst = 1) 335 self._owner.RegisterHandler('iq', self.RosterIqHandler, 'set', NS_ROSTER) 336 self._owner.RegisterHandler('presence', self.PresenceHandler) 337 if request: 338 return self.Request()
339
340 - def _on_roster_set(self, data):
341 if data: 342 self._owner.Dispatcher.ProcessNonBlocking(data) 343 if not self._set: 344 return 345 if not hasattr(self, '_owner') or not self._owner: 346 # Connection has been closed by receiving a <stream:error> for ex, 347 return 348 self._owner.onreceive(None) 349 if self.on_ready: 350 self.on_ready(self) 351 self.on_ready = None 352 return True
353
354 - def getRoster(self, on_ready=None, force=False):
355 """ 356 Request roster from server if neccessary and returns self 357 """ 358 return_self = True 359 if not self._set: 360 self.on_ready = on_ready 361 self._owner.onreceive(self._on_roster_set) 362 return_self = False 363 elif on_ready: 364 on_ready(self) 365 return_self = False 366 if return_self or force: 367 return self 368 return None
369

nbxmpp-0.5.3/doc/apidocs/nbxmpp.smacks-pysrc.html0000644000175000017500000015223612321263757023223 0ustar asterixasterix00000000000000 nbxmpp.smacks
Package nbxmpp :: Module smacks
[hide private]
[frames] | no frames]

Source Code for Module nbxmpp.smacks

  1  from protocol import Acks 
  2  from protocol import NS_STREAM_MGMT 
  3  import logging 
  4  log = logging.getLogger('nbxmpp.smacks') 
  5   
6 -class Smacks():
7 ''' 8 This is Smacks is the Stream Management class. It takes care of requesting 9 and sending acks. Also, it keeps track of the unhandled outgoing stanzas. 10 11 The dispatcher has to be able to access this class to increment the 12 number of handled stanzas 13 ''' 14
15 - def __init__(self, con):
16 self.con = con # Connection object 17 self.out_h = 0 # Outgoing stanzas handled 18 self.in_h = 0 # Incoming stanzas handled 19 self.uqueue = [] # Unhandled stanzas queue 20 self.session_id = None 21 self.resumption = False # If server supports resume 22 # Max number of stanzas in queue before making a request 23 self.max_queue = 5 24 self._owner = None 25 self.resuming = False 26 self.enabled = False # If SM is enabled 27 self.location = None 28 self.failed_resume = False # If last resuming attempt failed 29 self.supports_sm = False # If server supports sm
30
31 - def set_owner(self, owner):
32 self._owner = owner 33 # Register handlers 34 owner.Dispatcher.RegisterNamespace(NS_STREAM_MGMT) 35 owner.Dispatcher.RegisterHandler('enabled', self._neg_response, 36 xmlns=NS_STREAM_MGMT) 37 owner.Dispatcher.RegisterHandler('r', self.send_ack, 38 xmlns=NS_STREAM_MGMT) 39 owner.Dispatcher.RegisterHandler('a', self.check_ack, 40 xmlns=NS_STREAM_MGMT) 41 owner.Dispatcher.RegisterHandler('resumed', self.check_ack, 42 xmlns=NS_STREAM_MGMT) 43 owner.Dispatcher.RegisterHandler('failed', self.error_handling, 44 xmlns=NS_STREAM_MGMT)
45
46 - def _neg_response(self, disp, stanza):
47 r = stanza.getAttr('resume') 48 if r == 'true' or r == 'True' or r == '1': 49 self.resumption = True 50 self.session_id = stanza.getAttr('id') 51 if r == 'false' or r == 'False' or r == '0': 52 self.negociate(False) 53 l = stanza.getAttr('location') 54 if l: 55 self.location = l 56 if self.failed_resume: 57 self.con._discover_server_at_connection(self.con.connection) 58 self.failed_resume = False
59
60 - def negociate(self, resume=True):
61 # Every time we attempt to negociate, we must erase all previous info 62 # about any previous session 63 self.uqueue = [] 64 self.in_h = 0 65 self.out_h = 0 66 self.session_id = None 67 self.enabled = True 68 69 stanza = Acks() 70 stanza.buildEnable(resume) 71 self._owner.Connection.send(stanza, now=True)
72
73 - def resume_request(self):
74 if not self.session_id: 75 self.resuming = False 76 log.error('Attempted to resume without a valid session id ') 77 return 78 resume = Acks() 79 resume.buildResume(self.in_h, self.session_id) 80 self._owner.Connection.send(resume, False)
81
82 - def send_ack(self, disp, stanza):
83 ack = Acks() 84 ack.buildAnswer(self.in_h) 85 self._owner.Connection.send(ack, False)
86
87 - def request_ack(self):
88 r = Acks() 89 r.buildRequest() 90 self._owner.Connection.send(r, False)
91
92 - def check_ack(self, disp, stanza):
93 ''' 94 Checks if the number of stanzas sent are the same as the 95 number of stanzas received by the server. Pops stanzas that were 96 handled by the server from the queue. 97 ''' 98 h = int(stanza.getAttr('h')) 99 diff = self.out_h - h 100 101 if len(self.uqueue) < diff or diff < 0: 102 log.error('Server and client number of stanzas handled mismatch ') 103 else: 104 while (len(self.uqueue) > diff): 105 self.uqueue.pop(0) 106 107 if stanza.getName() == 'resumed': 108 self.enabled = True 109 self.resuming = True 110 self.con.set_oldst() 111 if self.uqueue != []: 112 for i in self.uqueue: 113 self._owner.Connection.send(i, False)
114
115 - def error_handling(self, disp, stanza):
116 # If the server doesn't recognize previd, forget about resuming 117 # Ask for service discovery, etc.. 118 if stanza.getTag('item-not-found'): 119 self.resuming = False 120 self.enabled = False 121 # we need to bind a resource 122 self._owner.NonBlockingBind.resuming = False 123 self._owner._on_auth_bind(None) 124 self.failed_resume = True 125 return 126 127 # Doesn't support resumption 128 if stanza.getTag('feature-not-implemented'): 129 self.negociate(False) 130 return 131 132 if stanza.getTag('unexpected-request'): 133 self.enabled = False 134 log.error('Gajim failed to negociate Stream Management') 135 return
136

nbxmpp-0.5.3/doc/apidocs/nbxmpp.stringprepare.IMappingTable-class.html0000644000175000017500000001605612321263757027246 0ustar asterixasterix00000000000000 nbxmpp.stringprepare.IMappingTable
Package nbxmpp :: Module stringprepare :: Class IMappingTable
[hide private]
[frames] | no frames]

Class IMappingTable

source code

Interface for character mapping classes
Instance Methods [hide private]
 
map(self, c)
Return mapping for character
source code
Method Details [hide private]

map(self, c)

source code 
Return mapping for character

nbxmpp-0.5.3/doc/apidocs/module-tree.html0000644000175000017500000001723512321263757021522 0ustar asterixasterix00000000000000 Module Hierarchy
 
[hide private]
[frames] | no frames]
[ Module Hierarchy | Class Hierarchy ]

Module Hierarchy

  • nbxmpp: This is a fork of the xmpppy jabber python library. Most of the code is inherited but has been extended by implementation of non-blocking transports and new features like BOSH.
    • nbxmpp.auth_nb: Provides plugs for SASL and NON-SASL authentication mechanisms. Can be used both for client and transport authentication
    • nbxmpp.bosh
    • nbxmpp.c14n: XML canonicalisation methods (for XEP-0116)
    • nbxmpp.client_nb: Client class establishs connection to XMPP Server and handles authentication
    • nbxmpp.dispatcher_nb: Main xmpp decision making logic. Provides library with methods to assign different handlers to different XMPP stanzas and namespaces
    • nbxmpp.features_nb: Different stuff that wasn't worth separating it into modules (Registration, Privacy Lists, ...)
    • nbxmpp.idlequeue: Idlequeues are Gajim's network heartbeat. Transports can be plugged as idle objects and be informed about possible IO
    • nbxmpp.plugin: Provides PlugIn class functionality to develop extentions for xmpppy
    • nbxmpp.protocol: Protocol module contains tools that are needed for processing of xmpp-related data structures, including jabber-objects like JID or different stanzas and sub- stanzas) handling routines
    • nbxmpp.proxy_connectors: Module containing classes for proxy connecting. So far its HTTP CONNECT and SOCKS5 proxy
    • nbxmpp.roster_nb: Simple roster implementation. Can be used though for different tasks like mass-renaming of contacts.
    • nbxmpp.simplexml: Simplexml module provides xmpppy library with all needed tools to handle XML nodes and XML streams. I'm personally using it in many other separate projects. It is designed to be as standalone as possible
    • nbxmpp.smacks
    • nbxmpp.stringprepare
    • nbxmpp.tls_nb
    • nbxmpp.transports_nb: Transports are objects responsible for connecting to XMPP server and putting data to wrapped sockets in in desired form (SSL, TLS, TCP, for HTTP proxy, for SOCKS5 proxy...)
nbxmpp-0.5.3/doc/apidocs/nbxmpp.simplexml.NT-class.html0000644000175000017500000002423312321263757024234 0ustar asterixasterix00000000000000 nbxmpp.simplexml.NT
Package nbxmpp :: Module simplexml :: Class NT
[hide private]
[frames] | no frames]

Class NT

source code


Auxiliary class used to quick create node's child nodes
Instance Methods [hide private]
 
__getattr__(self, attr) source code
 
__setattr__(self, attr, val) source code

Inherited from T: __delattr__, __init__

Method Details [hide private]

__getattr__(self, attr)
(Qualification operator)

source code 
Overrides: T.__getattr__

__setattr__(self, attr, val)

source code 
Overrides: T.__setattr__

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_a.gif0000644000175000017500000002064612321263757025301 0ustar asterixasterix00000000000000GIF89alVL4.,ĂtbdbdLB<Ģ<rd|ܲT2,\NLBD"$f\,&$,\F<ԦrlĖ<64|  ,Ě|^TܺnlԪz|t^T~tTJLRT24|jlTB<$"$L:4̞ | tZTD2,|b\$jd4&$dJDD6,ܪzl<.,̪zt|䲤dNDJL*,jl\JL 쾼vttTF<|f\D:<~| lZ\jl̢rtj\\JDԢvl̒,"Ğ亼ndԪ^\>4̞ $4*$D:4~t<2,dRT ~|d"Ċ䶴̦~tT64,*,̌|ܶFD&$ĞVT64ܮNL.,nlvt̖侼Ԯ lVTLBD\FDԦt^\TBD̞ tZ\|bd$D64ztdNLTFD|fdjdvt,"$nlL><4*,<24!,; H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵצIKٳhӪ]˶۷pʝKWnP߿ LÈ+^̸ce}ƒ˘3k̹ϠCc tiҦS^:5 ɓVnMjԩqm߯c˶xq(##e䡡:𥳩k߽} j4z=ݽkדf7)S`=3!f!?PPf1}ݗ~=_'֥zn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&3l#[U őTt >#HDhqFpp G<̰)t+$ZC}u o=l>^1z2+C{bvŒC"kכּr˴~-"I,ĐR$9Ur`D(Dy%UeZVNxFTj%IQOԙ%]ʂ7ka!lTC"NLVb!BТtEbrı0+0`C)vT81,S#c3kch8юcY"֥&IJKb2q㱆A~$u.Taθ7ݮ\4w.A]7 rٌDG*Xn|%ޜCb.0I1-z<Eh3Sl^Tz#M\ )oʬJD.ˏ+aZXIOj2Lb#@Mn74X p!|qM(>eI|*G^z J>3t:*#6gP2L+EEy9q*V+D@ksLD -iEG$aB[HN\4~聾>P Vv8 c [yMbnG# SַnMQΙBwPU )P%E0^V}z`%VLo2.ۤN*L DE Ry~Šh&ASldsęBzOƷPw|%AZ|Y]_Klt;w.bX"ղn˴:/l%OG@q w}E?zҗG}Uzַ}e?{ڻ/eZ{~?|G~|7χ~?}g~}w?~Gտ~?$4DTdt Ծ;nbxmpp-0.5.3/doc/apidocs/nbxmpp.roster_nb-module.html0000644000175000017500000002226012321263757024055 0ustar asterixasterix00000000000000 nbxmpp.roster_nb
Package nbxmpp :: Module roster_nb
[hide private]
[frames] | no frames]

Module roster_nb

source code

Simple roster implementation. Can be used though for different tasks like mass-renaming of contacts.
Classes [hide private]
  NonBlockingRoster
Defines a plenty of methods that will allow you to manage roster. Also automatically track presences from remote JIDs taking into account that every JID can have multiple resources connected. Does not currently support 'error' presences. You can also use mapping interface for access to the internal representation of contacts in roster
Variables [hide private]
  log = logging.getLogger('nbxmpp.roster_nb')
  __package__ = 'nbxmpp'

Imports: JID, Iq, Presence, Node, NodeProcessed, NS_MUC_USER, NS_ROSTER, PlugIn, logging


Variables Details [hide private]

log

Value:
logging.getLogger('nbxmpp.roster_nb')

__package__

Value:
'nbxmpp'

nbxmpp-0.5.3/doc/apidocs/nbxmpp.auth_nb.NonBlockingNonSASL-class.html0000644000175000017500000004120212321263757026655 0ustar asterixasterix00000000000000 nbxmpp.auth_nb.NonBlockingNonSASL
Package nbxmpp :: Module auth_nb :: Class NonBlockingNonSASL
[hide private]
[frames] | no frames]

Class NonBlockingNonSASL

source code


Implements old Non-SASL (JEP-0078) authentication used in jabberd1.4 and transport authentication
Instance Methods [hide private]
 
__init__(self, user, password, resource, on_auth)
Caches username, password and resource for auth
source code
 
plugin(self, owner)
Determine the best auth method (digest/0k/plain) and use it for auth. Returns used method name on success. Used internally
source code
 
_on_username(self, resp) source code
 
_on_password(self, password) source code
 
_on_auth(self, resp) source code

Inherited from plugin.PlugIn: PlugIn, PlugOut

Class Methods [hide private]

Inherited from plugin.PlugIn: get_instance

Method Details [hide private]

__init__(self, user, password, resource, on_auth)
(Constructor)

source code 
Caches username, password and resource for auth
Overrides: plugin.PlugIn.__init__

plugin(self, owner)

source code 
Determine the best auth method (digest/0k/plain) and use it for auth. Returns used method name on success. Used internally

_on_username(self, resp)

source code 

_on_password(self, password)

source code 

_on_auth(self, resp)

source code 

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.SystemShutdown-class.html0000644000175000017500000002267612321263757026573 0ustar asterixasterix00000000000000 nbxmpp.protocol.SystemShutdown
Package nbxmpp :: Module protocol :: Class SystemShutdown
[hide private]
[frames] | no frames]

Class SystemShutdown

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/nbxmpp.idlequeue.IdleObject-class.html0000644000175000017500000004106712321263757025673 0ustar asterixasterix00000000000000 nbxmpp.idlequeue.IdleObject
Package nbxmpp :: Module idlequeue :: Class IdleObject
[hide private]
[frames] | no frames]

Class IdleObject

source code


Idle listener interface. Listed methods are called by IdleQueue.
Instance Methods [hide private]
 
__init__(self) source code
 
pollend(self)
Called on stream failure
source code
 
pollin(self)
Called on new read event
source code
 
pollout(self)
Called on new write event (connect in sockets is a pollout)
source code
 
read_timeout(self)
Called when timeout happened
source code
Instance Variables [hide private]
  fd
filedescriptor, must be unique for each IdleObject
Method Details [hide private]

__init__(self)
(Constructor)

source code 

pollend(self)

source code 
Called on stream failure

pollin(self)

source code 
Called on new read event

pollout(self)

source code 
Called on new write event (connect in sockets is a pollout)

read_timeout(self)

source code 
Called when timeout happened

Instance Variable Details [hide private]

fd

filedescriptor, must be unique for each IdleObject

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_12.gif0000644000175000017500000003471112321263757025620 0ustar asterixasterix00000000000000GIF89a@LB<ČJDĢ\|b\$"$ĂlRLjdľ<2,jl \NLl"$Ėvt\F<\JDԪ$~t̄ 4*$.,Ğ  D6,̚|rldRLL>4,&$z|LBDĴbd|bdnd<24nl~|ܮ̒䶴̦|jlrt\><̔*,ܪܾܶĞ64侼nl \FDԦD:<$zt TBDjd̞dNLtZ\|fd,"$vtTFDt^\lVT4*,D64L><!,@/ H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷p/^@ݻx˷߿ LÈ+^̸ǐ#K|"=2k̹ϠCMӨS^ͺװc˞Mۥ# Nȓ+_μУC 8cνﱻӫ_Ͼs>߽c'[]}Gu6gzVh-(ؠrb( Jy$}a$ v3HbH%!# P@FI\Io|Qd7c2 e:,[ `@ F"$+)gHxF,_ b\+^ъNP>|y(hE)IIF&zheHAuZ8#Nhzݤ^箼*gF(*찿Ib#Ioblb`!c ×d[l+d!͒+JBmû-\+s h _b_&*Hk‹0Ǿ-r򛑿,am( jՂ3 M-4K\q $% ?3#|pFoqr[\hr| )] +ruV6I.8m9 0T_n#:Rl v'`IWì}W+Ĉ,wZ'`i81]:]L HWu$;J1L9y F+ ā+ L2hN1#KL:xγ>yR沠 /_BQq{І\ P4MИ&Mc3j찁Nu˖;QzCPU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7y-}f >8~8i7Չ698i;WI,6qWjydRCnW~WN#hMIzU)aB{V~&x( u{p̧i M]iGS9$}(R2Q3$_6D.qE_XECҩEutS4-"T2UոQzRd*h>˪fT5ҏ(X,YM4 !,YNt1ܩJ@ bXYaI/ (EXͶIJ,LF>LTvw2N^Q\Gih]d{8+][0Nrry NK.,#oyw.o'[%~+h  8{V0wϻjc/Or9 s"R`7*0,9uh! YtǻU1.͛x!ţn((/| Lc/2CJ xa /[SrRӄS  ]C.o+h[g69 ?(C$PV(嚃?|IcCYZ> ?pR9ې2V LJ'_Ȃ{2x̏~P=s=XlOHNȀ'DNEXC$ +ێX jT^bRC$TT `M D > fW` 8!`*|GAeٓA甘22E\e q "/ }1Y\1)YĹ5R<=S4#ћcI "9#ϭݪ̩iJ<ќ!DDIDBRӍAՙcݹٱHWI-PiaفOILfݱd@J$ d^Sq=UUM!RU^GXUvQI8NaR.}_&Z\֢%Aae]֟L1_*]rA$ WAT`tMY, N4 Dx![RfYf2f }hF `jNjMk&fm*m&nGofgpLԁr.'s6s>'tFtN'uVu^'vfvn'wvw6)qFޔy'zzx{'|Ƨ|'}֧}'~~''(h';nbxmpp-0.5.3/doc/apidocs/nbxmpp.stringprepare.MappingTableFromFunction-class.html0000644000175000017500000002021612321263757031460 0ustar asterixasterix00000000000000 nbxmpp.stringprepare.MappingTableFromFunction
Package nbxmpp :: Module stringprepare :: Class MappingTableFromFunction
[hide private]
[frames] | no frames]

Class MappingTableFromFunction

source code

Nested Classes [hide private]
  __implements__
Interface for character mapping classes
Instance Methods [hide private]
 
__init__(self, map_table_function) source code
Method Details [hide private]

__init__(self, map_table_function)
(Constructor)

source code 

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_t_7.gif0000644000175000017500000010223012321263757025540 0ustar asterixasterix00000000000000GIF89as|ČBD<.,ĂlfdĢnlTF<<|f\"$ĺT6,BDD:4Ė$zlrddRL,&$  lԦlRLdJD64ܲĚ|rtVL|vt,RTԪlZ\ܺL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mߋoeAer_^]] &`q(m ց  [3f.f-5_yg\g\\(?2Njh#rh=2@(ݝbch[P0i2[g8aP.^ k^.Hp^Y`銕nj8[=v:tڌgthji@꽕pkijX.kNpJ8rhkY\NkV뉭k^uw9k&ٻkص.lnl.Nl~l˾lˎkl.mnS^mnm~m؎mٞmڮm۾mmmm(nkl.nkn&V>n~nq^nVnn>[nn6lnUoNnT=ooNnRloo$mUEp/p?pOpgp7Uo n~p wnXphȦX0peq@p ?n7MV񈎂Zqwq$rjj&rhՁoeMx$sG]r-'h&[i*3(X#s;7T=vipt_X=s?/b^^ eopt}wt唖GngMPցC?A[ETPލ-u[scTؽ(X3}s5kXegvggc8PHN/mo[&gIu `vdfhiq\iw gz{v/-cx=iXXuh+؋jOf1n>Xdvwdp}y}yIxw,.xI捥}ysOz5]KjSeئ'_KP JghbJz?})\I:X}ZXVzzE۶F~p^{&:Wz".F(yX/y5J2iY+Xȗ|bMIfe.iX>|M|uschXgYs|߿R]gXׁu8ᗄvX'gXʧ`}k_?qj8w..HXІї'`w{GZh/O~Mj/G͌st L0ǹXw!0 5q ES? )r$ɒ&OLr%˖._Œ)s&͚6o̩s'Ϟ> 4|iwauRq`𑘃MTU|ΪՈ Vl٫ngLSC֬Eĸ{Vcq8W.]܍@U)SP؋A9ֽWU_MXp̟p-Goέ{7޾.|8qDS#O|9ΟC08Wm=..~<ϣO~={ǷÏ/>'~?vi!_sh)at~brءf#X'.+آ/p"X7h2أ?d4XGxK2٤OBbQHRY[r٥Mq4cYgk٦osY'J~{gZ"2ڨBRbrکZڪZ⚫ګ["2۬BR[bkm@;nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.InvalidXML-class.html0000644000175000017500000002264212321263757025513 0ustar asterixasterix00000000000000 nbxmpp.protocol.InvalidXML
Package nbxmpp :: Module protocol :: Class InvalidXML
[hide private]
[frames] | no frames]

Class InvalidXML

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.ResourceConstraint-class.html0000644000175000017500000002273212321263757027400 0ustar asterixasterix00000000000000 nbxmpp.protocol.ResourceConstraint
Package nbxmpp :: Module protocol :: Class ResourceConstraint
[hide private]
[frames] | no frames]

Class ResourceConstraint

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/nbxmpp.simplexml.Node-class.html0000644000175000017500000023162212321263757024602 0ustar asterixasterix00000000000000 nbxmpp.simplexml.Node
Package nbxmpp :: Module simplexml :: Class Node
[hide private]
[frames] | no frames]

Class Node

source code


Node class describes syntax of separate XML Node. It have a constructor that permits node creation from set of "namespace name", attributes and payload of text strings and other nodes. It does not natively support building node from text string and uses NodeBuilder class for that purpose. After creation node can be mangled in many ways so it can be completely changed. Also node can be serialised into string in one of two modes: default (where the textual representation of node describes it exactly) and "fancy" - with whitespace added to make indentation and thus make result more readable by human.

Node class have attribute FORCE_NODE_RECREATION that is defaults to False thus enabling fast node replication from the some other node. The drawback of the fast way is that new node shares some info with the "original" node that is changing the one node may influence the other. Though it is rarely needed (in xmpppy it is never needed at all since I'm usually never using original node after replication (and using replication only to move upwards on the classes tree).

Instance Methods [hide private]
 
__init__(self, tag=None, attrs={}, payload=[], parent=None, nsp=None, node_built=False, node=None)
Takes "tag" argument as the name of node (prepended by namespace, if needed and separated from it by a space), attrs dictionary as the set of arguments, payload list as the set of textual strings and child nodes that this node carries within itself and "parent" argument that is another node that this one will be the child of. Also the __init__ can be provided with "node" argument that is either a text string containing exactly one node or another Node instance to begin with. If both "node" and other arguments is provided then the node initially created as replica of "node" provided and then modified to be compliant with other arguments.
source code
 
lookup_nsp(self, pfx='') source code
 
__str__(self, fancy=0)
Method used to dump node into textual representation. If "fancy" argument is set to True produces indented output for readability
source code
 
addChild(self, name=None, attrs={}, payload=[], namespace=None, node=None)
If "node" argument is provided, adds it as child node. Else creates new node from the other arguments' values and adds it as well
source code
 
addData(self, data)
Add some CDATA to node
source code
 
clearData(self)
Remove all CDATA from the node
source code
 
delAttr(self, key)
Delete an attribute "key"
source code
 
delChild(self, node, attrs={})
Delete the "node" from the node's childs list, if "node" is an instance. Else delete the first node that have specified name and (optionally) attributes
source code
 
getAttrs(self)
Return all node's attributes as dictionary
source code
 
getAttr(self, key)
Return value of specified attribute
source code
 
getChildren(self)
Return all node's child nodes as list
source code
 
getData(self)
Return all node CDATA as string (concatenated)
source code
 
getName(self)
Return the name of node
source code
 
getNamespace(self)
Return the namespace of node
source code
 
getParent(self)
Returns the parent of node (if present)
source code
 
getPayload(self)
Return the payload of node i.e. list of child nodes and CDATA entries. F.e. for "<node>text1<nodea/><nodeb/> text2</node>" will be returned list: ['text1', <nodea instance>, <nodeb instance>, ' text2']
source code
 
getTag(self, name, attrs={}, namespace=None)
Filter all child nodes using specified arguments as filter. Return the first found or None if not found
source code
 
getTagAttr(self, tag, attr)
Return attribute value of the child with specified name (or None if no such attribute)
source code
 
getTagData(self, tag)
Return cocatenated CDATA of the child with specified name
source code
 
getTags(self, name, attrs={}, namespace=None, one=0)
Filter all child nodes using specified arguments as filter. Returns the list of nodes found
source code
 
iterTags(self, name, attrs={}, namespace=None)
Iterate over all children using specified arguments as filter
source code
 
setAttr(self, key, val)
Set attribute "key" with the value "val"
source code
 
setData(self, data)
Set node's CDATA to provided string. Resets all previous CDATA!
source code
 
setName(self, val)
Change the node name
source code
 
setNamespace(self, namespace)
Changes the node namespace
source code
 
setParent(self, node)
Set node's parent to "node". WARNING: do not checks if the parent already present and not removes the node from the list of childs of previous parent
source code
 
setPayload(self, payload, add=0)
Set node payload according to the list specified. WARNING: completely replaces all node's previous content. If you wish just to add child or CDATA - use addData or addChild methods
source code
 
setTag(self, name, attrs={}, namespace=None)
Same as getTag but if the node with specified namespace/attributes not found, creates such node and returns it
source code
 
setTagAttr(self, tag, attr, val)
Create new node (if not already present) with name "tag" and set it's attribute "attr" to value "val"
source code
 
setTagData(self, tag, val, attrs={})
Creates new node (if not already present) with name "tag" and (optionally) attributes "attrs" and sets it's CDATA to string "val"
source code
 
has_attr(self, key)
Check if node have attribute "key"
source code
 
__getitem__(self, item)
Return node's attribute "item" value
source code
 
__setitem__(self, item, val)
Set node's attribute "item" value
source code
 
__delitem__(self, item)
Delete node's attribute "item"
source code
 
__contains__(self, item)
Check if node has attribute "item"
source code
 
__getattr__(self, attr)
Reduce memory usage caused by T/NT classes - use memory only when needed
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  FORCE_NODE_RECREATION = 0
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, tag=None, attrs={}, payload=[], parent=None, nsp=None, node_built=False, node=None)
(Constructor)

source code 
Takes "tag" argument as the name of node (prepended by namespace, if needed and separated from it by a space), attrs dictionary as the set of arguments, payload list as the set of textual strings and child nodes that this node carries within itself and "parent" argument that is another node that this one will be the child of. Also the __init__ can be provided with "node" argument that is either a text string containing exactly one node or another Node instance to begin with. If both "node" and other arguments is provided then the node initially created as replica of "node" provided and then modified to be compliant with other arguments.
Overrides: object.__init__

lookup_nsp(self, pfx='')

source code 

__str__(self, fancy=0)
(Informal representation operator)

source code 
Method used to dump node into textual representation. If "fancy" argument is set to True produces indented output for readability
Overrides: object.__str__

addChild(self, name=None, attrs={}, payload=[], namespace=None, node=None)

source code 
If "node" argument is provided, adds it as child node. Else creates new node from the other arguments' values and adds it as well

addData(self, data)

source code 
Add some CDATA to node

clearData(self)

source code 
Remove all CDATA from the node

delAttr(self, key)

source code 
Delete an attribute "key"

delChild(self, node, attrs={})

source code 
Delete the "node" from the node's childs list, if "node" is an instance. Else delete the first node that have specified name and (optionally) attributes

getAttrs(self)

source code 
Return all node's attributes as dictionary

getAttr(self, key)

source code 
Return value of specified attribute

getChildren(self)

source code 
Return all node's child nodes as list

getData(self)

source code 
Return all node CDATA as string (concatenated)

getName(self)

source code 
Return the name of node

getNamespace(self)

source code 
Return the namespace of node

getParent(self)

source code 
Returns the parent of node (if present)

getPayload(self)

source code 
Return the payload of node i.e. list of child nodes and CDATA entries. F.e. for "<node>text1<nodea/><nodeb/> text2</node>" will be returned list: ['text1', <nodea instance>, <nodeb instance>, ' text2']

getTag(self, name, attrs={}, namespace=None)

source code 
Filter all child nodes using specified arguments as filter. Return the first found or None if not found

getTagAttr(self, tag, attr)

source code 
Return attribute value of the child with specified name (or None if no such attribute)

getTagData(self, tag)

source code 
Return cocatenated CDATA of the child with specified name

getTags(self, name, attrs={}, namespace=None, one=0)

source code 
Filter all child nodes using specified arguments as filter. Returns the list of nodes found

iterTags(self, name, attrs={}, namespace=None)

source code 
Iterate over all children using specified arguments as filter

setAttr(self, key, val)

source code 
Set attribute "key" with the value "val"

setData(self, data)

source code 
Set node's CDATA to provided string. Resets all previous CDATA!

setName(self, val)

source code 
Change the node name

setNamespace(self, namespace)

source code 
Changes the node namespace

setParent(self, node)

source code 
Set node's parent to "node". WARNING: do not checks if the parent already present and not removes the node from the list of childs of previous parent

setPayload(self, payload, add=0)

source code 
Set node payload according to the list specified. WARNING: completely replaces all node's previous content. If you wish just to add child or CDATA - use addData or addChild methods

setTag(self, name, attrs={}, namespace=None)

source code 
Same as getTag but if the node with specified namespace/attributes not found, creates such node and returns it

setTagAttr(self, tag, attr, val)

source code 
Create new node (if not already present) with name "tag" and set it's attribute "attr" to value "val"

setTagData(self, tag, val, attrs={})

source code 
Creates new node (if not already present) with name "tag" and (optionally) attributes "attrs" and sets it's CDATA to string "val"

has_attr(self, key)

source code 
Check if node have attribute "key"

__getitem__(self, item)
(Indexing operator)

source code 
Return node's attribute "item" value

__setitem__(self, item, val)
(Index assignment operator)

source code 
Set node's attribute "item" value

__delitem__(self, item)
(Index deletion operator)

source code 
Delete node's attribute "item"

__contains__(self, item)
(In operator)

source code 
Check if node has attribute "item"

__getattr__(self, attr)
(Qualification operator)

source code 
Reduce memory usage caused by T/NT classes - use memory only when needed

Class Variable Details [hide private]

FORCE_NODE_RECREATION

Value:
0

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.Conflict-class.html0000644000175000017500000002260212321263757025301 0ustar asterixasterix00000000000000 nbxmpp.protocol.Conflict
Package nbxmpp :: Module protocol :: Class Conflict
[hide private]
[frames] | no frames]

Class Conflict

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_t.gif0000644000175000017500000001453712321263757025326 0ustar asterixasterix00000000000000GIF89aLB<Čjd|Ģ$"$tbdĂlVLnd<2,$ܲnl\NL伒|d&$z| ̞\F4Ğ,&$dRTLBDĄĆlVTT><4:<^\ܮrt䶴̦<.,ܶԼ|&$̼~|ĞĎnl.,fd侼nl<24̞\FDD:<Ԧjd t^\TBD$|bdtZ\zt,"$dNLTFD|fd4*,vtD64L><!,- H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ꐃPJJիXjʵׯ`~Q hӪ]˶۷pʝKݻxD@ K LÈ+^,ǏCLArϔ%Om4ӨSgkӯ"L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Mڟp FJ 4y `У11r @s`+0 JZ}ZZJp P@kJ* xs 7zɣ`)qziDJ:9{JzY+i≪J꧀j)ʧؚ s@bZ u ʚY PUzIy` @zP  嚠g隚VP: 0aKYj: ꠱J[@Pb z X0 0۪0:zι1P_ PB Q+MO[Z ` 9J+b{Y  yhWYt[Q,1v|Kx7p 0[{۸;۸p5۹{ڷ{VKNkۺۚʩY* Ļ+ 9@ɻ)ʛ˦ ˚ҋ Kj+Z01㻽۽'᱗nyPINJEz89ϫ&ᱫP ik\,{yPsXܼ z0,&\Y[p !;35,9BL=?L+F TlN\kZ`X\WĮ#4p_@ mqk [J9pƯ"A|J!aȈw ȱ1,|Ȑ|ɜ<ɠ(ʦ 5A s ʮʰ˲<˴\˶|˸˺˼˶<P0\|) | ̴ܻ<ѼZ0;ͯy |Ƕ9! + >ඦYqx 0Q[{@\{>ڬ}]Q˼*:{􋛪Ck[S X :[š *kP#'+={Z vɾХ 8M&*>mAPz< \J` a;«[ڥP! , ko {ϙִ{ p {N BPZ n휃m]݊_aݯq>Ɓ unm0~ӄ.綋kqZLt[*Ϊ9UxPa$Û˫ <QnʾN^|=όb,Y|@|}.wkݫ1Ҧ:M+m㽚 zmSV1 l p0bͤ lف TzI p9||MMďj]yz @-ڱ Z37ú, M5rpki^B 򇟠 Nle>"l m0P0` aw S;_3nL^8~H>9 ' jKkjXn([=p]j.ǜ>ptnٲGV aoE  DPB >0 K-^ĘQFOB bC!Fb5ҡ*]FL5NSNCl -T6ET҄8y>@3k] S]~54X>EVRd4V\u۾ś1n]}&WFXbƍ?Ydʕ-_Y RZhҥMFZj֭]5gϵmƝ[n޽}\pōG\r͝?]tխ_Ǟ]vݽ^x;nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.PolicyViolation-class.html0000644000175000017500000002270512321263757026670 0ustar asterixasterix00000000000000 nbxmpp.protocol.PolicyViolation
Package nbxmpp :: Module protocol :: Class PolicyViolation
[hide private]
[frames] | no frames]

Class PolicyViolation

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.UnsupportedStanzaType-class.html0000644000175000017500000002275712321263757030126 0ustar asterixasterix00000000000000 nbxmpp.protocol.UnsupportedStanzaType
Package nbxmpp :: Module protocol :: Class UnsupportedStanzaType
[hide private]
[frames] | no frames]

Class UnsupportedStanzaType

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_6.gif0000644000175000017500000002022012321263757025531 0ustar asterixasterix00000000000000GIF89aLB<ČBDlĢ,"jdlfdĂbdT><ĺlRL <2,vtĖdNDԦ"$ܬRTzt24\F<|b\$D:4ĚԪrtܲvtj\ ndlZ\><ܺBD4*$|D2,̞tTB<̴jlܬZ\dJDܪ~tnl|^TJL̢Ԣ*,24\JLf\,L:4jlrltZT亼 Ċ̚TF< 4&$<64vl̒dRL\JD|f\$Ԫz|䲤zl rt:<<.,D6,̼jd^TND̢L>4t^Tt,&$fdtjlĆfdlVL|z|$ܤ~t&$VT64Ğvtܶ  rdܾFDnl^\ܮNLԦ.,64nl侼 Ď̞̖Ԯ><̦<24dNLԦ\FD$jd4*,̞TBDtZ\TFD|fdztD64L><!,= H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ -AѣH*]ʴӧP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ustar asterixasterix00000000000000 nbxmpp.protocol.Protocol
Package nbxmpp :: Module protocol :: Class Protocol
[hide private]
[frames] | no frames]

Class Protocol

source code


A "stanza" object class. Contains methods that are common for presences, iqs and messages
Instance Methods [hide private]
 
__init__(self, name=None, to=None, typ=None, frm=None, attrs={}, payload=[], timestamp=None, xmlns=None, node=None)
Constructor, name is the name of the stanza i.e. 'message' or 'presence'or 'iq'
source code
 
getTo(self)
Return value of the 'to' attribute
source code
 
getFrom(self)
Return value of the 'from' attribute
source code
 
getTimestamp(self)
Return the timestamp in the 'yyyymmddThhmmss' format
source code
 
getTimestamp2(self)
Return the timestamp in the 'yyyymmddThhmmss' format
source code
 
getID(self)
Return the value of the 'id' attribute
source code
 
setTo(self, val)
Set the value of the 'to' attribute
source code
 
getType(self)
Return the value of the 'type' attribute
source code
 
setFrom(self, val)
Set the value of the 'from' attribute
source code
 
setType(self, val)
Set the value of the 'type' attribute
source code
 
setID(self, val)
Set the value of the 'id' attribute
source code
 
getError(self)
Return the error-condition (if present) or the textual description of the error (otherwise)
source code
 
getErrorMsg(self)
Return the textual description of the error (if present) or the error condition
source code
 
getErrorCode(self)
Return the error code. Obsolete.
source code
 
getStatusConditions(self)
Return the status conditions list as defined in XEP-0306.
source code
 
setError(self, error, code=None)
Set the error code. Obsolete. Use error-conditions instead
source code
 
setTimestamp(self, val=None)
Set the timestamp. timestamp should be the yyyymmddThhmmss string
source code
 
getProperties(self)
Return the list of namespaces to which belongs the direct childs of element
source code
 
__setitem__(self, item, val)
Set the item 'item' to the value 'val'
source code

Inherited from simplexml.Node: __contains__, __delitem__, __getattr__, __getitem__, __str__, addChild, addData, clearData, delAttr, delChild, getAttr, getAttrs, getChildren, getData, getName, getNamespace, getParent, getPayload, getTag, getTagAttr, getTagData, getTags, has_attr, iterTags, lookup_nsp, setAttr, setData, setName, setNamespace, setParent, setPayload, setTag, setTagAttr, setTagData

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]

Inherited from simplexml.Node: FORCE_NODE_RECREATION

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name=None, to=None, typ=None, frm=None, attrs={}, payload=[], timestamp=None, xmlns=None, node=None)
(Constructor)

source code 

Constructor, name is the name of the stanza i.e. 'message' or 'presence'or 'iq'

to is the value of 'to' attribure, 'typ' - 'type' attribute frn - from attribure, attrs - other attributes mapping, payload - same meaning as for simplexml payload definition timestamp - the time value that needs to be stamped over stanza xmlns - namespace of top stanza node node - parsed or unparsed stana to be taken as prototype.

Overrides: object.__init__

getTo(self)

source code 
Return value of the 'to' attribute

getFrom(self)

source code 
Return value of the 'from' attribute

getTimestamp(self)

source code 
Return the timestamp in the 'yyyymmddThhmmss' format

getTimestamp2(self)

source code 
Return the timestamp in the 'yyyymmddThhmmss' format

getID(self)

source code 
Return the value of the 'id' attribute

setTo(self, val)

source code 
Set the value of the 'to' attribute

getType(self)

source code 
Return the value of the 'type' attribute

setFrom(self, val)

source code 
Set the value of the 'from' attribute

setType(self, val)

source code 
Set the value of the 'type' attribute

setID(self, val)

source code 
Set the value of the 'id' attribute

getError(self)

source code 
Return the error-condition (if present) or the textual description of the error (otherwise)

getErrorMsg(self)

source code 
Return the textual description of the error (if present) or the error condition

getErrorCode(self)

source code 
Return the error code. Obsolete.

getStatusConditions(self)

source code 
Return the status conditions list as defined in XEP-0306.

setError(self, error, code=None)

source code 
Set the error code. Obsolete. Use error-conditions instead

setTimestamp(self, val=None)

source code 
Set the timestamp. timestamp should be the yyyymmddThhmmss string

getProperties(self)

source code 
Return the list of namespaces to which belongs the direct childs of element

__setitem__(self, item, val)
(Index assignment operator)

source code 
Set the item 'item' to the value 'val'
Overrides: simplexml.Node.__setitem__

nbxmpp-0.5.3/doc/apidocs/nbxmpp.tls_nb-module.html0000644000175000017500000003517312321263757023350 0ustar asterixasterix00000000000000 nbxmpp.tls_nb
Package nbxmpp :: Module tls_nb
[hide private]
[frames] | no frames]

Module tls_nb

source code

Classes [hide private]
  SSLWrapper
Abstract SSLWrapper base class
  PyOpenSSLWrapper
Wrapper class for PyOpenSSL's recv() and send() methods
  StdlibSSLWrapper
Wrapper class for Python socket.ssl read() and write() methods
  NonBlockingTLS
TLS connection used to encrypts already estabilished tcp connection
Functions [hide private]
 
gattr(obj, attr, default=None) source code
Variables [hide private]
  log = logging.getLogger('nbxmpp.tls_nb')
  PYOPENSSL = 'PYOPENSSL'
  PYSTDLIB = 'PYSTDLIB'
  USE_PYOPENSSL = True
  __package__ = 'nbxmpp'

Imports: socket, PlugIn, sys, os, time, traceback, logging, OpenSSL


Function Details [hide private]

gattr(obj, attr, default=None)

source code 

Variables Details [hide private]

log

Value:
logging.getLogger('nbxmpp.tls_nb')

PYOPENSSL

Value:
'PYOPENSSL'

PYSTDLIB

Value:
'PYSTDLIB'

USE_PYOPENSSL

Value:
True

__package__

Value:
'nbxmpp'

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_7.gif0000644000175000017500000002073712321263757025547 0ustar asterixasterix00000000000000GIF89aLB<ČBDl̢$"$jdlfdĂbdlRLT><ĺ <2,vtĖdNDԪ"$\F<ܬRTzt24|b\$D:4Ěܲvt4&$rtlZ\j\ܺ Ԧnd><̞tTB4LBDtfdtjl|$ܤ~tĆfdlVL&$VT64Ğܶvtܾ  rdFDnlܮ^\NL.,64nl侼Ԧ̞ Ď̦̖Ԯ><<24dNL\FD$jdԦ̞TBDtZ\,"$vtTFDt^\|fdzt4*,D64L><!,C H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ -AѣH*]ʴӧPJJU µׯ`ÊKٳhӪ]@PȝKݻx˷߿v Wa+^8pb; wh!ϣʛ7c{YqdG-ZcM^:sS$S%Ҍq1Ř݊: osi3FSЮBUtcGtB`t .rAi⃁7;uW]rHGuv}xͅFu-4nk(kX'Ć-T zZ0Y("Qt烲0[PfY?D,d\~ݰ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!ܢvc;6o6mw׻1_. p͜DԷi[߼4o{5cbm#|x 3X9;g:1851.rnJ{Muu>oM\SC$V =/3/ @7y ]BwD{щ6L@m8Ύ<~wrwުn.0%?y' {5_d|E`{ G}[^=9Z ~?|G~/}ư>e?1GĪ}K>~',G?ˏ]h{׿V߽g{#/Td@q @@{ D $?RTdt좮$;nbxmpp-0.5.3/doc/apidocs/nbxmpp.dispatcher_nb-module.html0000644000175000017500000003150012321263757024662 0ustar asterixasterix00000000000000 nbxmpp.dispatcher_nb
Package nbxmpp :: Module dispatcher_nb
[hide private]
[frames] | no frames]

Module dispatcher_nb

source code

Main xmpp decision making logic. Provides library with methods to assign different handlers to different XMPP stanzas and namespaces
Classes [hide private]
  Dispatcher
Why is this here - I needed to redefine Dispatcher for BOSH and easiest way was to inherit original Dispatcher (now renamed to XMPPDispatcher). Trouble is that reference used to access dispatcher instance is in Client attribute named by __class__.__name__ of the dispatcher instance .. long story short:
  XMPPDispatcher
Handles XMPP stream and is the first who takes control over a fresh stanza
  BOSHDispatcher
Variables [hide private]
  log = logging.getLogger('nbxmpp.dispatcher_nb')
  DEFAULT_TIMEOUT_SECONDS = 25
default timeout to wait for response for our id
  outgoingID = 0
  XML_DECLARATION = '<?xml version=\'1.0\'?>'
  __package__ = 'nbxmpp'

Imports: simplexml, sys, locale, re, ExpatError, PlugIn, NS_STREAMS, NS_XMPP_STREAMS, NS_HTTP_BIND, Iq, Presence, Message, Protocol, Node, Error, ERR_FEATURE_NOT_IMPLEMENTED, StreamError, logging


Variables Details [hide private]

log

Value:
logging.getLogger('nbxmpp.dispatcher_nb')

DEFAULT_TIMEOUT_SECONDS

default timeout to wait for response for our id
Value:
25

outgoingID

Value:
0

XML_DECLARATION

Value:
'<?xml version=\'1.0\'?>'

__package__

Value:
'nbxmpp'

nbxmpp-0.5.3/doc/apidocs/nbxmpp.idlequeue.IdleQueue-class.html0000644000175000017500000010273512321263757025551 0ustar asterixasterix00000000000000 nbxmpp.idlequeue.IdleQueue
Package nbxmpp :: Module idlequeue :: Class IdleQueue
[hide private]
[frames] | no frames]

Class IdleQueue

source code


IdleQueue provide three distinct time based features. Uses select.poll()

  1. Alarm timeout: Execute a callback after foo seconds
  2. Timeout event: Call read_timeout() of an plugged object if a timeout has been set, but not removed in time.
  3. Check file descriptor of plugged objects for read, write and error events
Instance Methods [hide private]
 
__init__(self) source code
 
_init_idle(self)
Hook method for subclassed. Will be called by __init__
source code
 
set_alarm(self, alarm_cb, seconds)
Set up a new alarm. alarm_cb will be called after specified seconds.
source code
 
remove_alarm(self, alarm_cb, alarm_time)
Remove alarm callback alarm_cb scheduled on alarm_time. Returns True if it was removed sucessfully, otherwise False
source code
 
remove_timeout(self, fd, timeout=None)
Remove the read timeout
source code
 
set_read_timeout(self, fd, seconds, func=None)
Seta a new timeout. If it is not removed after specified seconds, func or obj.read_timeout() will be called
source code
 
_check_time_events(self)
Execute and remove alarm callbacks and execute func() or read_timeout() for plugged objects if specified time has ellapsed
source code
 
plug_idle(self, obj, writable=True, readable=True)
Plug an IdleObject into idlequeue. Filedescriptor fd must be set
source code
 
_add_idle(self, fd, flags)
Hook method for subclasses, called by plug_idle
source code
 
unplug_idle(self, fd)
Remove plugged IdleObject, specified by filedescriptor fd
source code
 
current_time(self) source code
 
_remove_idle(self, fd)
Hook method for subclassed, called by unplug_idle
source code
 
_process_events(self, fd, flags) source code
 
process(self)
Process idlequeue. Check for any pending timeout or alarm events. Call IdleObjects on possible and requested read, write and error events on their file descriptors
source code
Class Variables [hide private]
  PROCESS_TIMEOUT = (100, False)
Method Details [hide private]

__init__(self)
(Constructor)

source code 

_init_idle(self)

source code 
Hook method for subclassed. Will be called by __init__

set_alarm(self, alarm_cb, seconds)

source code 
Set up a new alarm. alarm_cb will be called after specified seconds.

remove_alarm(self, alarm_cb, alarm_time)

source code 
Remove alarm callback alarm_cb scheduled on alarm_time. Returns True if it was removed sucessfully, otherwise False

remove_timeout(self, fd, timeout=None)

source code 
Remove the read timeout

set_read_timeout(self, fd, seconds, func=None)

source code 

Seta a new timeout. If it is not removed after specified seconds, func or obj.read_timeout() will be called

A filedescriptor fd can have several timeouts.

_check_time_events(self)

source code 
Execute and remove alarm callbacks and execute func() or read_timeout() for plugged objects if specified time has ellapsed

plug_idle(self, obj, writable=True, readable=True)

source code 
Plug an IdleObject into idlequeue. Filedescriptor fd must be set
Parameters:
  • obj - the IdleObject
  • writable - True if obj has data to sent
  • readable - True if obj expects data to be reiceived

_add_idle(self, fd, flags)

source code 
Hook method for subclasses, called by plug_idle

unplug_idle(self, fd)

source code 
Remove plugged IdleObject, specified by filedescriptor fd

current_time(self)

source code 

_remove_idle(self, fd)

source code 
Hook method for subclassed, called by unplug_idle

_process_events(self, fd, flags)

source code 

process(self)

source code 

Process idlequeue. Check for any pending timeout or alarm events. Call IdleObjects on possible and requested read, write and error events on their file descriptors

Call this in regular intervals.


Class Variable Details [hide private]

PROCESS_TIMEOUT

Value:
(100, False)

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.NodeProcessed-class.html0000644000175000017500000002263412321263757026302 0ustar asterixasterix00000000000000 nbxmpp.protocol.NodeProcessed
Package nbxmpp :: Module protocol :: Class NodeProcessed
[hide private]
[frames] | no frames]

Class NodeProcessed

source code


Exception that should be raised by handler when the handling should be stopped
Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/nbxmpp.bosh-module.html0000644000175000017500000004224612321263757023021 0ustar asterixasterix00000000000000 nbxmpp.bosh
Package nbxmpp :: Module bosh
[hide private]
[frames] | no frames]

Module bosh

source code

Classes [hide private]
  NonBlockingBOSH
  AckChecker
Class for generating rids and generating and checking acknowledgements in BOSH messages
  KeyStack
Class implementing key sequences for BOSH messages
Functions [hide private]
 
get_rand_number() source code
Variables [hide private]
  log = logging.getLogger('nbxmpp.bosh')
  KEY_COUNT = 10
  FAKE_DESCRIPTOR = -1337
  bosh_errors = {'bad-request': 'The format of an HTTP header or...
  __package__ = 'nbxmpp'

Imports: locale, random, sha1, NonBlockingTransport, NonBlockingHTTPBOSH, CONNECTED, CONNECTING, DISCONNECTED, DISCONNECTING, urisplit, DISCONNECT_TIMEOUT_SECONDS, BOSHBody, Protocol, NS_CLIENT, Node, logging


Function Details [hide private]

get_rand_number()

source code 

Variables Details [hide private]

log

Value:
logging.getLogger('nbxmpp.bosh')

KEY_COUNT

Value:
10

FAKE_DESCRIPTOR

Value:
-1337

bosh_errors

Value:
{'bad-request': 'The format of an HTTP header or binding element recei\
ved from the client is unacceptable (e.g., syntax error), or Script Sy\
ntax is not supported.',
 'host-gone': 'The target domain specified in the "to" attribute or th\
e target host or port specified in the "route" attribute is no longer \
serviced by the connection manager.',
 'host-unknown': 'The target domain specified in the "to" attribute or\
 the target host or port specified in the "route" attribute is unknown\
...

__package__

Value:
'nbxmpp'

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_29.gif0000644000175000017500000002111412321263757025621 0ustar asterixasterix00000000000000GIF89aLB<ČBDl̢$"$jdlfdĂbdlRLĺT><<2, vtĖdND\F<Ԫ"$RTܲD:424܄zt$vt4&$|b\ĚܺrtlZ\j\ tTJLԦnd>4ND,&$z|fd䶴t$<.,ľĆfdlVL&$VTܶ64Ğܾvt  rdFDnlܮ^\NL.,64侼nlԦ Ď̞̦̖Ԯ><!,K H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ -AѣH*]ʴӧPJJ0µׯ`ÊKٳhӪ]CȝKݻx˷߿v Wa+^8pb; whʛ7c{YqdG-ZNj:sSKt&17ݍ@(!oyĉЮ!B YRDB\KB`4 1r b7;uW]rHGu'v}xͅFp 0)JS<FmxuR%2T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5.3/doc/apidocs/nbxmpp.protocol.SeeOtherHost-class.html0000644000175000017500000002266012321263757026120 0ustar asterixasterix00000000000000 nbxmpp.protocol.SeeOtherHost
Package nbxmpp :: Module protocol :: Class SeeOtherHost
[hide private]
[frames] | no frames]

Class SeeOtherHost

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_38.gif0000644000175000017500000002116412321263757025626 0ustar asterixasterix00000000000000GIF89aLB<<2, \NLvtĖzt|b\\F<Ԧ"$RTܲD:424$vtĚ|jlt4&$lZ\Ԫܺndrt TJL><̞TB4,&$Ćfd&$VTܶ64Ğܾvt  FDnl^\ܮNLԦ.,64侼̞ Ďnl̖Ԯ><!,_ H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ -iAѣH*]ʴӧPJJHAµׯ`ÊKٳhӪ]HȝKݻx˷߿v Wa+^8pb; wh!ʛ7c{YqdG-ZSŽ:sSg9$U*a1kR o}TЮ2!&B\Q(J`t3r!⃠7;uW]rHGuv}xͅF])k48_']g^#瞃βx֦G)JS<FmxR%2TꍹzLPqz~"$}0u.BkcńLL=GW#եclDzH1kXŪz=hiD)R#ۍhm(3 JVAvr-%+,uځ,_xݕ0?zW := "T 'rƁu~# @Q,|]q3vS}q4!eR$%R(%r&"B"]V|Vr0~u1ur6tsr>U)7+;s*` EsrU`vLuG_.Ʋq @ D0b60Xuocu[d'#C0zq [ et慱ImWs {x'x3<3cThxuHoxzJam"CRT]VzւHCPYu! h}t|~1{L [PAW[uT`7^里H|G|BQX\ѨA`7`&m<ǍT$=<򇎍ar;`DJF"n pH|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 3ԅX#o3;@}𓳭 9BMN]$\ɜ;ͮ2t8o]<\@B?ѥ1_35/bK?^LT7Z;Cb?S<BG|}0\FÒh`̽9ƾZ</|ތ-k}ȃg4ɂy/̷wQ&z~i)}O ™L}T/v?G2tojSկBMԏI$La\;pi0 ,03х.HaNt*r̋_b]H M ΀4+lb¹CDݼiW%j9P„_3xf8pv (]ͳH}#q{p 'Ů/r!AA,􆙽wPhD`C*j ?ߨ~~$\i@A$eios=&'0K}9Q/ <P< Tv2 1s|E1ȰcxaE&wp/x/s0w3フ [.F}_ sx iآvhbp9]mۏ?'m ._ NAѽ7%r|_\,CD9\Yլd.f'{5?7#T@3C; 5 @*AH$4DTdA_(; l@{AAA$ B"TB@\'dB *p l-./\A($C;ŽI2TkB\7 34:/9:C8C=\>B4=iÓ.bFtGHd/JKLMNDr ;nbxmpp-0.5.3/doc/apidocs/identifier-index.html0000644000175000017500000064625512321263757022541 0ustar asterixasterix00000000000000 Identifier Index
 
[hide private]
[frames] | no frames]

Identifier Index

[ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _ ]

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

R

S

T

U

W

X

_



nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_22.gif0000644000175000017500000007570712321263757025633 0ustar asterixasterix00000000000000GIF89aKLB<ĤBD|Ă$"$lZ\Ģjd|bdĺdJD<2,4\*,lfd vtĖԦTJLD:4"4&$|ܲԚl|^TdRL|f\zlܺ \F<Ԫ"$4*$|bddVT|jl~t  :4$Ll^\ܮ̢z|䶴d*$Ğrt<.,|b\Ԫ,&$̚\NLĆ|fdĚܶԞܾvtܔ., Ďnl侼~|&$><̦LBD<24ԦD:<!,KG H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻx˷߿ LÈ+^̸ǐ#KL˘3k9ϠCMӨS^ͺװc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}w}5>}~tʸW{< 0 C!_@F.%F+Bf-0` MxB \p9\b6lC/8c )$bxۭq-aCnA 7KcpL HxD0QcQ2J([ .$# I)"\`FF81f45$klxDŽH$dBI2|\/,".Q$e)dFf`AF8g# G& 0#\ 2DIE^K< .$1 JT-f5yMǠM*hXT%@0ɡV 8U fp9ޡHMT`;BYѓILWw":7l#-3&6ZYģWKeiK]jJm 1VD@2BQGYA<%RTLx}SjUSl]XƲ6D Y&7 0-6t[Ԉ0t Z\(̫^ )R1&VV@,f3B " C|{cQ津"\eLK,jյPj 9֊8Z2V%n &.!! lWӥ?"8nwKj&!{^Ez^Zoi|{_rЫo~_Kpo |`oKp-3 ab@+B nCt!aX0bA8, CbwKVfE0DzaY!XC>G.8ϐڟau-JW+FMvtF'ͨubi34I Iq#+fwjUW,j)LAR>TVy'U.KOU([ ڮzמhHzhK!p+t<6<\!ѓ[LÆ gy*cDY̜Ym6mn+j;û\ȴ0c JXa\( b¸D@CA WɊ+` 63b@sQV#aAIW oҵ\x蘎s!P0Z"AfA2 ;ë@1ȂX1j4 B8, aP9 7m&&-y Y*R)_@C\2|DA)詧x)"DȂH8`h7y#+ N#IAXqYON|2Hŭ3B+b$*- 9El4irwQ&i8j2>@hG:ْ|T& E9˹qӛ@9yuv 3 Hd5l-KIIXIH XIlһ#1J,JL39JlJD|JJJ_"Ɠ688IJvJ5ɠk)s>;[? ;j$$N"sω 9&?3=LL4)@M!s5 A܈YBhb@Akr@kdbO[ A s5L5(|q*s"ep=B(d`6kOs5&6qxjn#ЛQ|55(-CjO1<(ON)RBa)ܐ:!ܷ`N,Ŝ8T P0 9mtP+2+"E9FJbK LX鬘f`ƐF!F -r5q!zʬ9N]-K dS ȣHB5:@H3mT";) tTK-qؑKԦUSI nbxmpp.idlequeue
Package nbxmpp :: Module idlequeue
[hide private]
[frames] | no frames]

Module idlequeue

source code

Idlequeues are Gajim's network heartbeat. Transports can be plugged as idle objects and be informed about possible IO
Classes [hide private]
  IdleObject
Idle listener interface. Listed methods are called by IdleQueue.
  IdleCommand
Can be subclassed to execute commands asynchronously by the idlequeue. Result will be optained via file descriptor of created pipe
  IdleQueue
IdleQueue provide three distinct time based features. Uses select.poll()
  SelectIdleQueue
Extends IdleQueue to use select.select() for polling
  GlibIdleQueue
Extends IdleQueue to use glib io_add_wath, instead of select/poll In another 'non gui' implementation of Gajim IdleQueue can be used safetly
Functions [hide private]
 
get_idlequeue()
Get an appropriate idlequeue
source code
Variables [hide private]
  log = logging.getLogger('nbxmpp.idlequeue')
  HAVE_GOBJECT = True
  FLAG_WRITE = 20
  FLAG_READ = 19
  FLAG_READ_WRITE = 23
  FLAG_CLOSE = 16
  PENDING_READ = 3
  PENDING_WRITE = 4
  IS_CLOSED = 16
  __package__ = 'nbxmpp'

Imports: os, select, logging, gobject, STDOUT, PIPE, call, CalledProcessError, Popen, check_call, check_output, fcntl


Function Details [hide private]

get_idlequeue()

source code 
Get an appropriate idlequeue

Variables Details [hide private]

log

Value:
logging.getLogger('nbxmpp.idlequeue')

HAVE_GOBJECT

Value:
True

FLAG_WRITE

Value:
20

FLAG_READ

Value:
19

FLAG_READ_WRITE

Value:
23

FLAG_CLOSE

Value:
16

PENDING_READ

Value:
3

PENDING_WRITE

Value:
4

IS_CLOSED

Value:
16

__package__

Value:
'nbxmpp'

nbxmpp-0.5.3/doc/apidocs/toc-nbxmpp.dispatcher_nb-module.html0000644000175000017500000000356012321263757025452 0ustar asterixasterix00000000000000 dispatcher_nb

Module dispatcher_nb


Classes

BOSHDispatcher
Dispatcher
XMPPDispatcher

Variables

DEFAULT_TIMEOUT_SECONDS
XML_DECLARATION
__package__
log
outgoingID

[hide private] nbxmpp-0.5.3/doc/apidocs/nbxmpp.smacks.Smacks-class.html0000644000175000017500000004474012321263757024410 0ustar asterixasterix00000000000000 nbxmpp.smacks.Smacks
Package nbxmpp :: Module smacks :: Class Smacks
[hide private]
[frames] | no frames]

Class Smacks

source code

This is Smacks is the Stream Management class. It takes care of requesting and sending acks. Also, it keeps track of the unhandled outgoing stanzas.

The dispatcher has to be able to access this class to increment the number of handled stanzas

Instance Methods [hide private]
 
__init__(self, con) source code
 
set_owner(self, owner) source code
 
_neg_response(self, disp, stanza) source code
 
negociate(self, resume=True) source code
 
resume_request(self) source code
 
send_ack(self, disp, stanza) source code
 
request_ack(self) source code
 
check_ack(self, disp, stanza)
Checks if the number of stanzas sent are the same as the number of stanzas received by the server. Pops stanzas that were handled by the server from the queue.
source code
 
error_handling(self, disp, stanza) source code
Method Details [hide private]

__init__(self, con)
(Constructor)

source code 

set_owner(self, owner)

source code 

_neg_response(self, disp, stanza)

source code 

negociate(self, resume=True)

source code 

resume_request(self)

source code 

send_ack(self, disp, stanza)

source code 

request_ack(self)

source code 

check_ack(self, disp, stanza)

source code 
Checks if the number of stanzas sent are the same as the number of stanzas received by the server. Pops stanzas that were handled by the server from the queue.

error_handling(self, disp, stanza)

source code 

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.BadNamespacePrefix-class.html0000644000175000017500000002271012321263757027221 0ustar asterixasterix00000000000000 nbxmpp.protocol.BadNamespacePrefix
Package nbxmpp :: Module protocol :: Class BadNamespacePrefix
[hide private]
[frames] | no frames]

Class BadNamespacePrefix

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_s_2.gif0000644000175000017500000006003212321263757025535 0ustar asterixasterix00000000000000GIF89a3lBDtbd4.,ĢnlĂ<rt"$LB<ĺBD䤒b\ܒ$l\NL|Ԧ24T2,  rtVT,&$lRLtjlrl\F< 4&$vt\JL䲤D:<̚Z\亼TFDt Ԛ~vJDJLL4zt*$lvld"Z\ndĜ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@B_ѥ1_35/bK?^LT7Z;Cb?S<BG|}0\FÒh`̽9ƾZ</|ތ-k}ȃg4ɂy/̷wQ&z~i)}O ™L}T/v?G2tojSկBMԏIqz~A/oZ {L`!qc_xb, :b!raAn"`=8@̜j^oX69`&/Ҽfzurcvrf7Y΅'zlgEt(roD1D` XтYLB״1,,ίimb6 f^: qqdϺַ+;B}l['V z0@A^6Q0byųA!`>E~{X 7{58{_W8^8aw|q@ P !tF,;\=l2IG77} zgu ˠn]?guQ 2ؿWwﯞ9>qk<]M?1Y ` N~\0=AG=uDA#BǪg7Xܴ67{{&AO7.yTy~[H,! F( {*}!u~quwsu>(@d3ӻs`_˲!؃SK5% ; @ 4 DtA TO D_̜i7!$"4#D$T%d&t'(#dA,BAK-0.t/3C2,3D6A56t9DA8l9<A;?@d )4CDDTEd*0=,HD DKD ND QD B/Tt+/AZi]^_L/a$b4cDdTed6 ;nbxmpp-0.5.3/doc/apidocs/nbxmpp-module.html0000644000175000017500000007466612321263757022102 0ustar asterixasterix00000000000000 nbxmpp
Package nbxmpp
[hide private]
[frames] | no frames]

Package nbxmpp

source code

This is a fork of the xmpppy jabber python library. Most of the code is inherited but has been extended by implementation of non-blocking transports and new features like BOSH.

Most of the xmpp classes are ancestors of PlugIn class to share a single set of methods in order to compile a featured and extensible XMPP client.

Thanks and credits to the xmpppy developers. See: http://xmpppy.sourceforge.net/

Submodules [hide private]
  • nbxmpp.auth_nb: Provides plugs for SASL and NON-SASL authentication mechanisms. Can be used both for client and transport authentication
  • nbxmpp.bosh
  • nbxmpp.c14n: XML canonicalisation methods (for XEP-0116)
  • nbxmpp.client_nb: Client class establishs connection to XMPP Server and handles authentication
  • nbxmpp.dispatcher_nb: Main xmpp decision making logic. Provides library with methods to assign different handlers to different XMPP stanzas and namespaces
  • nbxmpp.features_nb: Different stuff that wasn't worth separating it into modules (Registration, Privacy Lists, ...)
  • nbxmpp.idlequeue: Idlequeues are Gajim's network heartbeat. Transports can be plugged as idle objects and be informed about possible IO
  • nbxmpp.plugin: Provides PlugIn class functionality to develop extentions for xmpppy
  • nbxmpp.protocol: Protocol module contains tools that are needed for processing of xmpp-related data structures, including jabber-objects like JID or different stanzas and sub- stanzas) handling routines
  • nbxmpp.proxy_connectors: Module containing classes for proxy connecting. So far its HTTP CONNECT and SOCKS5 proxy
  • nbxmpp.roster_nb: Simple roster implementation. Can be used though for different tasks like mass-renaming of contacts.
  • nbxmpp.simplexml: Simplexml module provides xmpppy library with all needed tools to handle XML nodes and XML streams. I'm personally using it in many other separate projects. It is designed to be as standalone as possible
  • nbxmpp.smacks
  • nbxmpp.stringprepare
  • nbxmpp.tls_nb
  • nbxmpp.transports_nb: Transports are objects responsible for connecting to XMPP server and putting data to wrapped sockets in in desired form (SSL, TLS, TCP, for HTTP proxy, for SOCKS5 proxy...)

Variables [hide private]
  __package__ = 'nbxmpp'

Imports: NS_MUC_ADMIN, STREAM_NOT_AUTHORIZED, NS_FILE, Error, NS_PUBSUB_EVENT, NS_RECEIPTS, STREAM_CONNECTION_TIMEOUT, STREAM_IMPROPER_ADDRESSING, NS_PING, ERR_GONE, Conflict, NS_PHYSLOC, NS_CHATTING, ERR_CONFLICT, NS_COMPRESS, NS_HASHES_SHA1, NS_AGENTS, NS_CAPTCHA, NS_MOOD, ERR_NOT_AUTHORIZED, UnsupportedVersion, NS_BROWSING, ERR_INTERNAL_SERVER_ERROR, HostUnknown, SASL_INCORRECT_ENCODING, NS_MUC_OWNER, NS_ACTIVITY, NS_ARCHIVE_MANUAL, NS_JINGLE_RTP_AUDIO, string, NS_PRESENCE, STREAM_INTERNAL_SERVER_ERROR, NS_CHATSTATES, NS_LAST, ERR_REDIRECT, isErrorNode, Acks, NS_GROUPCHAT, Protocol, ERR_FEATURE_NOT_IMPLEMENTED, NS_GATEWAY, NS_DISCO_ITEMS, NS_MUC_CONFIG, ConnectionTimeout, NS_BIND, NS_JINGLE_ERRORS, NS_XMPP_STREAMS, NS_IQ, ERR_RESOURCE_CONSTRAINT, NS_CLIENT, NS_FORWARD, SASL_INVALID_AUTHZID, NS_EVENT, STREAM_POLICY_VIOLATION, NS_JINGLE_IBB, NS_DATA_LAYOUT, NS_TUNE, InvalidID, stream_exceptions, NS_HASHES_SHA256, NS_CARBONS, NS_ROSTER, NS_STANZAS, NS_HTTP_BIND, isResultNode, NS_TIME_REVISED, UnsupportedStanzaType, NS_MUC_UNIQUE, ERR_SERVICE_UNAVAILABLE, NS_PUBKEY_PUBKEY, NS_AMP, STREAM_UNDEFINED_CONDITION, NS_CONFERENCE, NS_MAM, NS_DISCO, NS_RSM, NS_BLOCKING, ERRORS, NS_STREAM, NS_HASHES, HostGone, RemoteConnectionFailed, NS_ESESSION, NotAuthorized, STREAM_BAD_FORMAT, NS_JINGLE_FILE_TRANSFER, NS_LOCATION, NS_ARCHIVE_AUTO, NS_DIALBACK, SASL_ABORTED, NS_AUTH, BadFormat, NS_BOOKMARKS, NS_VCARD, STREAM_HOST_GONE, DataForm, ERR_REMOTE_SERVER_NOT_FOUND, NS_XHTML, JID, InvalidXML, NS_SI, PolicyViolation, NS_SASL, NS_JINGLE_RAW_UDP, NS_SESSION, STREAM_INVALID_FROM, StreamError, NS_CAPS, NS_PUBSUB_OWNER, NS_HASHES_SHA512, NS_AMP_ERRORS, NS_BROWSE, NS_CORRECT, NS_ROSTERX, ERR_UNDEFINED_CONDITION, NS_TLS, NS_ATTENTION, NS_DATA, NS_SERVER, ImproperAddressing, ERR_REMOTE_SERVER_TIMEOUT, NS_JINGLE_ICE_UDP, NS_IBB, DataField, ERR_REGISTRATION_REQUIRED, NS_TIME, NS_PROFILE, Message, NS_SECLABEL, NS_XHTML_IM, NS_PRIVACY, NS_GMAILNOTIFY, BadNamespacePrefix, NS_CONDITIONS, UnsupportedEncoding, NS_FEATURE, STREAM_UNSUPPORTED_VERSION, SASL_NOT_AUTHORIZED, SeeOtherHost, Node, NS_JINGLE_RTP, SystemShutdown, NS_WAITINGLIST, NS_ARCHIVE_MANAGE, NS_SSN, NS_DELAY2, SASL_MECHANISM_TOO_WEAK, InvalidNamespace, NS_COMPONENT_1, Iq, NS_ARCHIVE_PREF, Hashes, ERR_JID_MALFORMED, STREAM_INVALID_XML, NS_INVISIBLE, NS_JINGLE_RTP_VIDEO, NS_PRIVATE, NS_VERSION, STREAM_UNSUPPORTED_ENCODING, ERR_NOT_ALLOWED, NS_GAMING, NS_OFFLINE, STREAM_SYSTEM_SHUTDOWN, NS_MUC_USER, NS_VCARD_UPDATE, NS_ATOM, ascii_upper, NS_STREAMS, STREAM_HOST_UNKNOWN, ERR_BAD_REQUEST, hashlib, NS_GTALKSETTING, InvalidFrom, NS_ENCRYPTED, UndefinedCondition, NS_RPC, NS_STANZA_CRYPTO, NS_SIGNED, NS_NICK, ERR_PAYMENT_REQUIRED, NS_PUBSUB, NS_MESSAGE, NS_JINGLE_XTLS, NS_DATA_MEDIA, STREAM_XML_NOT_WELL_FORMED, XMLNotWellFormed, NS_REGISTER, STREAM_SEE_OTHER_HOST, NS_BYTESTREAM, NS_DELAY, NS_VACATION, NS_PUBSUB_PUBLISH_OPTIONS, STREAM_BAD_NAMESPACE_PREFIX, NS_GEOLOC, NS_ARCHIVE, NS_ROSTERNOTES, NS_SI_PUB, NS_DATA_VALIDATE, ERR_RECIPIENT_UNAVAILABLE, NS_ESESSION_INIT, SASL_TEMPORARY_AUTH_FAILURE, NS_PUBKEY_REVOKE, NS_JINGLE_BYTESTREAM, NodeBuilder, SASL_INVALID_MECHANISM, NS_ROSTER_VER, NS_VIEWING, NS_COMMANDS, NS_AVATAR, NodeProcessed, Presence, STREAM_CONFLICT, ResourceConstraint, STREAM_RESOURCE_CONSTRAINT, NS_STREAM_MGMT, ERR_UNEXPECTED_REQUEST, time, NS_X_OOB, ERR_SUBSCRIPTION_REQUIRED, ERR_ITEM_NOT_FOUND, STREAM_INVALID_NAMESPACE, NS_SEARCH, STREAM_REMOTE_CONNECTION_FAILED, BOSHBody, NS_ADDRESS, NS_COMPONENT_ACCEPT, STREAM_INVALID_ID, RestrictedXML, NS_SECLABEL_CATALOG, STREAM_RESTRICTED_XML, NS_DISCO_INFO, STREAM_UNSUPPORTED_STANZA_TYPE, InternalServerError, NS_PUBKEY_ATTEST, NS_MUC, ERR_NOT_ACCEPTABLE, NS_JINGLE, NS_BOB, NS_HASHES_MD5, NS_HTTP_AUTH, ERR_FORBIDDEN, ErrorNode, simplexml, protocol, auth_nb, transports_nb, roster_nb, dispatcher_nb, features_nb, idlequeue, bosh, tls_nb, proxy_connectors, NonBlockingClient, PlugIn, Smacks, client_nb, plugin, smacks


Variables Details [hide private]

__package__

Value:
'nbxmpp'

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_t_8.gif0000644000175000017500000006412312321263757025551 0ustar asterixasterix00000000000000GIF89aq(LB4T><$,&$ĤFDĆd&$|fdĞܶT6,ܾVTĎ><~| NLnl侼^\Ԧ̞nlt &$̖64.,܌̦ԮLBD<24|bdD:<!,q( H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻE˷߿ LÈ+^x#b˘3k̹ϠCMӨI$ȜM۸sͻ7m.ȋ~ͼɣK?N\ӳk~f BN^;Oرey˧:}뷮%G~*W}_k F'>1uȄ1mm]a#2(cw&h] 8C&Ohl{QN9]= ($fi$JP`7)W^@?@%0Y3[DyF9fgfsY~މi(\dj'qʞĵd9mF*l6ji桨hס&1[9yډ)YJ!fdJ,rP#{PePqEd{:mZ|.]Ȧ;*(>LJ)b 3O[Z/f {nI1^N gl'_oEB&E%wܟ<*1oF'X9\@[DA'DPG-TWmXg\w`s "JThlp-tmx @fF.8,mO!}<%W8$yw噇林>㢧馷.8Ǯan1o'_<7G3Wg1w3GgG)'KHǽO~ye1N₹51i]ej=JnGz r}̠B 8\ H@(.! qE/l ZlcbtÉ"L`E`T b7 9DԌ8x BQ0< Ƨla E[zll l>  m ["`p H$3яtO=1 ('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g`03{v3ߛoKv勤XB;)۫VKڮ8v㐯0v@[  0D ok~ ۸黯#cw)I&ܒ/I{#ܑH0 d%0 Ǘn=kדM }IP\vGKiŸ*SnUg@Vaܾ^Lo`lk|hnqnoj,rtLnv|lz,n|fǀ|m<[\Ȇ\mPȌljJɕlɗə],Ƀ7 ʡ,ʣLʥlʧʩʫʭʨ|,˳L˵l˷˹˻˽˿ ,ìk;nbxmpp-0.5.3/doc/apidocs/epydoc.css0000644000175000017500000003722712321263757020412 0ustar asterixasterix00000000000000 /* Epydoc CSS Stylesheet * * This stylesheet can be used to customize the appearance of epydoc's * HTML output. * */ /* Default Colors & Styles * - Set the default foreground & background color with 'body'; and * link colors with 'a:link' and 'a:visited'. * - Use bold for decision list terms. * - The heading styles defined here are used for headings *within* * docstring descriptions. All headings used by epydoc itself use * either class='epydoc' or class='toc' (CSS styles for both * defined below). */ body { background: #ffffff; color: #000000; } p { margin-top: 0.5em; margin-bottom: 0.5em; } a:link { color: #0000ff; } a:visited { color: #204080; } dt { font-weight: bold; } h1 { font-size: +140%; font-style: italic; font-weight: bold; } h2 { font-size: +125%; font-style: italic; font-weight: bold; } h3 { font-size: +110%; font-style: italic; font-weight: normal; } code { font-size: 100%; } /* N.B.: class, not pseudoclass */ a.link { font-family: monospace; } /* Page Header & Footer * - The standard page header consists of a navigation bar (with * pointers to standard pages such as 'home' and 'trees'); a * breadcrumbs list, which can be used to navigate to containing * classes or modules; options links, to show/hide private * variables and to show/hide frames; and a page title (using *

). The page title may be followed by a link to the * corresponding source code (using 'span.codelink'). * - The footer consists of a navigation bar, a timestamp, and a * pointer to epydoc's homepage. */ h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; } h2.epydoc { font-size: +130%; font-weight: bold; } h3.epydoc { font-size: +115%; font-weight: bold; margin-top: 0.2em; } td h3.epydoc { font-size: +115%; font-weight: bold; margin-bottom: 0; } table.navbar { background: #a0c0ff; color: #000000; border: 2px groove #c0d0d0; } table.navbar table { color: #000000; } th.navbar-select { background: #70b0ff; color: #000000; } table.navbar a { text-decoration: none; } table.navbar a:link { color: #0000ff; } table.navbar a:visited { color: #204080; } span.breadcrumbs { font-size: 85%; font-weight: bold; } span.options { font-size: 70%; } span.codelink { font-size: 85%; } td.footer { font-size: 85%; } /* Table Headers * - Each summary table and details section begins with a 'header' * row. This row contains a section title (marked by * 'span.table-header') as well as a show/hide private link * (marked by 'span.options', defined above). * - Summary tables that contain user-defined groups mark those * groups using 'group header' rows. */ td.table-header { background: #70b0ff; color: #000000; border: 1px solid #608090; } td.table-header table { color: #000000; } td.table-header table a:link { color: #0000ff; } td.table-header table a:visited { color: #204080; } span.table-header { font-size: 120%; font-weight: bold; } th.group-header { background: #c0e0f8; color: #000000; text-align: left; font-style: italic; font-size: 115%; border: 1px solid #608090; } /* Summary Tables (functions, variables, etc) * - Each object is described by a single row of the table with * two cells. The left cell gives the object's type, and is * marked with 'code.summary-type'. The right cell gives the * object's name and a summary description. * - CSS styles for the table's header and group headers are * defined above, under 'Table Headers' */ table.summary { border-collapse: collapse; background: #e8f0f8; color: #000000; border: 1px solid #608090; margin-bottom: 0.5em; } td.summary { border: 1px solid #608090; } code.summary-type { font-size: 85%; } table.summary a:link { color: #0000ff; } table.summary a:visited { color: #204080; } /* Details Tables (functions, variables, etc) * - Each object is described in its own div. * - A single-row summary table w/ table-header is used as * a header for each details section (CSS style for table-header * is defined above, under 'Table Headers'). */ table.details { border-collapse: collapse; background: #e8f0f8; color: #000000; border: 1px solid #608090; margin: .2em 0 0 0; } table.details table { color: #000000; } table.details a:link { color: #0000ff; } table.details a:visited { color: #204080; } /* Fields */ dl.fields { margin-left: 2em; margin-top: 1em; margin-bottom: 1em; } dl.fields dd ul { margin-left: 0em; padding-left: 0em; } dl.fields dd ul li ul { margin-left: 2em; padding-left: 0em; } div.fields { margin-left: 2em; } div.fields p { margin-bottom: 0.5em; } /* Index tables (identifier index, term index, etc) * - link-index is used for indices containing lists of links * (namely, the identifier index & term index). * - index-where is used in link indices for the text indicating * the container/source for each link. * - metadata-index is used for indices containing metadata * extracted from fields (namely, the bug index & todo index). */ table.link-index { border-collapse: collapse; background: #e8f0f8; color: #000000; border: 1px solid #608090; } td.link-index { border-width: 0px; } table.link-index a:link { color: #0000ff; } table.link-index a:visited { color: #204080; } span.index-where { font-size: 70%; } table.metadata-index { border-collapse: collapse; background: #e8f0f8; color: #000000; border: 1px solid #608090; margin: .2em 0 0 0; } td.metadata-index { border-width: 1px; border-style: solid; } table.metadata-index a:link { color: #0000ff; } table.metadata-index a:visited { color: #204080; } /* Function signatures * - sig* is used for the signature in the details section. * - .summary-sig* is used for the signature in the summary * table, and when listing property accessor functions. * */ .sig-name { color: #006080; } .sig-arg { color: #008060; } .sig-default { color: #602000; } .summary-sig { font-family: monospace; } .summary-sig-name { color: #006080; font-weight: bold; } table.summary a.summary-sig-name:link { color: #006080; font-weight: bold; } table.summary a.summary-sig-name:visited { color: #006080; font-weight: bold; } .summary-sig-arg { color: #006040; } .summary-sig-default { color: #501800; } /* Subclass list */ ul.subclass-list { display: inline; } ul.subclass-list li { display: inline; } /* To render variables, classes etc. like functions */ table.summary .summary-name { color: #006080; font-weight: bold; font-family: monospace; } table.summary a.summary-name:link { color: #006080; font-weight: bold; font-family: monospace; } table.summary a.summary-name:visited { color: #006080; font-weight: bold; font-family: monospace; } /* Variable values * - In the 'variable details' sections, each varaible's value is * listed in a 'pre.variable' box. The width of this box is * restricted to 80 chars; if the value's repr is longer than * this it will be wrapped, using a backslash marked with * class 'variable-linewrap'. If the value's repr is longer * than 3 lines, the rest will be ellided; and an ellipsis * marker ('...' marked with 'variable-ellipsis') will be used. * - If the value is a string, its quote marks will be marked * with 'variable-quote'. * - If the variable is a regexp, it is syntax-highlighted using * the re* CSS classes. */ pre.variable { padding: .5em; margin: 0; background: #dce4ec; color: #000000; border: 1px solid #708890; } .variable-linewrap { color: #604000; font-weight: bold; } .variable-ellipsis { color: #604000; font-weight: bold; } .variable-quote { color: #604000; font-weight: bold; } .variable-group { color: #008000; font-weight: bold; } .variable-op { color: #604000; font-weight: bold; } .variable-string { color: #006030; } .variable-unknown { color: #a00000; font-weight: bold; } .re { color: #000000; } .re-char { color: #006030; } .re-op { color: #600000; } .re-group { color: #003060; } .re-ref { color: #404040; } /* Base tree * - Used by class pages to display the base class hierarchy. */ pre.base-tree { font-size: 80%; margin: 0; } /* Frames-based table of contents headers * - Consists of two frames: one for selecting modules; and * the other listing the contents of the selected module. * - h1.toc is used for each frame's heading * - h2.toc is used for subheadings within each frame. */ h1.toc { text-align: center; font-size: 105%; margin: 0; font-weight: bold; padding: 0; } h2.toc { font-size: 100%; font-weight: bold; margin: 0.5em 0 0 -0.3em; } /* Syntax Highlighting for Source Code * - doctest examples are displayed in a 'pre.py-doctest' block. * If the example is in a details table entry, then it will use * the colors specified by the 'table pre.py-doctest' line. * - Source code listings are displayed in a 'pre.py-src' block. * Each line is marked with 'span.py-line' (used to draw a line * down the left margin, separating the code from the line * numbers). Line numbers are displayed with 'span.py-lineno'. * The expand/collapse block toggle button is displayed with * 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not * modify the font size of the text.) * - If a source code page is opened with an anchor, then the * corresponding code block will be highlighted. The code * block's header is highlighted with 'py-highlight-hdr'; and * the code block's body is highlighted with 'py-highlight'. * - The remaining py-* classes are used to perform syntax * highlighting (py-string for string literals, py-name for names, * etc.) */ pre.py-doctest { padding: .5em; margin: 1em; background: #e8f0f8; color: #000000; border: 1px solid #708890; } table pre.py-doctest { background: #dce4ec; color: #000000; } pre.py-src { border: 2px solid #000000; background: #f0f0f0; color: #000000; } .py-line { border-left: 2px solid #000000; margin-left: .2em; padding-left: .4em; } .py-lineno { font-style: italic; font-size: 90%; padding-left: .5em; } a.py-toggle { text-decoration: none; } div.py-highlight-hdr { border-top: 2px solid #000000; border-bottom: 2px solid #000000; background: #d8e8e8; } div.py-highlight { border-bottom: 2px solid #000000; background: #d0e0e0; } .py-prompt { color: #005050; font-weight: bold;} .py-more { color: #005050; font-weight: bold;} .py-string { color: #006030; } .py-comment { color: #003060; } .py-keyword { color: #600000; } .py-output { color: #404040; } .py-name { color: #000050; } .py-name:link { color: #000050 !important; } .py-name:visited { color: #000050 !important; } .py-number { color: #005000; } .py-defname { color: #000060; font-weight: bold; } .py-def-name { color: #000060; font-weight: bold; } .py-base-class { color: #000060; } .py-param { color: #000060; } .py-docstring { color: #006030; } .py-decorator { color: #804020; } /* Use this if you don't want links to names underlined: */ /*a.py-name { text-decoration: none; }*/ /* Graphs & Diagrams * - These CSS styles are used for graphs & diagrams generated using * Graphviz dot. 'img.graph-without-title' is used for bare * diagrams (to remove the border created by making the image * clickable). */ img.graph-without-title { border: none; } img.graph-with-title { border: 1px solid #000000; } span.graph-title { font-weight: bold; } span.graph-caption { } /* General-purpose classes * - 'p.indent-wrapped-lines' defines a paragraph whose first line * is not indented, but whose subsequent lines are. * - The 'nomargin-top' class is used to remove the top margin (e.g. * from lists). The 'nomargin' class is used to remove both the * top and bottom margin (but not the left or right margin -- * for lists, that would cause the bullets to disappear.) */ p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em; margin: 0; } .nomargin-top { margin-top: 0; } .nomargin { margin-top: 0; margin-bottom: 0; } /* HTML Log */ div.log-block { padding: 0; margin: .5em 0 .5em 0; background: #e8f0f8; color: #000000; border: 1px solid #000000; } div.log-error { padding: .1em .3em .1em .3em; margin: 4px; background: #ffb0b0; color: #000000; border: 1px solid #000000; } div.log-warning { padding: .1em .3em .1em .3em; margin: 4px; background: #ffffb0; color: #000000; border: 1px solid #000000; } div.log-info { padding: .1em .3em .1em .3em; margin: 4px; background: #b0ffb0; color: #000000; border: 1px solid #000000; } h2.log-hdr { background: #70b0ff; color: #000000; margin: 0; padding: 0em 0.5em 0em 0.5em; border-bottom: 1px solid #000000; font-size: 110%; } p.log { font-weight: bold; margin: .5em 0 .5em 0; } tr.opt-changed { color: #000000; font-weight: bold; } tr.opt-default { color: #606060; } pre.log { margin: 0; padding: 0; padding-left: 1em; } nbxmpp-0.5.3/doc/apidocs/toc-nbxmpp.protocol-module.html0000644000175000017500000006317712321263757024520 0ustar asterixasterix00000000000000 protocol

Module protocol


Classes

Acks
BOSHBody
BadFormat
BadNamespacePrefix
Conflict
ConnectionTimeout
DataField
DataForm
Error
ErrorNode
Hashes
HostGone
HostUnknown
ImproperAddressing
InternalServerError
InvalidFrom
InvalidID
InvalidNamespace
InvalidXML
Iq
JID
Message
NodeProcessed
NotAuthorized
PolicyViolation
Presence
Protocol
RemoteConnectionFailed
ResourceConstraint
RestrictedXML
SeeOtherHost
StreamError
SystemShutdown
UndefinedCondition
UnsupportedEncoding
UnsupportedStanzaType
UnsupportedVersion
XMLNotWellFormed

Functions

ascii_upper
isErrorNode
isResultNode

Variables

ERRORS
ERR_BAD_REQUEST
ERR_CONFLICT
ERR_FEATURE_NOT_IMPLEMENTED
ERR_FORBIDDEN
ERR_GONE
ERR_INTERNAL_SERVER_ERROR
ERR_ITEM_NOT_FOUND
ERR_JID_MALFORMED
ERR_NOT_ACCEPTABLE
ERR_NOT_ALLOWED
ERR_NOT_AUTHORIZED
ERR_PAYMENT_REQUIRED
ERR_RECIPIENT_UNAVAILABLE
ERR_REDIRECT
ERR_REGISTRATION_REQUIRED
ERR_REMOTE_SERVER_NOT_FOUND
ERR_REMOTE_SERVER_TIMEOUT
ERR_RESOURCE_CONSTRAINT
ERR_SERVICE_UNAVAILABLE
ERR_SUBSCRIPTION_REQUIRED
ERR_UNDEFINED_CONDITION
ERR_UNEXPECTED_REQUEST
NS_ACTIVITY
NS_ADDRESS
NS_AGENTS
NS_AMP
NS_AMP_ERRORS
NS_ARCHIVE
NS_ARCHIVE_AUTO
NS_ARCHIVE_MANAGE
NS_ARCHIVE_MANUAL
NS_ARCHIVE_PREF
NS_ATOM
NS_ATTENTION
NS_AUTH
NS_AVATAR
NS_BIND
NS_BLOCKING
NS_BOB
NS_BOOKMARKS
NS_BROWSE
NS_BROWSING
NS_BYTESTREAM
NS_CAPS
NS_CAPTCHA
NS_CARBONS
NS_CHATSTATES
NS_CHATTING
NS_CLIENT
NS_COMMANDS
NS_COMPONENT_1
NS_COMPONENT_ACCEPT
NS_COMPRESS
NS_CONDITIONS
NS_CONFERENCE
NS_CORRECT
NS_DATA
NS_DATA_LAYOUT
NS_DATA_MEDIA
NS_DATA_VALIDATE
NS_DELAY
NS_DELAY2
NS_DIALBACK
NS_DISCO
NS_DISCO_INFO
NS_DISCO_ITEMS
NS_ENCRYPTED
NS_ESESSION
NS_ESESSION_INIT
NS_EVENT
NS_FEATURE
NS_FILE
NS_FORWARD
NS_GAMING
NS_GATEWAY
NS_GEOLOC
NS_GMAILNOTIFY
NS_GROUPCHAT
NS_GTALKSETTING
NS_HASHES
NS_HASHES_MD5
NS_HASHES_SHA1
NS_HASHES_SHA256
NS_HASHES_SHA512
NS_HTTP_AUTH
NS_HTTP_BIND
NS_IBB
NS_INVISIBLE
NS_IQ
NS_JINGLE
NS_JINGLE_BYTESTREAM
NS_JINGLE_ERRORS
NS_JINGLE_FILE_TRANSFER
NS_JINGLE_IBB
NS_JINGLE_ICE_UDP
NS_JINGLE_RAW_UDP
NS_JINGLE_RTP
NS_JINGLE_RTP_AUDIO
NS_JINGLE_RTP_VIDEO
NS_JINGLE_XTLS
NS_LAST
NS_LOCATION
NS_MAM
NS_MESSAGE
NS_MOOD
NS_MUC
NS_MUC_ADMIN
NS_MUC_CONFIG
NS_MUC_OWNER
NS_MUC_UNIQUE
NS_MUC_USER
NS_NICK
NS_OFFLINE
NS_PHYSLOC
NS_PING
NS_PRESENCE
NS_PRIVACY
NS_PRIVATE
NS_PROFILE
NS_PUBKEY_ATTEST
NS_PUBKEY_PUBKEY
NS_PUBKEY_REVOKE
NS_PUBSUB
NS_PUBSUB_EVENT
NS_PUBSUB_OWNER
NS_PUBSUB_PUBLISH_OPTIONS
NS_RECEIPTS
NS_REGISTER
NS_ROSTER
NS_ROSTERNOTES
NS_ROSTERX
NS_ROSTER_VER
NS_RPC
NS_RSM
NS_SASL
NS_SEARCH
NS_SECLABEL
NS_SECLABEL_CATALOG
NS_SERVER
NS_SESSION
NS_SI
NS_SIGNED
NS_SI_PUB
NS_SSN
NS_STANZAS
NS_STANZA_CRYPTO
NS_STREAM
NS_STREAMS
NS_STREAM_MGMT
NS_TIME
NS_TIME_REVISED
NS_TLS
NS_TUNE
NS_VACATION
NS_VCARD
NS_VCARD_UPDATE
NS_VERSION
NS_VIEWING
NS_WAITINGLIST
NS_XHTML
NS_XHTML_IM
NS_XMPP_STREAMS
NS_X_OOB
SASL_ABORTED
SASL_INCORRECT_ENCODING
SASL_INVALID_AUTHZID
SASL_INVALID_MECHANISM
SASL_MECHANISM_TOO_WEAK
SASL_NOT_AUTHORIZED
SASL_TEMPORARY_AUTH_FAILURE
STREAM_BAD_FORMAT
STREAM_BAD_NAMESPACE_PREFIX
STREAM_CONFLICT
STREAM_CONNECTION_TIMEOUT
STREAM_HOST_GONE
STREAM_HOST_UNKNOWN
STREAM_IMPROPER_ADDRESSING
STREAM_INTERNAL_SERVER_ERROR
STREAM_INVALID_FROM
STREAM_INVALID_ID
STREAM_INVALID_NAMESPACE
STREAM_INVALID_XML
STREAM_NOT_AUTHORIZED
STREAM_POLICY_VIOLATION
STREAM_REMOTE_CONNECTION_FAILED
STREAM_RESOURCE_CONSTRAINT
STREAM_RESTRICTED_XML
STREAM_SEE_OTHER_HOST
STREAM_SYSTEM_SHUTDOWN
STREAM_UNDEFINED_CONDITION
STREAM_UNSUPPORTED_ENCODING
STREAM_UNSUPPORTED_STANZA_TYPE
STREAM_UNSUPPORTED_VERSION
STREAM_XML_NOT_WELL_FORMED
__package__
stream_exceptions

[hide private] nbxmpp-0.5.3/doc/apidocs/nbxmpp.bosh-pysrc.html0000644000175000017500000060334512321263757022677 0ustar asterixasterix00000000000000 nbxmpp.bosh
Package nbxmpp :: Module bosh
[hide private]
[frames] | no frames]

Source Code for Module nbxmpp.bosh

  1  ## bosh.py 
  2  ## 
  3  ## 
  4  ## Copyright (C) 2008 Tomas Karasek <tom.to.the.k@gmail.com> 
  5  ## 
  6  ## This file is part of Gajim. 
  7  ## 
  8  ## Gajim is free software; you can redistribute it and/or modify 
  9  ## it under the terms of the GNU General Public License as published 
 10  ## by the Free Software Foundation; version 3 only. 
 11  ## 
 12  ## Gajim is distributed in the hope that it will be useful, 
 13  ## but WITHOUT ANY WARRANTY; without even the implied warranty of 
 14  ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 15  ## GNU General Public License for more details. 
 16  ## 
 17  ## You should have received a copy of the GNU General Public License 
 18  ## along with Gajim.  If not, see <http://www.gnu.org/licenses/>. 
 19   
 20   
 21  import locale, random 
 22  from hashlib import sha1 
 23  from transports_nb import NonBlockingTransport, NonBlockingHTTPBOSH,\ 
 24          CONNECTED, CONNECTING, DISCONNECTED, DISCONNECTING,\ 
 25          urisplit, DISCONNECT_TIMEOUT_SECONDS 
 26  from protocol import BOSHBody, Protocol, NS_CLIENT 
 27  from simplexml import Node 
 28   
 29  import logging 
 30  log = logging.getLogger('nbxmpp.bosh') 
 31   
 32  KEY_COUNT = 10 
 33   
 34  # Fake file descriptor - it's used for setting read_timeout in idlequeue for 
 35  # BOSH Transport. In TCP-derived transports this is file descriptor of socket. 
 36  FAKE_DESCRIPTOR = -1337 
 37   
 38   
39 -class NonBlockingBOSH(NonBlockingTransport):
40 - def __init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, certs, 41 xmpp_server, domain, bosh_dict, proxy_creds):
42 NonBlockingTransport.__init__(self, raise_event, on_disconnect, idlequeue, 43 estabilish_tls, certs) 44 45 self.bosh_sid = None 46 if locale.getdefaultlocale()[0]: 47 self.bosh_xml_lang = locale.getdefaultlocale()[0].split('_')[0] 48 else: 49 self.bosh_xml_lang = 'en' 50 51 self.http_version = 'HTTP/1.1' 52 self.http_persistent = True 53 self.http_pipelining = bosh_dict['bosh_http_pipelining'] 54 self.bosh_to = domain 55 56 self.route_host, self.route_port = xmpp_server 57 58 self.bosh_wait = bosh_dict['bosh_wait'] 59 if not self.http_pipelining: 60 self.bosh_hold = 1 61 else: 62 self.bosh_hold = bosh_dict['bosh_hold'] 63 self.bosh_requests = self.bosh_hold 64 self.bosh_uri = bosh_dict['bosh_uri'] 65 self.bosh_content = bosh_dict['bosh_content'] 66 self.over_proxy = bosh_dict['bosh_useproxy'] 67 if estabilish_tls: 68 self.bosh_secure = 'true' 69 else: 70 self.bosh_secure = 'false' 71 self.use_proxy_auth = bosh_dict['useauth'] 72 self.proxy_creds = proxy_creds 73 self.wait_cb_time = None 74 self.http_socks = [] 75 self.stanza_buffer = [] 76 self.prio_bosh_stanzas = [] 77 self.current_recv_handler = None 78 self.current_recv_socket = None 79 self.key_stack = None 80 self.ack_checker = None 81 self.after_init = False 82 self.proxy_dict = {} 83 if self.over_proxy and self.estabilish_tls: 84 self.proxy_dict['type'] = 'http' 85 # with SSL over proxy, we do HTTP CONNECT to proxy to open a channel to 86 # BOSH Connection Manager 87 host, port = urisplit(self.bosh_uri)[1:3] 88 self.proxy_dict['xmpp_server'] = (host, port) 89 self.proxy_dict['credentials'] = self.proxy_creds 90 91 # ssl variables 92 self.ssl_fingerprint_sha1 = [] 93 self.ssl_certificate = [] 94 self.ssl_errnum = [] 95 self.ssl_cert_pem = []
96 97
98 - def connect(self, conn_5tuple, on_connect, on_connect_failure):
99 NonBlockingTransport.connect(self, conn_5tuple, on_connect, on_connect_failure) 100 101 global FAKE_DESCRIPTOR 102 FAKE_DESCRIPTOR = FAKE_DESCRIPTOR - 1 103 self.fd = FAKE_DESCRIPTOR 104 105 self.stanza_buffer = [] 106 self.prio_bosh_stanzas = [] 107 108 self.key_stack = KeyStack(KEY_COUNT) 109 self.ack_checker = AckChecker() 110 self.after_init = True 111 112 self.http_socks.append(self.get_new_http_socket()) 113 self._tcp_connecting_started() 114 115 self.http_socks[0].connect( 116 conn_5tuple = conn_5tuple, 117 on_connect = self._on_connect, 118 on_connect_failure = self._on_connect_failure)
119
120 - def _on_connect(self):
121 self.peerhost = self.http_socks[0].peerhost 122 self.ssl_lib = self.http_socks[0].ssl_lib 123 NonBlockingTransport._on_connect(self)
124 125 126
127 - def set_timeout(self, timeout):
128 if self.get_state() != DISCONNECTED and self.fd != -1: 129 NonBlockingTransport.set_timeout(self, timeout) 130 else: 131 log.warn('set_timeout: TIMEOUT NOT SET: state is %s, fd is %s' % (self.get_state(), self.fd))
132
133 - def on_http_request_possible(self):
134 """ 135 Called when HTTP request it's possible to send a HTTP request. It can be when 136 socket is connected or when HTTP response arrived 137 138 There should be always one pending request to BOSH CM. 139 """ 140 log.debug('on_http_req possible, state:\n%s' % self.get_current_state()) 141 if self.get_state()==DISCONNECTED: return 142 143 #Hack for making the non-secure warning dialog work 144 if self._owner.got_features: 145 if (hasattr(self._owner, 'NonBlockingNonSASL') or hasattr(self._owner, 'SASL')): 146 self.send_BOSH(None) 147 else: 148 # If we already got features and no auth module was plugged yet, we are 149 # probably waiting for confirmation of the "not-secure-connection" dialog. 150 # We don't send HTTP request in that case. 151 # see http://lists.jabber.ru/pipermail/ejabberd/2008-August/004027.html 152 return 153 else: 154 self.send_BOSH(None)
155 156 157
158 - def get_socket_in(self, state):
159 """ 160 Get sockets in desired state 161 """ 162 for s in self.http_socks: 163 if s.get_state()==state: return s 164 return None
165 166
167 - def get_free_socket(self):
168 """ 169 Select and returns socket eligible for sending a data to 170 """ 171 if self.http_pipelining: 172 return self.get_socket_in(CONNECTED) 173 else: 174 last_recv_time, tmpsock = 0, None 175 for s in self.http_socks: 176 # we're interested only in CONNECTED socket with no requests pending 177 if s.get_state()==CONNECTED and s.pending_requests==0: 178 # if there's more of them, we want the one with the least recent data receive 179 # (lowest last_recv_time) 180 if (last_recv_time==0) or (s.last_recv_time < last_recv_time): 181 last_recv_time = s.last_recv_time 182 tmpsock = s 183 if tmpsock: 184 return tmpsock 185 else: 186 return None
187 188
189 - def send_BOSH(self, payload):
190 """ 191 Tries to send a stanza in payload by appeding it to a buffer and plugging a 192 free socket for writing. 193 """ 194 total_pending_reqs = sum([s.pending_requests for s in self.http_socks]) 195 196 # when called after HTTP response (Payload=None) and when there are already 197 # some pending requests and no data to send, or when the socket is 198 # disconnected, we do nothing 199 if payload is None and \ 200 total_pending_reqs > 0 and \ 201 self.stanza_buffer == [] and \ 202 self.prio_bosh_stanzas == [] or \ 203 self.get_state()==DISCONNECTED: 204 return 205 206 # Add xmlns to stanza to help ejabberd server 207 if payload and isinstance(payload, Protocol): 208 if not payload.getNamespace(): 209 payload.setNamespace(NS_CLIENT) 210 211 # now the payload is put to buffer and will be sent at some point 212 self.append_stanza(payload) 213 214 # if we're about to make more requests than allowed, we don't send - stanzas will be 215 # sent after HTTP response from CM, exception is when we're disconnecting - then we 216 # send anyway 217 if total_pending_reqs >= self.bosh_requests and self.get_state()!=DISCONNECTING: 218 log.warn('attemp to make more requests than allowed by Connection Manager:\n%s' % 219 self.get_current_state()) 220 return 221 222 # when there's free CONNECTED socket, we plug it for write and the data will 223 # be sent when write is possible 224 if self.get_free_socket(): 225 self.plug_socket() 226 return 227 228 # if there is a connecting socket, we just wait for when it connects, 229 # payload will be sent in a sec when the socket connects 230 if self.get_socket_in(CONNECTING): return 231 232 # being here means there are either DISCONNECTED sockets or all sockets are 233 # CONNECTED with too many pending requests 234 s = self.get_socket_in(DISCONNECTED) 235 236 # if we have DISCONNECTED socket, lets connect it and plug for send 237 if s: 238 self.connect_and_flush(s) 239 else: 240 # otherwise create and connect a new one 241 ss = self.get_new_http_socket() 242 self.http_socks.append(ss) 243 self.connect_and_flush(ss) 244 return
245
246 - def plug_socket(self):
247 stanza = None 248 s = self.get_free_socket() 249 if s: 250 s._plug_idle(writable=True, readable=True) 251 else: 252 log.error('=====!!!!!!!!====> Couldn\'t get free socket in plug_socket())')
253
254 - def build_stanza(self, socket):
255 """ 256 Build a BOSH body tag from data in buffers and adds key, rid and ack 257 attributes to it 258 259 This method is called from _do_send() of underlying transport. This is to 260 ensure rid and keys will be processed in correct order. If I generate 261 them before plugging a socket for write (and did it for two sockets/HTTP 262 connections) in parallel, they might be sent in wrong order, which 263 results in violating the BOSH session and server-side disconnect. 264 """ 265 if self.prio_bosh_stanzas: 266 stanza, add_payload = self.prio_bosh_stanzas.pop(0) 267 if add_payload: 268 stanza.setPayload(self.stanza_buffer) 269 self.stanza_buffer = [] 270 else: 271 stanza = self.boshify_stanzas(self.stanza_buffer) 272 self.stanza_buffer = [] 273 274 stanza = self.ack_checker.backup_stanza(stanza, socket) 275 276 key, newkey = self.key_stack.get() 277 if key: 278 stanza.setAttr('key', key) 279 if newkey: 280 stanza.setAttr('newkey', newkey) 281 282 283 log.info('sending msg with rid=%s to sock %s' % (stanza.getAttr('rid'), id(socket))) 284 self.renew_bosh_wait_timeout(self.bosh_wait + 3) 285 return stanza
286 287
288 - def on_bosh_wait_timeout(self):
289 log.error('Connection Manager didn\'t respond within %s + 3 seconds --> forcing disconnect' % self.bosh_wait) 290 self.disconnect()
291 292
293 - def renew_bosh_wait_timeout(self, timeout):
294 if self.wait_cb_time is not None: 295 self.remove_bosh_wait_timeout() 296 sched_time = self.idlequeue.set_alarm(self.on_bosh_wait_timeout, timeout) 297 self.wait_cb_time = sched_time
298
299 - def remove_bosh_wait_timeout(self):
300 self.idlequeue.remove_alarm( 301 self.on_bosh_wait_timeout, 302 self.wait_cb_time)
303
304 - def on_persistent_fallback(self, socket):
305 """ 306 Called from underlying transport when server closes TCP connection 307 308 :param socket: disconnected transport object 309 """ 310 if socket.http_persistent: 311 log.warn('Fallback to nonpersistent HTTP (no pipelining as well)') 312 socket.http_persistent = False 313 self.http_persistent = False 314 self.http_pipelining = False 315 socket.disconnect(do_callback=False) 316 self.connect_and_flush(socket) 317 else: 318 socket.disconnect()
319 320 321
322 - def handle_body_attrs(self, stanza_attrs):
323 """ 324 Called for each incoming body stanza from dispatcher. Checks body 325 attributes. 326 """ 327 self.remove_bosh_wait_timeout() 328 329 if self.after_init: 330 if stanza_attrs.has_key('sid'): 331 # session ID should be only in init response 332 self.bosh_sid = stanza_attrs['sid'] 333 334 if stanza_attrs.has_key('requests'): 335 self.bosh_requests = int(stanza_attrs['requests']) 336 337 if stanza_attrs.has_key('wait'): 338 self.bosh_wait = int(stanza_attrs['wait']) 339 self.after_init = False 340 341 ack = None 342 if stanza_attrs.has_key('ack'): 343 ack = stanza_attrs['ack'] 344 self.ack_checker.process_incoming_ack(ack=ack, 345 socket=self.current_recv_socket) 346 347 if stanza_attrs.has_key('type'): 348 if stanza_attrs['type'] in ['terminate', 'terminal']: 349 condition = 'n/a' 350 if stanza_attrs.has_key('condition'): 351 condition = stanza_attrs['condition'] 352 if condition == 'n/a': 353 log.info('Received sesion-ending terminating stanza') 354 else: 355 log.error('Received terminating stanza: %s - %s' % (condition, 356 bosh_errors[condition])) 357 self.disconnect() 358 return 359 360 if stanza_attrs['type'] == 'error': 361 # recoverable error 362 pass 363 return
364 365
366 - def append_stanza(self, stanza):
367 """ 368 Append stanza to a buffer to send 369 """ 370 if stanza: 371 if isinstance(stanza, tuple): 372 # stanza is tuple of BOSH stanza and bool value for whether to add payload 373 self.prio_bosh_stanzas.append(stanza) 374 else: 375 # stanza is XMPP stanza. Will be boshified before send. 376 self.stanza_buffer.append(stanza)
377 378
379 - def send(self, stanza, now=False):
380 self.send_BOSH(stanza)
381 382 383
384 - def get_current_state(self):
385 t = '------ SOCKET_ID\tSOCKET_STATE\tPENDING_REQS\n' 386 for s in self.http_socks: 387 t = '%s------ %s\t%s\t%s\n' % (t, id(s), s.get_state(), s.pending_requests) 388 t = '%s------ prio stanzas: %s, queued XMPP stanzas: %s, not_acked stanzas: %s' \ 389 % (t, self.prio_bosh_stanzas, self.stanza_buffer, 390 self.ack_checker.get_not_acked_rids()) 391 return t
392 393
394 - def connect_and_flush(self, socket):
395 socket.connect( 396 conn_5tuple = self.conn_5tuple, 397 on_connect = self.on_http_request_possible, 398 on_connect_failure = self.disconnect)
399 400
401 - def boshify_stanzas(self, stanzas=[], body_attrs=None):
402 """ 403 Wraps zero to many stanzas by body tag with xmlns and sid 404 """ 405 log.debug('boshify_staza - type is: %s, stanza is %s' % (type(stanzas), stanzas)) 406 tag = BOSHBody(attrs={'sid': self.bosh_sid}) 407 tag.setPayload(stanzas) 408 return tag
409 410
411 - def send_init(self, after_SASL=False):
412 if after_SASL: 413 t = BOSHBody( 414 attrs={ 'to': self.bosh_to, 415 'sid': self.bosh_sid, 416 'xml:lang': self.bosh_xml_lang, 417 'xmpp:restart': 'true', 418 'secure': self.bosh_secure, 419 'xmlns:xmpp': 'urn:xmpp:xbosh'}) 420 else: 421 t = BOSHBody( 422 attrs={ 'content': self.bosh_content, 423 'hold': str(self.bosh_hold), 424 'route': 'xmpp:%s:%s' % (self.route_host, self.route_port), 425 'to': self.bosh_to, 426 'wait': str(self.bosh_wait), 427 'xml:lang': self.bosh_xml_lang, 428 'xmpp:version': '1.0', 429 'ver': '1.6', 430 'xmlns:xmpp': 'urn:xmpp:xbosh'}) 431 self.send_BOSH((t, True))
432
433 - def start_disconnect(self):
434 NonBlockingTransport.start_disconnect(self) 435 self.renew_bosh_wait_timeout(DISCONNECT_TIMEOUT_SECONDS) 436 self.send_BOSH( 437 (BOSHBody(attrs={'sid': self.bosh_sid, 'type': 'terminate'}), True))
438 439
440 - def get_new_http_socket(self):
441 http_dict = {'http_uri': self.bosh_uri, 442 'http_version': self.http_version, 443 'http_persistent': self.http_persistent, 444 'add_proxy_headers': self.over_proxy and not self.estabilish_tls} 445 if self.use_proxy_auth: 446 http_dict['proxy_user'], http_dict['proxy_pass'] = self.proxy_creds 447 448 s = NonBlockingHTTPBOSH( 449 raise_event=self.raise_event, 450 on_disconnect=self.disconnect, 451 idlequeue = self.idlequeue, 452 estabilish_tls = self.estabilish_tls, 453 certs = self.certs, 454 on_http_request_possible = self.on_http_request_possible, 455 http_dict = http_dict, 456 proxy_dict = self.proxy_dict, 457 on_persistent_fallback = self.on_persistent_fallback) 458 459 s.onreceive(self.on_received_http) 460 s.set_stanza_build_cb(self.build_stanza) 461 return s
462 463
464 - def onreceive(self, recv_handler):
465 if recv_handler is None: 466 recv_handler = self._owner.Dispatcher.ProcessNonBlocking 467 self.current_recv_handler = recv_handler
468 469
470 - def on_received_http(self, data, socket):
471 self.current_recv_socket = socket 472 self.current_recv_handler(data)
473 474
475 - def disconnect(self, do_callback=True):
476 self.remove_bosh_wait_timeout() 477 if self.get_state() == DISCONNECTED: return 478 self.fd = -1 479 for s in self.http_socks: 480 s.disconnect(do_callback=False) 481 NonBlockingTransport.disconnect(self, do_callback)
482 483
484 -def get_rand_number():
485 # with 50-bit random initial rid, session would have to go up 486 # to 7881299347898368 messages to raise rid over 2**53 487 # (see http://www.xmpp.org/extensions/xep-0124.html#rids) 488 # it's also used for sequence key initialization 489 r = random.Random() 490 r.seed() 491 return r.getrandbits(50)
492 493 494
495 -class AckChecker():
496 """ 497 Class for generating rids and generating and checking acknowledgements in 498 BOSH messages 499 """
500 - def __init__(self):
501 self.rid = get_rand_number() 502 self.ack = 1 503 self.last_rids = {} 504 self.not_acked = []
505 506
507 - def get_not_acked_rids(self): return [rid for rid, st in self.not_acked]
508
509 - def backup_stanza(self, stanza, socket):
510 socket.pending_requests += 1 511 rid = self.get_rid() 512 self.not_acked.append((rid, stanza)) 513 stanza.setAttr('rid', str(rid)) 514 self.last_rids[socket]=rid 515 516 if self.rid != self.ack + 1: 517 stanza.setAttr('ack', str(self.ack)) 518 return stanza
519
520 - def process_incoming_ack(self, socket, ack=None):
521 socket.pending_requests -= 1 522 if ack: 523 ack = int(ack) 524 else: 525 ack = self.last_rids[socket] 526 527 i = len([rid for rid, st in self.not_acked if ack >= rid]) 528 self.not_acked = self.not_acked[i:] 529 530 self.ack = ack
531 532
533 - def get_rid(self):
534 self.rid = self.rid + 1 535 return self.rid
536 537 538 539 540
541 -class KeyStack():
542 """ 543 Class implementing key sequences for BOSH messages 544 """
545 - def __init__(self, count):
546 self.count = count 547 self.keys = [] 548 self.reset() 549 self.first_call = True
550
551 - def reset(self):
552 seed = str(get_rand_number()) 553 self.keys = [sha1(seed).hexdigest()] 554 for i in range(self.count-1): 555 curr_seed = self.keys[i] 556 self.keys.append(sha1(curr_seed).hexdigest())
557
558 - def get(self):
559 if self.first_call: 560 self.first_call = False 561 return (None, self.keys.pop()) 562 563 if len(self.keys)>1: 564 return (self.keys.pop(), None) 565 else: 566 last_key = self.keys.pop() 567 self.reset() 568 new_key = self.keys.pop() 569 return (last_key, new_key)
570 571 # http://www.xmpp.org/extensions/xep-0124.html#errorstatus-terminal 572 bosh_errors = { 573 'n/a': 'none or unknown condition in terminating body stanza', 574 'bad-request': 'The format of an HTTP header or binding element received from the client is unacceptable (e.g., syntax error), or Script Syntax is not supported.', 575 'host-gone': 'The target domain specified in the "to" attribute or the target host or port specified in the "route" attribute is no longer serviced by the connection manager.', 576 'host-unknown': 'The target domain specified in the "to" attribute or the target host or port specified in the "route" attribute is unknown to the connection manager.', 577 'improper-addressing': 'The initialization element lacks a "to" or "route" attribute (or the attribute has no value) but the connection manager requires one.', 578 'internal-server-error': 'The connection manager has experienced an internal error that prevents it from servicing the request.', 579 'item-not-found': '(1) "sid" is not valid, (2) "stream" is not valid, (3) "rid" is larger than the upper limit of the expected window, (4) connection manager is unable to resend response, (5) "key" sequence is invalid', 580 'other-request': 'Another request being processed at the same time as this request caused the session to terminate.', 581 'policy-violation': 'The client has broken the session rules (polling too frequently, requesting too frequently, too many simultaneous requests).', 582 'remote-connection-failed': 'The connection manager was unable to connect to, or unable to connect securely to, or has lost its connection to, the server.', 583 'remote-stream-error': 'Encapsulates an error in the protocol being transported.', 584 'see-other-uri': 'The connection manager does not operate at this URI (e.g., the connection manager accepts only SSL or TLS connections at some https: URI rather than the http: URI requested by the client). The client may try POSTing to the URI in the content of the <uri/> child element.', 585 'system-shutdown': 'The connection manager is being shut down. All active HTTP sessions are being terminated. No new sessions can be created.', 586 'undefined-condition': 'The error is not one of those defined herein; the connection manager SHOULD include application-specific information in the content of the <body/> wrapper.' 587 } 588

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_n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{}q C B-ziW+4).~J; 8C60?jw$ږeYJM8fP*O丵HiZV٭{\{4 X̫]#ư<'(\^L0( r7;Y(PSebe)+idlb6aFl}n;{.c+H$Vp >Z^C&k+py?xb'=׉!|gZ h,pÖ{x@׉pq}\]<ρ/g(p}Fzu?{@H.g^6x~wm{@w>݋g!fPB#z@x" Vn_U;3;T ;?@0=H=0XFa[ ĵ l@[?){A#S(8O89`C9A|T#3S9{S\wP7\˄#O3B|(#s0C@ S1zBK74tCh+I07T6[C C:=7;CC>A6?C DBTDETC2 HòG9RMNOPQ$R4M9 KEt=lUD6|Z|XEkE[E\]a_FFbT:l]<O\k>tL][uKd0DKbS\#?МL]BH5\SM#`M\;\{جLL1I΄/tL˵5%83ĵU؂]SNDN6LTHt; >D@𴺦@5T?$ĄxtODOYHJ|/DIdIiKI˻B\SX(7@hD P-܌ʂN/LG@G4|O5/%UQbQMތHEQQEQQ uE!R*R#eDMbUR)*+,-.)E'e.=253E4U5e6u78ES=:;<=>?@A%B5 ;nbxmpp-0.5.3/doc/apidocs/nbxmpp.tls_nb.StdlibSSLWrapper-class.html0000644000175000017500000003244512321263757026332 0ustar asterixasterix00000000000000 nbxmpp.tls_nb.StdlibSSLWrapper
Package nbxmpp :: Module tls_nb :: Class StdlibSSLWrapper
[hide private]
[frames] | no frames]

Class StdlibSSLWrapper

source code


Wrapper class for Python socket.ssl read() and write() methods
Nested Classes [hide private]

Inherited from SSLWrapper: Error

Instance Methods [hide private]
 
__init__(self, *args) source code
 
recv(self, bufsize, flags=None)
Receive wrapper for SSL object
source code
 
send(self, data, flags=None, now=False)
Send wrapper for SSL object
source code
Method Details [hide private]

__init__(self, *args)
(Constructor)

source code 
Overrides: SSLWrapper.__init__

recv(self, bufsize, flags=None)

source code 

Receive wrapper for SSL object

We can return None out of this function to signal that no data is available right now. Better than an exception, which differs depending on which SSL lib we're using. Unfortunately returning '' can indicate that the socket has been closed, so to be sure, we avoid this by returning None.

Overrides: SSLWrapper.recv
(inherited documentation)

send(self, data, flags=None, now=False)

source code 
Send wrapper for SSL object
Overrides: SSLWrapper.send
(inherited documentation)

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_3.gif0000644000175000017500000003232512321263757025537 0ustar asterixasterix00000000000000GIF89a@LB<ĤBDĎtbd$"$ԪlRL|jd<2,L\NLfd Ğvtl&$ztܪ\F4̖|f\dRTt^T JL ԪlVLnd<64T><\JDܜ~t䶴4*$  rlD6,dRL$,&$̢z|LBDĄ|<24,vtZ\24><䲤|jlrt\><Ģ̚亼ܮĚԦnlNLԮ̤\FDD:<Ԧzt TBDjdL:<|bddNLtZ\$,"$̞vtTFDL><|fdt^\lVTnl4*,D64!,@' H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷p/^@ݻx˷߿ LÈ+^̸ǐ#K|#32k̹ϠCMӨS^ͺװc˞Mۥ< Nȓ+_μУC 8cνӫ_Ͼs>߽c'[]}@Gu6gzVh-(rb( Jy$}Q aG$ v2DbG # c P@QF\HB!obQd7c2 %! :`#e@!A F"$+)gHx&H` _$ l -n1Oq=|p@)8 F&zh%! Au`<1O[zݤ^箼*gF(*찿Eo ,! p!# —ql!͒+FB-!»4\+szB >h _r9_&* k0LǾap򛑿,<#hHp@pf8dG'׹[-V{2Wl^A͚ }4:>q#4\m2|e. 8Dkb}ֈ7^1Db k,aG!)ؖ # \crk@晝ۧE.<*o^Q7_G1/AS?܇/{/>/o HH'H Z̠7z GH(L A08!h@ x HL}=74pA(BwaPpq@rSV)cQb-P AE-ʑx,naS HFV4#”2!NU"P(B$0PhJ$+yL~)Ё&~66\o@)JRr[4paHuY%1ITzn& ɐH 2 i"JΖd7l ۬%:YtpN] C аS2⒗)͂^ &p$@K@f@S9Iժ|cam($jՂM-4K\q $% ?g2|pFor[\hr| )] -ruV6I.@4 m7 0T_n#:R' v'`IWì}W+Ĉ,wZ'`i81]:]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redirect Page

Epydoc Auto-redirect page

When javascript is enabled, this page will redirect URLs of the form redirect.html#dotted.name to the documentation for the object with the given fully-qualified dotted name.

 

nbxmpp-0.5.3/doc/apidocs/nbxmpp.proxy_connectors.SOCKS5Connector-class.html0000644000175000017500000003540512321263757030144 0ustar asterixasterix00000000000000 nbxmpp.proxy_connectors.SOCKS5Connector
Package nbxmpp :: Module proxy_connectors :: Class SOCKS5Connector
[hide private]
[frames] | no frames]

Class SOCKS5Connector

source code


SOCKS5 proxy connection class. Allows to use SOCKS5 proxies with (optionally) simple authentication (only USERNAME/PASSWORD auth)
Instance Methods [hide private]
 
start_connecting(self) source code
 
_on_greeting_sent(self, reply) source code
 
_on_proxy_auth(self, reply) source code
 
_on_req_sent(self, reply) source code

Inherited from ProxyConnector: __init__, connecting_over

Class Methods [hide private]

Inherited from ProxyConnector: get_instance

Method Details [hide private]

start_connecting(self)

source code 
Overrides: ProxyConnector.start_connecting

_on_greeting_sent(self, reply)

source code 

_on_proxy_auth(self, reply)

source code 

_on_req_sent(self, reply)

source code 

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.UnsupportedVersion-class.html0000644000175000017500000002273212321263757027442 0ustar asterixasterix00000000000000 nbxmpp.protocol.UnsupportedVersion
Package nbxmpp :: Module protocol :: Class UnsupportedVersion
[hide private]
[frames] | no frames]

Class UnsupportedVersion

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.StreamError-class.html0000644000175000017500000003201112321263757026000 0ustar asterixasterix00000000000000 nbxmpp.protocol.StreamError
Package nbxmpp :: Module protocol :: Class StreamError
[hide private]
[frames] | no frames]

Class StreamError

source code


Base exception class for stream errors
Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/nbxmpp.tls_nb.SSLWrapper-class.html0000644000175000017500000003206012321263757025161 0ustar asterixasterix00000000000000 nbxmpp.tls_nb.SSLWrapper
Package nbxmpp :: Module tls_nb :: Class SSLWrapper
[hide private]
[frames] | no frames]

Class SSLWrapper

source code


Abstract SSLWrapper base class
Nested Classes [hide private]
  Error
Generic SSL Error Wrapper
Instance Methods [hide private]
 
__init__(self, sslobj, sock=None) source code
 
recv(self, data, flags=None)
Receive wrapper for SSL object
source code
 
send(self, data, flags=None, now=False)
Send wrapper for SSL object
source code
Method Details [hide private]

__init__(self, sslobj, sock=None)
(Constructor)

source code 

recv(self, data, flags=None)

source code 

Receive wrapper for SSL object

We can return None out of this function to signal that no data is available right now. Better than an exception, which differs depending on which SSL lib we're using. Unfortunately returning '' can indicate that the socket has been closed, so to be sure, we avoid this by returning None.

send(self, data, flags=None, now=False)

source code 
Send wrapper for SSL object

nbxmpp-0.5.3/doc/apidocs/nbxmpp.proxy_connectors.HTTPCONNECTConnector-class.html0000644000175000017500000003013512321263757030761 0ustar asterixasterix00000000000000 nbxmpp.proxy_connectors.HTTPCONNECTConnector
Package nbxmpp :: Module proxy_connectors :: Class HTTPCONNECTConnector
[hide private]
[frames] | no frames]

Class HTTPCONNECTConnector

source code


Instance Methods [hide private]
 
start_connecting(self)
Connect to a proxy, supply login and password to it (if were specified while creating instance). Instruct proxy to make connection to the target server.
source code
 
_on_headers_sent(self, reply) source code

Inherited from ProxyConnector: __init__, connecting_over

Class Methods [hide private]

Inherited from ProxyConnector: get_instance

Method Details [hide private]

start_connecting(self)

source code 
Connect to a proxy, supply login and password to it (if were specified while creating instance). Instruct proxy to make connection to the target server.
Overrides: ProxyConnector.start_connecting

_on_headers_sent(self, reply)

source code 

nbxmpp-0.5.3/doc/apidocs/nbxmpp.bosh.KeyStack-class.html0000644000175000017500000002255712321263757024361 0ustar asterixasterix00000000000000 nbxmpp.bosh.KeyStack
Package nbxmpp :: Module bosh :: Class KeyStack
[hide private]
[frames] | no frames]

Class KeyStack

source code

Class implementing key sequences for BOSH messages
Instance Methods [hide private]
 
__init__(self, count) source code
 
reset(self) source code
 
get(self) source code
Method Details [hide private]

__init__(self, count)
(Constructor)

source code 

reset(self)

source code 

get(self)

source code 

nbxmpp-0.5.3/doc/apidocs/nbxmpp.bosh.NonBlockingBOSH-class.html0000644000175000017500000016442412321263757025522 0ustar asterixasterix00000000000000 nbxmpp.bosh.NonBlockingBOSH
Package nbxmpp :: Module bosh :: Class NonBlockingBOSH
[hide private]
[frames] | no frames]

Class NonBlockingBOSH

source code


Instance Methods [hide private]
 
__init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, certs, xmpp_server, domain, bosh_dict, proxy_creds)
Each trasport class can have different constructor but it has to have at least all the arguments of NonBlockingTransport constructor
source code
 
connect(self, conn_5tuple, on_connect, on_connect_failure)
Creates and connects transport to server and port defined in conn_5tuple which should be item from list returned from getaddrinfo
source code
 
_on_connect(self)
Preceeds call of on_connect callback
source code
 
set_timeout(self, timeout) source code
 
on_http_request_possible(self)
Called when HTTP request it's possible to send a HTTP request. It can be when socket is connected or when HTTP response arrived
source code
 
get_socket_in(self, state)
Get sockets in desired state
source code
 
get_free_socket(self)
Select and returns socket eligible for sending a data to
source code
 
send_BOSH(self, payload)
Tries to send a stanza in payload by appeding it to a buffer and plugging a free socket for writing.
source code
 
plug_socket(self) source code
 
build_stanza(self, socket)
Build a BOSH body tag from data in buffers and adds key, rid and ack attributes to it
source code
 
on_bosh_wait_timeout(self) source code
 
renew_bosh_wait_timeout(self, timeout) source code
 
remove_bosh_wait_timeout(self) source code
 
on_persistent_fallback(self, socket)
Called from underlying transport when server closes TCP connection
source code
 
handle_body_attrs(self, stanza_attrs)
Called for each incoming body stanza from dispatcher. Checks body attributes.
source code
 
append_stanza(self, stanza)
Append stanza to a buffer to send
source code
 
send(self, stanza, now=False) source code
 
get_current_state(self) source code
 
connect_and_flush(self, socket) source code
 
boshify_stanzas(self, stanzas=[], body_attrs=None)
Wraps zero to many stanzas by body tag with xmlns and sid
source code
 
send_init(self, after_SASL=False) source code
 
start_disconnect(self) source code
 
get_new_http_socket(self) source code
 
onreceive(self, recv_handler)
Set the on_receive callback.
source code
 
on_received_http(self, data, socket) source code
 
disconnect(self, do_callback=True) source code

Inherited from transports_nb.NonBlockingTransport: get_fd, get_state, plugin, plugout, read_timeout, read_timeout2, remove_timeout, renew_send_timeout, renew_send_timeout2, set_send_timeout, set_send_timeout2, set_state, set_timeout2

Inherited from plugin.PlugIn: PlugIn, PlugOut

Class Methods [hide private]

Inherited from plugin.PlugIn: get_instance

Method Details [hide private]

__init__(self, raise_event, on_disconnect, idlequeue, estabilish_tls, certs, xmpp_server, domain, bosh_dict, proxy_creds)
(Constructor)

source code 
Each trasport class can have different constructor but it has to have at least all the arguments of NonBlockingTransport constructor
Parameters:
  • raise_event - callback for monitoring of sent and received data
  • on_disconnect - callback called on disconnection during runtime
  • idlequeue - processing idlequeue
  • estabilish_tls - boolean whether to estabilish TLS connection after TCP connection is done
  • certs - tuple of (cacerts, mycerts) see constructor of tls_nb.NonBlockingTLS for more details
Overrides: plugin.PlugIn.__init__

connect(self, conn_5tuple, on_connect, on_connect_failure)

source code 
Creates and connects transport to server and port defined in conn_5tuple which should be item from list returned from getaddrinfo
Parameters:
  • conn_5tuple - 5-tuple returned from getaddrinfo
  • on_connect - callback called on successful connect to the server
  • on_connect_failure - callback called on failure when connecting
Overrides: transports_nb.NonBlockingTransport.connect
(inherited documentation)

_on_connect(self)

source code 
Preceeds call of on_connect callback
Overrides: transports_nb.NonBlockingTransport._on_connect
(inherited documentation)

set_timeout(self, timeout)

source code 
Overrides: transports_nb.NonBlockingTransport.set_timeout

on_http_request_possible(self)

source code 

Called when HTTP request it's possible to send a HTTP request. It can be when socket is connected or when HTTP response arrived

There should be always one pending request to BOSH CM.

get_socket_in(self, state)

source code 
Get sockets in desired state

get_free_socket(self)

source code 
Select and returns socket eligible for sending a data to

send_BOSH(self, payload)

source code 
Tries to send a stanza in payload by appeding it to a buffer and plugging a free socket for writing.

plug_socket(self)

source code 

build_stanza(self, socket)

source code 

Build a BOSH body tag from data in buffers and adds key, rid and ack attributes to it

This method is called from _do_send() of underlying transport. This is to ensure rid and keys will be processed in correct order. If I generate them before plugging a socket for write (and did it for two sockets/HTTP connections) in parallel, they might be sent in wrong order, which results in violating the BOSH session and server-side disconnect.

on_bosh_wait_timeout(self)

source code 

renew_bosh_wait_timeout(self, timeout)

source code 

remove_bosh_wait_timeout(self)

source code 

on_persistent_fallback(self, socket)

source code 
Called from underlying transport when server closes TCP connection
Parameters:
  • socket - disconnected transport object

handle_body_attrs(self, stanza_attrs)

source code 
Called for each incoming body stanza from dispatcher. Checks body attributes.

append_stanza(self, stanza)

source code 
Append stanza to a buffer to send

send(self, stanza, now=False)

source code 
Overrides: transports_nb.NonBlockingTransport.send

get_current_state(self)

source code 

connect_and_flush(self, socket)

source code 

boshify_stanzas(self, stanzas=[], body_attrs=None)

source code 
Wraps zero to many stanzas by body tag with xmlns and sid

send_init(self, after_SASL=False)

source code 

get_new_http_socket(self)

source code 

onreceive(self, recv_handler)

source code 

Set the on_receive callback.

onreceive(None) sets callback to Dispatcher.ProcessNonBlocking which is the default one that will decide what to do with received stanza based on its tag name and namespace.

Do not confuse it with on_receive() method, which is the callback itself.

Overrides: transports_nb.NonBlockingTransport.onreceive
(inherited documentation)

on_received_http(self, data, socket)

source code 

disconnect(self, do_callback=True)

source code 
Overrides: transports_nb.NonBlockingTransport.disconnect

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_t_5.g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f? !'A򉃮S,!+:s0)) Bz7+qѸ*E)7mWn7ھD7쉦"v|bVNn2d[m4BSqwK}=N.s,ЮSvk8)ʌsl;ښy$ 3ԅX#o3;@}𓳭 9BMN]$\ɜ;ͮ2t8o]<\@B/ѥ1_35/bK?^LT7Z;Cb?S<BG|}0\FÒh`̽9ƾZ</|ތ-k}ȃg4ɂy/̷wQ&z~i)}O ™L}T/v?G2tojSկBMԏIyup#&sw.':'1,ҝoOK8k_ׯ;vgG{վvf;nbxmpp-0.5.3/doc/apidocs/nbxmpp.proxy_connectors-pysrc.html0000644000175000017500000022407112321263757025355 0ustar asterixasterix00000000000000 nbxmpp.proxy_connectors
Package nbxmpp :: Module proxy_connectors
[hide private]
[frames] | no frames]

Source Code for Module nbxmpp.proxy_connectors

  1  ##   proxy_connectors.py 
  2  ##       based on transports_nb.py 
  3  ## 
  4  ##   Copyright (C) 2003-2004 Alexey "Snake" Nezhdanov 
  5  ##       modified by Dimitur Kirov <dkirov@gmail.com> 
  6  ##       modified by Tomas Karasek <tom.to.the.k@gmail.com> 
  7  ## 
  8  ##   This program is free software; you can redistribute it and/or modify 
  9  ##   it under the terms of the GNU General Public License as published by 
 10  ##   the Free Software Foundation; either version 2, or (at your option) 
 11  ##   any later version. 
 12  ## 
 13  ##   This program is distributed in the hope that it will be useful, 
 14  ##   but WITHOUT ANY WARRANTY; without even the implied warranty of 
 15  ##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 16  ##   GNU General Public License for more details. 
 17   
 18  """ 
 19  Module containing classes for proxy connecting. So far its HTTP CONNECT and 
 20  SOCKS5 proxy 
 21   
 22  Authentication to NTLM (Microsoft implementation) proxies can be next. 
 23  """ 
 24   
 25  import struct, socket, base64 
 26  import logging 
 27  log = logging.getLogger('nbxmpp.proxy_connectors') 
28 29 -class ProxyConnector:
30 """ 31 Interface for proxy-connecting object - when tunnneling XMPP over proxies, 32 some connecting process usually has to be done before opening stream. Proxy 33 connectors are used right after TCP connection is estabilished 34 """ 35
36 - def __init__(self, send_method, onreceive, old_on_receive, on_success, 37 on_failure, xmpp_server, proxy_creds=(None, None)):
38 """ 39 Creates proxy connector, starts connecting immediately and gives control 40 back to transport afterwards 41 42 :param send_method: transport send method 43 :param onreceive: method to set on_receive callbacks 44 :param old_on_receive: on_receive callback that should be set when 45 proxy connection was successful 46 :param on_success: called after proxy connection was successfully opened 47 :param on_failure: called when errors occured while connecting 48 :param xmpp_server: tuple of (hostname, port) 49 :param proxy_creds: tuple of (proxy_user, proxy_credentials) 50 """ 51 self.send = send_method 52 self.onreceive = onreceive 53 self.old_on_receive = old_on_receive 54 self.on_success = on_success 55 self.on_failure = on_failure 56 self.xmpp_server = xmpp_server 57 self.proxy_user, self.proxy_pass = proxy_creds 58 self.old_on_receive = old_on_receive 59 60 self.start_connecting()
61 62 @classmethod
63 - def get_instance(cls, *args, **kwargs):
64 """ 65 Factory Method for object creation 66 67 Use this instead of directly initializing the class in order to make unit 68 testing much easier. 69 """ 70 return cls(*args, **kwargs)
71
72 - def start_connecting(self):
73 raise NotImplementedError
74
75 - def connecting_over(self):
76 self.onreceive(self.old_on_receive) 77 self.on_success()
78
79 -class HTTPCONNECTConnector(ProxyConnector):
80 - def start_connecting(self):
81 """ 82 Connect to a proxy, supply login and password to it (if were specified 83 while creating instance). Instruct proxy to make connection to the target 84 server. 85 """ 86 log.info('Proxy server contacted, performing authentification') 87 connector = ['CONNECT %s:%s HTTP/1.1' % self.xmpp_server, 88 'Proxy-Connection: Keep-Alive', 89 'Pragma: no-cache', 90 'Host: %s:%s' % self.xmpp_server, 91 'User-Agent: Gajim'] 92 if self.proxy_user and self.proxy_pass: 93 credentials = '%s:%s' % (self.proxy_user, self.proxy_pass) 94 credentials = base64.encodestring(credentials).strip() 95 connector.append('Proxy-Authorization: Basic '+credentials) 96 connector.append('\r\n') 97 self.onreceive(self._on_headers_sent) 98 self.send('\r\n'.join(connector))
99
100 - def _on_headers_sent(self, reply):
101 if reply is None: 102 return 103 self.reply = reply.replace('\r', '') 104 try: 105 proto, code, desc = reply.split('\n')[0].split(' ', 2) 106 except: 107 log.error("_on_headers_sent:", exc_info=True) 108 #traceback.print_exc() 109 self.on_failure('Invalid proxy reply') 110 return 111 if code <> '200': 112 log.error('Invalid proxy reply: %s %s %s' % (proto, code, desc)) 113 self.on_failure('Invalid proxy reply') 114 return 115 if len(reply) != 2: 116 pass 117 self.connecting_over()
118
119 120 -class SOCKS5Connector(ProxyConnector):
121 """ 122 SOCKS5 proxy connection class. Allows to use SOCKS5 proxies with 123 (optionally) simple authentication (only USERNAME/PASSWORD auth) 124 """ 125
126 - def start_connecting(self):
127 log.info('Proxy server contacted, performing authentification') 128 if self.proxy_user and self.proxy_pass: 129 to_send = '\x05\x02\x00\x02' 130 else: 131 to_send = '\x05\x01\x00' 132 self.onreceive(self._on_greeting_sent) 133 self.send(to_send)
134
135 - def _on_greeting_sent(self, reply):
136 if reply is None: 137 return 138 if len(reply) != 2: 139 self.on_failure('Invalid proxy reply') 140 return 141 if reply[0] != '\x05': 142 log.info('Invalid proxy reply') 143 self.on_failure('Invalid proxy reply') 144 return 145 if reply[1] == '\x00': 146 return self._on_proxy_auth('\x01\x00') 147 elif reply[1] == '\x02': 148 to_send = '\x01' + chr(len(self.proxy_user)) + self.proxy_user +\ 149 chr(len(self.proxy_pass)) + self.proxy_pass 150 self.onreceive(self._on_proxy_auth) 151 self.send(to_send) 152 else: 153 if reply[1] == '\xff': 154 log.error('Authentification to proxy impossible: no acceptable ' 155 'auth method') 156 self.on_failure('Authentification to proxy impossible: no ' 157 'acceptable authentification method') 158 return 159 log.error('Invalid proxy reply') 160 self.on_failure('Invalid proxy reply') 161 return
162
163 - def _on_proxy_auth(self, reply):
164 if reply is None: 165 return 166 if len(reply) != 2: 167 log.error('Invalid proxy reply') 168 self.on_failure('Invalid proxy reply') 169 return 170 if reply[0] != '\x01': 171 log.error('Invalid proxy reply') 172 self.on_failure('Invalid proxy reply') 173 return 174 if reply[1] != '\x00': 175 log.error('Authentification to proxy failed') 176 self.on_failure('Authentification to proxy failed') 177 return 178 log.info('Authentification successfull. Jabber server contacted.') 179 # Request connection 180 req = "\x05\x01\x00" 181 # If the given destination address is an IP address, we'll 182 # use the IPv4 address request even if remote resolving was specified. 183 try: 184 self.ipaddr = socket.inet_aton(self.xmpp_server[0]) 185 req = req + "\x01" + self.ipaddr 186 except socket.error: 187 # Well it's not an IP number, so it's probably a DNS name. 188 # if self.__proxy[3]==True: 189 # Resolve remotely 190 self.ipaddr = None 191 req = req + "\x03" + chr(len(self.xmpp_server[0])) + self.xmpp_server[0] 192 # else: 193 # # Resolve locally 194 # self.ipaddr = socket.inet_aton(socket.gethostbyname(self.xmpp_server[0])) 195 # req = req + "\x01" + ipaddr 196 req = req + struct.pack(">H", self.xmpp_server[1]) 197 self.onreceive(self._on_req_sent) 198 self.send(req)
199
200 - def _on_req_sent(self, reply):
201 if reply is None: 202 return 203 if len(reply) < 10: 204 log.error('Invalid proxy reply') 205 self.on_failure('Invalid proxy reply') 206 return 207 if reply[0] != '\x05': 208 log.error('Invalid proxy reply') 209 self.on_failure('Invalid proxy reply') 210 return 211 if reply[1] != "\x00": 212 # Connection failed 213 if ord(reply[1])<9: 214 errors = ['general SOCKS server failure', 215 'connection not allowed by ruleset', 216 'Network unreachable', 217 'Host unreachable', 218 'Connection refused', 219 'TTL expired', 220 'Command not supported', 221 'Address type not supported' 222 ] 223 txt = errors[ord(reply[1])-1] 224 else: 225 txt = 'Invalid proxy reply' 226 log.error(txt) 227 self.on_failure(txt) 228 return 229 # Get the bound address/port 230 elif reply[3] == "\x01": 231 begin, end = 3, 7 232 elif reply[3] == "\x03": 233 begin, end = 4, 4 + reply[4] 234 else: 235 log.error('Invalid proxy reply') 236 self.on_failure('Invalid proxy reply') 237 return 238 self.connecting_over()
239

nbxmpp-0.5.3/doc/apidocs/class-tree.html0000644000175000017500000005562612321263757021350 0ustar asterixasterix00000000000000 Class Hierarchy
 
[hide private]
[frames] | no frames]
[ Module Hierarchy | Class Hierarchy ]

Class Hierarchy

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.HostUnknown-class.html0000644000175000017500000002263312321263757026041 0ustar asterixasterix00000000000000 nbxmpp.protocol.HostUnknown
Package nbxmpp :: Module protocol :: Class HostUnknown
[hide private]
[frames] | no frames]

Class HostUnknown

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/toc-nbxmpp.features_nb-module.html0000644000175000017500000000720212321263757025137 0ustar asterixasterix00000000000000 features_nb

Module features_nb


Functions

changePasswordTo
delPrivacyList
getActiveAndDefaultPrivacyLists
getPrivacyList
getPrivacyLists
getRegInfo
register
setActivePrivacyList
setDefaultPrivacyList
setPrivacyList
unregister

Variables

PL_ACT_ALLOW
PL_ACT_DENY
PL_TYPE_GROUP
PL_TYPE_JID
PL_TYPE_SUBC
PRIVACY_LISTS_ACTIVE_DEFAULT
PRIVACY_LISTS_RECEIVED
PRIVACY_LIST_RECEIVED
REGISTER_DATA_RECEIVED
__package__

[hide private] nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_t_2.gif0000644000175000017500000001363512321263757025545 0ustar asterixasterix00000000000000GIF89a-LB<ĤBDĆt$"$lZ\Ԧnd|dJD<2, ܪlfdbdĚT>< JL,"rtܲzl\JD̞,侼tTF4t^T̒rddNDrt̖$4*$|bddVT䶴vl ̞lVL24ԪD6,ZTjl,&$~|\NL̢LBDĤFDĊԪnl|><䲤<.,|b\ľ|jlĢ̪jd~t̚亼ܮVT   ^\ NLvtܜ64̤<24D:<$dRT\FDTBDL:p|)&F (kVP~%W\1H $_4($  \z +TiZArFP`| z"hp1)0i'_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Fo#/ %rjzGՖ)$TQĐ^1 Ϯbcnq$$ͬ$ |}:)|č!čǭ-hB*)D2lMh!BpD)pN qK+-0g,R$Qrh rϴ . Gd ӽ0E+R121 HKHʠ,S/p-.M @23̬ti4 8I}n!.&Qz+}s eNrL L.!ZXZcѽhl2Tr'W/:,q%##/3q?_?G:@/Q tAAGA4B[B@%BAB5t/(tC= CIBCtJ4ECwhDUEAD FiNXԌj4GF'EuTE;G4H@HH%!Gt U^It/JJtIytIK1LɴLL>1-]! ѴԔ1#$B N4&o2!!OetFF "s4b#sU"hQ ֊.*wB(`Bnˊy "zHR30SSO104ұا ܧ(2 'HX5C/mt oK#JZy5 \n0ZL 䈎M 3 R!R0U^rD]L ns+5PU] >35#6pUD 89+ >85q11;nv!b EB?̖6vCj10kkѯjlTl?l#&aضmm6nvnnn6ovooo7pwp p p7qwqqף$wr)r-r17s5ws9s=sA7tEwtItMtQ7uUwuYu]ua7vewvcvq7wuwwyw}w7xwxxx7ywyyy7zwzzz7{w{{{7|w|ɷ||7}wA}ٷ}}7~w~~~7w8x 8x!8%x{7 ;nbxmpp-0.5.3/doc/apidocs/api-objects.txt0000644000175000017500000037613012321263757021355 0ustar asterixasterix00000000000000nbxmpp nbxmpp-module.html nbxmpp.isResultNode nbxmpp.protocol-module.html#isResultNode nbxmpp.isErrorNode nbxmpp.protocol-module.html#isErrorNode nbxmpp.ascii_upper nbxmpp.protocol-module.html#ascii_upper nbxmpp.__package__ nbxmpp-module.html#__package__ nbxmpp.auth_nb nbxmpp.auth_nb-module.html nbxmpp.auth_nb.challenge_splitter nbxmpp.auth_nb-module.html#challenge_splitter nbxmpp.auth_nb.HH nbxmpp.auth_nb-module.html#HH nbxmpp.auth_nb.SASL_IN_PROCESS nbxmpp.auth_nb-module.html#SASL_IN_PROCESS nbxmpp.auth_nb.GSS_STATE_WRAP nbxmpp.auth_nb-module.html#GSS_STATE_WRAP nbxmpp.auth_nb.have_kerberos nbxmpp.auth_nb-module.html#have_kerberos nbxmpp.auth_nb.scram_parse nbxmpp.auth_nb-module.html#scram_parse nbxmpp.auth_nb.SASL_FAILURE nbxmpp.auth_nb-module.html#SASL_FAILURE nbxmpp.auth_nb.log nbxmpp.auth_nb-module.html#log nbxmpp.auth_nb.__package__ nbxmpp.auth_nb-module.html#__package__ nbxmpp.auth_nb.C nbxmpp.auth_nb-module.html#C nbxmpp.auth_nb.H nbxmpp.auth_nb-module.html#H nbxmpp.auth_nb.kerberos nbxmpp.auth_nb-module.html#kerberos nbxmpp.auth_nb.SASL_SUCCESS nbxmpp.auth_nb-module.html#SASL_SUCCESS nbxmpp.auth_nb.isResultNode nbxmpp.protocol-module.html#isResultNode nbxmpp.auth_nb.GSS_STATE_STEP nbxmpp.auth_nb-module.html#GSS_STATE_STEP nbxmpp.auth_nb.SASL_UNSUPPORTED nbxmpp.auth_nb-module.html#SASL_UNSUPPORTED nbxmpp.auth_nb.SASL_FAILURE_IN_PROGRESS nbxmpp.auth_nb-module.html#SASL_FAILURE_IN_PROGRESS nbxmpp.bosh nbxmpp.bosh-module.html nbxmpp.bosh.FAKE_DESCRIPTOR nbxmpp.bosh-module.html#FAKE_DESCRIPTOR nbxmpp.bosh.KEY_COUNT nbxmpp.bosh-module.html#KEY_COUNT nbxmpp.bosh.get_rand_number nbxmpp.bosh-module.html#get_rand_number nbxmpp.bosh.bosh_errors nbxmpp.bosh-module.html#bosh_errors nbxmpp.bosh.__package__ nbxmpp.bosh-module.html#__package__ nbxmpp.bosh.log nbxmpp.bosh-module.html#log nbxmpp.bosh.urisplit nbxmpp.transports_nb-module.html#urisplit nbxmpp.c14n nbxmpp.c14n-module.html nbxmpp.c14n.ustr nbxmpp.simplexml-module.html#ustr nbxmpp.c14n.normalise_attr nbxmpp.c14n-module.html#normalise_attr nbxmpp.c14n.normalise_text nbxmpp.c14n-module.html#normalise_text nbxmpp.c14n.c14n nbxmpp.c14n-module.html#c14n nbxmpp.c14n.__package__ nbxmpp.c14n-module.html#__package__ nbxmpp.client_nb nbxmpp.client_nb-module.html nbxmpp.client_nb.log nbxmpp.client_nb-module.html#log nbxmpp.client_nb.__package__ nbxmpp.client_nb-module.html#__package__ nbxmpp.dispatcher_nb nbxmpp.dispatcher_nb-module.html nbxmpp.dispatcher_nb.XML_DECLARATION nbxmpp.dispatcher_nb-module.html#XML_DECLARATION nbxmpp.dispatcher_nb.DEFAULT_TIMEOUT_SECONDS nbxmpp.dispatcher_nb-module.html#DEFAULT_TIMEOUT_SECONDS nbxmpp.dispatcher_nb.log nbxmpp.dispatcher_nb-module.html#log nbxmpp.dispatcher_nb.__package__ nbxmpp.dispatcher_nb-module.html#__package__ nbxmpp.dispatcher_nb.outgoingID nbxmpp.dispatcher_nb-module.html#outgoingID nbxmpp.features_nb nbxmpp.features_nb-module.html nbxmpp.features_nb.getPrivacyList nbxmpp.features_nb-module.html#getPrivacyList nbxmpp.features_nb.register nbxmpp.features_nb-module.html#register nbxmpp.features_nb._ReceivedRegInfo nbxmpp.features_nb-module.html#_ReceivedRegInfo nbxmpp.features_nb.setDefaultPrivacyList nbxmpp.features_nb-module.html#setDefaultPrivacyList nbxmpp.features_nb.isResultNode nbxmpp.protocol-module.html#isResultNode nbxmpp.features_nb.setActivePrivacyList nbxmpp.features_nb-module.html#setActivePrivacyList nbxmpp.features_nb.getActiveAndDefaultPrivacyLists nbxmpp.features_nb-module.html#getActiveAndDefaultPrivacyLists nbxmpp.features_nb.PL_ACT_DENY nbxmpp.features_nb-module.html#PL_ACT_DENY nbxmpp.features_nb.__package__ nbxmpp.features_nb-module.html#__package__ nbxmpp.features_nb.delPrivacyList nbxmpp.features_nb-module.html#delPrivacyList nbxmpp.features_nb.setPrivacyList nbxmpp.features_nb-module.html#setPrivacyList nbxmpp.features_nb.REGISTER_DATA_RECEIVED nbxmpp.features_nb-module.html#REGISTER_DATA_RECEIVED nbxmpp.features_nb.PRIVACY_LISTS_RECEIVED nbxmpp.features_nb-module.html#PRIVACY_LISTS_RECEIVED nbxmpp.features_nb.PL_ACT_ALLOW nbxmpp.features_nb-module.html#PL_ACT_ALLOW nbxmpp.features_nb.getPrivacyLists nbxmpp.features_nb-module.html#getPrivacyLists nbxmpp.features_nb.PL_TYPE_JID nbxmpp.features_nb-module.html#PL_TYPE_JID nbxmpp.features_nb.PRIVACY_LISTS_ACTIVE_DEFAULT nbxmpp.features_nb-module.html#PRIVACY_LISTS_ACTIVE_DEFAULT nbxmpp.features_nb.getRegInfo nbxmpp.features_nb-module.html#getRegInfo nbxmpp.features_nb._on_default_response nbxmpp.features_nb-module.html#_on_default_response nbxmpp.features_nb.PL_TYPE_GROUP nbxmpp.features_nb-module.html#PL_TYPE_GROUP nbxmpp.features_nb.changePasswordTo nbxmpp.features_nb-module.html#changePasswordTo nbxmpp.features_nb.unregister nbxmpp.features_nb-module.html#unregister nbxmpp.features_nb.PRIVACY_LIST_RECEIVED nbxmpp.features_nb-module.html#PRIVACY_LIST_RECEIVED nbxmpp.features_nb.PL_TYPE_SUBC nbxmpp.features_nb-module.html#PL_TYPE_SUBC nbxmpp.idlequeue nbxmpp.idlequeue-module.html nbxmpp.idlequeue.PENDING_WRITE nbxmpp.idlequeue-module.html#PENDING_WRITE nbxmpp.idlequeue.FLAG_READ_WRITE nbxmpp.idlequeue-module.html#FLAG_READ_WRITE nbxmpp.idlequeue.PENDING_READ nbxmpp.idlequeue-module.html#PENDING_READ nbxmpp.idlequeue.FLAG_READ nbxmpp.idlequeue-module.html#FLAG_READ nbxmpp.idlequeue.FLAG_CLOSE nbxmpp.idlequeue-module.html#FLAG_CLOSE nbxmpp.idlequeue.__package__ nbxmpp.idlequeue-module.html#__package__ nbxmpp.idlequeue.HAVE_GOBJECT nbxmpp.idlequeue-module.html#HAVE_GOBJECT nbxmpp.idlequeue.IS_CLOSED nbxmpp.idlequeue-module.html#IS_CLOSED nbxmpp.idlequeue.log nbxmpp.idlequeue-module.html#log nbxmpp.idlequeue.FLAG_WRITE nbxmpp.idlequeue-module.html#FLAG_WRITE nbxmpp.idlequeue.get_idlequeue nbxmpp.idlequeue-module.html#get_idlequeue nbxmpp.plugin nbxmpp.plugin-module.html nbxmpp.plugin.__package__ nbxmpp.plugin-module.html#__package__ nbxmpp.plugin.log nbxmpp.plugin-module.html#log nbxmpp.protocol nbxmpp.protocol-module.html nbxmpp.protocol.NS_MUC_ADMIN nbxmpp.protocol-module.html#NS_MUC_ADMIN nbxmpp.protocol.STREAM_NOT_AUTHORIZED nbxmpp.protocol-module.html#STREAM_NOT_AUTHORIZED nbxmpp.protocol.NS_FILE nbxmpp.protocol-module.html#NS_FILE nbxmpp.protocol.NS_VCARD_UPDATE nbxmpp.protocol-module.html#NS_VCARD_UPDATE nbxmpp.protocol.NS_PUBSUB_EVENT nbxmpp.protocol-module.html#NS_PUBSUB_EVENT nbxmpp.protocol.isResultNode nbxmpp.protocol-module.html#isResultNode nbxmpp.protocol.NS_RECEIPTS nbxmpp.protocol-module.html#NS_RECEIPTS nbxmpp.protocol.STREAM_CONNECTION_TIMEOUT nbxmpp.protocol-module.html#STREAM_CONNECTION_TIMEOUT nbxmpp.protocol.STREAM_IMPROPER_ADDRESSING nbxmpp.protocol-module.html#STREAM_IMPROPER_ADDRESSING nbxmpp.protocol.STREAM_UNSUPPORTED_STANZA_TYPE nbxmpp.protocol-module.html#STREAM_UNSUPPORTED_STANZA_TYPE nbxmpp.protocol.NS_PING nbxmpp.protocol-module.html#NS_PING nbxmpp.protocol.ERR_GONE nbxmpp.protocol-module.html#ERR_GONE nbxmpp.protocol.NS_PHYSLOC nbxmpp.protocol-module.html#NS_PHYSLOC nbxmpp.protocol.NS_CHATTING nbxmpp.protocol-module.html#NS_CHATTING nbxmpp.protocol.ERR_CONFLICT nbxmpp.protocol-module.html#ERR_CONFLICT nbxmpp.protocol.NS_COMPRESS nbxmpp.protocol-module.html#NS_COMPRESS nbxmpp.protocol.NS_HASHES_SHA1 nbxmpp.protocol-module.html#NS_HASHES_SHA1 nbxmpp.protocol.NS_AGENTS nbxmpp.protocol-module.html#NS_AGENTS nbxmpp.protocol.NS_CAPTCHA nbxmpp.protocol-module.html#NS_CAPTCHA nbxmpp.protocol.NS_MOOD nbxmpp.protocol-module.html#NS_MOOD nbxmpp.protocol.ERR_NOT_AUTHORIZED nbxmpp.protocol-module.html#ERR_NOT_AUTHORIZED nbxmpp.protocol.ERR_REGISTRATION_REQUIRED nbxmpp.protocol-module.html#ERR_REGISTRATION_REQUIRED nbxmpp.protocol.ERR_INTERNAL_SERVER_ERROR nbxmpp.protocol-module.html#ERR_INTERNAL_SERVER_ERROR nbxmpp.protocol.SASL_INCORRECT_ENCODING nbxmpp.protocol-module.html#SASL_INCORRECT_ENCODING nbxmpp.protocol.NS_MUC_OWNER nbxmpp.protocol-module.html#NS_MUC_OWNER nbxmpp.protocol.NS_ACTIVITY nbxmpp.protocol-module.html#NS_ACTIVITY nbxmpp.protocol.NS_ARCHIVE_MANUAL nbxmpp.protocol-module.html#NS_ARCHIVE_MANUAL nbxmpp.protocol.NS_JINGLE_RTP_AUDIO nbxmpp.protocol-module.html#NS_JINGLE_RTP_AUDIO nbxmpp.protocol.NS_PRESENCE nbxmpp.protocol-module.html#NS_PRESENCE nbxmpp.protocol.STREAM_INTERNAL_SERVER_ERROR nbxmpp.protocol-module.html#STREAM_INTERNAL_SERVER_ERROR nbxmpp.protocol.NS_CHATSTATES nbxmpp.protocol-module.html#NS_CHATSTATES nbxmpp.protocol.ERR_REDIRECT nbxmpp.protocol-module.html#ERR_REDIRECT nbxmpp.protocol.isErrorNode nbxmpp.protocol-module.html#isErrorNode nbxmpp.protocol.NS_GROUPCHAT nbxmpp.protocol-module.html#NS_GROUPCHAT nbxmpp.protocol.ERR_FEATURE_NOT_IMPLEMENTED nbxmpp.protocol-module.html#ERR_FEATURE_NOT_IMPLEMENTED nbxmpp.protocol.NS_GATEWAY nbxmpp.protocol-module.html#NS_GATEWAY nbxmpp.protocol.NS_DISCO_ITEMS nbxmpp.protocol-module.html#NS_DISCO_ITEMS nbxmpp.protocol.NS_MUC_CONFIG nbxmpp.protocol-module.html#NS_MUC_CONFIG nbxmpp.protocol.NS_BIND nbxmpp.protocol-module.html#NS_BIND nbxmpp.protocol.NS_JINGLE_ERRORS nbxmpp.protocol-module.html#NS_JINGLE_ERRORS nbxmpp.protocol.NS_XMPP_STREAMS nbxmpp.protocol-module.html#NS_XMPP_STREAMS nbxmpp.protocol.NS_IQ nbxmpp.protocol-module.html#NS_IQ nbxmpp.protocol.ERR_RESOURCE_CONSTRAINT nbxmpp.protocol-module.html#ERR_RESOURCE_CONSTRAINT nbxmpp.protocol.NS_CLIENT nbxmpp.protocol-module.html#NS_CLIENT nbxmpp.protocol.NS_FORWARD nbxmpp.protocol-module.html#NS_FORWARD nbxmpp.protocol.SASL_INVALID_AUTHZID nbxmpp.protocol-module.html#SASL_INVALID_AUTHZID nbxmpp.protocol.NS_EVENT nbxmpp.protocol-module.html#NS_EVENT nbxmpp.protocol.NS_AVATAR nbxmpp.protocol-module.html#NS_AVATAR nbxmpp.protocol.NS_JINGLE_IBB nbxmpp.protocol-module.html#NS_JINGLE_IBB nbxmpp.protocol.NS_DATA_LAYOUT nbxmpp.protocol-module.html#NS_DATA_LAYOUT nbxmpp.protocol.NS_TUNE nbxmpp.protocol-module.html#NS_TUNE nbxmpp.protocol.stream_exceptions nbxmpp.protocol-module.html#stream_exceptions nbxmpp.protocol.NS_HASHES_SHA256 nbxmpp.protocol-module.html#NS_HASHES_SHA256 nbxmpp.protocol.NS_CARBONS nbxmpp.protocol-module.html#NS_CARBONS nbxmpp.protocol.NS_ROSTER nbxmpp.protocol-module.html#NS_ROSTER nbxmpp.protocol.NS_STANZAS nbxmpp.protocol-module.html#NS_STANZAS nbxmpp.protocol.ERR_JID_MALFORMED nbxmpp.protocol-module.html#ERR_JID_MALFORMED nbxmpp.protocol.NS_ROSTER_VER nbxmpp.protocol-module.html#NS_ROSTER_VER nbxmpp.protocol.NS_TIME_REVISED nbxmpp.protocol-module.html#NS_TIME_REVISED nbxmpp.protocol.NS_MUC_UNIQUE nbxmpp.protocol-module.html#NS_MUC_UNIQUE nbxmpp.protocol.ERR_SERVICE_UNAVAILABLE nbxmpp.protocol-module.html#ERR_SERVICE_UNAVAILABLE nbxmpp.protocol.NS_PUBKEY_PUBKEY nbxmpp.protocol-module.html#NS_PUBKEY_PUBKEY nbxmpp.protocol.NS_AMP nbxmpp.protocol-module.html#NS_AMP nbxmpp.protocol.STREAM_UNDEFINED_CONDITION nbxmpp.protocol-module.html#STREAM_UNDEFINED_CONDITION nbxmpp.protocol.NS_CONFERENCE nbxmpp.protocol-module.html#NS_CONFERENCE nbxmpp.protocol.NS_MAM nbxmpp.protocol-module.html#NS_MAM nbxmpp.protocol.NS_DISCO nbxmpp.protocol-module.html#NS_DISCO nbxmpp.protocol.NS_RSM nbxmpp.protocol-module.html#NS_RSM nbxmpp.protocol.NS_BLOCKING nbxmpp.protocol-module.html#NS_BLOCKING nbxmpp.protocol.ERRORS nbxmpp.protocol-module.html#ERRORS nbxmpp.protocol.NS_STREAM nbxmpp.protocol-module.html#NS_STREAM nbxmpp.protocol.NS_ESESSION nbxmpp.protocol-module.html#NS_ESESSION nbxmpp.protocol.STREAM_BAD_FORMAT nbxmpp.protocol-module.html#STREAM_BAD_FORMAT nbxmpp.protocol.NS_JINGLE_FILE_TRANSFER nbxmpp.protocol-module.html#NS_JINGLE_FILE_TRANSFER nbxmpp.protocol.NS_LOCATION nbxmpp.protocol-module.html#NS_LOCATION nbxmpp.protocol.NS_ARCHIVE_AUTO nbxmpp.protocol-module.html#NS_ARCHIVE_AUTO nbxmpp.protocol.NS_DIALBACK nbxmpp.protocol-module.html#NS_DIALBACK nbxmpp.protocol.SASL_ABORTED nbxmpp.protocol-module.html#SASL_ABORTED nbxmpp.protocol.NS_AUTH nbxmpp.protocol-module.html#NS_AUTH nbxmpp.protocol.NS_BOOKMARKS nbxmpp.protocol-module.html#NS_BOOKMARKS nbxmpp.protocol.NS_VCARD nbxmpp.protocol-module.html#NS_VCARD nbxmpp.protocol.STREAM_HOST_GONE nbxmpp.protocol-module.html#STREAM_HOST_GONE nbxmpp.protocol.NS_XHTML nbxmpp.protocol-module.html#NS_XHTML nbxmpp.protocol.NS_JINGLE_RTP nbxmpp.protocol-module.html#NS_JINGLE_RTP nbxmpp.protocol.NS_SI nbxmpp.protocol-module.html#NS_SI nbxmpp.protocol.NS_SASL nbxmpp.protocol-module.html#NS_SASL nbxmpp.protocol.ERR_UNDEFINED_CONDITION nbxmpp.protocol-module.html#ERR_UNDEFINED_CONDITION nbxmpp.protocol.STREAM_INVALID_FROM nbxmpp.protocol-module.html#STREAM_INVALID_FROM nbxmpp.protocol.NS_CAPS nbxmpp.protocol-module.html#NS_CAPS nbxmpp.protocol.NS_PUBSUB_OWNER nbxmpp.protocol-module.html#NS_PUBSUB_OWNER nbxmpp.protocol.NS_AMP_ERRORS nbxmpp.protocol-module.html#NS_AMP_ERRORS nbxmpp.protocol.NS_BROWSE nbxmpp.protocol-module.html#NS_BROWSE nbxmpp.protocol.NS_CORRECT nbxmpp.protocol-module.html#NS_CORRECT nbxmpp.protocol.NS_ROSTERX nbxmpp.protocol-module.html#NS_ROSTERX nbxmpp.protocol.NS_JINGLE_RAW_UDP nbxmpp.protocol-module.html#NS_JINGLE_RAW_UDP nbxmpp.protocol.NS_TLS nbxmpp.protocol-module.html#NS_TLS nbxmpp.protocol.NS_ATTENTION nbxmpp.protocol-module.html#NS_ATTENTION nbxmpp.protocol.NS_DATA nbxmpp.protocol-module.html#NS_DATA nbxmpp.protocol.NS_SERVER nbxmpp.protocol-module.html#NS_SERVER nbxmpp.protocol.NS_SESSION nbxmpp.protocol-module.html#NS_SESSION nbxmpp.protocol.ERR_REMOTE_SERVER_TIMEOUT nbxmpp.protocol-module.html#ERR_REMOTE_SERVER_TIMEOUT nbxmpp.protocol.NS_JINGLE_ICE_UDP nbxmpp.protocol-module.html#NS_JINGLE_ICE_UDP nbxmpp.protocol.NS_IBB nbxmpp.protocol-module.html#NS_IBB nbxmpp.protocol.NS_TIME nbxmpp.protocol-module.html#NS_TIME nbxmpp.protocol.NS_PROFILE nbxmpp.protocol-module.html#NS_PROFILE nbxmpp.protocol.NS_SECLABEL nbxmpp.protocol-module.html#NS_SECLABEL nbxmpp.protocol.NS_PRIVACY nbxmpp.protocol-module.html#NS_PRIVACY nbxmpp.protocol.NS_GMAILNOTIFY nbxmpp.protocol-module.html#NS_GMAILNOTIFY nbxmpp.protocol.STREAM_INVALID_NAMESPACE nbxmpp.protocol-module.html#STREAM_INVALID_NAMESPACE nbxmpp.protocol.NS_CONDITIONS nbxmpp.protocol-module.html#NS_CONDITIONS nbxmpp.protocol.NS_MESSAGE nbxmpp.protocol-module.html#NS_MESSAGE nbxmpp.protocol.NS_FEATURE nbxmpp.protocol-module.html#NS_FEATURE nbxmpp.protocol.STREAM_UNSUPPORTED_VERSION nbxmpp.protocol-module.html#STREAM_UNSUPPORTED_VERSION nbxmpp.protocol.SASL_NOT_AUTHORIZED nbxmpp.protocol-module.html#SASL_NOT_AUTHORIZED nbxmpp.protocol.ERR_REMOTE_SERVER_NOT_FOUND nbxmpp.protocol-module.html#ERR_REMOTE_SERVER_NOT_FOUND nbxmpp.protocol.NS_DELAY2 nbxmpp.protocol-module.html#NS_DELAY2 nbxmpp.protocol.NS_WAITINGLIST nbxmpp.protocol-module.html#NS_WAITINGLIST nbxmpp.protocol.NS_ARCHIVE_MANAGE nbxmpp.protocol-module.html#NS_ARCHIVE_MANAGE nbxmpp.protocol.NS_VERSION nbxmpp.protocol-module.html#NS_VERSION nbxmpp.protocol.NS_SSN nbxmpp.protocol-module.html#NS_SSN nbxmpp.protocol.ERR_SUBSCRIPTION_REQUIRED nbxmpp.protocol-module.html#ERR_SUBSCRIPTION_REQUIRED nbxmpp.protocol.SASL_MECHANISM_TOO_WEAK nbxmpp.protocol-module.html#SASL_MECHANISM_TOO_WEAK nbxmpp.protocol.NS_COMPONENT_1 nbxmpp.protocol-module.html#NS_COMPONENT_1 nbxmpp.protocol.NS_ARCHIVE_PREF nbxmpp.protocol-module.html#NS_ARCHIVE_PREF nbxmpp.protocol.STREAM_SYSTEM_SHUTDOWN nbxmpp.protocol-module.html#STREAM_SYSTEM_SHUTDOWN nbxmpp.protocol.NS_HTTP_BIND nbxmpp.protocol-module.html#NS_HTTP_BIND nbxmpp.protocol.STREAM_INVALID_XML nbxmpp.protocol-module.html#STREAM_INVALID_XML nbxmpp.protocol.NS_INVISIBLE nbxmpp.protocol-module.html#NS_INVISIBLE nbxmpp.protocol.NS_JINGLE_RTP_VIDEO nbxmpp.protocol-module.html#NS_JINGLE_RTP_VIDEO nbxmpp.protocol.NS_HASHES nbxmpp.protocol-module.html#NS_HASHES nbxmpp.protocol.STREAM_UNSUPPORTED_ENCODING nbxmpp.protocol-module.html#STREAM_UNSUPPORTED_ENCODING nbxmpp.protocol.ERR_NOT_ALLOWED nbxmpp.protocol-module.html#ERR_NOT_ALLOWED nbxmpp.protocol.STREAM_SEE_OTHER_HOST nbxmpp.protocol-module.html#STREAM_SEE_OTHER_HOST nbxmpp.protocol.NS_BROWSING nbxmpp.protocol-module.html#NS_BROWSING nbxmpp.protocol.NS_GAMING nbxmpp.protocol-module.html#NS_GAMING nbxmpp.protocol.NS_OFFLINE nbxmpp.protocol-module.html#NS_OFFLINE nbxmpp.protocol.NS_PUBSUB nbxmpp.protocol-module.html#NS_PUBSUB nbxmpp.protocol.NS_MUC_USER nbxmpp.protocol-module.html#NS_MUC_USER nbxmpp.protocol.NS_ATOM nbxmpp.protocol-module.html#NS_ATOM nbxmpp.protocol.ascii_upper nbxmpp.protocol-module.html#ascii_upper nbxmpp.protocol.NS_STREAMS nbxmpp.protocol-module.html#NS_STREAMS nbxmpp.protocol.STREAM_HOST_UNKNOWN nbxmpp.protocol-module.html#STREAM_HOST_UNKNOWN nbxmpp.protocol.ERR_BAD_REQUEST nbxmpp.protocol-module.html#ERR_BAD_REQUEST nbxmpp.protocol.NS_GTALKSETTING nbxmpp.protocol-module.html#NS_GTALKSETTING nbxmpp.protocol.NS_DELAY nbxmpp.protocol-module.html#NS_DELAY nbxmpp.protocol.NS_ENCRYPTED nbxmpp.protocol-module.html#NS_ENCRYPTED nbxmpp.protocol.NS_RPC nbxmpp.protocol-module.html#NS_RPC nbxmpp.protocol.NS_SECLABEL_CATALOG nbxmpp.protocol-module.html#NS_SECLABEL_CATALOG nbxmpp.protocol.NS_SIGNED nbxmpp.protocol-module.html#NS_SIGNED nbxmpp.protocol.NS_NICK nbxmpp.protocol-module.html#NS_NICK nbxmpp.protocol._errorcodes nbxmpp.protocol-module.html#_errorcodes nbxmpp.protocol.NS_PUBKEY_REVOKE nbxmpp.protocol-module.html#NS_PUBKEY_REVOKE nbxmpp.protocol.NS_JINGLE_XTLS nbxmpp.protocol-module.html#NS_JINGLE_XTLS nbxmpp.protocol.NS_DATA_MEDIA nbxmpp.protocol-module.html#NS_DATA_MEDIA nbxmpp.protocol.STREAM_XML_NOT_WELL_FORMED nbxmpp.protocol-module.html#STREAM_XML_NOT_WELL_FORMED nbxmpp.protocol.STREAM_POLICY_VIOLATION nbxmpp.protocol-module.html#STREAM_POLICY_VIOLATION nbxmpp.protocol.NS_REGISTER nbxmpp.protocol-module.html#NS_REGISTER nbxmpp.protocol.NS_BYTESTREAM nbxmpp.protocol-module.html#NS_BYTESTREAM nbxmpp.protocol.NS_VACATION nbxmpp.protocol-module.html#NS_VACATION nbxmpp.protocol.NS_PUBSUB_PUBLISH_OPTIONS nbxmpp.protocol-module.html#NS_PUBSUB_PUBLISH_OPTIONS nbxmpp.protocol.NS_XHTML_IM nbxmpp.protocol-module.html#NS_XHTML_IM nbxmpp.protocol.__package__ nbxmpp.protocol-module.html#__package__ nbxmpp.protocol.NS_GEOLOC nbxmpp.protocol-module.html#NS_GEOLOC nbxmpp.protocol.NS_ARCHIVE nbxmpp.protocol-module.html#NS_ARCHIVE nbxmpp.protocol.NS_ROSTERNOTES nbxmpp.protocol-module.html#NS_ROSTERNOTES nbxmpp.protocol.ERR_UNEXPECTED_REQUEST nbxmpp.protocol-module.html#ERR_UNEXPECTED_REQUEST nbxmpp.protocol.NS_DATA_VALIDATE nbxmpp.protocol-module.html#NS_DATA_VALIDATE nbxmpp.protocol.ERR_RECIPIENT_UNAVAILABLE nbxmpp.protocol-module.html#ERR_RECIPIENT_UNAVAILABLE nbxmpp.protocol.NS_ESESSION_INIT nbxmpp.protocol-module.html#NS_ESESSION_INIT nbxmpp.protocol.SASL_TEMPORARY_AUTH_FAILURE nbxmpp.protocol-module.html#SASL_TEMPORARY_AUTH_FAILURE nbxmpp.protocol.NS_PRIVATE nbxmpp.protocol-module.html#NS_PRIVATE nbxmpp.protocol.NS_JINGLE_BYTESTREAM nbxmpp.protocol-module.html#NS_JINGLE_BYTESTREAM nbxmpp.protocol.SASL_INVALID_MECHANISM nbxmpp.protocol-module.html#SASL_INVALID_MECHANISM nbxmpp.protocol.NS_VIEWING nbxmpp.protocol-module.html#NS_VIEWING nbxmpp.protocol.NS_COMMANDS nbxmpp.protocol-module.html#NS_COMMANDS nbxmpp.protocol.ERR_PAYMENT_REQUIRED nbxmpp.protocol-module.html#ERR_PAYMENT_REQUIRED nbxmpp.protocol.STREAM_CONFLICT nbxmpp.protocol-module.html#STREAM_CONFLICT nbxmpp.protocol.STREAM_RESOURCE_CONSTRAINT nbxmpp.protocol-module.html#STREAM_RESOURCE_CONSTRAINT nbxmpp.protocol.NS_STREAM_MGMT nbxmpp.protocol-module.html#NS_STREAM_MGMT nbxmpp.protocol.NS_SI_PUB nbxmpp.protocol-module.html#NS_SI_PUB nbxmpp.protocol.NS_MUC nbxmpp.protocol-module.html#NS_MUC nbxmpp.protocol.NS_X_OOB nbxmpp.protocol-module.html#NS_X_OOB nbxmpp.protocol.ERR_ITEM_NOT_FOUND nbxmpp.protocol-module.html#ERR_ITEM_NOT_FOUND nbxmpp.protocol.STREAM_BAD_NAMESPACE_PREFIX nbxmpp.protocol-module.html#STREAM_BAD_NAMESPACE_PREFIX nbxmpp.protocol.NS_SEARCH nbxmpp.protocol-module.html#NS_SEARCH nbxmpp.protocol.STREAM_REMOTE_CONNECTION_FAILED nbxmpp.protocol-module.html#STREAM_REMOTE_CONNECTION_FAILED nbxmpp.protocol.NS_ADDRESS nbxmpp.protocol-module.html#NS_ADDRESS nbxmpp.protocol.NS_COMPONENT_ACCEPT nbxmpp.protocol-module.html#NS_COMPONENT_ACCEPT nbxmpp.protocol.STREAM_INVALID_ID nbxmpp.protocol-module.html#STREAM_INVALID_ID nbxmpp.protocol.STREAM_RESTRICTED_XML nbxmpp.protocol-module.html#STREAM_RESTRICTED_XML nbxmpp.protocol.NS_DISCO_INFO nbxmpp.protocol-module.html#NS_DISCO_INFO nbxmpp.protocol.NS_STANZA_CRYPTO nbxmpp.protocol-module.html#NS_STANZA_CRYPTO nbxmpp.protocol.NS_LAST nbxmpp.protocol-module.html#NS_LAST nbxmpp.protocol.NS_PUBKEY_ATTEST nbxmpp.protocol-module.html#NS_PUBKEY_ATTEST nbxmpp.protocol.NS_HASHES_SHA512 nbxmpp.protocol-module.html#NS_HASHES_SHA512 nbxmpp.protocol.ERR_NOT_ACCEPTABLE nbxmpp.protocol-module.html#ERR_NOT_ACCEPTABLE nbxmpp.protocol.NS_JINGLE nbxmpp.protocol-module.html#NS_JINGLE nbxmpp.protocol.NS_BOB nbxmpp.protocol-module.html#NS_BOB nbxmpp.protocol.NS_HASHES_MD5 nbxmpp.protocol-module.html#NS_HASHES_MD5 nbxmpp.protocol.NS_HTTP_AUTH nbxmpp.protocol-module.html#NS_HTTP_AUTH nbxmpp.protocol.ERR_FORBIDDEN nbxmpp.protocol-module.html#ERR_FORBIDDEN nbxmpp.proxy_connectors nbxmpp.proxy_connectors-module.html nbxmpp.proxy_connectors.log nbxmpp.proxy_connectors-module.html#log nbxmpp.proxy_connectors.__package__ nbxmpp.proxy_connectors-module.html#__package__ nbxmpp.roster_nb nbxmpp.roster_nb-module.html nbxmpp.roster_nb.log nbxmpp.roster_nb-module.html#log nbxmpp.roster_nb.__package__ nbxmpp.roster_nb-module.html#__package__ nbxmpp.simplexml nbxmpp.simplexml-module.html nbxmpp.simplexml.BadXML2Node nbxmpp.simplexml-module.html#BadXML2Node nbxmpp.simplexml.ustr nbxmpp.simplexml-module.html#ustr nbxmpp.simplexml.ENCODING nbxmpp.simplexml-module.html#ENCODING nbxmpp.simplexml.__package__ nbxmpp.simplexml-module.html#__package__ nbxmpp.simplexml.XMLescape nbxmpp.simplexml-module.html#XMLescape nbxmpp.simplexml.XML2Node nbxmpp.simplexml-module.html#XML2Node nbxmpp.simplexml.log nbxmpp.simplexml-module.html#log nbxmpp.smacks nbxmpp.smacks-module.html nbxmpp.smacks.log nbxmpp.smacks-module.html#log nbxmpp.smacks.__package__ nbxmpp.smacks-module.html#__package__ nbxmpp.stringprepare nbxmpp.stringprepare-module.html nbxmpp.stringprepare.nodeprep nbxmpp.stringprepare-module.html#nodeprep nbxmpp.stringprepare.C_21 nbxmpp.stringprepare-module.html#C_21 nbxmpp.stringprepare.C_22 nbxmpp.stringprepare-module.html#C_22 nbxmpp.stringprepare.C_5 nbxmpp.stringprepare-module.html#C_5 nbxmpp.stringprepare.__package__ nbxmpp.stringprepare-module.html#__package__ nbxmpp.stringprepare.resourceprep nbxmpp.stringprepare-module.html#resourceprep nbxmpp.stringprepare.C_3 nbxmpp.stringprepare-module.html#C_3 nbxmpp.stringprepare.C_4 nbxmpp.stringprepare-module.html#C_4 nbxmpp.stringprepare.C_7 nbxmpp.stringprepare-module.html#C_7 nbxmpp.stringprepare.C_6 nbxmpp.stringprepare-module.html#C_6 nbxmpp.stringprepare.C_9 nbxmpp.stringprepare-module.html#C_9 nbxmpp.stringprepare.C_8 nbxmpp.stringprepare-module.html#C_8 nbxmpp.stringprepare.B_2 nbxmpp.stringprepare-module.html#B_2 nbxmpp.stringprepare.B_1 nbxmpp.stringprepare-module.html#B_1 nbxmpp.stringprepare.C_11 nbxmpp.stringprepare-module.html#C_11 nbxmpp.stringprepare.C_12 nbxmpp.stringprepare-module.html#C_12 nbxmpp.stringprepare.nameprep nbxmpp.stringprepare-module.html#nameprep nbxmpp.tls_nb nbxmpp.tls_nb-module.html nbxmpp.tls_nb.log nbxmpp.tls_nb-module.html#log nbxmpp.tls_nb.PYOPENSSL nbxmpp.tls_nb-module.html#PYOPENSSL nbxmpp.tls_nb.USE_PYOPENSSL nbxmpp.tls_nb-module.html#USE_PYOPENSSL nbxmpp.tls_nb.PYSTDLIB nbxmpp.tls_nb-module.html#PYSTDLIB nbxmpp.tls_nb.gattr nbxmpp.tls_nb-module.html#gattr nbxmpp.tls_nb.__package__ nbxmpp.tls_nb-module.html#__package__ nbxmpp.transports_nb nbxmpp.transports_nb-module.html nbxmpp.transports_nb.DATA_SENT nbxmpp.transports_nb-module.html#DATA_SENT nbxmpp.transports_nb.STATES nbxmpp.transports_nb-module.html#STATES nbxmpp.transports_nb.DISCONNECT_TIMEOUT_SECONDS nbxmpp.transports_nb-module.html#DISCONNECT_TIMEOUT_SECONDS nbxmpp.transports_nb.get_proxy_data_from_dict nbxmpp.transports_nb-module.html#get_proxy_data_from_dict nbxmpp.transports_nb.DISCONNECTING nbxmpp.transports_nb-module.html#DISCONNECTING nbxmpp.transports_nb.DISCONNECTED nbxmpp.transports_nb-module.html#DISCONNECTED nbxmpp.transports_nb.__package__ nbxmpp.transports_nb-module.html#__package__ nbxmpp.transports_nb.DATA_ERROR nbxmpp.transports_nb-module.html#DATA_ERROR nbxmpp.transports_nb.CONNECT_TIMEOUT_SECONDS nbxmpp.transports_nb-module.html#CONNECT_TIMEOUT_SECONDS nbxmpp.transports_nb.CONNECTING nbxmpp.transports_nb-module.html#CONNECTING nbxmpp.transports_nb.ustr nbxmpp.simplexml-module.html#ustr nbxmpp.transports_nb.RECV_BUFSIZE nbxmpp.transports_nb-module.html#RECV_BUFSIZE nbxmpp.transports_nb.log nbxmpp.transports_nb-module.html#log nbxmpp.transports_nb.PROXY_CONNECTING nbxmpp.transports_nb-module.html#PROXY_CONNECTING nbxmpp.transports_nb.urisplit nbxmpp.transports_nb-module.html#urisplit nbxmpp.transports_nb.DATA_RECEIVED nbxmpp.transports_nb-module.html#DATA_RECEIVED nbxmpp.transports_nb.CONNECTED nbxmpp.transports_nb-module.html#CONNECTED nbxmpp.auth_nb.NonBlockingBind nbxmpp.auth_nb.NonBlockingBind-class.html nbxmpp.plugin.PlugIn.PlugOut nbxmpp.plugin.PlugIn-class.html#PlugOut nbxmpp.auth_nb.NonBlockingBind.plugin nbxmpp.auth_nb.NonBlockingBind-class.html#plugin nbxmpp.plugin.PlugIn.PlugIn nbxmpp.plugin.PlugIn-class.html#PlugIn nbxmpp.auth_nb.NonBlockingBind.plugout nbxmpp.auth_nb.NonBlockingBind-class.html#plugout nbxmpp.auth_nb.NonBlockingBind._on_bound nbxmpp.auth_nb.NonBlockingBind-class.html#_on_bound nbxmpp.plugin.PlugIn.get_instance nbxmpp.plugin.PlugIn-class.html#get_instance nbxmpp.auth_nb.NonBlockingBind.FeaturesHandler nbxmpp.auth_nb.NonBlockingBind-class.html#FeaturesHandler nbxmpp.auth_nb.NonBlockingBind.__init__ nbxmpp.auth_nb.NonBlockingBind-class.html#__init__ nbxmpp.auth_nb.NonBlockingBind._on_session nbxmpp.auth_nb.NonBlockingBind-class.html#_on_session nbxmpp.auth_nb.NonBlockingBind.NonBlockingBind nbxmpp.auth_nb.NonBlockingBind-class.html#NonBlockingBind nbxmpp.auth_nb.NonBlockingNonSASL nbxmpp.auth_nb.NonBlockingNonSASL-class.html nbxmpp.plugin.PlugIn.PlugOut nbxmpp.plugin.PlugIn-class.html#PlugOut nbxmpp.plugin.PlugIn.PlugIn nbxmpp.plugin.PlugIn-class.html#PlugIn nbxmpp.auth_nb.NonBlockingNonSASL.plugin nbxmpp.auth_nb.NonBlockingNonSASL-class.html#plugin nbxmpp.auth_nb.NonBlockingNonSASL._on_username nbxmpp.auth_nb.NonBlockingNonSASL-class.html#_on_username nbxmpp.auth_nb.NonBlockingNonSASL._on_password nbxmpp.auth_nb.NonBlockingNonSASL-class.html#_on_password nbxmpp.plugin.PlugIn.get_instance nbxmpp.plugin.PlugIn-class.html#get_instance nbxmpp.auth_nb.NonBlockingNonSASL._on_auth nbxmpp.auth_nb.NonBlockingNonSASL-class.html#_on_auth nbxmpp.auth_nb.NonBlockingNonSASL.__init__ nbxmpp.auth_nb.NonBlockingNonSASL-class.html#__init__ nbxmpp.auth_nb.SASL nbxmpp.auth_nb.SASL-class.html nbxmpp.auth_nb.SASL.SASLHandler nbxmpp.auth_nb.SASL-class.html#SASLHandler nbxmpp.auth_nb.SASL.MechanismHandler nbxmpp.auth_nb.SASL-class.html#MechanismHandler nbxmpp.plugin.PlugIn.PlugOut nbxmpp.plugin.PlugIn-class.html#PlugOut nbxmpp.auth_nb.SASL._convert_to_iso88591 nbxmpp.auth_nb.SASL-class.html#_convert_to_iso88591 nbxmpp.auth_nb.SASL.plugin nbxmpp.auth_nb.SASL-class.html#plugin nbxmpp.auth_nb.SASL.auth nbxmpp.auth_nb.SASL-class.html#auth nbxmpp.auth_nb.SASL.FeaturesHandler nbxmpp.auth_nb.SASL-class.html#FeaturesHandler nbxmpp.plugin.PlugIn.PlugIn nbxmpp.plugin.PlugIn-class.html#PlugIn nbxmpp.plugin.PlugIn.get_instance nbxmpp.plugin.PlugIn-class.html#get_instance nbxmpp.auth_nb.SASL.plugout nbxmpp.auth_nb.SASL-class.html#plugout nbxmpp.auth_nb.SASL.set_password nbxmpp.auth_nb.SASL-class.html#set_password nbxmpp.auth_nb.SASL.__init__ nbxmpp.auth_nb.SASL-class.html#__init__ nbxmpp.bosh.AckChecker nbxmpp.bosh.AckChecker-class.html nbxmpp.bosh.AckChecker.get_not_acked_rids nbxmpp.bosh.AckChecker-class.html#get_not_acked_rids nbxmpp.bosh.AckChecker.process_incoming_ack nbxmpp.bosh.AckChecker-class.html#process_incoming_ack nbxmpp.bosh.AckChecker.get_rid nbxmpp.bosh.AckChecker-class.html#get_rid nbxmpp.bosh.AckChecker.__init__ nbxmpp.bosh.AckChecker-class.html#__init__ nbxmpp.bosh.AckChecker.backup_stanza nbxmpp.bosh.AckChecker-class.html#backup_stanza nbxmpp.bosh.KeyStack nbxmpp.bosh.KeyStack-class.html nbxmpp.bosh.KeyStack.reset nbxmpp.bosh.KeyStack-class.html#reset nbxmpp.bosh.KeyStack.__init__ nbxmpp.bosh.KeyStack-class.html#__init__ nbxmpp.bosh.KeyStack.get nbxmpp.bosh.KeyStack-class.html#get nbxmpp.bosh.NonBlockingBOSH nbxmpp.bosh.NonBlockingBOSH-class.html nbxmpp.transports_nb.NonBlockingTransport._tcp_connecting_started nbxmpp.transports_nb.NonBlockingTransport-class.html#_tcp_connecting_started nbxmpp.transports_nb.NonBlockingTransport.set_state nbxmpp.transports_nb.NonBlockingTransport-class.html#set_state nbxmpp.bosh.NonBlockingBOSH.get_free_socket nbxmpp.bosh.NonBlockingBOSH-class.html#get_free_socket nbxmpp.transports_nb.NonBlockingTransport.renew_send_timeout nbxmpp.transports_nb.NonBlockingTransport-class.html#renew_send_timeout nbxmpp.transports_nb.NonBlockingTransport.plugout nbxmpp.transports_nb.NonBlockingTransport-class.html#plugout nbxmpp.bosh.NonBlockingBOSH._on_connect nbxmpp.bosh.NonBlockingBOSH-class.html#_on_connect nbxmpp.transports_nb.NonBlockingTransport.get_state nbxmpp.transports_nb.NonBlockingTransport-class.html#get_state nbxmpp.bosh.NonBlockingBOSH.on_persistent_fallback nbxmpp.bosh.NonBlockingBOSH-class.html#on_persistent_fallback nbxmpp.transports_nb.NonBlockingTransport.read_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#read_timeout2 nbxmpp.bosh.NonBlockingBOSH.renew_bosh_wait_timeout nbxmpp.bosh.NonBlockingBOSH-class.html#renew_bosh_wait_timeout nbxmpp.plugin.PlugIn.get_instance nbxmpp.plugin.PlugIn-class.html#get_instance nbxmpp.transports_nb.NonBlockingTransport.set_send_timeout nbxmpp.transports_nb.NonBlockingTransport-class.html#set_send_timeout nbxmpp.transports_nb.NonBlockingTransport.read_timeout nbxmpp.transports_nb.NonBlockingTransport-class.html#read_timeout nbxmpp.bosh.NonBlockingBOSH.send_BOSH nbxmpp.bosh.NonBlockingBOSH-class.html#send_BOSH nbxmpp.bosh.NonBlockingBOSH.start_disconnect nbxmpp.bosh.NonBlockingBOSH-class.html#start_disconnect nbxmpp.bosh.NonBlockingBOSH.get_new_http_socket nbxmpp.bosh.NonBlockingBOSH-class.html#get_new_http_socket nbxmpp.bosh.NonBlockingBOSH.on_http_request_possible nbxmpp.bosh.NonBlockingBOSH-class.html#on_http_request_possible nbxmpp.bosh.NonBlockingBOSH.plug_socket nbxmpp.bosh.NonBlockingBOSH-class.html#plug_socket nbxmpp.bosh.NonBlockingBOSH.disconnect nbxmpp.bosh.NonBlockingBOSH-class.html#disconnect nbxmpp.bosh.NonBlockingBOSH.remove_bosh_wait_timeout nbxmpp.bosh.NonBlockingBOSH-class.html#remove_bosh_wait_timeout nbxmpp.plugin.PlugIn.PlugIn nbxmpp.plugin.PlugIn-class.html#PlugIn nbxmpp.bosh.NonBlockingBOSH.send nbxmpp.bosh.NonBlockingBOSH-class.html#send nbxmpp.transports_nb.NonBlockingTransport.renew_send_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#renew_send_timeout2 nbxmpp.bosh.NonBlockingBOSH.build_stanza nbxmpp.bosh.NonBlockingBOSH-class.html#build_stanza nbxmpp.bosh.NonBlockingBOSH.__init__ nbxmpp.bosh.NonBlockingBOSH-class.html#__init__ nbxmpp.bosh.NonBlockingBOSH.connect_and_flush nbxmpp.bosh.NonBlockingBOSH-class.html#connect_and_flush nbxmpp.plugin.PlugIn.PlugOut nbxmpp.plugin.PlugIn-class.html#PlugOut nbxmpp.bosh.NonBlockingBOSH.onreceive nbxmpp.bosh.NonBlockingBOSH-class.html#onreceive nbxmpp.bosh.NonBlockingBOSH.send_init nbxmpp.bosh.NonBlockingBOSH-class.html#send_init nbxmpp.bosh.NonBlockingBOSH.get_socket_in nbxmpp.bosh.NonBlockingBOSH-class.html#get_socket_in nbxmpp.bosh.NonBlockingBOSH.boshify_stanzas nbxmpp.bosh.NonBlockingBOSH-class.html#boshify_stanzas nbxmpp.bosh.NonBlockingBOSH.on_bosh_wait_timeout nbxmpp.bosh.NonBlockingBOSH-class.html#on_bosh_wait_timeout nbxmpp.bosh.NonBlockingBOSH.append_stanza nbxmpp.bosh.NonBlockingBOSH-class.html#append_stanza nbxmpp.transports_nb.NonBlockingTransport._on_connect_failure nbxmpp.transports_nb.NonBlockingTransport-class.html#_on_connect_failure nbxmpp.transports_nb.NonBlockingTransport.plugin nbxmpp.transports_nb.NonBlockingTransport-class.html#plugin nbxmpp.transports_nb.NonBlockingTransport.set_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#set_timeout2 nbxmpp.transports_nb.NonBlockingTransport.get_fd nbxmpp.transports_nb.NonBlockingTransport-class.html#get_fd nbxmpp.bosh.NonBlockingBOSH.get_current_state nbxmpp.bosh.NonBlockingBOSH-class.html#get_current_state nbxmpp.transports_nb.NonBlockingTransport.remove_timeout nbxmpp.transports_nb.NonBlockingTransport-class.html#remove_timeout nbxmpp.transports_nb.NonBlockingTransport.set_send_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#set_send_timeout2 nbxmpp.bosh.NonBlockingBOSH.set_timeout nbxmpp.bosh.NonBlockingBOSH-class.html#set_timeout nbxmpp.bosh.NonBlockingBOSH.handle_body_attrs nbxmpp.bosh.NonBlockingBOSH-class.html#handle_body_attrs nbxmpp.bosh.NonBlockingBOSH.on_received_http nbxmpp.bosh.NonBlockingBOSH-class.html#on_received_http nbxmpp.bosh.NonBlockingBOSH.connect nbxmpp.bosh.NonBlockingBOSH-class.html#connect nbxmpp.client_nb.NonBlockingClient nbxmpp.client_nb.NonBlockingClient-class.html nbxmpp.client_nb.NonBlockingClient._on_start_sasl nbxmpp.client_nb.NonBlockingClient-class.html#_on_start_sasl nbxmpp.client_nb.NonBlockingClient._on_connect nbxmpp.client_nb.NonBlockingClient-class.html#_on_connect nbxmpp.client_nb.NonBlockingClient._on_old_auth nbxmpp.client_nb.NonBlockingClient-class.html#_on_old_auth nbxmpp.client_nb.NonBlockingClient.sendPresence nbxmpp.client_nb.NonBlockingClient-class.html#sendPresence nbxmpp.client_nb.NonBlockingClient.connect nbxmpp.client_nb.NonBlockingClient-class.html#connect nbxmpp.client_nb.NonBlockingClient._on_stream_start nbxmpp.client_nb.NonBlockingClient-class.html#_on_stream_start nbxmpp.client_nb.NonBlockingClient.incoming_stream_version nbxmpp.client_nb.NonBlockingClient-class.html#incoming_stream_version nbxmpp.client_nb.NonBlockingClient.__init__ nbxmpp.client_nb.NonBlockingClient-class.html#__init__ nbxmpp.client_nb.NonBlockingClient.get_peerhost nbxmpp.client_nb.NonBlockingClient-class.html#get_peerhost nbxmpp.client_nb.NonBlockingClient.disconnect nbxmpp.client_nb.NonBlockingClient-class.html#disconnect nbxmpp.client_nb.NonBlockingClient.raise_event nbxmpp.client_nb.NonBlockingClient-class.html#raise_event nbxmpp.client_nb.NonBlockingClient.RegisterDisconnectHandler nbxmpp.client_nb.NonBlockingClient-class.html#RegisterDisconnectHandler nbxmpp.client_nb.NonBlockingClient._on_sasl_auth nbxmpp.client_nb.NonBlockingClient-class.html#_on_sasl_auth nbxmpp.client_nb.NonBlockingClient.initRoster nbxmpp.client_nb.NonBlockingClient-class.html#initRoster nbxmpp.client_nb.NonBlockingClient._xmpp_connect_machine nbxmpp.client_nb.NonBlockingClient-class.html#_xmpp_connect_machine nbxmpp.client_nb.NonBlockingClient.auth nbxmpp.client_nb.NonBlockingClient-class.html#auth nbxmpp.client_nb.NonBlockingClient.getRoster nbxmpp.client_nb.NonBlockingClient-class.html#getRoster nbxmpp.client_nb.NonBlockingClient._on_auth_bind nbxmpp.client_nb.NonBlockingClient-class.html#_on_auth_bind nbxmpp.client_nb.NonBlockingClient.get_connect_type nbxmpp.client_nb.NonBlockingClient-class.html#get_connect_type nbxmpp.client_nb.NonBlockingClient._on_doc_attrs nbxmpp.client_nb.NonBlockingClient-class.html#_on_doc_attrs nbxmpp.client_nb.NonBlockingClient.UnregisterDisconnectHandler nbxmpp.client_nb.NonBlockingClient-class.html#UnregisterDisconnectHandler nbxmpp.client_nb.NonBlockingClient._tls_negotiation_handler nbxmpp.client_nb.NonBlockingClient-class.html#_tls_negotiation_handler nbxmpp.client_nb.NonBlockingClient._try_next_ip nbxmpp.client_nb.NonBlockingClient-class.html#_try_next_ip nbxmpp.client_nb.NonBlockingClient.DisconnectHandler nbxmpp.client_nb.NonBlockingClient-class.html#DisconnectHandler nbxmpp.client_nb.NonBlockingClient._xmpp_connect nbxmpp.client_nb.NonBlockingClient-class.html#_xmpp_connect nbxmpp.client_nb.NonBlockingClient._resolve_hostname nbxmpp.client_nb.NonBlockingClient-class.html#_resolve_hostname nbxmpp.dispatcher_nb.BOSHDispatcher nbxmpp.dispatcher_nb.BOSHDispatcher-class.html nbxmpp.dispatcher_nb.XMPPDispatcher.restoreHandlers nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#restoreHandlers nbxmpp.dispatcher_nb.XMPPDispatcher.plugout nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#plugout nbxmpp.dispatcher_nb.XMPPDispatcher._WaitForData nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#_WaitForData nbxmpp.dispatcher_nb.BOSHDispatcher.StreamTerminate nbxmpp.dispatcher_nb.BOSHDispatcher-class.html#StreamTerminate nbxmpp.dispatcher_nb.XMPPDispatcher._init nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#_init nbxmpp.dispatcher_nb.BOSHDispatcher.dispatch nbxmpp.dispatcher_nb.BOSHDispatcher-class.html#dispatch nbxmpp.dispatcher_nb.XMPPDispatcher.RegisterHandlerOnce nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#RegisterHandlerOnce nbxmpp.dispatcher_nb.XMPPDispatcher.__init__ nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#__init__ nbxmpp.dispatcher_nb.XMPPDispatcher.RegisterDefaultHandler nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#RegisterDefaultHandler nbxmpp.dispatcher_nb.XMPPDispatcher.SendAndCallForResponse nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#SendAndCallForResponse nbxmpp.dispatcher_nb.XMPPDispatcher.UnregisterHandler nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#UnregisterHandler nbxmpp.dispatcher_nb.XMPPDispatcher.RegisterNamespace nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#RegisterNamespace nbxmpp.dispatcher_nb.BOSHDispatcher.PlugIn nbxmpp.dispatcher_nb.BOSHDispatcher-class.html#PlugIn nbxmpp.dispatcher_nb.XMPPDispatcher.dumpHandlers nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#dumpHandlers nbxmpp.dispatcher_nb.XMPPDispatcher.UnregisterCycleHandler nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#UnregisterCycleHandler nbxmpp.dispatcher_nb.XMPPDispatcher.SendAndWaitForResponse nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#SendAndWaitForResponse nbxmpp.dispatcher_nb.XMPPDispatcher.send nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#send nbxmpp.dispatcher_nb.XMPPDispatcher.RegisterEventHandler nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#RegisterEventHandler nbxmpp.plugin.PlugIn.get_instance nbxmpp.plugin.PlugIn-class.html#get_instance nbxmpp.dispatcher_nb.BOSHDispatcher.StreamInit nbxmpp.dispatcher_nb.BOSHDispatcher-class.html#StreamInit nbxmpp.dispatcher_nb.XMPPDispatcher.replace_non_character nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#replace_non_character nbxmpp.plugin.PlugIn.PlugOut nbxmpp.plugin.PlugIn-class.html#PlugOut nbxmpp.dispatcher_nb.XMPPDispatcher.RegisterCycleHandler nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#RegisterCycleHandler nbxmpp.dispatcher_nb.BOSHDispatcher.ProcessNonBlocking nbxmpp.dispatcher_nb.BOSHDispatcher-class.html#ProcessNonBlocking nbxmpp.dispatcher_nb.XMPPDispatcher.RegisterNamespaceHandler nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#RegisterNamespaceHandler nbxmpp.dispatcher_nb.XMPPDispatcher.RegisterProtocol nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#RegisterProtocol nbxmpp.dispatcher_nb.XMPPDispatcher._check_stream_start nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#_check_stream_start nbxmpp.dispatcher_nb.XMPPDispatcher.plugin nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#plugin nbxmpp.dispatcher_nb.XMPPDispatcher.returnStanzaHandler nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#returnStanzaHandler nbxmpp.dispatcher_nb.XMPPDispatcher.getAnID nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#getAnID nbxmpp.dispatcher_nb.XMPPDispatcher.RegisterHandler nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#RegisterHandler nbxmpp.dispatcher_nb.XMPPDispatcher.Event nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#Event nbxmpp.dispatcher_nb.Dispatcher nbxmpp.dispatcher_nb.Dispatcher-class.html nbxmpp.dispatcher_nb.Dispatcher.get_instance nbxmpp.dispatcher_nb.Dispatcher-class.html#get_instance nbxmpp.dispatcher_nb.Dispatcher.PlugIn nbxmpp.dispatcher_nb.Dispatcher-class.html#PlugIn nbxmpp.dispatcher_nb.XMPPDispatcher nbxmpp.dispatcher_nb.XMPPDispatcher-class.html nbxmpp.dispatcher_nb.XMPPDispatcher.restoreHandlers nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#restoreHandlers nbxmpp.dispatcher_nb.XMPPDispatcher.plugout nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#plugout nbxmpp.dispatcher_nb.XMPPDispatcher._WaitForData nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#_WaitForData nbxmpp.dispatcher_nb.XMPPDispatcher._init nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#_init nbxmpp.dispatcher_nb.XMPPDispatcher.dispatch nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#dispatch nbxmpp.dispatcher_nb.XMPPDispatcher.RegisterHandlerOnce nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#RegisterHandlerOnce nbxmpp.dispatcher_nb.XMPPDispatcher.__init__ nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#__init__ nbxmpp.dispatcher_nb.XMPPDispatcher.RegisterDefaultHandler nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#RegisterDefaultHandler nbxmpp.dispatcher_nb.XMPPDispatcher.SendAndCallForResponse nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#SendAndCallForResponse nbxmpp.dispatcher_nb.XMPPDispatcher.UnregisterHandler nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#UnregisterHandler nbxmpp.dispatcher_nb.XMPPDispatcher.RegisterNamespace nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#RegisterNamespace nbxmpp.plugin.PlugIn.PlugIn nbxmpp.plugin.PlugIn-class.html#PlugIn nbxmpp.dispatcher_nb.XMPPDispatcher.dumpHandlers nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#dumpHandlers nbxmpp.dispatcher_nb.XMPPDispatcher.UnregisterCycleHandler nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#UnregisterCycleHandler nbxmpp.dispatcher_nb.XMPPDispatcher.SendAndWaitForResponse nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#SendAndWaitForResponse nbxmpp.dispatcher_nb.XMPPDispatcher.send nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#send nbxmpp.dispatcher_nb.XMPPDispatcher.RegisterEventHandler nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#RegisterEventHandler nbxmpp.plugin.PlugIn.get_instance nbxmpp.plugin.PlugIn-class.html#get_instance nbxmpp.dispatcher_nb.XMPPDispatcher.StreamInit nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#StreamInit nbxmpp.dispatcher_nb.XMPPDispatcher.replace_non_character nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#replace_non_character nbxmpp.plugin.PlugIn.PlugOut nbxmpp.plugin.PlugIn-class.html#PlugOut nbxmpp.dispatcher_nb.XMPPDispatcher.RegisterCycleHandler nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#RegisterCycleHandler nbxmpp.dispatcher_nb.XMPPDispatcher.ProcessNonBlocking nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#ProcessNonBlocking nbxmpp.dispatcher_nb.XMPPDispatcher.RegisterNamespaceHandler nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#RegisterNamespaceHandler nbxmpp.dispatcher_nb.XMPPDispatcher.RegisterProtocol nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#RegisterProtocol nbxmpp.dispatcher_nb.XMPPDispatcher._check_stream_start nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#_check_stream_start nbxmpp.dispatcher_nb.XMPPDispatcher.plugin nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#plugin nbxmpp.dispatcher_nb.XMPPDispatcher.returnStanzaHandler nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#returnStanzaHandler nbxmpp.dispatcher_nb.XMPPDispatcher.getAnID nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#getAnID nbxmpp.dispatcher_nb.XMPPDispatcher.RegisterHandler nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#RegisterHandler nbxmpp.dispatcher_nb.XMPPDispatcher.Event nbxmpp.dispatcher_nb.XMPPDispatcher-class.html#Event nbxmpp.idlequeue.GlibIdleQueue nbxmpp.idlequeue.GlibIdleQueue-class.html nbxmpp.idlequeue.IdleQueue.current_time nbxmpp.idlequeue.IdleQueue-class.html#current_time nbxmpp.idlequeue.IdleQueue.remove_alarm nbxmpp.idlequeue.IdleQueue-class.html#remove_alarm nbxmpp.idlequeue.GlibIdleQueue.PROCESS_TIMEOUT nbxmpp.idlequeue.GlibIdleQueue-class.html#PROCESS_TIMEOUT nbxmpp.idlequeue.IdleQueue._check_time_events nbxmpp.idlequeue.IdleQueue-class.html#_check_time_events nbxmpp.idlequeue.GlibIdleQueue._init_idle nbxmpp.idlequeue.GlibIdleQueue-class.html#_init_idle nbxmpp.idlequeue.GlibIdleQueue._process_events nbxmpp.idlequeue.GlibIdleQueue-class.html#_process_events nbxmpp.idlequeue.GlibIdleQueue._add_idle nbxmpp.idlequeue.GlibIdleQueue-class.html#_add_idle nbxmpp.idlequeue.GlibIdleQueue.process nbxmpp.idlequeue.GlibIdleQueue-class.html#process nbxmpp.idlequeue.GlibIdleQueue._remove_idle nbxmpp.idlequeue.GlibIdleQueue-class.html#_remove_idle nbxmpp.idlequeue.IdleQueue.remove_timeout nbxmpp.idlequeue.IdleQueue-class.html#remove_timeout nbxmpp.idlequeue.IdleQueue.unplug_idle nbxmpp.idlequeue.IdleQueue-class.html#unplug_idle nbxmpp.idlequeue.IdleQueue.set_read_timeout nbxmpp.idlequeue.IdleQueue-class.html#set_read_timeout nbxmpp.idlequeue.IdleQueue.plug_idle nbxmpp.idlequeue.IdleQueue-class.html#plug_idle nbxmpp.idlequeue.IdleQueue.__init__ nbxmpp.idlequeue.IdleQueue-class.html#__init__ nbxmpp.idlequeue.IdleQueue.set_alarm nbxmpp.idlequeue.IdleQueue-class.html#set_alarm nbxmpp.idlequeue.IdleCommand nbxmpp.idlequeue.IdleCommand-class.html nbxmpp.idlequeue.IdleCommand._compose_command_args nbxmpp.idlequeue.IdleCommand-class.html#_compose_command_args nbxmpp.idlequeue.IdleCommand.set_idlequeue nbxmpp.idlequeue.IdleCommand-class.html#set_idlequeue nbxmpp.idlequeue.IdleCommand.end nbxmpp.idlequeue.IdleCommand-class.html#end nbxmpp.idlequeue.IdleCommand.start nbxmpp.idlequeue.IdleCommand-class.html#start nbxmpp.idlequeue.IdleCommand._compose_command_line nbxmpp.idlequeue.IdleCommand-class.html#_compose_command_line nbxmpp.idlequeue.IdleCommand.pollend nbxmpp.idlequeue.IdleCommand-class.html#pollend nbxmpp.idlequeue.IdleCommand.pollin nbxmpp.idlequeue.IdleCommand-class.html#pollin nbxmpp.idlequeue.IdleCommand._start_posix nbxmpp.idlequeue.IdleCommand-class.html#_start_posix nbxmpp.idlequeue.IdleCommand.read_timeout nbxmpp.idlequeue.IdleCommand-class.html#read_timeout nbxmpp.idlequeue.IdleObject.fd nbxmpp.idlequeue.IdleObject-class.html#fd nbxmpp.idlequeue.IdleCommand.wait_child nbxmpp.idlequeue.IdleCommand-class.html#wait_child nbxmpp.idlequeue.IdleCommand._start_nt nbxmpp.idlequeue.IdleCommand-class.html#_start_nt nbxmpp.idlequeue.IdleObject.pollout nbxmpp.idlequeue.IdleObject-class.html#pollout nbxmpp.idlequeue.IdleCommand.__init__ nbxmpp.idlequeue.IdleCommand-class.html#__init__ nbxmpp.idlequeue.IdleCommand._return_result nbxmpp.idlequeue.IdleCommand-class.html#_return_result nbxmpp.idlequeue.IdleObject nbxmpp.idlequeue.IdleObject-class.html nbxmpp.idlequeue.IdleObject.pollend nbxmpp.idlequeue.IdleObject-class.html#pollend nbxmpp.idlequeue.IdleObject.fd nbxmpp.idlequeue.IdleObject-class.html#fd nbxmpp.idlequeue.IdleObject.read_timeout nbxmpp.idlequeue.IdleObject-class.html#read_timeout nbxmpp.idlequeue.IdleObject.pollin nbxmpp.idlequeue.IdleObject-class.html#pollin nbxmpp.idlequeue.IdleObject.pollout nbxmpp.idlequeue.IdleObject-class.html#pollout nbxmpp.idlequeue.IdleObject.__init__ nbxmpp.idlequeue.IdleObject-class.html#__init__ nbxmpp.idlequeue.IdleQueue nbxmpp.idlequeue.IdleQueue-class.html nbxmpp.idlequeue.IdleQueue.current_time nbxmpp.idlequeue.IdleQueue-class.html#current_time nbxmpp.idlequeue.IdleQueue.remove_alarm nbxmpp.idlequeue.IdleQueue-class.html#remove_alarm nbxmpp.idlequeue.IdleQueue.PROCESS_TIMEOUT nbxmpp.idlequeue.IdleQueue-class.html#PROCESS_TIMEOUT nbxmpp.idlequeue.IdleQueue.set_alarm nbxmpp.idlequeue.IdleQueue-class.html#set_alarm nbxmpp.idlequeue.IdleQueue._init_idle nbxmpp.idlequeue.IdleQueue-class.html#_init_idle nbxmpp.idlequeue.IdleQueue.unplug_idle nbxmpp.idlequeue.IdleQueue-class.html#unplug_idle nbxmpp.idlequeue.IdleQueue._add_idle nbxmpp.idlequeue.IdleQueue-class.html#_add_idle nbxmpp.idlequeue.IdleQueue.process nbxmpp.idlequeue.IdleQueue-class.html#process nbxmpp.idlequeue.IdleQueue._remove_idle nbxmpp.idlequeue.IdleQueue-class.html#_remove_idle nbxmpp.idlequeue.IdleQueue.remove_timeout nbxmpp.idlequeue.IdleQueue-class.html#remove_timeout nbxmpp.idlequeue.IdleQueue._process_events nbxmpp.idlequeue.IdleQueue-class.html#_process_events nbxmpp.idlequeue.IdleQueue.set_read_timeout nbxmpp.idlequeue.IdleQueue-class.html#set_read_timeout nbxmpp.idlequeue.IdleQueue.plug_idle nbxmpp.idlequeue.IdleQueue-class.html#plug_idle nbxmpp.idlequeue.IdleQueue.__init__ nbxmpp.idlequeue.IdleQueue-class.html#__init__ nbxmpp.idlequeue.IdleQueue._check_time_events nbxmpp.idlequeue.IdleQueue-class.html#_check_time_events nbxmpp.idlequeue.SelectIdleQueue nbxmpp.idlequeue.SelectIdleQueue-class.html nbxmpp.idlequeue.IdleQueue.current_time nbxmpp.idlequeue.IdleQueue-class.html#current_time nbxmpp.idlequeue.IdleQueue.remove_alarm nbxmpp.idlequeue.IdleQueue-class.html#remove_alarm nbxmpp.idlequeue.IdleQueue.PROCESS_TIMEOUT nbxmpp.idlequeue.IdleQueue-class.html#PROCESS_TIMEOUT nbxmpp.idlequeue.IdleQueue._check_time_events nbxmpp.idlequeue.IdleQueue-class.html#_check_time_events nbxmpp.idlequeue.SelectIdleQueue._init_idle nbxmpp.idlequeue.SelectIdleQueue-class.html#_init_idle nbxmpp.idlequeue.IdleQueue.unplug_idle nbxmpp.idlequeue.IdleQueue-class.html#unplug_idle nbxmpp.idlequeue.SelectIdleQueue._add_idle nbxmpp.idlequeue.SelectIdleQueue-class.html#_add_idle nbxmpp.idlequeue.SelectIdleQueue.process nbxmpp.idlequeue.SelectIdleQueue-class.html#process nbxmpp.idlequeue.SelectIdleQueue._remove_idle nbxmpp.idlequeue.SelectIdleQueue-class.html#_remove_idle nbxmpp.idlequeue.IdleQueue.remove_timeout nbxmpp.idlequeue.IdleQueue-class.html#remove_timeout nbxmpp.idlequeue.IdleQueue._process_events nbxmpp.idlequeue.IdleQueue-class.html#_process_events nbxmpp.idlequeue.IdleQueue.set_read_timeout nbxmpp.idlequeue.IdleQueue-class.html#set_read_timeout nbxmpp.idlequeue.IdleQueue.plug_idle nbxmpp.idlequeue.IdleQueue-class.html#plug_idle nbxmpp.idlequeue.IdleQueue.__init__ nbxmpp.idlequeue.IdleQueue-class.html#__init__ nbxmpp.idlequeue.IdleQueue.set_alarm nbxmpp.idlequeue.IdleQueue-class.html#set_alarm nbxmpp.plugin.PlugIn nbxmpp.plugin.PlugIn-class.html nbxmpp.plugin.PlugIn.PlugIn nbxmpp.plugin.PlugIn-class.html#PlugIn nbxmpp.plugin.PlugIn.get_instance nbxmpp.plugin.PlugIn-class.html#get_instance nbxmpp.plugin.PlugIn.__init__ nbxmpp.plugin.PlugIn-class.html#__init__ nbxmpp.plugin.PlugIn.PlugOut nbxmpp.plugin.PlugIn-class.html#PlugOut nbxmpp.protocol.Acks nbxmpp.protocol.Acks-class.html nbxmpp.simplexml.Node.addChild nbxmpp.simplexml.Node-class.html#addChild nbxmpp.simplexml.Node.getAttrs nbxmpp.simplexml.Node-class.html#getAttrs nbxmpp.simplexml.Node.delAttr nbxmpp.simplexml.Node-class.html#delAttr nbxmpp.simplexml.Node.setNamespace nbxmpp.simplexml.Node-class.html#setNamespace nbxmpp.simplexml.Node.__str__ nbxmpp.simplexml.Node-class.html#__str__ nbxmpp.simplexml.Node.getNamespace nbxmpp.simplexml.Node-class.html#getNamespace nbxmpp.simplexml.Node.getChildren nbxmpp.simplexml.Node-class.html#getChildren nbxmpp.simplexml.Node.addData nbxmpp.simplexml.Node-class.html#addData nbxmpp.protocol.Acks.buildEnable nbxmpp.protocol.Acks-class.html#buildEnable nbxmpp.protocol.Acks.buildAnswer nbxmpp.protocol.Acks-class.html#buildAnswer nbxmpp.simplexml.Node.clearData nbxmpp.simplexml.Node-class.html#clearData nbxmpp.simplexml.Node.__contains__ nbxmpp.simplexml.Node-class.html#__contains__ nbxmpp.simplexml.Node.setParent nbxmpp.simplexml.Node-class.html#setParent nbxmpp.simplexml.Node.getName nbxmpp.simplexml.Node-class.html#getName nbxmpp.simplexml.Node.__getattr__ nbxmpp.simplexml.Node-class.html#__getattr__ nbxmpp.protocol.Acks.__init__ nbxmpp.protocol.Acks-class.html#__init__ nbxmpp.protocol.Acks.buildRequest nbxmpp.protocol.Acks-class.html#buildRequest nbxmpp.simplexml.Node.getData nbxmpp.simplexml.Node-class.html#getData nbxmpp.simplexml.Node.lookup_nsp nbxmpp.simplexml.Node-class.html#lookup_nsp nbxmpp.simplexml.Node.setData nbxmpp.simplexml.Node-class.html#setData nbxmpp.simplexml.Node.setTagData nbxmpp.simplexml.Node-class.html#setTagData nbxmpp.simplexml.Node.setName nbxmpp.simplexml.Node-class.html#setName nbxmpp.simplexml.Node.__getitem__ nbxmpp.simplexml.Node-class.html#__getitem__ nbxmpp.simplexml.Node.getTagAttr nbxmpp.simplexml.Node-class.html#getTagAttr nbxmpp.simplexml.Node.__setitem__ nbxmpp.simplexml.Node-class.html#__setitem__ nbxmpp.simplexml.Node.getPayload nbxmpp.simplexml.Node-class.html#getPayload nbxmpp.simplexml.Node.iterTags nbxmpp.simplexml.Node-class.html#iterTags nbxmpp.simplexml.Node.getTag nbxmpp.simplexml.Node-class.html#getTag nbxmpp.simplexml.Node.setTagAttr nbxmpp.simplexml.Node-class.html#setTagAttr nbxmpp.simplexml.Node.getTags nbxmpp.simplexml.Node-class.html#getTags nbxmpp.simplexml.Node.__delitem__ nbxmpp.simplexml.Node-class.html#__delitem__ nbxmpp.simplexml.Node.getParent nbxmpp.simplexml.Node-class.html#getParent nbxmpp.simplexml.Node.delChild nbxmpp.simplexml.Node-class.html#delChild nbxmpp.simplexml.Node.setAttr nbxmpp.simplexml.Node-class.html#setAttr nbxmpp.simplexml.Node.FORCE_NODE_RECREATION nbxmpp.simplexml.Node-class.html#FORCE_NODE_RECREATION nbxmpp.simplexml.Node.getAttr nbxmpp.simplexml.Node-class.html#getAttr nbxmpp.simplexml.Node.has_attr nbxmpp.simplexml.Node-class.html#has_attr nbxmpp.simplexml.Node.setPayload nbxmpp.simplexml.Node-class.html#setPayload nbxmpp.simplexml.Node.getTagData nbxmpp.simplexml.Node-class.html#getTagData nbxmpp.simplexml.Node.setTag nbxmpp.simplexml.Node-class.html#setTag nbxmpp.protocol.Acks.buildResume nbxmpp.protocol.Acks-class.html#buildResume nbxmpp.protocol.BOSHBody nbxmpp.protocol.BOSHBody-class.html nbxmpp.simplexml.Node.addChild nbxmpp.simplexml.Node-class.html#addChild nbxmpp.simplexml.Node.getAttrs nbxmpp.simplexml.Node-class.html#getAttrs nbxmpp.simplexml.Node.delAttr nbxmpp.simplexml.Node-class.html#delAttr nbxmpp.simplexml.Node.setNamespace nbxmpp.simplexml.Node-class.html#setNamespace nbxmpp.simplexml.Node.__str__ nbxmpp.simplexml.Node-class.html#__str__ nbxmpp.simplexml.Node.getNamespace nbxmpp.simplexml.Node-class.html#getNamespace nbxmpp.simplexml.Node.getChildren nbxmpp.simplexml.Node-class.html#getChildren nbxmpp.simplexml.Node.addData nbxmpp.simplexml.Node-class.html#addData nbxmpp.protocol.BOSHBody.__init__ nbxmpp.protocol.BOSHBody-class.html#__init__ nbxmpp.simplexml.Node.setName nbxmpp.simplexml.Node-class.html#setName nbxmpp.simplexml.Node.clearData nbxmpp.simplexml.Node-class.html#clearData nbxmpp.simplexml.Node.__contains__ nbxmpp.simplexml.Node-class.html#__contains__ nbxmpp.simplexml.Node.setParent nbxmpp.simplexml.Node-class.html#setParent nbxmpp.simplexml.Node.getName nbxmpp.simplexml.Node-class.html#getName nbxmpp.simplexml.Node.__getattr__ nbxmpp.simplexml.Node-class.html#__getattr__ nbxmpp.simplexml.Node.getData nbxmpp.simplexml.Node-class.html#getData nbxmpp.simplexml.Node.lookup_nsp nbxmpp.simplexml.Node-class.html#lookup_nsp nbxmpp.simplexml.Node.setData nbxmpp.simplexml.Node-class.html#setData nbxmpp.simplexml.Node.setTagData nbxmpp.simplexml.Node-class.html#setTagData nbxmpp.simplexml.Node.__getitem__ nbxmpp.simplexml.Node-class.html#__getitem__ nbxmpp.simplexml.Node.getTagAttr nbxmpp.simplexml.Node-class.html#getTagAttr nbxmpp.simplexml.Node.__setitem__ nbxmpp.simplexml.Node-class.html#__setitem__ nbxmpp.simplexml.Node.getPayload nbxmpp.simplexml.Node-class.html#getPayload nbxmpp.simplexml.Node.iterTags nbxmpp.simplexml.Node-class.html#iterTags nbxmpp.simplexml.Node.getTag nbxmpp.simplexml.Node-class.html#getTag nbxmpp.simplexml.Node.setTagAttr nbxmpp.simplexml.Node-class.html#setTagAttr nbxmpp.simplexml.Node.getTags nbxmpp.simplexml.Node-class.html#getTags nbxmpp.simplexml.Node.__delitem__ nbxmpp.simplexml.Node-class.html#__delitem__ nbxmpp.simplexml.Node.getParent nbxmpp.simplexml.Node-class.html#getParent nbxmpp.simplexml.Node.delChild nbxmpp.simplexml.Node-class.html#delChild nbxmpp.simplexml.Node.setAttr nbxmpp.simplexml.Node-class.html#setAttr nbxmpp.simplexml.Node.FORCE_NODE_RECREATION nbxmpp.simplexml.Node-class.html#FORCE_NODE_RECREATION nbxmpp.simplexml.Node.getAttr nbxmpp.simplexml.Node-class.html#getAttr nbxmpp.simplexml.Node.has_attr nbxmpp.simplexml.Node-class.html#has_attr nbxmpp.simplexml.Node.setPayload nbxmpp.simplexml.Node-class.html#setPayload nbxmpp.simplexml.Node.getTagData nbxmpp.simplexml.Node-class.html#getTagData nbxmpp.simplexml.Node.setTag nbxmpp.simplexml.Node-class.html#setTag nbxmpp.protocol.BadFormat nbxmpp.protocol.BadFormat-class.html nbxmpp.protocol.BadNamespacePrefix nbxmpp.protocol.BadNamespacePrefix-class.html nbxmpp.protocol.Conflict nbxmpp.protocol.Conflict-class.html nbxmpp.protocol.ConnectionTimeout nbxmpp.protocol.ConnectionTimeout-class.html nbxmpp.protocol.DataField nbxmpp.protocol.DataField-class.html nbxmpp.simplexml.Node.addChild nbxmpp.simplexml.Node-class.html#addChild nbxmpp.protocol.DataField.addOption nbxmpp.protocol.DataField-class.html#addOption nbxmpp.simplexml.Node.getAttrs nbxmpp.simplexml.Node-class.html#getAttrs nbxmpp.simplexml.Node.delAttr nbxmpp.simplexml.Node-class.html#delAttr nbxmpp.simplexml.Node.setNamespace nbxmpp.simplexml.Node-class.html#setNamespace nbxmpp.simplexml.Node.__str__ nbxmpp.simplexml.Node-class.html#__str__ nbxmpp.simplexml.Node.getNamespace nbxmpp.simplexml.Node-class.html#getNamespace nbxmpp.protocol.DataField.getValues nbxmpp.protocol.DataField-class.html#getValues nbxmpp.simplexml.Node.getChildren nbxmpp.simplexml.Node-class.html#getChildren nbxmpp.simplexml.Node.addData nbxmpp.simplexml.Node-class.html#addData nbxmpp.protocol.DataField.getOptions nbxmpp.protocol.DataField-class.html#getOptions nbxmpp.protocol.DataField.setVar nbxmpp.protocol.DataField-class.html#setVar nbxmpp.protocol.DataField.__init__ nbxmpp.protocol.DataField-class.html#__init__ nbxmpp.protocol.DataField.setType nbxmpp.protocol.DataField-class.html#setType nbxmpp.simplexml.Node.setTagAttr nbxmpp.simplexml.Node-class.html#setTagAttr nbxmpp.simplexml.Node.setName nbxmpp.simplexml.Node-class.html#setName nbxmpp.simplexml.Node.clearData nbxmpp.simplexml.Node-class.html#clearData nbxmpp.simplexml.Node.__contains__ nbxmpp.simplexml.Node-class.html#__contains__ nbxmpp.protocol.DataField.getDesc nbxmpp.protocol.DataField-class.html#getDesc nbxmpp.simplexml.Node.setParent nbxmpp.simplexml.Node-class.html#setParent nbxmpp.simplexml.Node.getName nbxmpp.simplexml.Node-class.html#getName nbxmpp.simplexml.Node.__getattr__ nbxmpp.simplexml.Node-class.html#__getattr__ nbxmpp.protocol.DataField.getVar nbxmpp.protocol.DataField-class.html#getVar nbxmpp.simplexml.Node.getData nbxmpp.simplexml.Node-class.html#getData nbxmpp.protocol.DataField.setDesc nbxmpp.protocol.DataField-class.html#setDesc nbxmpp.simplexml.Node.lookup_nsp nbxmpp.simplexml.Node-class.html#lookup_nsp nbxmpp.simplexml.Node.setData nbxmpp.simplexml.Node-class.html#setData nbxmpp.simplexml.Node.setTagData nbxmpp.simplexml.Node-class.html#setTagData nbxmpp.protocol.DataField.setValue nbxmpp.protocol.DataField-class.html#setValue nbxmpp.simplexml.Node.__getitem__ nbxmpp.simplexml.Node-class.html#__getitem__ nbxmpp.simplexml.Node.getTagAttr nbxmpp.simplexml.Node-class.html#getTagAttr nbxmpp.protocol.DataField.setRequired nbxmpp.protocol.DataField-class.html#setRequired nbxmpp.protocol.DataField.getType nbxmpp.protocol.DataField-class.html#getType nbxmpp.protocol.DataField.setOptions nbxmpp.protocol.DataField-class.html#setOptions nbxmpp.protocol.DataField.isRequired nbxmpp.protocol.DataField-class.html#isRequired nbxmpp.simplexml.Node.__setitem__ nbxmpp.simplexml.Node-class.html#__setitem__ nbxmpp.simplexml.Node.getPayload nbxmpp.simplexml.Node-class.html#getPayload nbxmpp.simplexml.Node.iterTags nbxmpp.simplexml.Node-class.html#iterTags nbxmpp.simplexml.Node.getTag nbxmpp.simplexml.Node-class.html#getTag nbxmpp.protocol.DataField.setValues nbxmpp.protocol.DataField-class.html#setValues nbxmpp.simplexml.Node.getTags nbxmpp.simplexml.Node-class.html#getTags nbxmpp.simplexml.Node.__delitem__ nbxmpp.simplexml.Node-class.html#__delitem__ nbxmpp.simplexml.Node.getParent nbxmpp.simplexml.Node-class.html#getParent nbxmpp.simplexml.Node.delChild nbxmpp.simplexml.Node-class.html#delChild nbxmpp.simplexml.Node.setAttr nbxmpp.simplexml.Node-class.html#setAttr nbxmpp.simplexml.Node.FORCE_NODE_RECREATION nbxmpp.simplexml.Node-class.html#FORCE_NODE_RECREATION nbxmpp.simplexml.Node.getAttr nbxmpp.simplexml.Node-class.html#getAttr nbxmpp.simplexml.Node.has_attr nbxmpp.simplexml.Node-class.html#has_attr nbxmpp.protocol.DataField.getValue nbxmpp.protocol.DataField-class.html#getValue nbxmpp.simplexml.Node.setPayload nbxmpp.simplexml.Node-class.html#setPayload nbxmpp.simplexml.Node.getTagData nbxmpp.simplexml.Node-class.html#getTagData nbxmpp.simplexml.Node.setTag nbxmpp.simplexml.Node-class.html#setTag nbxmpp.protocol.DataField.addValue nbxmpp.protocol.DataField-class.html#addValue nbxmpp.protocol.DataForm nbxmpp.protocol.DataForm-class.html nbxmpp.simplexml.Node.addChild nbxmpp.simplexml.Node-class.html#addChild nbxmpp.simplexml.Node.getAttrs nbxmpp.simplexml.Node-class.html#getAttrs nbxmpp.simplexml.Node.delAttr nbxmpp.simplexml.Node-class.html#delAttr nbxmpp.simplexml.Node.setNamespace nbxmpp.simplexml.Node-class.html#setNamespace nbxmpp.protocol.DataForm.setTitle nbxmpp.protocol.DataForm-class.html#setTitle nbxmpp.simplexml.Node.getNamespace nbxmpp.simplexml.Node-class.html#getNamespace nbxmpp.simplexml.Node.getChildren nbxmpp.simplexml.Node-class.html#getChildren nbxmpp.simplexml.Node.addData nbxmpp.simplexml.Node-class.html#addData nbxmpp.protocol.DataForm.setField nbxmpp.protocol.DataForm-class.html#setField nbxmpp.protocol.DataForm.__init__ nbxmpp.protocol.DataForm-class.html#__init__ nbxmpp.protocol.DataForm.setType nbxmpp.protocol.DataForm-class.html#setType nbxmpp.protocol.DataForm.__getitem__ nbxmpp.protocol.DataForm-class.html#__getitem__ nbxmpp.simplexml.Node.clearData nbxmpp.simplexml.Node-class.html#clearData nbxmpp.simplexml.Node.__contains__ nbxmpp.simplexml.Node-class.html#__contains__ nbxmpp.simplexml.Node.setParent nbxmpp.simplexml.Node-class.html#setParent nbxmpp.simplexml.Node.getName nbxmpp.simplexml.Node-class.html#getName nbxmpp.simplexml.Node.setAttr nbxmpp.simplexml.Node-class.html#setAttr nbxmpp.simplexml.Node.__getattr__ nbxmpp.simplexml.Node-class.html#__getattr__ nbxmpp.simplexml.Node.getData nbxmpp.simplexml.Node-class.html#getData nbxmpp.protocol.DataForm.setInstructions nbxmpp.protocol.DataForm-class.html#setInstructions nbxmpp.simplexml.Node.__str__ nbxmpp.simplexml.Node-class.html#__str__ nbxmpp.simplexml.Node.lookup_nsp nbxmpp.simplexml.Node-class.html#lookup_nsp nbxmpp.simplexml.Node.setData nbxmpp.simplexml.Node-class.html#setData nbxmpp.simplexml.Node.setTagData nbxmpp.simplexml.Node-class.html#setTagData nbxmpp.simplexml.Node.setName nbxmpp.simplexml.Node-class.html#setName nbxmpp.protocol.DataForm.asDict nbxmpp.protocol.DataForm-class.html#asDict nbxmpp.simplexml.Node.getTagAttr nbxmpp.simplexml.Node-class.html#getTagAttr nbxmpp.protocol.DataForm.getType nbxmpp.protocol.DataForm-class.html#getType nbxmpp.protocol.DataForm.__setitem__ nbxmpp.protocol.DataForm-class.html#__setitem__ nbxmpp.simplexml.Node.getPayload nbxmpp.simplexml.Node-class.html#getPayload nbxmpp.simplexml.Node.iterTags nbxmpp.simplexml.Node-class.html#iterTags nbxmpp.protocol.DataForm.getTitle nbxmpp.protocol.DataForm-class.html#getTitle nbxmpp.protocol.DataForm.getInstructions nbxmpp.protocol.DataForm-class.html#getInstructions nbxmpp.simplexml.Node.getTag nbxmpp.simplexml.Node-class.html#getTag nbxmpp.simplexml.Node.setTagAttr nbxmpp.simplexml.Node-class.html#setTagAttr nbxmpp.simplexml.Node.getTags nbxmpp.simplexml.Node-class.html#getTags nbxmpp.simplexml.Node.__delitem__ nbxmpp.simplexml.Node-class.html#__delitem__ nbxmpp.simplexml.Node.getTagData nbxmpp.simplexml.Node-class.html#getTagData nbxmpp.simplexml.Node.getParent nbxmpp.simplexml.Node-class.html#getParent nbxmpp.simplexml.Node.delChild nbxmpp.simplexml.Node-class.html#delChild nbxmpp.protocol.DataForm.getField nbxmpp.protocol.DataForm-class.html#getField nbxmpp.simplexml.Node.FORCE_NODE_RECREATION nbxmpp.simplexml.Node-class.html#FORCE_NODE_RECREATION nbxmpp.simplexml.Node.getAttr nbxmpp.simplexml.Node-class.html#getAttr nbxmpp.simplexml.Node.has_attr nbxmpp.simplexml.Node-class.html#has_attr nbxmpp.simplexml.Node.setPayload nbxmpp.simplexml.Node-class.html#setPayload nbxmpp.protocol.DataForm.addInstructions nbxmpp.protocol.DataForm-class.html#addInstructions nbxmpp.simplexml.Node.setTag nbxmpp.simplexml.Node-class.html#setTag nbxmpp.protocol.Error nbxmpp.protocol.Error-class.html nbxmpp.simplexml.Node.addChild nbxmpp.simplexml.Node-class.html#addChild nbxmpp.simplexml.Node.getAttrs nbxmpp.simplexml.Node-class.html#getAttrs nbxmpp.protocol.Protocol.setFrom nbxmpp.protocol.Protocol-class.html#setFrom nbxmpp.simplexml.Node.setNamespace nbxmpp.simplexml.Node-class.html#setNamespace nbxmpp.simplexml.Node.__str__ nbxmpp.simplexml.Node-class.html#__str__ nbxmpp.simplexml.Node.setAttr nbxmpp.simplexml.Node-class.html#setAttr nbxmpp.simplexml.Node.getNamespace nbxmpp.simplexml.Node-class.html#getNamespace nbxmpp.protocol.Protocol.getID nbxmpp.protocol.Protocol-class.html#getID nbxmpp.simplexml.Node.getChildren nbxmpp.simplexml.Node-class.html#getChildren nbxmpp.simplexml.Node.addData nbxmpp.simplexml.Node-class.html#addData nbxmpp.protocol.Protocol.setTo nbxmpp.protocol.Protocol-class.html#setTo nbxmpp.simplexml.Node.delAttr nbxmpp.simplexml.Node-class.html#delAttr nbxmpp.protocol.Protocol.setError nbxmpp.protocol.Protocol-class.html#setError nbxmpp.protocol.Error.__init__ nbxmpp.protocol.Error-class.html#__init__ nbxmpp.protocol.Protocol.setType nbxmpp.protocol.Protocol-class.html#setType nbxmpp.protocol.Protocol.getTo nbxmpp.protocol.Protocol-class.html#getTo nbxmpp.protocol.Protocol.getTimestamp2 nbxmpp.protocol.Protocol-class.html#getTimestamp2 nbxmpp.simplexml.Node.setName nbxmpp.simplexml.Node-class.html#setName nbxmpp.protocol.Protocol.getError nbxmpp.protocol.Protocol-class.html#getError nbxmpp.simplexml.Node.__contains__ nbxmpp.simplexml.Node-class.html#__contains__ nbxmpp.simplexml.Node.setParent nbxmpp.simplexml.Node-class.html#setParent nbxmpp.simplexml.Node.getName nbxmpp.simplexml.Node-class.html#getName nbxmpp.protocol.Protocol.getFrom nbxmpp.protocol.Protocol-class.html#getFrom nbxmpp.protocol.Protocol.setTimestamp nbxmpp.protocol.Protocol-class.html#setTimestamp nbxmpp.simplexml.Node.__getattr__ nbxmpp.simplexml.Node-class.html#__getattr__ nbxmpp.protocol.Protocol.getTimestamp nbxmpp.protocol.Protocol-class.html#getTimestamp nbxmpp.simplexml.Node.getData nbxmpp.simplexml.Node-class.html#getData nbxmpp.simplexml.Node.lookup_nsp nbxmpp.simplexml.Node-class.html#lookup_nsp nbxmpp.simplexml.Node.setData nbxmpp.simplexml.Node-class.html#setData nbxmpp.protocol.Protocol.getErrorCode nbxmpp.protocol.Protocol-class.html#getErrorCode nbxmpp.protocol.Error.__dupstr__ nbxmpp.protocol.Error-class.html#__dupstr__ nbxmpp.simplexml.Node.setTag nbxmpp.simplexml.Node-class.html#setTag nbxmpp.simplexml.Node.__getitem__ nbxmpp.simplexml.Node-class.html#__getitem__ nbxmpp.simplexml.Node.getTagAttr nbxmpp.simplexml.Node-class.html#getTagAttr nbxmpp.protocol.Protocol.getType nbxmpp.protocol.Protocol-class.html#getType nbxmpp.protocol.Protocol.__setitem__ nbxmpp.protocol.Protocol-class.html#__setitem__ nbxmpp.protocol.Protocol.getStatusConditions nbxmpp.protocol.Protocol-class.html#getStatusConditions nbxmpp.simplexml.Node.getPayload nbxmpp.simplexml.Node-class.html#getPayload nbxmpp.simplexml.Node.iterTags nbxmpp.simplexml.Node-class.html#iterTags nbxmpp.protocol.Protocol.setID nbxmpp.protocol.Protocol-class.html#setID nbxmpp.simplexml.Node.setTagAttr nbxmpp.simplexml.Node-class.html#setTagAttr nbxmpp.protocol.Protocol.getErrorMsg nbxmpp.protocol.Protocol-class.html#getErrorMsg nbxmpp.simplexml.Node.getParent nbxmpp.simplexml.Node-class.html#getParent nbxmpp.simplexml.Node.getTags nbxmpp.simplexml.Node-class.html#getTags nbxmpp.simplexml.Node.__delitem__ nbxmpp.simplexml.Node-class.html#__delitem__ nbxmpp.simplexml.Node.clearData nbxmpp.simplexml.Node-class.html#clearData nbxmpp.simplexml.Node.delChild nbxmpp.simplexml.Node-class.html#delChild nbxmpp.simplexml.Node.setTagData nbxmpp.simplexml.Node-class.html#setTagData nbxmpp.simplexml.Node.FORCE_NODE_RECREATION nbxmpp.simplexml.Node-class.html#FORCE_NODE_RECREATION nbxmpp.simplexml.Node.getAttr nbxmpp.simplexml.Node-class.html#getAttr nbxmpp.simplexml.Node.has_attr nbxmpp.simplexml.Node-class.html#has_attr nbxmpp.simplexml.Node.setPayload nbxmpp.simplexml.Node-class.html#setPayload nbxmpp.simplexml.Node.getTagData nbxmpp.simplexml.Node-class.html#getTagData nbxmpp.protocol.Protocol.getProperties nbxmpp.protocol.Protocol-class.html#getProperties nbxmpp.simplexml.Node.getTag nbxmpp.simplexml.Node-class.html#getTag nbxmpp.protocol.ErrorNode nbxmpp.protocol.ErrorNode-class.html nbxmpp.simplexml.Node.addChild nbxmpp.simplexml.Node-class.html#addChild nbxmpp.simplexml.Node.getAttrs nbxmpp.simplexml.Node-class.html#getAttrs nbxmpp.simplexml.Node.delAttr nbxmpp.simplexml.Node-class.html#delAttr nbxmpp.simplexml.Node.setNamespace nbxmpp.simplexml.Node-class.html#setNamespace nbxmpp.simplexml.Node.__str__ nbxmpp.simplexml.Node-class.html#__str__ nbxmpp.simplexml.Node.getNamespace nbxmpp.simplexml.Node-class.html#getNamespace nbxmpp.simplexml.Node.getChildren nbxmpp.simplexml.Node-class.html#getChildren nbxmpp.simplexml.Node.addData nbxmpp.simplexml.Node-class.html#addData nbxmpp.protocol.ErrorNode.__init__ nbxmpp.protocol.ErrorNode-class.html#__init__ nbxmpp.simplexml.Node.setName nbxmpp.simplexml.Node-class.html#setName nbxmpp.simplexml.Node.clearData nbxmpp.simplexml.Node-class.html#clearData nbxmpp.simplexml.Node.__contains__ nbxmpp.simplexml.Node-class.html#__contains__ nbxmpp.simplexml.Node.setParent nbxmpp.simplexml.Node-class.html#setParent nbxmpp.simplexml.Node.getName nbxmpp.simplexml.Node-class.html#getName nbxmpp.simplexml.Node.__getattr__ nbxmpp.simplexml.Node-class.html#__getattr__ nbxmpp.simplexml.Node.getData nbxmpp.simplexml.Node-class.html#getData nbxmpp.simplexml.Node.lookup_nsp nbxmpp.simplexml.Node-class.html#lookup_nsp nbxmpp.simplexml.Node.setData nbxmpp.simplexml.Node-class.html#setData nbxmpp.simplexml.Node.setTagData nbxmpp.simplexml.Node-class.html#setTagData nbxmpp.simplexml.Node.__getitem__ nbxmpp.simplexml.Node-class.html#__getitem__ nbxmpp.simplexml.Node.getTagAttr nbxmpp.simplexml.Node-class.html#getTagAttr nbxmpp.simplexml.Node.__setitem__ nbxmpp.simplexml.Node-class.html#__setitem__ nbxmpp.simplexml.Node.getPayload nbxmpp.simplexml.Node-class.html#getPayload nbxmpp.simplexml.Node.iterTags nbxmpp.simplexml.Node-class.html#iterTags nbxmpp.simplexml.Node.getTag nbxmpp.simplexml.Node-class.html#getTag nbxmpp.simplexml.Node.setTagAttr nbxmpp.simplexml.Node-class.html#setTagAttr nbxmpp.simplexml.Node.getTags nbxmpp.simplexml.Node-class.html#getTags nbxmpp.simplexml.Node.__delitem__ nbxmpp.simplexml.Node-class.html#__delitem__ nbxmpp.simplexml.Node.getParent nbxmpp.simplexml.Node-class.html#getParent nbxmpp.simplexml.Node.delChild nbxmpp.simplexml.Node-class.html#delChild nbxmpp.simplexml.Node.setAttr nbxmpp.simplexml.Node-class.html#setAttr nbxmpp.simplexml.Node.FORCE_NODE_RECREATION nbxmpp.simplexml.Node-class.html#FORCE_NODE_RECREATION nbxmpp.simplexml.Node.getAttr nbxmpp.simplexml.Node-class.html#getAttr nbxmpp.simplexml.Node.has_attr nbxmpp.simplexml.Node-class.html#has_attr nbxmpp.simplexml.Node.setPayload nbxmpp.simplexml.Node-class.html#setPayload nbxmpp.simplexml.Node.getTagData nbxmpp.simplexml.Node-class.html#getTagData nbxmpp.simplexml.Node.setTag nbxmpp.simplexml.Node-class.html#setTag nbxmpp.protocol.Hashes nbxmpp.protocol.Hashes-class.html nbxmpp.simplexml.Node.addChild nbxmpp.simplexml.Node-class.html#addChild nbxmpp.simplexml.Node.getAttrs nbxmpp.simplexml.Node-class.html#getAttrs nbxmpp.simplexml.Node.delAttr nbxmpp.simplexml.Node-class.html#delAttr nbxmpp.simplexml.Node.setNamespace nbxmpp.simplexml.Node-class.html#setNamespace nbxmpp.simplexml.Node.__str__ nbxmpp.simplexml.Node-class.html#__str__ nbxmpp.protocol.Hashes.supported nbxmpp.protocol.Hashes-class.html#supported nbxmpp.simplexml.Node.getNamespace nbxmpp.simplexml.Node-class.html#getNamespace nbxmpp.simplexml.Node.getChildren nbxmpp.simplexml.Node-class.html#getChildren nbxmpp.simplexml.Node.addData nbxmpp.simplexml.Node-class.html#addData nbxmpp.protocol.Hashes.__init__ nbxmpp.protocol.Hashes-class.html#__init__ nbxmpp.protocol.Hashes.addHash nbxmpp.protocol.Hashes-class.html#addHash nbxmpp.simplexml.Node.clearData nbxmpp.simplexml.Node-class.html#clearData nbxmpp.simplexml.Node.__contains__ nbxmpp.simplexml.Node-class.html#__contains__ nbxmpp.simplexml.Node.setParent nbxmpp.simplexml.Node-class.html#setParent nbxmpp.simplexml.Node.getName nbxmpp.simplexml.Node-class.html#getName nbxmpp.simplexml.Node.__getattr__ nbxmpp.simplexml.Node-class.html#__getattr__ nbxmpp.simplexml.Node.getData nbxmpp.simplexml.Node-class.html#getData nbxmpp.simplexml.Node.lookup_nsp nbxmpp.simplexml.Node-class.html#lookup_nsp nbxmpp.simplexml.Node.setData nbxmpp.simplexml.Node-class.html#setData nbxmpp.simplexml.Node.setTagData nbxmpp.simplexml.Node-class.html#setTagData nbxmpp.simplexml.Node.setName nbxmpp.simplexml.Node-class.html#setName nbxmpp.simplexml.Node.__getitem__ nbxmpp.simplexml.Node-class.html#__getitem__ nbxmpp.simplexml.Node.getTagAttr nbxmpp.simplexml.Node-class.html#getTagAttr nbxmpp.protocol.Hashes.calculateHash nbxmpp.protocol.Hashes-class.html#calculateHash nbxmpp.simplexml.Node.__setitem__ nbxmpp.simplexml.Node-class.html#__setitem__ nbxmpp.simplexml.Node.getPayload nbxmpp.simplexml.Node-class.html#getPayload nbxmpp.simplexml.Node.iterTags nbxmpp.simplexml.Node-class.html#iterTags nbxmpp.simplexml.Node.getTag nbxmpp.simplexml.Node-class.html#getTag nbxmpp.simplexml.Node.setTagAttr nbxmpp.simplexml.Node-class.html#setTagAttr nbxmpp.simplexml.Node.getTags nbxmpp.simplexml.Node-class.html#getTags nbxmpp.simplexml.Node.__delitem__ nbxmpp.simplexml.Node-class.html#__delitem__ nbxmpp.simplexml.Node.getParent nbxmpp.simplexml.Node-class.html#getParent nbxmpp.simplexml.Node.delChild nbxmpp.simplexml.Node-class.html#delChild nbxmpp.simplexml.Node.setAttr nbxmpp.simplexml.Node-class.html#setAttr nbxmpp.simplexml.Node.FORCE_NODE_RECREATION nbxmpp.simplexml.Node-class.html#FORCE_NODE_RECREATION nbxmpp.simplexml.Node.getAttr nbxmpp.simplexml.Node-class.html#getAttr nbxmpp.simplexml.Node.has_attr nbxmpp.simplexml.Node-class.html#has_attr nbxmpp.simplexml.Node.setPayload nbxmpp.simplexml.Node-class.html#setPayload nbxmpp.simplexml.Node.getTagData nbxmpp.simplexml.Node-class.html#getTagData nbxmpp.simplexml.Node.setTag nbxmpp.simplexml.Node-class.html#setTag nbxmpp.protocol.HostGone nbxmpp.protocol.HostGone-class.html nbxmpp.protocol.HostUnknown nbxmpp.protocol.HostUnknown-class.html nbxmpp.protocol.ImproperAddressing nbxmpp.protocol.ImproperAddressing-class.html nbxmpp.protocol.InternalServerError nbxmpp.protocol.InternalServerError-class.html nbxmpp.protocol.InvalidFrom nbxmpp.protocol.InvalidFrom-class.html nbxmpp.protocol.InvalidID nbxmpp.protocol.InvalidID-class.html nbxmpp.protocol.InvalidNamespace nbxmpp.protocol.InvalidNamespace-class.html nbxmpp.protocol.InvalidXML nbxmpp.protocol.InvalidXML-class.html nbxmpp.protocol.Iq nbxmpp.protocol.Iq-class.html nbxmpp.simplexml.Node.addChild nbxmpp.simplexml.Node-class.html#addChild nbxmpp.simplexml.Node.getAttrs nbxmpp.simplexml.Node-class.html#getAttrs nbxmpp.protocol.Protocol.setFrom nbxmpp.protocol.Protocol-class.html#setFrom nbxmpp.simplexml.Node.setNamespace nbxmpp.simplexml.Node-class.html#setNamespace nbxmpp.simplexml.Node.__str__ nbxmpp.simplexml.Node-class.html#__str__ nbxmpp.simplexml.Node.getNamespace nbxmpp.simplexml.Node-class.html#getNamespace nbxmpp.protocol.Protocol.getID nbxmpp.protocol.Protocol-class.html#getID nbxmpp.simplexml.Node.getChildren nbxmpp.simplexml.Node-class.html#getChildren nbxmpp.simplexml.Node.addData nbxmpp.simplexml.Node-class.html#addData nbxmpp.protocol.Protocol.setTo nbxmpp.protocol.Protocol-class.html#setTo nbxmpp.protocol.Iq.getQueryNS nbxmpp.protocol.Iq-class.html#getQueryNS nbxmpp.simplexml.Node.delAttr nbxmpp.simplexml.Node-class.html#delAttr nbxmpp.protocol.Protocol.setError nbxmpp.protocol.Protocol-class.html#setError nbxmpp.protocol.Iq.__init__ nbxmpp.protocol.Iq-class.html#__init__ nbxmpp.protocol.Protocol.setType nbxmpp.protocol.Protocol-class.html#setType nbxmpp.protocol.Protocol.getTo nbxmpp.protocol.Protocol-class.html#getTo nbxmpp.protocol.Protocol.getTimestamp2 nbxmpp.protocol.Protocol-class.html#getTimestamp2 nbxmpp.simplexml.Node.__getitem__ nbxmpp.simplexml.Node-class.html#__getitem__ nbxmpp.protocol.Protocol.getError nbxmpp.protocol.Protocol-class.html#getError nbxmpp.simplexml.Node.__contains__ nbxmpp.simplexml.Node-class.html#__contains__ nbxmpp.simplexml.Node.setParent nbxmpp.simplexml.Node-class.html#setParent nbxmpp.simplexml.Node.getName nbxmpp.simplexml.Node-class.html#getName nbxmpp.protocol.Protocol.getFrom nbxmpp.protocol.Protocol-class.html#getFrom nbxmpp.protocol.Protocol.setTimestamp nbxmpp.protocol.Protocol-class.html#setTimestamp nbxmpp.protocol.Iq.getQueryPayload nbxmpp.protocol.Iq-class.html#getQueryPayload nbxmpp.simplexml.Node.__getattr__ nbxmpp.simplexml.Node-class.html#__getattr__ nbxmpp.simplexml.Node.getTags nbxmpp.simplexml.Node-class.html#getTags nbxmpp.protocol.Protocol.getTimestamp nbxmpp.protocol.Protocol-class.html#getTimestamp nbxmpp.protocol.Iq.setQueryPayload nbxmpp.protocol.Iq-class.html#setQueryPayload nbxmpp.simplexml.Node.getData nbxmpp.simplexml.Node-class.html#getData nbxmpp.simplexml.Node.lookup_nsp nbxmpp.simplexml.Node-class.html#lookup_nsp nbxmpp.simplexml.Node.setData nbxmpp.simplexml.Node-class.html#setData nbxmpp.protocol.Iq.getQuery nbxmpp.protocol.Iq-class.html#getQuery nbxmpp.protocol.Protocol.getErrorCode nbxmpp.protocol.Protocol-class.html#getErrorCode nbxmpp.simplexml.Node.setTagData nbxmpp.simplexml.Node-class.html#setTagData nbxmpp.simplexml.Node.setName nbxmpp.simplexml.Node-class.html#setName nbxmpp.simplexml.Node.setTag nbxmpp.simplexml.Node-class.html#setTag nbxmpp.protocol.Iq.buildReply nbxmpp.protocol.Iq-class.html#buildReply nbxmpp.simplexml.Node.getTagAttr nbxmpp.simplexml.Node-class.html#getTagAttr nbxmpp.protocol.Protocol.getType nbxmpp.protocol.Protocol-class.html#getType nbxmpp.protocol.Iq.getQueryChildren nbxmpp.protocol.Iq-class.html#getQueryChildren nbxmpp.protocol.Protocol.__setitem__ nbxmpp.protocol.Protocol-class.html#__setitem__ nbxmpp.protocol.Protocol.getStatusConditions nbxmpp.protocol.Protocol-class.html#getStatusConditions nbxmpp.simplexml.Node.getPayload nbxmpp.simplexml.Node-class.html#getPayload nbxmpp.simplexml.Node.iterTags nbxmpp.simplexml.Node-class.html#iterTags nbxmpp.protocol.Protocol.setID nbxmpp.protocol.Protocol-class.html#setID nbxmpp.simplexml.Node.setTagAttr nbxmpp.simplexml.Node-class.html#setTagAttr nbxmpp.protocol.Protocol.getErrorMsg nbxmpp.protocol.Protocol-class.html#getErrorMsg nbxmpp.simplexml.Node.getParent nbxmpp.simplexml.Node-class.html#getParent nbxmpp.protocol.Iq.getQuerynode nbxmpp.protocol.Iq-class.html#getQuerynode nbxmpp.simplexml.Node.__delitem__ nbxmpp.simplexml.Node-class.html#__delitem__ nbxmpp.simplexml.Node.clearData nbxmpp.simplexml.Node-class.html#clearData nbxmpp.simplexml.Node.delChild nbxmpp.simplexml.Node-class.html#delChild nbxmpp.simplexml.Node.setAttr nbxmpp.simplexml.Node-class.html#setAttr nbxmpp.simplexml.Node.FORCE_NODE_RECREATION nbxmpp.simplexml.Node-class.html#FORCE_NODE_RECREATION nbxmpp.simplexml.Node.getAttr nbxmpp.simplexml.Node-class.html#getAttr nbxmpp.simplexml.Node.has_attr nbxmpp.simplexml.Node-class.html#has_attr nbxmpp.simplexml.Node.setPayload nbxmpp.simplexml.Node-class.html#setPayload nbxmpp.protocol.Iq.setQuery nbxmpp.protocol.Iq-class.html#setQuery nbxmpp.simplexml.Node.getTagData nbxmpp.simplexml.Node-class.html#getTagData nbxmpp.protocol.Protocol.getProperties nbxmpp.protocol.Protocol-class.html#getProperties nbxmpp.protocol.Iq.setQueryNS nbxmpp.protocol.Iq-class.html#setQueryNS nbxmpp.protocol.Iq.setQuerynode nbxmpp.protocol.Iq-class.html#setQuerynode nbxmpp.simplexml.Node.getTag nbxmpp.simplexml.Node-class.html#getTag nbxmpp.protocol.JID nbxmpp.protocol.JID-class.html nbxmpp.protocol.JID.getDomain nbxmpp.protocol.JID-class.html#getDomain nbxmpp.protocol.JID.bareMatch nbxmpp.protocol.JID-class.html#bareMatch nbxmpp.protocol.JID.setNode nbxmpp.protocol.JID-class.html#setNode nbxmpp.protocol.JID.getStripped nbxmpp.protocol.JID-class.html#getStripped nbxmpp.protocol.JID.setResource nbxmpp.protocol.JID-class.html#setResource nbxmpp.protocol.JID.__str__ nbxmpp.protocol.JID-class.html#__str__ nbxmpp.protocol.JID.getResource nbxmpp.protocol.JID-class.html#getResource nbxmpp.protocol.JID.setDomain nbxmpp.protocol.JID-class.html#setDomain nbxmpp.protocol.JID.__hash__ nbxmpp.protocol.JID-class.html#__hash__ nbxmpp.protocol.JID.__ne__ nbxmpp.protocol.JID-class.html#__ne__ nbxmpp.protocol.JID.__eq__ nbxmpp.protocol.JID-class.html#__eq__ nbxmpp.protocol.JID.__init__ nbxmpp.protocol.JID-class.html#__init__ nbxmpp.protocol.JID.getNode nbxmpp.protocol.JID-class.html#getNode nbxmpp.protocol.Message nbxmpp.protocol.Message-class.html nbxmpp.simplexml.Node.addChild nbxmpp.simplexml.Node-class.html#addChild nbxmpp.protocol.Message.getStatusCode nbxmpp.protocol.Message-class.html#getStatusCode nbxmpp.protocol.Protocol.setTo nbxmpp.protocol.Protocol-class.html#setTo nbxmpp.protocol.Protocol.setFrom nbxmpp.protocol.Protocol-class.html#setFrom nbxmpp.simplexml.Node.setNamespace nbxmpp.simplexml.Node-class.html#setNamespace nbxmpp.simplexml.Node.__str__ nbxmpp.simplexml.Node-class.html#__str__ nbxmpp.simplexml.Node.getNamespace nbxmpp.simplexml.Node-class.html#getNamespace nbxmpp.protocol.Protocol.getID nbxmpp.protocol.Protocol-class.html#getID nbxmpp.simplexml.Node.getChildren nbxmpp.simplexml.Node-class.html#getChildren nbxmpp.simplexml.Node.addData nbxmpp.simplexml.Node-class.html#addData nbxmpp.protocol.Message.getSubject nbxmpp.protocol.Message-class.html#getSubject nbxmpp.simplexml.Node.getAttrs nbxmpp.simplexml.Node-class.html#getAttrs nbxmpp.simplexml.Node.delAttr nbxmpp.simplexml.Node-class.html#delAttr nbxmpp.protocol.Protocol.setError nbxmpp.protocol.Protocol-class.html#setError nbxmpp.protocol.Message.__init__ nbxmpp.protocol.Message-class.html#__init__ nbxmpp.protocol.Protocol.setType nbxmpp.protocol.Protocol-class.html#setType nbxmpp.protocol.Protocol.getTo nbxmpp.protocol.Protocol-class.html#getTo nbxmpp.protocol.Message.setBody nbxmpp.protocol.Message-class.html#setBody nbxmpp.simplexml.Node.__getitem__ nbxmpp.simplexml.Node-class.html#__getitem__ nbxmpp.protocol.Protocol.getError nbxmpp.protocol.Protocol-class.html#getError nbxmpp.simplexml.Node.__contains__ nbxmpp.simplexml.Node-class.html#__contains__ nbxmpp.simplexml.Node.setParent nbxmpp.simplexml.Node-class.html#setParent nbxmpp.simplexml.Node.getName nbxmpp.simplexml.Node-class.html#getName nbxmpp.protocol.Protocol.getFrom nbxmpp.protocol.Protocol-class.html#getFrom nbxmpp.protocol.Protocol.setTimestamp nbxmpp.protocol.Protocol-class.html#setTimestamp nbxmpp.simplexml.Node.__getattr__ nbxmpp.simplexml.Node-class.html#__getattr__ nbxmpp.simplexml.Node.clearData nbxmpp.simplexml.Node-class.html#clearData nbxmpp.protocol.Protocol.getTimestamp nbxmpp.protocol.Protocol-class.html#getTimestamp nbxmpp.simplexml.Node.getData nbxmpp.simplexml.Node-class.html#getData nbxmpp.simplexml.Node.lookup_nsp nbxmpp.simplexml.Node-class.html#lookup_nsp nbxmpp.simplexml.Node.setData nbxmpp.simplexml.Node-class.html#setData nbxmpp.protocol.Protocol.getErrorCode nbxmpp.protocol.Protocol-class.html#getErrorCode nbxmpp.simplexml.Node.setTagData nbxmpp.simplexml.Node-class.html#setTagData nbxmpp.simplexml.Node.setName nbxmpp.simplexml.Node-class.html#setName nbxmpp.simplexml.Node.setTag nbxmpp.simplexml.Node-class.html#setTag nbxmpp.protocol.Message.buildReply nbxmpp.protocol.Message-class.html#buildReply nbxmpp.simplexml.Node.getTagAttr nbxmpp.simplexml.Node-class.html#getTagAttr nbxmpp.protocol.Message.setThread nbxmpp.protocol.Message-class.html#setThread nbxmpp.simplexml.Node.getTag nbxmpp.simplexml.Node-class.html#getTag nbxmpp.protocol.Protocol.getType nbxmpp.protocol.Protocol-class.html#getType nbxmpp.protocol.Protocol.__setitem__ nbxmpp.protocol.Protocol-class.html#__setitem__ nbxmpp.protocol.Protocol.getTimestamp2 nbxmpp.protocol.Protocol-class.html#getTimestamp2 nbxmpp.simplexml.Node.getPayload nbxmpp.simplexml.Node-class.html#getPayload nbxmpp.simplexml.Node.iterTags nbxmpp.simplexml.Node-class.html#iterTags nbxmpp.protocol.Message.setXHTML nbxmpp.protocol.Message-class.html#setXHTML nbxmpp.protocol.Protocol.setID nbxmpp.protocol.Protocol-class.html#setID nbxmpp.simplexml.Node.setTagAttr nbxmpp.simplexml.Node-class.html#setTagAttr nbxmpp.protocol.Protocol.getErrorMsg nbxmpp.protocol.Protocol-class.html#getErrorMsg nbxmpp.simplexml.Node.getParent nbxmpp.simplexml.Node-class.html#getParent nbxmpp.simplexml.Node.getTags nbxmpp.simplexml.Node-class.html#getTags nbxmpp.simplexml.Node.__delitem__ nbxmpp.simplexml.Node-class.html#__delitem__ nbxmpp.protocol.Message.getThread nbxmpp.protocol.Message-class.html#getThread nbxmpp.simplexml.Node.delChild nbxmpp.simplexml.Node-class.html#delChild nbxmpp.simplexml.Node.setAttr nbxmpp.simplexml.Node-class.html#setAttr nbxmpp.simplexml.Node.FORCE_NODE_RECREATION nbxmpp.simplexml.Node-class.html#FORCE_NODE_RECREATION nbxmpp.simplexml.Node.getAttr nbxmpp.simplexml.Node-class.html#getAttr nbxmpp.simplexml.Node.has_attr nbxmpp.simplexml.Node-class.html#has_attr nbxmpp.simplexml.Node.setPayload nbxmpp.simplexml.Node-class.html#setPayload nbxmpp.protocol.Message.setSubject nbxmpp.protocol.Message-class.html#setSubject nbxmpp.protocol.Protocol.getStatusConditions nbxmpp.protocol.Protocol-class.html#getStatusConditions nbxmpp.simplexml.Node.getTagData nbxmpp.simplexml.Node-class.html#getTagData nbxmpp.protocol.Protocol.getProperties nbxmpp.protocol.Protocol-class.html#getProperties nbxmpp.protocol.Message.getXHTML nbxmpp.protocol.Message-class.html#getXHTML nbxmpp.protocol.Message.getBody nbxmpp.protocol.Message-class.html#getBody nbxmpp.protocol.NodeProcessed nbxmpp.protocol.NodeProcessed-class.html nbxmpp.protocol.NotAuthorized nbxmpp.protocol.NotAuthorized-class.html nbxmpp.protocol.PolicyViolation nbxmpp.protocol.PolicyViolation-class.html nbxmpp.protocol.Presence nbxmpp.protocol.Presence-class.html nbxmpp.simplexml.Node.addChild nbxmpp.simplexml.Node-class.html#addChild nbxmpp.protocol.Protocol.getFrom nbxmpp.protocol.Protocol-class.html#getFrom nbxmpp.protocol.Presence.getStatusCode nbxmpp.protocol.Presence-class.html#getStatusCode nbxmpp.protocol.Presence.getPriority nbxmpp.protocol.Presence-class.html#getPriority nbxmpp.protocol.Presence.getAffiliation nbxmpp.protocol.Presence-class.html#getAffiliation nbxmpp.simplexml.Node.setNamespace nbxmpp.simplexml.Node-class.html#setNamespace nbxmpp.simplexml.Node.__str__ nbxmpp.simplexml.Node-class.html#__str__ nbxmpp.simplexml.Node.setAttr nbxmpp.simplexml.Node-class.html#setAttr nbxmpp.simplexml.Node.getNamespace nbxmpp.simplexml.Node-class.html#getNamespace nbxmpp.protocol.Protocol.getID nbxmpp.protocol.Protocol-class.html#getID nbxmpp.simplexml.Node.getTagData nbxmpp.simplexml.Node-class.html#getTagData nbxmpp.simplexml.Node.getChildren nbxmpp.simplexml.Node-class.html#getChildren nbxmpp.protocol.Presence.setPriority nbxmpp.protocol.Presence-class.html#setPriority nbxmpp.simplexml.Node.addData nbxmpp.simplexml.Node-class.html#addData nbxmpp.protocol.Protocol.setTo nbxmpp.protocol.Protocol-class.html#setTo nbxmpp.simplexml.Node.getAttrs nbxmpp.simplexml.Node-class.html#getAttrs nbxmpp.protocol.Presence.setStatus nbxmpp.protocol.Presence-class.html#setStatus nbxmpp.simplexml.Node.delAttr nbxmpp.simplexml.Node-class.html#delAttr nbxmpp.protocol.Protocol.setError nbxmpp.protocol.Protocol-class.html#setError nbxmpp.protocol.Presence.__init__ nbxmpp.protocol.Presence-class.html#__init__ nbxmpp.protocol.Protocol.setType nbxmpp.protocol.Protocol-class.html#setType nbxmpp.protocol.Presence.getShow nbxmpp.protocol.Presence-class.html#getShow nbxmpp.protocol.Protocol.getTo nbxmpp.protocol.Protocol-class.html#getTo nbxmpp.protocol.Protocol.getTimestamp2 nbxmpp.protocol.Protocol-class.html#getTimestamp2 nbxmpp.simplexml.Node.setName nbxmpp.simplexml.Node-class.html#setName nbxmpp.protocol.Protocol.getError nbxmpp.protocol.Protocol-class.html#getError nbxmpp.simplexml.Node.__contains__ nbxmpp.simplexml.Node-class.html#__contains__ nbxmpp.simplexml.Node.setParent nbxmpp.simplexml.Node-class.html#setParent nbxmpp.simplexml.Node.getName nbxmpp.simplexml.Node-class.html#getName nbxmpp.protocol.Presence.getStatus nbxmpp.protocol.Presence-class.html#getStatus nbxmpp.protocol.Protocol.setTimestamp nbxmpp.protocol.Protocol-class.html#setTimestamp nbxmpp.simplexml.Node.__getattr__ nbxmpp.simplexml.Node-class.html#__getattr__ nbxmpp.protocol.Presence.getActor nbxmpp.protocol.Presence-class.html#getActor nbxmpp.protocol.Protocol.getTimestamp nbxmpp.protocol.Protocol-class.html#getTimestamp nbxmpp.protocol.Presence.getRole nbxmpp.protocol.Presence-class.html#getRole nbxmpp.simplexml.Node.lookup_nsp nbxmpp.simplexml.Node-class.html#lookup_nsp nbxmpp.simplexml.Node.setData nbxmpp.simplexml.Node-class.html#setData nbxmpp.protocol.Protocol.getErrorCode nbxmpp.protocol.Protocol-class.html#getErrorCode nbxmpp.simplexml.Node.setTagData nbxmpp.simplexml.Node-class.html#setTagData nbxmpp.simplexml.Node.setTag nbxmpp.simplexml.Node-class.html#setTag nbxmpp.simplexml.Node.__getitem__ nbxmpp.simplexml.Node-class.html#__getitem__ nbxmpp.simplexml.Node.getTagAttr nbxmpp.simplexml.Node-class.html#getTagAttr nbxmpp.protocol.Protocol.getType nbxmpp.protocol.Protocol-class.html#getType nbxmpp.protocol.Protocol.__setitem__ nbxmpp.protocol.Protocol-class.html#__setitem__ nbxmpp.protocol.Presence.getJid nbxmpp.protocol.Presence-class.html#getJid nbxmpp.simplexml.Node.getPayload nbxmpp.simplexml.Node-class.html#getPayload nbxmpp.simplexml.Node.iterTags nbxmpp.simplexml.Node-class.html#iterTags nbxmpp.protocol.Protocol.setID nbxmpp.protocol.Protocol-class.html#setID nbxmpp.simplexml.Node.setTagAttr nbxmpp.simplexml.Node-class.html#setTagAttr nbxmpp.protocol.Protocol.getErrorMsg nbxmpp.protocol.Protocol-class.html#getErrorMsg nbxmpp.simplexml.Node.getParent nbxmpp.simplexml.Node-class.html#getParent nbxmpp.simplexml.Node.getTags nbxmpp.simplexml.Node-class.html#getTags nbxmpp.simplexml.Node.__delitem__ nbxmpp.simplexml.Node-class.html#__delitem__ nbxmpp.simplexml.Node.getData nbxmpp.simplexml.Node-class.html#getData nbxmpp.protocol.Presence.setShow nbxmpp.protocol.Presence-class.html#setShow nbxmpp.simplexml.Node.clearData nbxmpp.simplexml.Node-class.html#clearData nbxmpp.simplexml.Node.delChild nbxmpp.simplexml.Node-class.html#delChild nbxmpp.protocol.Presence._muc_getSubTagDataAttr nbxmpp.protocol.Presence-class.html#_muc_getSubTagDataAttr nbxmpp.protocol.Presence.getReason nbxmpp.protocol.Presence-class.html#getReason nbxmpp.simplexml.Node.FORCE_NODE_RECREATION nbxmpp.simplexml.Node-class.html#FORCE_NODE_RECREATION nbxmpp.simplexml.Node.getAttr nbxmpp.simplexml.Node-class.html#getAttr nbxmpp.simplexml.Node.has_attr nbxmpp.simplexml.Node-class.html#has_attr nbxmpp.simplexml.Node.setPayload nbxmpp.simplexml.Node-class.html#setPayload nbxmpp.protocol.Protocol.getStatusConditions nbxmpp.protocol.Protocol-class.html#getStatusConditions nbxmpp.protocol.Presence.getNewNick nbxmpp.protocol.Presence-class.html#getNewNick nbxmpp.protocol.Protocol.getProperties nbxmpp.protocol.Protocol-class.html#getProperties nbxmpp.protocol.Protocol.setFrom nbxmpp.protocol.Protocol-class.html#setFrom nbxmpp.protocol.Presence._muc_getItemAttr nbxmpp.protocol.Presence-class.html#_muc_getItemAttr nbxmpp.simplexml.Node.getTag nbxmpp.simplexml.Node-class.html#getTag nbxmpp.protocol.Protocol nbxmpp.protocol.Protocol-class.html nbxmpp.simplexml.Node.addChild nbxmpp.simplexml.Node-class.html#addChild nbxmpp.simplexml.Node.getAttrs nbxmpp.simplexml.Node-class.html#getAttrs nbxmpp.protocol.Protocol.setFrom nbxmpp.protocol.Protocol-class.html#setFrom nbxmpp.simplexml.Node.setNamespace nbxmpp.simplexml.Node-class.html#setNamespace nbxmpp.simplexml.Node.__str__ nbxmpp.simplexml.Node-class.html#__str__ nbxmpp.simplexml.Node.getNamespace nbxmpp.simplexml.Node-class.html#getNamespace nbxmpp.protocol.Protocol.getID nbxmpp.protocol.Protocol-class.html#getID nbxmpp.simplexml.Node.getChildren nbxmpp.simplexml.Node-class.html#getChildren nbxmpp.simplexml.Node.addData nbxmpp.simplexml.Node-class.html#addData nbxmpp.protocol.Protocol.setTo nbxmpp.protocol.Protocol-class.html#setTo nbxmpp.simplexml.Node.delAttr nbxmpp.simplexml.Node-class.html#delAttr nbxmpp.protocol.Protocol.setError nbxmpp.protocol.Protocol-class.html#setError nbxmpp.protocol.Protocol.__init__ nbxmpp.protocol.Protocol-class.html#__init__ nbxmpp.protocol.Protocol.setType nbxmpp.protocol.Protocol-class.html#setType nbxmpp.protocol.Protocol.getTo nbxmpp.protocol.Protocol-class.html#getTo nbxmpp.protocol.Protocol.getTimestamp2 nbxmpp.protocol.Protocol-class.html#getTimestamp2 nbxmpp.simplexml.Node.setName nbxmpp.simplexml.Node-class.html#setName nbxmpp.protocol.Protocol.getError nbxmpp.protocol.Protocol-class.html#getError nbxmpp.simplexml.Node.__contains__ nbxmpp.simplexml.Node-class.html#__contains__ nbxmpp.simplexml.Node.setParent nbxmpp.simplexml.Node-class.html#setParent nbxmpp.simplexml.Node.getName nbxmpp.simplexml.Node-class.html#getName nbxmpp.protocol.Protocol.getFrom nbxmpp.protocol.Protocol-class.html#getFrom nbxmpp.protocol.Protocol.setTimestamp nbxmpp.protocol.Protocol-class.html#setTimestamp nbxmpp.simplexml.Node.__getattr__ nbxmpp.simplexml.Node-class.html#__getattr__ nbxmpp.protocol.Protocol.getTimestamp nbxmpp.protocol.Protocol-class.html#getTimestamp nbxmpp.simplexml.Node.getData nbxmpp.simplexml.Node-class.html#getData nbxmpp.simplexml.Node.lookup_nsp nbxmpp.simplexml.Node-class.html#lookup_nsp nbxmpp.simplexml.Node.setData nbxmpp.simplexml.Node-class.html#setData nbxmpp.protocol.Protocol.getErrorCode nbxmpp.protocol.Protocol-class.html#getErrorCode nbxmpp.simplexml.Node.setTagData nbxmpp.simplexml.Node-class.html#setTagData nbxmpp.simplexml.Node.setTag nbxmpp.simplexml.Node-class.html#setTag nbxmpp.simplexml.Node.__getitem__ nbxmpp.simplexml.Node-class.html#__getitem__ nbxmpp.simplexml.Node.getTagAttr nbxmpp.simplexml.Node-class.html#getTagAttr nbxmpp.protocol.Protocol.getType nbxmpp.protocol.Protocol-class.html#getType nbxmpp.protocol.Protocol.__setitem__ nbxmpp.protocol.Protocol-class.html#__setitem__ nbxmpp.protocol.Protocol.getStatusConditions nbxmpp.protocol.Protocol-class.html#getStatusConditions nbxmpp.simplexml.Node.getPayload nbxmpp.simplexml.Node-class.html#getPayload nbxmpp.simplexml.Node.iterTags nbxmpp.simplexml.Node-class.html#iterTags nbxmpp.protocol.Protocol.setID nbxmpp.protocol.Protocol-class.html#setID nbxmpp.simplexml.Node.setTagAttr nbxmpp.simplexml.Node-class.html#setTagAttr nbxmpp.protocol.Protocol.getErrorMsg nbxmpp.protocol.Protocol-class.html#getErrorMsg nbxmpp.simplexml.Node.getParent nbxmpp.simplexml.Node-class.html#getParent nbxmpp.simplexml.Node.getTags nbxmpp.simplexml.Node-class.html#getTags nbxmpp.simplexml.Node.__delitem__ nbxmpp.simplexml.Node-class.html#__delitem__ nbxmpp.simplexml.Node.clearData nbxmpp.simplexml.Node-class.html#clearData nbxmpp.simplexml.Node.delChild nbxmpp.simplexml.Node-class.html#delChild nbxmpp.simplexml.Node.setAttr nbxmpp.simplexml.Node-class.html#setAttr nbxmpp.simplexml.Node.FORCE_NODE_RECREATION nbxmpp.simplexml.Node-class.html#FORCE_NODE_RECREATION nbxmpp.simplexml.Node.getAttr nbxmpp.simplexml.Node-class.html#getAttr nbxmpp.simplexml.Node.has_attr nbxmpp.simplexml.Node-class.html#has_attr nbxmpp.simplexml.Node.setPayload nbxmpp.simplexml.Node-class.html#setPayload nbxmpp.simplexml.Node.getTagData nbxmpp.simplexml.Node-class.html#getTagData nbxmpp.protocol.Protocol.getProperties nbxmpp.protocol.Protocol-class.html#getProperties nbxmpp.simplexml.Node.getTag nbxmpp.simplexml.Node-class.html#getTag nbxmpp.protocol.RemoteConnectionFailed nbxmpp.protocol.RemoteConnectionFailed-class.html nbxmpp.protocol.ResourceConstraint nbxmpp.protocol.ResourceConstraint-class.html nbxmpp.protocol.RestrictedXML nbxmpp.protocol.RestrictedXML-class.html nbxmpp.protocol.SeeOtherHost nbxmpp.protocol.SeeOtherHost-class.html nbxmpp.protocol.StreamError nbxmpp.protocol.StreamError-class.html nbxmpp.protocol.SystemShutdown nbxmpp.protocol.SystemShutdown-class.html nbxmpp.protocol.UndefinedCondition nbxmpp.protocol.UndefinedCondition-class.html nbxmpp.protocol.UnsupportedEncoding nbxmpp.protocol.UnsupportedEncoding-class.html nbxmpp.protocol.UnsupportedStanzaType nbxmpp.protocol.UnsupportedStanzaType-class.html nbxmpp.protocol.UnsupportedVersion nbxmpp.protocol.UnsupportedVersion-class.html nbxmpp.protocol.XMLNotWellFormed nbxmpp.protocol.XMLNotWellFormed-class.html nbxmpp.proxy_connectors.HTTPCONNECTConnector nbxmpp.proxy_connectors.HTTPCONNECTConnector-class.html nbxmpp.proxy_connectors.HTTPCONNECTConnector._on_headers_sent nbxmpp.proxy_connectors.HTTPCONNECTConnector-class.html#_on_headers_sent nbxmpp.proxy_connectors.HTTPCONNECTConnector.start_connecting nbxmpp.proxy_connectors.HTTPCONNECTConnector-class.html#start_connecting nbxmpp.proxy_connectors.ProxyConnector.connecting_over nbxmpp.proxy_connectors.ProxyConnector-class.html#connecting_over nbxmpp.proxy_connectors.ProxyConnector.__init__ nbxmpp.proxy_connectors.ProxyConnector-class.html#__init__ nbxmpp.proxy_connectors.ProxyConnector.get_instance nbxmpp.proxy_connectors.ProxyConnector-class.html#get_instance nbxmpp.proxy_connectors.ProxyConnector nbxmpp.proxy_connectors.ProxyConnector-class.html nbxmpp.proxy_connectors.ProxyConnector.connecting_over nbxmpp.proxy_connectors.ProxyConnector-class.html#connecting_over nbxmpp.proxy_connectors.ProxyConnector.start_connecting nbxmpp.proxy_connectors.ProxyConnector-class.html#start_connecting nbxmpp.proxy_connectors.ProxyConnector.get_instance nbxmpp.proxy_connectors.ProxyConnector-class.html#get_instance nbxmpp.proxy_connectors.ProxyConnector.__init__ nbxmpp.proxy_connectors.ProxyConnector-class.html#__init__ nbxmpp.proxy_connectors.SOCKS5Connector nbxmpp.proxy_connectors.SOCKS5Connector-class.html nbxmpp.proxy_connectors.ProxyConnector.connecting_over nbxmpp.proxy_connectors.ProxyConnector-class.html#connecting_over nbxmpp.proxy_connectors.SOCKS5Connector._on_proxy_auth nbxmpp.proxy_connectors.SOCKS5Connector-class.html#_on_proxy_auth nbxmpp.proxy_connectors.SOCKS5Connector.start_connecting nbxmpp.proxy_connectors.SOCKS5Connector-class.html#start_connecting nbxmpp.proxy_connectors.SOCKS5Connector._on_req_sent nbxmpp.proxy_connectors.SOCKS5Connector-class.html#_on_req_sent nbxmpp.proxy_connectors.SOCKS5Connector._on_greeting_sent nbxmpp.proxy_connectors.SOCKS5Connector-class.html#_on_greeting_sent nbxmpp.proxy_connectors.ProxyConnector.__init__ nbxmpp.proxy_connectors.ProxyConnector-class.html#__init__ nbxmpp.proxy_connectors.ProxyConnector.get_instance nbxmpp.proxy_connectors.ProxyConnector-class.html#get_instance nbxmpp.roster_nb.NonBlockingRoster nbxmpp.roster_nb.NonBlockingRoster-class.html nbxmpp.roster_nb.NonBlockingRoster.getRaw nbxmpp.roster_nb.NonBlockingRoster-class.html#getRaw nbxmpp.roster_nb.NonBlockingRoster._getResourceData nbxmpp.roster_nb.NonBlockingRoster-class.html#_getResourceData nbxmpp.roster_nb.NonBlockingRoster.getGroups nbxmpp.roster_nb.NonBlockingRoster-class.html#getGroups nbxmpp.roster_nb.NonBlockingRoster.getPriority nbxmpp.roster_nb.NonBlockingRoster-class.html#getPriority nbxmpp.roster_nb.NonBlockingRoster._on_roster_set nbxmpp.roster_nb.NonBlockingRoster-class.html#_on_roster_set nbxmpp.roster_nb.NonBlockingRoster.getRawRoster nbxmpp.roster_nb.NonBlockingRoster-class.html#getRawRoster nbxmpp.roster_nb.NonBlockingRoster.PresenceHandler nbxmpp.roster_nb.NonBlockingRoster-class.html#PresenceHandler nbxmpp.roster_nb.NonBlockingRoster._getItemData nbxmpp.roster_nb.NonBlockingRoster-class.html#_getItemData nbxmpp.roster_nb.NonBlockingRoster.__init__ nbxmpp.roster_nb.NonBlockingRoster-class.html#__init__ nbxmpp.roster_nb.NonBlockingRoster.getShow nbxmpp.roster_nb.NonBlockingRoster-class.html#getShow nbxmpp.roster_nb.NonBlockingRoster.getRoster nbxmpp.roster_nb.NonBlockingRoster-class.html#getRoster nbxmpp.plugin.PlugIn.PlugIn nbxmpp.plugin.PlugIn-class.html#PlugIn nbxmpp.roster_nb.NonBlockingRoster.getName nbxmpp.roster_nb.NonBlockingRoster-class.html#getName nbxmpp.roster_nb.NonBlockingRoster.getStatus nbxmpp.roster_nb.NonBlockingRoster-class.html#getStatus nbxmpp.roster_nb.NonBlockingRoster.Unauthorize nbxmpp.roster_nb.NonBlockingRoster-class.html#Unauthorize nbxmpp.roster_nb.NonBlockingRoster.Unsubscribe nbxmpp.roster_nb.NonBlockingRoster-class.html#Unsubscribe nbxmpp.plugin.PlugIn.get_instance nbxmpp.plugin.PlugIn-class.html#get_instance nbxmpp.roster_nb.NonBlockingRoster.RosterIqHandler nbxmpp.roster_nb.NonBlockingRoster-class.html#RosterIqHandler nbxmpp.roster_nb.NonBlockingRoster.getRawItem nbxmpp.roster_nb.NonBlockingRoster-class.html#getRawItem nbxmpp.roster_nb.NonBlockingRoster.getItems nbxmpp.roster_nb.NonBlockingRoster-class.html#getItems nbxmpp.roster_nb.NonBlockingRoster.__getitem__ nbxmpp.roster_nb.NonBlockingRoster-class.html#__getitem__ nbxmpp.plugin.PlugIn.PlugOut nbxmpp.plugin.PlugIn-class.html#PlugOut nbxmpp.roster_nb.NonBlockingRoster.keys nbxmpp.roster_nb.NonBlockingRoster-class.html#keys nbxmpp.roster_nb.NonBlockingRoster.Request nbxmpp.roster_nb.NonBlockingRoster-class.html#Request nbxmpp.roster_nb.NonBlockingRoster.getAsk nbxmpp.roster_nb.NonBlockingRoster-class.html#getAsk nbxmpp.roster_nb.NonBlockingRoster.setItem nbxmpp.roster_nb.NonBlockingRoster-class.html#setItem nbxmpp.roster_nb.NonBlockingRoster.setItemMulti nbxmpp.roster_nb.NonBlockingRoster-class.html#setItemMulti nbxmpp.roster_nb.NonBlockingRoster.getItem nbxmpp.roster_nb.NonBlockingRoster-class.html#getItem nbxmpp.roster_nb.NonBlockingRoster.Authorize nbxmpp.roster_nb.NonBlockingRoster-class.html#Authorize nbxmpp.roster_nb.NonBlockingRoster.plugin nbxmpp.roster_nb.NonBlockingRoster-class.html#plugin nbxmpp.roster_nb.NonBlockingRoster.Subscribe nbxmpp.roster_nb.NonBlockingRoster-class.html#Subscribe nbxmpp.roster_nb.NonBlockingRoster.setRaw nbxmpp.roster_nb.NonBlockingRoster-class.html#setRaw nbxmpp.roster_nb.NonBlockingRoster.delItem nbxmpp.roster_nb.NonBlockingRoster-class.html#delItem nbxmpp.roster_nb.NonBlockingRoster.getSubscription nbxmpp.roster_nb.NonBlockingRoster-class.html#getSubscription nbxmpp.roster_nb.NonBlockingRoster.getResources nbxmpp.roster_nb.NonBlockingRoster-class.html#getResources nbxmpp.simplexml.NT nbxmpp.simplexml.NT-class.html nbxmpp.simplexml.T.__delattr__ nbxmpp.simplexml.T-class.html#__delattr__ nbxmpp.simplexml.NT.__setattr__ nbxmpp.simplexml.NT-class.html#__setattr__ nbxmpp.simplexml.T.__init__ nbxmpp.simplexml.T-class.html#__init__ nbxmpp.simplexml.NT.__getattr__ nbxmpp.simplexml.NT-class.html#__getattr__ nbxmpp.simplexml.Node nbxmpp.simplexml.Node-class.html nbxmpp.simplexml.Node.addChild nbxmpp.simplexml.Node-class.html#addChild nbxmpp.simplexml.Node.getAttrs nbxmpp.simplexml.Node-class.html#getAttrs nbxmpp.simplexml.Node.delAttr nbxmpp.simplexml.Node-class.html#delAttr nbxmpp.simplexml.Node.setNamespace nbxmpp.simplexml.Node-class.html#setNamespace nbxmpp.simplexml.Node.__str__ nbxmpp.simplexml.Node-class.html#__str__ nbxmpp.simplexml.Node.getNamespace nbxmpp.simplexml.Node-class.html#getNamespace nbxmpp.simplexml.Node.getChildren nbxmpp.simplexml.Node-class.html#getChildren nbxmpp.simplexml.Node.has_attr nbxmpp.simplexml.Node-class.html#has_attr nbxmpp.simplexml.Node.__init__ nbxmpp.simplexml.Node-class.html#__init__ nbxmpp.simplexml.Node.__getitem__ nbxmpp.simplexml.Node-class.html#__getitem__ nbxmpp.simplexml.Node.clearData nbxmpp.simplexml.Node-class.html#clearData nbxmpp.simplexml.Node.__contains__ nbxmpp.simplexml.Node-class.html#__contains__ nbxmpp.simplexml.Node.setParent nbxmpp.simplexml.Node-class.html#setParent nbxmpp.simplexml.Node.getName nbxmpp.simplexml.Node-class.html#getName nbxmpp.simplexml.Node.__getattr__ nbxmpp.simplexml.Node-class.html#__getattr__ nbxmpp.simplexml.Node.getData nbxmpp.simplexml.Node-class.html#getData nbxmpp.simplexml.Node.lookup_nsp nbxmpp.simplexml.Node-class.html#lookup_nsp nbxmpp.simplexml.Node.setData nbxmpp.simplexml.Node-class.html#setData nbxmpp.simplexml.Node.setTagData nbxmpp.simplexml.Node-class.html#setTagData nbxmpp.simplexml.Node.setName nbxmpp.simplexml.Node-class.html#setName nbxmpp.simplexml.Node.getTagAttr nbxmpp.simplexml.Node-class.html#getTagAttr nbxmpp.simplexml.Node.__setitem__ nbxmpp.simplexml.Node-class.html#__setitem__ nbxmpp.simplexml.Node.getPayload nbxmpp.simplexml.Node-class.html#getPayload nbxmpp.simplexml.Node.iterTags nbxmpp.simplexml.Node-class.html#iterTags nbxmpp.simplexml.Node.getTag nbxmpp.simplexml.Node-class.html#getTag nbxmpp.simplexml.Node.setTagAttr nbxmpp.simplexml.Node-class.html#setTagAttr nbxmpp.simplexml.Node.getTags nbxmpp.simplexml.Node-class.html#getTags nbxmpp.simplexml.Node.__delitem__ nbxmpp.simplexml.Node-class.html#__delitem__ nbxmpp.simplexml.Node.getTagData nbxmpp.simplexml.Node-class.html#getTagData nbxmpp.simplexml.Node.getParent nbxmpp.simplexml.Node-class.html#getParent nbxmpp.simplexml.Node.delChild nbxmpp.simplexml.Node-class.html#delChild nbxmpp.simplexml.Node.setAttr nbxmpp.simplexml.Node-class.html#setAttr nbxmpp.simplexml.Node.getAttr nbxmpp.simplexml.Node-class.html#getAttr nbxmpp.simplexml.Node.addData nbxmpp.simplexml.Node-class.html#addData nbxmpp.simplexml.Node.setPayload nbxmpp.simplexml.Node-class.html#setPayload nbxmpp.simplexml.Node.FORCE_NODE_RECREATION nbxmpp.simplexml.Node-class.html#FORCE_NODE_RECREATION nbxmpp.simplexml.Node.setTag nbxmpp.simplexml.Node-class.html#setTag nbxmpp.simplexml.NodeBuilder nbxmpp.simplexml.NodeBuilder-class.html nbxmpp.simplexml.NodeBuilder.stream_header_received nbxmpp.simplexml.NodeBuilder-class.html#stream_header_received nbxmpp.simplexml.NodeBuilder._dec_depth nbxmpp.simplexml.NodeBuilder-class.html#_dec_depth nbxmpp.simplexml.NodeBuilder.starttag nbxmpp.simplexml.NodeBuilder-class.html#starttag nbxmpp.simplexml.NodeBuilder.endtag nbxmpp.simplexml.NodeBuilder-class.html#endtag nbxmpp.simplexml.NodeBuilder.check_data_buffer nbxmpp.simplexml.NodeBuilder-class.html#check_data_buffer nbxmpp.simplexml.NodeBuilder.handle_cdata nbxmpp.simplexml.NodeBuilder-class.html#handle_cdata nbxmpp.simplexml.NodeBuilder.getDom nbxmpp.simplexml.NodeBuilder-class.html#getDom nbxmpp.simplexml.NodeBuilder.dispatch nbxmpp.simplexml.NodeBuilder-class.html#dispatch nbxmpp.simplexml.NodeBuilder.stream_footer_received nbxmpp.simplexml.NodeBuilder-class.html#stream_footer_received nbxmpp.simplexml.NodeBuilder.has_received_endtag nbxmpp.simplexml.NodeBuilder-class.html#has_received_endtag nbxmpp.simplexml.NodeBuilder.destroy nbxmpp.simplexml.NodeBuilder-class.html#destroy nbxmpp.simplexml.NodeBuilder._inc_depth nbxmpp.simplexml.NodeBuilder-class.html#_inc_depth nbxmpp.simplexml.NodeBuilder.__init__ nbxmpp.simplexml.NodeBuilder-class.html#__init__ nbxmpp.simplexml.NodeBuilder.handle_namespace_start nbxmpp.simplexml.NodeBuilder-class.html#handle_namespace_start nbxmpp.simplexml.T nbxmpp.simplexml.T-class.html nbxmpp.simplexml.T.__delattr__ nbxmpp.simplexml.T-class.html#__delattr__ nbxmpp.simplexml.T.__setattr__ nbxmpp.simplexml.T-class.html#__setattr__ nbxmpp.simplexml.T.__init__ nbxmpp.simplexml.T-class.html#__init__ nbxmpp.simplexml.T.__getattr__ nbxmpp.simplexml.T-class.html#__getattr__ nbxmpp.smacks.Smacks nbxmpp.smacks.Smacks-class.html nbxmpp.smacks.Smacks.resume_request nbxmpp.smacks.Smacks-class.html#resume_request nbxmpp.smacks.Smacks.send_ack nbxmpp.smacks.Smacks-class.html#send_ack nbxmpp.smacks.Smacks.check_ack nbxmpp.smacks.Smacks-class.html#check_ack nbxmpp.smacks.Smacks.negociate nbxmpp.smacks.Smacks-class.html#negociate nbxmpp.smacks.Smacks.request_ack nbxmpp.smacks.Smacks-class.html#request_ack nbxmpp.smacks.Smacks._neg_response nbxmpp.smacks.Smacks-class.html#_neg_response nbxmpp.smacks.Smacks.error_handling nbxmpp.smacks.Smacks-class.html#error_handling nbxmpp.smacks.Smacks.set_owner nbxmpp.smacks.Smacks-class.html#set_owner nbxmpp.smacks.Smacks.__init__ nbxmpp.smacks.Smacks-class.html#__init__ nbxmpp.stringprepare.EmptyMappingTable nbxmpp.stringprepare.EmptyMappingTable-class.html nbxmpp.stringprepare.EmptyMappingTable.__implements__ nbxmpp.stringprepare.IMappingTable-class.html nbxmpp.stringprepare.EmptyMappingTable.map nbxmpp.stringprepare.EmptyMappingTable-class.html#map nbxmpp.stringprepare.EmptyMappingTable.__init__ nbxmpp.stringprepare.EmptyMappingTable-class.html#__init__ nbxmpp.stringprepare.ILookupTable nbxmpp.stringprepare.ILookupTable-class.html nbxmpp.stringprepare.ILookupTable.lookup nbxmpp.stringprepare.ILookupTable-class.html#lookup nbxmpp.stringprepare.IMappingTable nbxmpp.stringprepare.IMappingTable-class.html nbxmpp.stringprepare.IMappingTable.map nbxmpp.stringprepare.IMappingTable-class.html#map nbxmpp.stringprepare.LookupTable nbxmpp.stringprepare.LookupTable-class.html nbxmpp.stringprepare.LookupTable.__implements__ nbxmpp.stringprepare.ILookupTable-class.html nbxmpp.stringprepare.LookupTable.lookup nbxmpp.stringprepare.LookupTable-class.html#lookup nbxmpp.stringprepare.LookupTable.__init__ nbxmpp.stringprepare.LookupTable-class.html#__init__ nbxmpp.stringprepare.LookupTableFromFunction nbxmpp.stringprepare.LookupTableFromFunction-class.html nbxmpp.stringprepare.LookupTableFromFunction.__implements__ nbxmpp.stringprepare.ILookupTable-class.html nbxmpp.stringprepare.LookupTableFromFunction.__init__ nbxmpp.stringprepare.LookupTableFromFunction-class.html#__init__ nbxmpp.stringprepare.MappingTableFromFunction nbxmpp.stringprepare.MappingTableFromFunction-class.html nbxmpp.stringprepare.MappingTableFromFunction.__implements__ nbxmpp.stringprepare.IMappingTable-class.html nbxmpp.stringprepare.MappingTableFromFunction.__init__ nbxmpp.stringprepare.MappingTableFromFunction-class.html#__init__ nbxmpp.stringprepare.NamePrep nbxmpp.stringprepare.NamePrep-class.html nbxmpp.stringprepare.NamePrep.prohibiteds nbxmpp.stringprepare.NamePrep-class.html#prohibiteds nbxmpp.stringprepare.NamePrep.nameprep nbxmpp.stringprepare.NamePrep-class.html#nameprep nbxmpp.stringprepare.NamePrep.check_prohibiteds nbxmpp.stringprepare.NamePrep-class.html#check_prohibiteds nbxmpp.stringprepare.NamePrep.prepare nbxmpp.stringprepare.NamePrep-class.html#prepare nbxmpp.stringprepare.NamePrep.n nbxmpp.stringprepare.NamePrep-class.html#n nbxmpp.stringprepare.Profile nbxmpp.stringprepare.Profile-class.html nbxmpp.stringprepare.Profile.check_unassigneds nbxmpp.stringprepare.Profile-class.html#check_unassigneds nbxmpp.stringprepare.Profile.map nbxmpp.stringprepare.Profile-class.html#map nbxmpp.stringprepare.Profile.check_prohibiteds nbxmpp.stringprepare.Profile-class.html#check_prohibiteds nbxmpp.stringprepare.Profile.prepare nbxmpp.stringprepare.Profile-class.html#prepare nbxmpp.stringprepare.Profile.check_bidirectionals nbxmpp.stringprepare.Profile-class.html#check_bidirectionals nbxmpp.stringprepare.Profile.__init__ nbxmpp.stringprepare.Profile-class.html#__init__ nbxmpp.tls_nb.NonBlockingTLS nbxmpp.tls_nb.NonBlockingTLS-class.html nbxmpp.tls_nb.NonBlockingTLS._dumpX509 nbxmpp.tls_nb.NonBlockingTLS-class.html#_dumpX509 nbxmpp.tls_nb.NonBlockingTLS.ssl_h_bits nbxmpp.tls_nb.NonBlockingTLS-class.html#ssl_h_bits nbxmpp.plugin.PlugIn.PlugOut nbxmpp.plugin.PlugIn-class.html#PlugOut nbxmpp.tls_nb.NonBlockingTLS._startSSL_pyOpenSSL nbxmpp.tls_nb.NonBlockingTLS-class.html#_startSSL_pyOpenSSL nbxmpp.tls_nb.NonBlockingTLS.plugin nbxmpp.tls_nb.NonBlockingTLS-class.html#plugin nbxmpp.plugin.PlugIn.PlugIn nbxmpp.plugin.PlugIn-class.html#PlugIn nbxmpp.tls_nb.NonBlockingTLS._dumpX509Name nbxmpp.tls_nb.NonBlockingTLS-class.html#_dumpX509Name nbxmpp.tls_nb.NonBlockingTLS._load_cert_file nbxmpp.tls_nb.NonBlockingTLS-class.html#_load_cert_file nbxmpp.tls_nb.NonBlockingTLS._dumpPKey nbxmpp.tls_nb.NonBlockingTLS-class.html#_dumpPKey nbxmpp.plugin.PlugIn.get_instance nbxmpp.plugin.PlugIn-class.html#get_instance nbxmpp.tls_nb.NonBlockingTLS._startSSL nbxmpp.tls_nb.NonBlockingTLS-class.html#_startSSL nbxmpp.tls_nb.NonBlockingTLS._startSSL_stdlib nbxmpp.tls_nb.NonBlockingTLS-class.html#_startSSL_stdlib nbxmpp.tls_nb.NonBlockingTLS._ssl_verify_callback nbxmpp.tls_nb.NonBlockingTLS-class.html#_ssl_verify_callback nbxmpp.tls_nb.NonBlockingTLS.__init__ nbxmpp.tls_nb.NonBlockingTLS-class.html#__init__ nbxmpp.tls_nb.PyOpenSSLWrapper nbxmpp.tls_nb.PyOpenSSLWrapper-class.html nbxmpp.tls_nb.PyOpenSSLWrapper.recv nbxmpp.tls_nb.PyOpenSSLWrapper-class.html#recv nbxmpp.tls_nb.PyOpenSSLWrapper.is_numtoolarge nbxmpp.tls_nb.PyOpenSSLWrapper-class.html#is_numtoolarge nbxmpp.tls_nb.PyOpenSSLWrapper.__init__ nbxmpp.tls_nb.PyOpenSSLWrapper-class.html#__init__ nbxmpp.tls_nb.PyOpenSSLWrapper.send nbxmpp.tls_nb.PyOpenSSLWrapper-class.html#send nbxmpp.tls_nb.SSLWrapper.Error nbxmpp.tls_nb.SSLWrapper.Error-class.html nbxmpp.tls_nb.SSLWrapper nbxmpp.tls_nb.SSLWrapper-class.html nbxmpp.tls_nb.SSLWrapper.recv nbxmpp.tls_nb.SSLWrapper-class.html#recv nbxmpp.tls_nb.SSLWrapper.__init__ nbxmpp.tls_nb.SSLWrapper-class.html#__init__ nbxmpp.tls_nb.SSLWrapper.send nbxmpp.tls_nb.SSLWrapper-class.html#send nbxmpp.tls_nb.SSLWrapper.Error nbxmpp.tls_nb.SSLWrapper.Error-class.html nbxmpp.tls_nb.SSLWrapper.Error nbxmpp.tls_nb.SSLWrapper.Error-class.html nbxmpp.tls_nb.SSLWrapper.Error.__str__ nbxmpp.tls_nb.SSLWrapper.Error-class.html#__str__ nbxmpp.tls_nb.SSLWrapper.Error.__init__ nbxmpp.tls_nb.SSLWrapper.Error-class.html#__init__ nbxmpp.tls_nb.StdlibSSLWrapper nbxmpp.tls_nb.StdlibSSLWrapper-class.html nbxmpp.tls_nb.StdlibSSLWrapper.recv nbxmpp.tls_nb.StdlibSSLWrapper-class.html#recv nbxmpp.tls_nb.StdlibSSLWrapper.__init__ nbxmpp.tls_nb.StdlibSSLWrapper-class.html#__init__ nbxmpp.tls_nb.StdlibSSLWrapper.send nbxmpp.tls_nb.StdlibSSLWrapper-class.html#send nbxmpp.tls_nb.SSLWrapper.Error nbxmpp.tls_nb.SSLWrapper.Error-class.html nbxmpp.transports_nb.NonBlockingHTTP nbxmpp.transports_nb.NonBlockingHTTP-class.html nbxmpp.transports_nb.NonBlockingTransport._tcp_connecting_started nbxmpp.transports_nb.NonBlockingTransport-class.html#_tcp_connecting_started nbxmpp.transports_nb.NonBlockingTransport.set_state nbxmpp.transports_nb.NonBlockingTransport-class.html#set_state nbxmpp.transports_nb.NonBlockingTransport.renew_send_timeout nbxmpp.transports_nb.NonBlockingTransport-class.html#renew_send_timeout nbxmpp.transports_nb.NonBlockingTransport.plugout nbxmpp.transports_nb.NonBlockingTransport-class.html#plugout nbxmpp.transports_nb.NonBlockingTCP._on_connect nbxmpp.transports_nb.NonBlockingTCP-class.html#_on_connect nbxmpp.transports_nb.NonBlockingTransport.read_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#read_timeout2 nbxmpp.transports_nb.NonBlockingTCP.connect nbxmpp.transports_nb.NonBlockingTCP-class.html#connect nbxmpp.transports_nb.NonBlockingHTTP.parse_http_message nbxmpp.transports_nb.NonBlockingHTTP-class.html#parse_http_message nbxmpp.transports_nb.NonBlockingTCP.read_timeout nbxmpp.transports_nb.NonBlockingTCP-class.html#read_timeout nbxmpp.transports_nb.NonBlockingTransport.set_send_timeout nbxmpp.transports_nb.NonBlockingTransport-class.html#set_send_timeout nbxmpp.transports_nb.NonBlockingTCP.encode_stanza nbxmpp.transports_nb.NonBlockingTCP-class.html#encode_stanza nbxmpp.transports_nb.NonBlockingTransport.renew_send_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#renew_send_timeout2 nbxmpp.transports_nb.NonBlockingHTTP.__init__ nbxmpp.transports_nb.NonBlockingHTTP-class.html#__init__ nbxmpp.transports_nb.NonBlockingTCP._do_receive nbxmpp.transports_nb.NonBlockingTCP-class.html#_do_receive nbxmpp.transports_nb.NonBlockingTCP.disconnect nbxmpp.transports_nb.NonBlockingTCP-class.html#disconnect nbxmpp.transports_nb.NonBlockingHTTP.build_http_message nbxmpp.transports_nb.NonBlockingHTTP-class.html#build_http_message nbxmpp.transports_nb.NonBlockingTCP._do_send nbxmpp.transports_nb.NonBlockingTCP-class.html#_do_send nbxmpp.transports_nb.NonBlockingTCP.send nbxmpp.transports_nb.NonBlockingTCP-class.html#send nbxmpp.transports_nb.NonBlockingTCP.tls_init nbxmpp.transports_nb.NonBlockingTCP-class.html#tls_init nbxmpp.transports_nb.NonBlockingTCP._connect_to_proxy nbxmpp.transports_nb.NonBlockingTCP-class.html#_connect_to_proxy nbxmpp.transports_nb.NonBlockingTCP.pollin nbxmpp.transports_nb.NonBlockingTCP-class.html#pollin nbxmpp.plugin.PlugIn.get_instance nbxmpp.plugin.PlugIn-class.html#get_instance nbxmpp.transports_nb.NonBlockingHTTP._on_receive nbxmpp.transports_nb.NonBlockingHTTP-class.html#_on_receive nbxmpp.transports_nb.NonBlockingHTTP.http_send nbxmpp.transports_nb.NonBlockingHTTP-class.html#http_send nbxmpp.plugin.PlugIn.PlugOut nbxmpp.plugin.PlugIn-class.html#PlugOut nbxmpp.transports_nb.NonBlockingTCP._plug_idle nbxmpp.transports_nb.NonBlockingTCP-class.html#_plug_idle nbxmpp.transports_nb.NonBlockingTransport.onreceive nbxmpp.transports_nb.NonBlockingTransport-class.html#onreceive nbxmpp.idlequeue.IdleObject.fd nbxmpp.idlequeue.IdleObject-class.html#fd nbxmpp.transports_nb.NonBlockingTransport.get_state nbxmpp.transports_nb.NonBlockingTransport-class.html#get_state nbxmpp.transports_nb.NonBlockingTCP.pollout nbxmpp.transports_nb.NonBlockingTCP-class.html#pollout nbxmpp.transports_nb.NonBlockingTransport._on_connect_failure nbxmpp.transports_nb.NonBlockingTransport-class.html#_on_connect_failure nbxmpp.transports_nb.NonBlockingTransport.plugin nbxmpp.transports_nb.NonBlockingTransport-class.html#plugin nbxmpp.plugin.PlugIn.PlugIn nbxmpp.plugin.PlugIn-class.html#PlugIn nbxmpp.transports_nb.NonBlockingTransport.set_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#set_timeout2 nbxmpp.transports_nb.NonBlockingTCP.pollend nbxmpp.transports_nb.NonBlockingTCP-class.html#pollend nbxmpp.transports_nb.NonBlockingTransport.get_fd nbxmpp.transports_nb.NonBlockingTransport-class.html#get_fd nbxmpp.transports_nb.NonBlockingTCP.remove_timeout nbxmpp.transports_nb.NonBlockingTCP-class.html#remove_timeout nbxmpp.transports_nb.NonBlockingTransport.set_send_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#set_send_timeout2 nbxmpp.transports_nb.NonBlockingTCP.set_timeout nbxmpp.transports_nb.NonBlockingTCP-class.html#set_timeout nbxmpp.transports_nb.NonBlockingTCP.start_disconnect nbxmpp.transports_nb.NonBlockingTCP-class.html#start_disconnect nbxmpp.transports_nb.NonBlockingHTTPBOSH nbxmpp.transports_nb.NonBlockingHTTPBOSH-class.html nbxmpp.transports_nb.NonBlockingTransport._tcp_connecting_started nbxmpp.transports_nb.NonBlockingTransport-class.html#_tcp_connecting_started nbxmpp.transports_nb.NonBlockingTransport.set_state nbxmpp.transports_nb.NonBlockingTransport-class.html#set_state nbxmpp.transports_nb.NonBlockingTransport.renew_send_timeout nbxmpp.transports_nb.NonBlockingTransport-class.html#renew_send_timeout nbxmpp.transports_nb.NonBlockingTransport.plugout nbxmpp.transports_nb.NonBlockingTransport-class.html#plugout nbxmpp.transports_nb.NonBlockingTCP._on_connect nbxmpp.transports_nb.NonBlockingTCP-class.html#_on_connect nbxmpp.transports_nb.NonBlockingTransport.read_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#read_timeout2 nbxmpp.transports_nb.NonBlockingTCP.connect nbxmpp.transports_nb.NonBlockingTCP-class.html#connect nbxmpp.transports_nb.NonBlockingHTTP.parse_http_message nbxmpp.transports_nb.NonBlockingHTTP-class.html#parse_http_message nbxmpp.transports_nb.NonBlockingTCP.read_timeout nbxmpp.transports_nb.NonBlockingTCP-class.html#read_timeout nbxmpp.transports_nb.NonBlockingTransport.set_send_timeout nbxmpp.transports_nb.NonBlockingTransport-class.html#set_send_timeout nbxmpp.transports_nb.NonBlockingTCP.encode_stanza nbxmpp.transports_nb.NonBlockingTCP-class.html#encode_stanza nbxmpp.transports_nb.NonBlockingTransport.renew_send_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#renew_send_timeout2 nbxmpp.transports_nb.NonBlockingHTTP.__init__ nbxmpp.transports_nb.NonBlockingHTTP-class.html#__init__ nbxmpp.transports_nb.NonBlockingHTTPBOSH.set_stanza_build_cb nbxmpp.transports_nb.NonBlockingHTTPBOSH-class.html#set_stanza_build_cb nbxmpp.transports_nb.NonBlockingTCP._do_receive nbxmpp.transports_nb.NonBlockingTCP-class.html#_do_receive nbxmpp.transports_nb.NonBlockingTCP.disconnect nbxmpp.transports_nb.NonBlockingTCP-class.html#disconnect nbxmpp.transports_nb.NonBlockingHTTP.build_http_message nbxmpp.transports_nb.NonBlockingHTTP-class.html#build_http_message nbxmpp.transports_nb.NonBlockingHTTPBOSH._do_send nbxmpp.transports_nb.NonBlockingHTTPBOSH-class.html#_do_send nbxmpp.transports_nb.NonBlockingTCP.send nbxmpp.transports_nb.NonBlockingTCP-class.html#send nbxmpp.transports_nb.NonBlockingTCP.tls_init nbxmpp.transports_nb.NonBlockingTCP-class.html#tls_init nbxmpp.transports_nb.NonBlockingTCP._connect_to_proxy nbxmpp.transports_nb.NonBlockingTCP-class.html#_connect_to_proxy nbxmpp.transports_nb.NonBlockingTCP.pollin nbxmpp.transports_nb.NonBlockingTCP-class.html#pollin nbxmpp.plugin.PlugIn.get_instance nbxmpp.plugin.PlugIn-class.html#get_instance nbxmpp.transports_nb.NonBlockingHTTP._on_receive nbxmpp.transports_nb.NonBlockingHTTP-class.html#_on_receive nbxmpp.transports_nb.NonBlockingHTTP.http_send nbxmpp.transports_nb.NonBlockingHTTP-class.html#http_send nbxmpp.plugin.PlugIn.PlugOut nbxmpp.plugin.PlugIn-class.html#PlugOut nbxmpp.transports_nb.NonBlockingTCP._plug_idle nbxmpp.transports_nb.NonBlockingTCP-class.html#_plug_idle nbxmpp.transports_nb.NonBlockingTransport.onreceive nbxmpp.transports_nb.NonBlockingTransport-class.html#onreceive nbxmpp.idlequeue.IdleObject.fd nbxmpp.idlequeue.IdleObject-class.html#fd nbxmpp.transports_nb.NonBlockingTransport.get_state nbxmpp.transports_nb.NonBlockingTransport-class.html#get_state nbxmpp.transports_nb.NonBlockingTCP.pollout nbxmpp.transports_nb.NonBlockingTCP-class.html#pollout nbxmpp.transports_nb.NonBlockingTransport._on_connect_failure nbxmpp.transports_nb.NonBlockingTransport-class.html#_on_connect_failure nbxmpp.transports_nb.NonBlockingTransport.plugin nbxmpp.transports_nb.NonBlockingTransport-class.html#plugin nbxmpp.plugin.PlugIn.PlugIn nbxmpp.plugin.PlugIn-class.html#PlugIn nbxmpp.transports_nb.NonBlockingTransport.set_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#set_timeout2 nbxmpp.transports_nb.NonBlockingTCP.pollend nbxmpp.transports_nb.NonBlockingTCP-class.html#pollend nbxmpp.transports_nb.NonBlockingTransport.get_fd nbxmpp.transports_nb.NonBlockingTransport-class.html#get_fd nbxmpp.transports_nb.NonBlockingTCP.remove_timeout nbxmpp.transports_nb.NonBlockingTCP-class.html#remove_timeout nbxmpp.transports_nb.NonBlockingTransport.set_send_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#set_send_timeout2 nbxmpp.transports_nb.NonBlockingTCP.set_timeout nbxmpp.transports_nb.NonBlockingTCP-class.html#set_timeout nbxmpp.transports_nb.NonBlockingTCP.start_disconnect nbxmpp.transports_nb.NonBlockingTCP-class.html#start_disconnect nbxmpp.transports_nb.NonBlockingTCP nbxmpp.transports_nb.NonBlockingTCP-class.html nbxmpp.transports_nb.NonBlockingTransport._tcp_connecting_started nbxmpp.transports_nb.NonBlockingTransport-class.html#_tcp_connecting_started nbxmpp.transports_nb.NonBlockingTransport.set_state nbxmpp.transports_nb.NonBlockingTransport-class.html#set_state nbxmpp.transports_nb.NonBlockingTransport.renew_send_timeout nbxmpp.transports_nb.NonBlockingTransport-class.html#renew_send_timeout nbxmpp.transports_nb.NonBlockingTransport.plugout nbxmpp.transports_nb.NonBlockingTransport-class.html#plugout nbxmpp.transports_nb.NonBlockingTCP._on_connect nbxmpp.transports_nb.NonBlockingTCP-class.html#_on_connect nbxmpp.transports_nb.NonBlockingTransport.read_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#read_timeout2 nbxmpp.transports_nb.NonBlockingTCP.connect nbxmpp.transports_nb.NonBlockingTCP-class.html#connect nbxmpp.transports_nb.NonBlockingTCP.read_timeout nbxmpp.transports_nb.NonBlockingTCP-class.html#read_timeout nbxmpp.transports_nb.NonBlockingTransport.set_send_timeout nbxmpp.transports_nb.NonBlockingTransport-class.html#set_send_timeout nbxmpp.transports_nb.NonBlockingTCP.encode_stanza nbxmpp.transports_nb.NonBlockingTCP-class.html#encode_stanza nbxmpp.transports_nb.NonBlockingTransport.renew_send_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#renew_send_timeout2 nbxmpp.transports_nb.NonBlockingTCP.__init__ nbxmpp.transports_nb.NonBlockingTCP-class.html#__init__ nbxmpp.transports_nb.NonBlockingTCP._do_receive nbxmpp.transports_nb.NonBlockingTCP-class.html#_do_receive nbxmpp.transports_nb.NonBlockingTCP.disconnect nbxmpp.transports_nb.NonBlockingTCP-class.html#disconnect nbxmpp.transports_nb.NonBlockingTCP.pollend nbxmpp.transports_nb.NonBlockingTCP-class.html#pollend nbxmpp.transports_nb.NonBlockingTCP.send nbxmpp.transports_nb.NonBlockingTCP-class.html#send nbxmpp.transports_nb.NonBlockingTCP.tls_init nbxmpp.transports_nb.NonBlockingTCP-class.html#tls_init nbxmpp.transports_nb.NonBlockingTCP._connect_to_proxy nbxmpp.transports_nb.NonBlockingTCP-class.html#_connect_to_proxy nbxmpp.transports_nb.NonBlockingTCP.pollin nbxmpp.transports_nb.NonBlockingTCP-class.html#pollin nbxmpp.plugin.PlugIn.get_instance nbxmpp.plugin.PlugIn-class.html#get_instance nbxmpp.transports_nb.NonBlockingTCP._on_receive nbxmpp.transports_nb.NonBlockingTCP-class.html#_on_receive nbxmpp.plugin.PlugIn.PlugOut nbxmpp.plugin.PlugIn-class.html#PlugOut nbxmpp.transports_nb.NonBlockingTCP._plug_idle nbxmpp.transports_nb.NonBlockingTCP-class.html#_plug_idle nbxmpp.transports_nb.NonBlockingTransport.onreceive nbxmpp.transports_nb.NonBlockingTransport-class.html#onreceive nbxmpp.idlequeue.IdleObject.fd nbxmpp.idlequeue.IdleObject-class.html#fd nbxmpp.transports_nb.NonBlockingTransport.get_state nbxmpp.transports_nb.NonBlockingTransport-class.html#get_state nbxmpp.transports_nb.NonBlockingTCP.pollout nbxmpp.transports_nb.NonBlockingTCP-class.html#pollout nbxmpp.transports_nb.NonBlockingTransport._on_connect_failure nbxmpp.transports_nb.NonBlockingTransport-class.html#_on_connect_failure nbxmpp.transports_nb.NonBlockingTransport.plugin nbxmpp.transports_nb.NonBlockingTransport-class.html#plugin nbxmpp.plugin.PlugIn.PlugIn nbxmpp.plugin.PlugIn-class.html#PlugIn nbxmpp.transports_nb.NonBlockingTransport.set_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#set_timeout2 nbxmpp.transports_nb.NonBlockingTCP._do_send nbxmpp.transports_nb.NonBlockingTCP-class.html#_do_send nbxmpp.transports_nb.NonBlockingTransport.get_fd nbxmpp.transports_nb.NonBlockingTransport-class.html#get_fd nbxmpp.transports_nb.NonBlockingTCP.remove_timeout nbxmpp.transports_nb.NonBlockingTCP-class.html#remove_timeout nbxmpp.transports_nb.NonBlockingTransport.set_send_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#set_send_timeout2 nbxmpp.transports_nb.NonBlockingTCP.set_timeout nbxmpp.transports_nb.NonBlockingTCP-class.html#set_timeout nbxmpp.transports_nb.NonBlockingTCP.start_disconnect nbxmpp.transports_nb.NonBlockingTCP-class.html#start_disconnect nbxmpp.transports_nb.NonBlockingTransport nbxmpp.transports_nb.NonBlockingTransport-class.html nbxmpp.transports_nb.NonBlockingTransport._tcp_connecting_started nbxmpp.transports_nb.NonBlockingTransport-class.html#_tcp_connecting_started nbxmpp.transports_nb.NonBlockingTransport.set_state nbxmpp.transports_nb.NonBlockingTransport-class.html#set_state nbxmpp.transports_nb.NonBlockingTransport.renew_send_timeout nbxmpp.transports_nb.NonBlockingTransport-class.html#renew_send_timeout nbxmpp.transports_nb.NonBlockingTransport.plugout nbxmpp.transports_nb.NonBlockingTransport-class.html#plugout nbxmpp.transports_nb.NonBlockingTransport._on_connect nbxmpp.transports_nb.NonBlockingTransport-class.html#_on_connect nbxmpp.transports_nb.NonBlockingTransport.read_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#read_timeout2 nbxmpp.transports_nb.NonBlockingTransport.connect nbxmpp.transports_nb.NonBlockingTransport-class.html#connect nbxmpp.transports_nb.NonBlockingTransport.read_timeout nbxmpp.transports_nb.NonBlockingTransport-class.html#read_timeout nbxmpp.transports_nb.NonBlockingTransport.set_send_timeout nbxmpp.transports_nb.NonBlockingTransport-class.html#set_send_timeout nbxmpp.transports_nb.NonBlockingTransport.renew_send_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#renew_send_timeout2 nbxmpp.transports_nb.NonBlockingTransport.__init__ nbxmpp.transports_nb.NonBlockingTransport-class.html#__init__ nbxmpp.transports_nb.NonBlockingTransport.disconnect nbxmpp.transports_nb.NonBlockingTransport-class.html#disconnect nbxmpp.plugin.PlugIn.PlugIn nbxmpp.plugin.PlugIn-class.html#PlugIn nbxmpp.transports_nb.NonBlockingTransport.send nbxmpp.transports_nb.NonBlockingTransport-class.html#send nbxmpp.plugin.PlugIn.get_instance nbxmpp.plugin.PlugIn-class.html#get_instance nbxmpp.plugin.PlugIn.PlugOut nbxmpp.plugin.PlugIn-class.html#PlugOut nbxmpp.transports_nb.NonBlockingTransport.onreceive nbxmpp.transports_nb.NonBlockingTransport-class.html#onreceive nbxmpp.transports_nb.NonBlockingTransport.get_state nbxmpp.transports_nb.NonBlockingTransport-class.html#get_state nbxmpp.transports_nb.NonBlockingTransport._on_connect_failure nbxmpp.transports_nb.NonBlockingTransport-class.html#_on_connect_failure nbxmpp.transports_nb.NonBlockingTransport.plugin nbxmpp.transports_nb.NonBlockingTransport-class.html#plugin nbxmpp.transports_nb.NonBlockingTransport.set_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#set_timeout2 nbxmpp.transports_nb.NonBlockingTransport.get_fd nbxmpp.transports_nb.NonBlockingTransport-class.html#get_fd nbxmpp.transports_nb.NonBlockingTransport.remove_timeout nbxmpp.transports_nb.NonBlockingTransport-class.html#remove_timeout nbxmpp.transports_nb.NonBlockingTransport.set_send_timeout2 nbxmpp.transports_nb.NonBlockingTransport-class.html#set_send_timeout2 nbxmpp.transports_nb.NonBlockingTransport.set_timeout nbxmpp.transports_nb.NonBlockingTransport-class.html#set_timeout nbxmpp.transports_nb.NonBlockingTransport.start_disconnect nbxmpp.transports_nb.NonBlockingTransport-class.html#start_disconnect nbxmpp-0.5.3/doc/apidocs/nbxmpp.tls_nb-pysrc.html0000644000175000017500000051423112321263757023220 0ustar asterixasterix00000000000000 nbxmpp.tls_nb
Package nbxmpp :: Module tls_nb
[hide private]
[frames] | no frames]

Source Code for Module nbxmpp.tls_nb

  1  ##   tls_nb.py 
  2  ##       based on transports_nb.py 
  3  ## 
  4  ##   Copyright (C) 2003-2004 Alexey "Snake" Nezhdanov 
  5  ##       modified by Dimitur Kirov <dkirov@gmail.com> 
  6  ##       modified by Tomas Karasek <tom.to.the.k@gmail.com> 
  7  ## 
  8  ##   This program is free software; you can redistribute it and/or modify 
  9  ##   it under the terms of the GNU General Public License as published by 
 10  ##   the Free Software Foundation; either version 2, or (at your option) 
 11  ##   any later version. 
 12  ## 
 13  ##   This program is distributed in the hope that it will be useful, 
 14  ##   but WITHOUT ANY WARRANTY; without even the implied warranty of 
 15  ##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 16  ##   GNU General Public License for more details. 
 17   
 18  import socket 
 19  from plugin import PlugIn 
 20   
 21  import sys 
 22  import os 
 23  import time 
 24   
 25  import traceback 
 26   
 27  import logging 
 28  log = logging.getLogger('nbxmpp.tls_nb') 
 29   
 30  USE_PYOPENSSL = False 
 31   
 32  PYOPENSSL = 'PYOPENSSL' 
 33  PYSTDLIB  = 'PYSTDLIB' 
 34   
 35  try: 
 36      #raise ImportError("Manually disabled PyOpenSSL") 
 37      import OpenSSL.SSL 
 38      import OpenSSL.crypto 
 39      USE_PYOPENSSL = True 
 40      log.info("PyOpenSSL loaded") 
 41  except ImportError: 
 42      log.debug("Import of PyOpenSSL failed:", exc_info=True) 
 43   
 44      # FIXME: Remove these prints before release, replace with a warning dialog. 
 45      print >> sys.stderr, "=" * 79 
 46      print >> sys.stderr, "PyOpenSSL not found, falling back to Python builtin SSL objects (insecure)." 
 47      print >> sys.stderr, "=" * 79 
 48   
49 -def gattr(obj, attr, default=None):
50 try: 51 return getattr(obj, attr) 52 except AttributeError: 53 return default
54 55
56 -class SSLWrapper:
57 """ 58 Abstract SSLWrapper base class 59 """ 60
61 - class Error(IOError):
62 """ 63 Generic SSL Error Wrapper 64 """ 65
66 - def __init__(self, sock=None, exc=None, errno=None, strerror=None, 67 peer=None):
68 self.parent = IOError 69 70 errno = errno or gattr(exc, 'errno') or exc[0] 71 strerror = strerror or gattr(exc, 'strerror') or gattr(exc, 'args') 72 if not isinstance(strerror, basestring): 73 strerror = repr(strerror) 74 75 self.sock = sock 76 self.exc = exc 77 self.peer = peer 78 self.exc_name = None 79 self.exc_args = None 80 self.exc_str = None 81 self.exc_repr = None 82 83 if self.exc is not None: 84 self.exc_name = str(self.exc.__class__) 85 self.exc_args = gattr(self.exc, 'args') 86 self.exc_str = str(self.exc) 87 self.exc_repr = repr(self.exc) 88 if not errno: 89 try: 90 if isinstance(exc, OpenSSL.SSL.SysCallError): 91 if self.exc_args[0] > 0: 92 errno = self.exc_args[0] 93 strerror = self.exc_args[1] 94 except: pass 95 96 self.parent.__init__(self, errno, strerror) 97 98 if self.peer is None and sock is not None: 99 try: 100 ppeer = self.sock.getpeername() 101 if len(ppeer) == 2 and isinstance(ppeer[0], basestring) \ 102 and isinstance(ppeer[1], int): 103 self.peer = ppeer 104 except: 105 pass
106
107 - def __str__(self):
108 s = str(self.__class__) 109 if self.peer: 110 s += " for %s:%d" % self.peer 111 if self.errno is not None: 112 s += ": [Errno: %d]" % self.errno 113 if self.strerror: 114 s += " (%s)" % self.strerror 115 if self.exc_name: 116 s += ", Caused by %s" % self.exc_name 117 if self.exc_str: 118 if self.strerror: 119 s += "(%s)" % self.exc_str 120 else: s += "(%s)" % str(self.exc_args) 121 return s
122
123 - def __init__(self, sslobj, sock=None):
124 self.sslobj = sslobj 125 self.sock = sock 126 log.debug("%s.__init__ called with %s", self.__class__, sslobj)
127
128 - def recv(self, data, flags=None):
129 """ 130 Receive wrapper for SSL object 131 132 We can return None out of this function to signal that no data is 133 available right now. Better than an exception, which differs 134 depending on which SSL lib we're using. Unfortunately returning '' 135 can indicate that the socket has been closed, so to be sure, we avoid 136 this by returning None. 137 """ 138 raise NotImplementedError
139
140 - def send(self, data, flags=None, now=False):
141 """ 142 Send wrapper for SSL object 143 """ 144 raise NotImplementedError
145 146
147 -class PyOpenSSLWrapper(SSLWrapper):
148 """ 149 Wrapper class for PyOpenSSL's recv() and send() methods 150 """ 151
152 - def __init__(self, *args):
153 self.parent = SSLWrapper 154 self.parent.__init__(self, *args)
155
156 - def is_numtoolarge(self, e):
157 ''' Magic methods don't need documentation ''' 158 t = ('asn1 encoding routines', 'a2d_ASN1_OBJECT', 'first num too large') 159 return (isinstance(e.args, (list, tuple)) and len(e.args) == 1 and 160 isinstance(e.args[0], (list, tuple)) and len(e.args[0]) == 2 and 161 e.args[0][0] == e.args[0][1] == t)
162
163 - def recv(self, bufsize, flags=None):
164 retval = None 165 try: 166 if flags is None: 167 retval = self.sslobj.recv(bufsize) 168 else: 169 retval = self.sslobj.recv(bufsize, flags) 170 except (OpenSSL.SSL.WantReadError, OpenSSL.SSL.WantWriteError), e: 171 log.debug("Recv: Want-error: " + repr(e)) 172 except OpenSSL.SSL.SysCallError, e: 173 log.debug("Recv: Got OpenSSL.SSL.SysCallError: " + repr(e), 174 exc_info=True) 175 raise SSLWrapper.Error(self.sock or self.sslobj, e) 176 except OpenSSL.SSL.ZeroReturnError, e: 177 # end-of-connection raises ZeroReturnError instead of having the 178 # connection's .recv() method return a zero-sized result. 179 raise SSLWrapper.Error(self.sock or self.sslobj, e, -1) 180 except OpenSSL.SSL.Error, e: 181 if self.is_numtoolarge(e): 182 # warn, but ignore this exception 183 log.warning("Recv: OpenSSL: asn1enc: first num too large (ignored)") 184 else: 185 log.debug("Recv: Caught OpenSSL.SSL.Error:", exc_info=True) 186 raise SSLWrapper.Error(self.sock or self.sslobj, e) 187 return retval
188
189 - def send(self, data, flags=None, now=False):
190 try: 191 if flags is None: 192 return self.sslobj.send(data) 193 else: 194 return self.sslobj.send(data, flags) 195 except (OpenSSL.SSL.WantReadError, OpenSSL.SSL.WantWriteError), e: 196 #log.debug("Send: " + repr(e)) 197 time.sleep(0.1) # prevent 100% CPU usage 198 except OpenSSL.SSL.SysCallError, e: 199 log.error("Send: Got OpenSSL.SSL.SysCallError: " + repr(e), 200 exc_info=True) 201 raise SSLWrapper.Error(self.sock or self.sslobj, e) 202 except OpenSSL.SSL.Error, e: 203 if self.is_numtoolarge(e): 204 # warn, but ignore this exception 205 log.warning("Send: OpenSSL: asn1enc: first num too large (ignored)") 206 else: 207 log.error("Send: Caught OpenSSL.SSL.Error:", exc_info=True) 208 raise SSLWrapper.Error(self.sock or self.sslobj, e) 209 return 0
210 211
212 -class StdlibSSLWrapper(SSLWrapper):
213 """ 214 Wrapper class for Python socket.ssl read() and write() methods 215 """ 216
217 - def __init__(self, *args):
218 self.parent = SSLWrapper 219 self.parent.__init__(self, *args)
220
221 - def recv(self, bufsize, flags=None):
222 # we simply ignore flags since ssl object doesn't support it 223 try: 224 return self.sslobj.read(bufsize) 225 except socket.sslerror, e: 226 log.debug("Recv: Caught socket.sslerror: " + repr(e), exc_info=True) 227 if e.args[0] not in (socket.SSL_ERROR_WANT_READ, socket.SSL_ERROR_WANT_WRITE): 228 raise SSLWrapper.Error(self.sock or self.sslobj, e) 229 return None
230
231 - def send(self, data, flags=None, now=False):
232 # we simply ignore flags since ssl object doesn't support it 233 try: 234 return self.sslobj.write(data) 235 except socket.sslerror, e: 236 log.debug("Send: Caught socket.sslerror:", exc_info=True) 237 if e.args[0] not in (socket.SSL_ERROR_WANT_READ, socket.SSL_ERROR_WANT_WRITE): 238 raise SSLWrapper.Error(self.sock or self.sslobj, e) 239 return 0
240 241
242 -class NonBlockingTLS(PlugIn):
243 """ 244 TLS connection used to encrypts already estabilished tcp connection 245 246 Can be plugged into NonBlockingTCP and will make use of StdlibSSLWrapper or 247 PyOpenSSLWrapper. 248 """ 249
250 - def __init__(self, cacerts, mycerts):
251 """ 252 :param cacerts: path to pem file with certificates of known XMPP servers 253 :param mycerts: path to pem file with certificates of user trusted servers 254 """ 255 PlugIn.__init__(self) 256 self.cacerts = cacerts 257 self.mycerts = mycerts
258 259 # from ssl.h (partial extract) 260 ssl_h_bits = { "SSL_ST_CONNECT": 0x1000, "SSL_ST_ACCEPT": 0x2000, 261 "SSL_CB_LOOP": 0x01, "SSL_CB_EXIT": 0x02, 262 "SSL_CB_READ": 0x04, "SSL_CB_WRITE": 0x08, 263 "SSL_CB_ALERT": 0x4000, 264 "SSL_CB_HANDSHAKE_START": 0x10, "SSL_CB_HANDSHAKE_DONE": 0x20} 265
266 - def plugin(self, owner):
267 """ 268 Use to PlugIn TLS into transport and start establishing immediately. 269 Returns True if TLS/SSL was established correctly, otherwise False 270 """ 271 log.info('Starting TLS estabilishing') 272 try: 273 res = self._startSSL() 274 except Exception, e: 275 log.error("PlugIn: while trying _startSSL():", exc_info=True) 276 return False 277 return res
278
279 - def _dumpX509(self, cert, stream=sys.stderr):
280 print >> stream, "Digest (SHA-1):", cert.digest("sha1") 281 print >> stream, "Digest (MD5):", cert.digest("md5") 282 print >> stream, "Serial #:", cert.get_serial_number() 283 print >> stream, "Version:", cert.get_version() 284 print >> stream, "Expired:", ("Yes" if cert.has_expired() else "No") 285 print >> stream, "Subject:" 286 self._dumpX509Name(cert.get_subject(), stream) 287 print >> stream, "Issuer:" 288 self._dumpX509Name(cert.get_issuer(), stream) 289 self._dumpPKey(cert.get_pubkey(), stream)
290
291 - def _dumpX509Name(self, name, stream=sys.stderr):
292 print >> stream, "X509Name:", str(name)
293
294 - def _dumpPKey(self, pkey, stream=sys.stderr):
295 typedict = {OpenSSL.crypto.TYPE_RSA: "RSA", 296 OpenSSL.crypto.TYPE_DSA: "DSA"} 297 print >> stream, "PKey bits:", pkey.bits() 298 print >> stream, "PKey type: %s (%d)" % (typedict.get(pkey.type(), 299 "Unknown"), pkey.type())
300
301 - def _startSSL(self):
302 """ 303 Immediatedly switch socket to TLS mode. Used internally 304 """ 305 log.debug("_startSSL called") 306 307 if USE_PYOPENSSL: 308 result = self._startSSL_pyOpenSSL() 309 else: 310 result = self._startSSL_stdlib() 311 312 if result: 313 log.debug('Synchronous handshake completed') 314 return True 315 else: 316 return False
317
318 - def _load_cert_file(self, cert_path, cert_store, logg=True):
319 if not os.path.isfile(cert_path): 320 return 321 try: 322 f = open(cert_path) 323 except IOError, e: 324 log.warning('Unable to open certificate file %s: %s' % \ 325 (cert_path, str(e))) 326 return 327 lines = f.readlines() 328 i = 0 329 begin = -1 330 for line in lines: 331 if 'BEGIN CERTIFICATE' in line: 332 begin = i 333 elif 'END CERTIFICATE' in line and begin > -1: 334 cert = ''.join(lines[begin:i+2]) 335 try: 336 x509cert = OpenSSL.crypto.load_certificate( 337 OpenSSL.crypto.FILETYPE_PEM, cert) 338 cert_store.add_cert(x509cert) 339 except OpenSSL.crypto.Error, exception_obj: 340 if logg: 341 log.warning('Unable to load a certificate from file %s: %s' %\ 342 (cert_path, exception_obj.args[0][0][2])) 343 except: 344 log.warning('Unknown error while loading certificate from file ' 345 '%s' % cert_path) 346 begin = -1 347 i += 1
348
349 - def _startSSL_pyOpenSSL(self):
350 log.debug("_startSSL_pyOpenSSL called") 351 tcpsock = self._owner 352 # NonBlockingHTTPBOSH instance has no attribute _owner 353 if hasattr(tcpsock, '_owner') and tcpsock._owner._caller.client_cert \ 354 and os.path.exists(tcpsock._owner._caller.client_cert): 355 conn = tcpsock._owner._caller 356 # FIXME make a checkbox for Client Cert / SSLv23 / TLSv1 357 # If we are going to use a client cert/key pair for authentication, 358 # we choose TLSv1 method. 359 tcpsock._sslContext = OpenSSL.SSL.Context(OpenSSL.SSL.TLSv1_METHOD) 360 log.debug('Using client cert and key from %s' % conn.client_cert) 361 try: 362 p12 = OpenSSL.crypto.load_pkcs12(open(conn.client_cert).read(), 363 conn.client_cert_passphrase) 364 except OpenSSL.crypto.Error, exception_obj: 365 log.warning('Unable to load client pkcs12 certificate from ' 366 'file %s: %s ... Is it a valid PKCS12 cert?' % \ 367 (conn.client_cert, exception_obj.args)) 368 except: 369 log.warning('Unknown error while loading certificate from file ' 370 '%s' % conn.client_cert) 371 else: 372 log.info('PKCS12 Client cert loaded OK') 373 try: 374 tcpsock._sslContext.use_certificate(p12.get_certificate()) 375 tcpsock._sslContext.use_privatekey(p12.get_privatekey()) 376 log.info('p12 cert and key loaded') 377 except OpenSSL.crypto.Error, exception_obj: 378 log.warning('Unable to extract client certificate from ' 379 'file %s' % conn.client_cert) 380 except Exception, msg: 381 log.warning('Unknown error extracting client certificate ' 382 'from file %s: %s' % (conn.client_cert, msg)) 383 else: 384 log.info('client cert and key loaded OK') 385 else: 386 # See http://docs.python.org/dev/library/ssl.html 387 tcpsock._sslContext = OpenSSL.SSL.Context(OpenSSL.SSL.SSLv23_METHOD) 388 flags = OpenSSL.SSL.OP_NO_SSLv2 389 try: 390 flags |= OpenSSL.SSL.OP_NO_TICKET 391 except AttributeError, e: 392 # py-OpenSSL < 0.9 or old OpenSSL 393 flags |= 16384 394 tcpsock._sslContext.set_options(flags) 395 396 tcpsock.ssl_errnum = [] 397 tcpsock._sslContext.set_verify(OpenSSL.SSL.VERIFY_PEER, 398 self._ssl_verify_callback) 399 store = tcpsock._sslContext.get_cert_store() 400 self._load_cert_file(self.cacerts, store) 401 self._load_cert_file(self.mycerts, store) 402 if os.path.isdir('/etc/ssl/certs'): 403 for f in os.listdir('/etc/ssl/certs'): 404 # We don't logg because there is a lot a duplicated certs in this 405 # folder 406 self._load_cert_file(os.path.join('/etc/ssl/certs', f), store, 407 logg=False) 408 409 tcpsock._sslObj = OpenSSL.SSL.Connection(tcpsock._sslContext, 410 tcpsock._sock) 411 tcpsock._sslObj.set_connect_state() # set to client mode 412 wrapper = PyOpenSSLWrapper(tcpsock._sslObj) 413 tcpsock._recv = wrapper.recv 414 tcpsock._send = wrapper.send 415 416 log.debug("Initiating handshake...") 417 try: 418 tcpsock._sslObj.do_handshake() 419 except (OpenSSL.SSL.WantReadError, OpenSSL.SSL.WantWriteError), e: 420 pass 421 except: 422 log.error('Error while TLS handshake: ', exc_info=True) 423 return False 424 self._owner.ssl_lib = PYOPENSSL 425 return True
426
427 - def _startSSL_stdlib(self):
428 log.debug("_startSSL_stdlib called") 429 tcpsock=self._owner 430 try: 431 tcpsock._sock.setblocking(True) 432 tcpsock._sslObj = socket.ssl(tcpsock._sock, None, None) 433 tcpsock._sock.setblocking(False) 434 tcpsock._sslIssuer = tcpsock._sslObj.issuer() 435 tcpsock._sslServer = tcpsock._sslObj.server() 436 wrapper = StdlibSSLWrapper(tcpsock._sslObj, tcpsock._sock) 437 tcpsock._recv = wrapper.recv 438 tcpsock._send = wrapper.send 439 except: 440 log.error("Exception caught in _startSSL_stdlib:", exc_info=True) 441 return False 442 self._owner.ssl_lib = PYSTDLIB 443 return True
444
445 - def _ssl_verify_callback(self, sslconn, cert, errnum, depth, ok):
446 # Exceptions can't propagate up through this callback, so print them here. 447 try: 448 self._owner.ssl_fingerprint_sha1.append(cert.digest('sha1')) 449 self._owner.ssl_certificate.append(cert) 450 self._owner.ssl_errnum.append(errnum) 451 self._owner.ssl_cert_pem.append(OpenSSL.crypto.dump_certificate( 452 OpenSSL.crypto.FILETYPE_PEM, cert)) 453 return True 454 except: 455 log.error("Exception caught in _ssl_info_callback:", exc_info=True) 456 # Make sure something is printed, even if log is disabled. 457 traceback.print_exc()
458

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.Acks-class.html0000644000175000017500000006200112321263757024416 0ustar asterixasterix00000000000000 nbxmpp.protocol.Acks
Package nbxmpp :: Module protocol :: Class Acks
[hide private]
[frames] | no frames]

Class Acks

source code


Acknowledgement elements for Stream Management
Instance Methods [hide private]
 
__init__(self, nsp='urn:xmpp:sm:2')
Takes "tag" argument as the name of node (prepended by namespace, if needed and separated from it by a space), attrs dictionary as the set of arguments, payload list as the set of textual strings and child nodes that this node carries within itself and "parent" argument that is another node that this one will be the child of. Also the __init__ can be provided with "node" argument that is either a text string containing exactly one node or another Node instance to begin with. If both "node" and other arguments is provided then the node initially created as replica of "node" provided and then modified to be compliant with other arguments.
source code
 
buildAnswer(self, handled)
handled is the number of stanzas handled
source code
 
buildRequest(self) source code
 
buildEnable(self, resume=False) source code
 
buildResume(self, handled, previd) source code

Inherited from simplexml.Node: __contains__, __delitem__, __getattr__, __getitem__, __setitem__, __str__, addChild, addData, clearData, delAttr, delChild, getAttr, getAttrs, getChildren, getData, getName, getNamespace, getParent, getPayload, getTag, getTagAttr, getTagData, getTags, has_attr, iterTags, lookup_nsp, setAttr, setData, setName, setNamespace, setParent, setPayload, setTag, setTagAttr, setTagData

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]

Inherited from simplexml.Node: FORCE_NODE_RECREATION

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, nsp='urn:xmpp:sm:2')
(Constructor)

source code 
Takes "tag" argument as the name of node (prepended by namespace, if needed and separated from it by a space), attrs dictionary as the set of arguments, payload list as the set of textual strings and child nodes that this node carries within itself and "parent" argument that is another node that this one will be the child of. Also the __init__ can be provided with "node" argument that is either a text string containing exactly one node or another Node instance to begin with. If both "node" and other arguments is provided then the node initially created as replica of "node" provided and then modified to be compliant with other arguments.
Overrides: object.__init__
(inherited documentation)

buildAnswer(self, handled)

source code 
handled is the number of stanzas handled

buildRequest(self)

source code 

buildEnable(self, resume=False)

source code 

buildResume(self, handled, previd)

source code 

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_t_9.gif0000644000175000017500000004510012321263757025544 0ustar asterixasterix00000000000000GIF89amLB<ČJDT̆|$"$lfdĢjdĂԦlRLd"bd, <2,䲤\NLvt|ztܶ\F<|b\̖ܮ"$t4&$D:4|jl ĬRTlZ\zlndܪrtĖ̞24TJL̦t TB<|亼dVT|^Tnl̞̤BD,*,D2,dNDĚdJDf\4.,L:4j\tZT$~trlĊ ,"jl,vl\JL|f\*,| ̬Z\~|rtz|Ԟ:<|Ԧ TF<ܤJLdRTjlt^Td̒ĺԪlVL\2,DܾT><ܒԮԢܲtbdfd䶴| 쾼Ğz|\$<.,Lܺ\JD̚4*$  ̜~trd̢̪|D6,dRLL>4$,&$ԪľĴfdԼ&$VTvt64侼̤FDĞĎ nl.,^\~|>< ܤNLnlLBDԦ<24z|\FD|bdD:< ztnl̞TBDdNLjdtZ\$,"$vt|fdTFDt^\lVT4*,D64L><!,m H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhJ#۷pʝKݻx˷߿~ È+^̸ǐ#KL˘3W6`g)MӨS^͚4ְaM۱t;fh۞Mm“+WsK|:xt]um7N>e臧0tկ{|$ӧ H0{%aHl > *&`q1q:h~$~_0 4LŅR`3ܝDP`2h8l3x:#X$xC B'#{؈.?R(dI [v%aR09 IIr` *jΆf] ۭhx{g'BgU%kh&^Zfij\:逜Nwi.i01 &P9Dhk:zlhE.*ݚmm%Ζ Dd%].{ix˯l˔n7L jI`$IXGl); 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9:z:+k:+{/{:;+wG>_{N;V;:8BŠ : ;8Xz;;(֪"%PBk<'/<7?)_wF>orj>mz>g>~`>꯾Z>>V>ϾQ>߾N>K>G>C ?B?>7'n&O/|(V@`(Z:?kk?S?@P8`A&TaC[8bE1fԸcGA9dI'QTi/IAL7B\gO?:hɖ8 rIYjUWfZAD|@YFR:sͱ2ƕ Nݺo_j:&bmM0&&cNsgϟAS\n D$0>Dzk"9-kM6H|r4v 9tw81RaS3 IzS{{P&Q$$ @> l:ҮK6O 9(zi.F\2a%n)]VB/`*,dH\ТEe_oqQ߮i=A3-A $ .2q -LI8s!a}Y,XS^Ģe2s{ da>d(:Lp;Ҝ&]qS0f7 #q8ȉlDH]Sv(R!]0+$E15RrkT8Z)4)m̫dV xڦm'!0u q-rP zmmZB=J SX HJ,K$#Qm x) a5;^7i٥@UJJz+W=0YeLH9 0C B'Dh !d-_h?Z^NV$sk7jpyVWE@ R0 'Di-Z (Z<e!ϰe,asB囅X>fY.cl*YiwWdgjЅ4?tN?;LJ AjQtҪFUխvSϚֵqk]׽la66;nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.JID-class.html0000644000175000017500000006306612321263757024157 0ustar asterixasterix00000000000000 nbxmpp.protocol.JID
Package nbxmpp :: Module protocol :: Class JID
[hide private]
[frames] | no frames]

Class JID

source code

JID can be built from string, modified, compared, serialised into string
Instance Methods [hide private]
 
__init__(self, jid=None, node='', domain='', resource='')
JID can be specified as string (jid argument) or as separate parts
source code
 
getNode(self)
Return the node part of the JID
source code
 
setNode(self, node)
Set the node part of the JID to new value. Specify None to remove the node part
source code
 
getDomain(self)
Return the domain part of the JID
source code
 
setDomain(self, domain)
Set the domain part of the JID to new value
source code
 
getResource(self)
Return the resource part of the JID
source code
 
setResource(self, resource)
Set the resource part of the JID to new value. Specify None to remove the resource part
source code
 
getStripped(self)
Return the bare representation of JID. I.e. string value w/o resource
source code
 
__eq__(self, other)
Compare the JID to another instance or to string for equality
source code
 
__ne__(self, other)
Compare the JID to another instance or to string for non-equality
source code
 
bareMatch(self, other)
Compare the node and domain parts of the JID's for equality
source code
 
__str__(self, wresource=1)
Serialise JID into string
source code
 
__hash__(self)
Produce hash of the JID, Allows to use JID objects as keys of the dictionary
source code
Method Details [hide private]

__init__(self, jid=None, node='', domain='', resource='')
(Constructor)

source code 

JID can be specified as string (jid argument) or as separate parts

Examples: JID('node@domain/resource') JID(node='node',domain='domain.org')

getNode(self)

source code 
Return the node part of the JID

setNode(self, node)

source code 
Set the node part of the JID to new value. Specify None to remove the node part

getDomain(self)

source code 
Return the domain part of the JID

setDomain(self, domain)

source code 
Set the domain part of the JID to new value

getResource(self)

source code 
Return the resource part of the JID

setResource(self, resource)

source code 
Set the resource part of the JID to new value. Specify None to remove the resource part

getStripped(self)

source code 
Return the bare representation of JID. I.e. string value w/o resource

__eq__(self, other)
(Equality operator)

source code 
Compare the JID to another instance or to string for equality

__ne__(self, other)

source code 
Compare the JID to another instance or to string for non-equality

bareMatch(self, other)

source code 
Compare the node and domain parts of the JID's for equality

__str__(self, wresource=1)
(Informal representation operator)

source code 
Serialise JID into string

__hash__(self)
(Hashing function)

source code 
Produce hash of the JID, Allows to use JID objects as keys of the dictionary

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_34.gif0000644000175000017500000002101612321263757025616 0ustar asterixasterix00000000000000GIF89aLB<ČBDlĢ$"$jdlfdĂbdlRLĺT>< <2,ĖvtdNDԦ"$\F<̞tTJLBD|D2,|^TTB<̴jldJDZ\L:4tZT~tܪj\쾼nlJL̢,"vlԢ*,\JL24܄f\,<.,亼rl̚ ĊTF4ND̢,&$z|fdt$~tľĆfd&$VT64ܶĞvtܾ  rdFDnl^\ܮNLԦ.,64侼̞ Ďnl̖Ԯ><̦<24dNLԦ\FDD:<$̞TBDtZ\jd,"$vtTFDt^\lVT|fdzt4*,D64L><!,K H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ -AѣH*]ʴ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rl_VB Ta +X>汍KbXCvlc 9 G\?B V`E} 9- AXOT2 f1Y\r}  R,*_9Ara3/Às >!u!A!=1cxƐCPӚ4a! FQmWoӇ0m\KҼ~tKm <C}gVrQf?;Avi׷~VMmBn`L]Ğ]C!&pe'A0;kF<v}-΃zg e}ly <&Mmw86seA ~ͅQ _` W;_as'{ ?OtW1C:Ap/z?^Gx@y,v1eD7<9 Ӿ @[k=;C/t{ Azi/ !T.B$T%d&.()* +,Br ;nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.UnsupportedEncoding-class.html0000644000175000017500000002274112321263757027543 0ustar asterixasterix00000000000000 nbxmpp.protocol.UnsupportedEncoding
Package nbxmpp :: Module protocol :: Class UnsupportedEncoding
[hide private]
[frames] | no frames]

Class UnsupportedEncoding

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_i.gif0000644000175000017500000002204212321263757025301 0ustar asterixasterix00000000000000GIF89a`#LB<ČJD\Ă$"$|b\ĢlVL|jd<2,ľjl\NL 촖d24vt\F4dRT ĬZ\lZ\nd<64\JDԪ$̚4*$~t亼  *,rlD6,~|dRLjl,&$̢z|LBDĊ|bdlVT|<24T><><ܮ䶴|jlĞrt<.,̌z|nlĚܶ̄ ^\侼.,nl̦\FDD:<Ԧ$zt t^\TBDL:}ZÖ͑[msL4cOνyw Wξmk 1R"dJl0Fep4^e( 6U|gᆬC"U$RY\I~WY'i4"1Yছ+h$HdDoR)yWOјy%`(r^)BewPifVieViZ&(F:i 4PE#*X pEew^zLЂc"Z:#jj^T<ƄlH_7qG"X)AIemH{nr -Zf6I/jVt'Y 'DGlšN,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mpp :: Module protocol :: Class ErrorNode
[hide private]
[frames] | no frames]

Class ErrorNode

source code


XMPP-style error element

In the case of stanza error should be attached to XMPP stanza. In the case of stream-level errors should be used separately.

Instance Methods [hide private]
 
__init__(self, name, code=None, typ=None, text=None)
Mandatory parameter: name - name of error condition. Optional parameters: code, typ, text. Used for backwards compartibility with older jabber protocol.
source code

Inherited from simplexml.Node: __contains__, __delitem__, __getattr__, __getitem__, __setitem__, __str__, addChild, addData, clearData, delAttr, delChild, getAttr, getAttrs, getChildren, getData, getName, getNamespace, getParent, getPayload, getTag, getTagAttr, getTagData, getTags, has_attr, iterTags, lookup_nsp, setAttr, setData, setName, setNamespace, setParent, setPayload, setTag, setTagAttr, setTagData

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]

Inherited from simplexml.Node: FORCE_NODE_RECREATION

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, code=None, typ=None, text=None)
(Constructor)

source code 
Mandatory parameter: name - name of error condition. Optional parameters: code, typ, text. Used for backwards compartibility with older jabber protocol.
Overrides: object.__init__

nbxmpp-0.5.3/doc/apidocs/nbxmpp.tls_nb.NonBlockingTLS-class.html0000644000175000017500000007272612321263757025762 0ustar asterixasterix00000000000000 nbxmpp.tls_nb.NonBlockingTLS
Package nbxmpp :: Module tls_nb :: Class NonBlockingTLS
[hide private]
[frames] | no frames]

Class NonBlockingTLS

source code


TLS connection used to encrypts already estabilished tcp connection

Can be plugged into NonBlockingTCP and will make use of StdlibSSLWrapper or PyOpenSSLWrapper.

Instance Methods [hide private]
 
__init__(self, cacerts, mycerts) source code
 
plugin(self, owner)
Use to PlugIn TLS into transport and start establishing immediately. Returns True if TLS/SSL was established correctly, otherwise False
source code
 
_dumpX509(self, cert, stream=sys.stderr) source code
 
_dumpX509Name(self, name, stream=sys.stderr) source code
 
_dumpPKey(self, pkey, stream=sys.stderr) source code
 
_startSSL(self)
Immediatedly switch socket to TLS mode. Used internally
source code
 
_load_cert_file(self, cert_path, cert_store, logg=True) source code
 
_startSSL_pyOpenSSL(self) source code
 
_startSSL_stdlib(self) source code
 
_ssl_verify_callback(self, sslconn, cert, errnum, depth, ok) source code

Inherited from plugin.PlugIn: PlugIn, PlugOut

Class Methods [hide private]

Inherited from plugin.PlugIn: get_instance

Class Variables [hide private]
  ssl_h_bits = {'SSL_CB_ALERT': 16384, 'SSL_CB_EXIT': 2, 'SSL_CB...
Method Details [hide private]

__init__(self, cacerts, mycerts)
(Constructor)

source code 
Parameters:
  • cacerts - path to pem file with certificates of known XMPP servers
  • mycerts - path to pem file with certificates of user trusted servers
Overrides: plugin.PlugIn.__init__

plugin(self, owner)

source code 
Use to PlugIn TLS into transport and start establishing immediately. Returns True if TLS/SSL was established correctly, otherwise False

_dumpX509(self, cert, stream=sys.stderr)

source code 

_dumpX509Name(self, name, stream=sys.stderr)

source code 

_dumpPKey(self, pkey, stream=sys.stderr)

source code 

_startSSL(self)

source code 
Immediatedly switch socket to TLS mode. Used internally

_load_cert_file(self, cert_path, cert_store, logg=True)

source code 

_startSSL_pyOpenSSL(self)

source code 

_startSSL_stdlib(self)

source code 

_ssl_verify_callback(self, sslconn, cert, errnum, depth, ok)

source code 

Class Variable Details [hide private]

ssl_h_bits

Value:
{'SSL_CB_ALERT': 16384,
 'SSL_CB_EXIT': 2,
 'SSL_CB_HANDSHAKE_DONE': 32,
 'SSL_CB_HANDSHAKE_START': 16,
 'SSL_CB_LOOP': 1,
 'SSL_CB_READ': 4,
 'SSL_CB_WRITE': 8,
 'SSL_ST_ACCEPT': 8192,
...

nbxmpp-0.5.3/doc/apidocs/nbxmpp.auth_nb.SASL-class.html0000644000175000017500000005735212321263757024073 0ustar asterixasterix00000000000000 nbxmpp.auth_nb.SASL
Package nbxmpp :: Module auth_nb :: Class SASL
[hide private]
[frames] | no frames]

Class SASL

source code


Implements SASL authentication. Can be plugged into NonBlockingClient to start authentication
Instance Methods [hide private]
 
__init__(self, username, password, on_sasl) source code
 
plugin(self, owner) source code
 
plugout(self)
Remove SASL handlers from owner's dispatcher. Used internally
source code
 
auth(self)
Start authentication. Result can be obtained via "SASL.startsasl" attribute and will be either SASL_SUCCESS or SASL_FAILURE
source code
 
FeaturesHandler(self, conn, feats)
Used to determine if server supports SASL auth. Used internally
source code
 
MechanismHandler(self) source code
 
SASLHandler(self, conn, challenge)
Perform next SASL auth step. Used internally
source code
 
set_password(self, password) source code

Inherited from plugin.PlugIn: PlugIn, PlugOut

Class Methods [hide private]

Inherited from plugin.PlugIn: get_instance

Static Methods [hide private]
 
_convert_to_iso88591(string) source code
Method Details [hide private]

__init__(self, username, password, on_sasl)
(Constructor)

source code 
Parameters:
  • username - XMPP username
  • password - XMPP password
  • on_sasl - Callback, will be called after each SASL auth-step.
Overrides: plugin.PlugIn.__init__

plugin(self, owner)

source code 

plugout(self)

source code 
Remove SASL handlers from owner's dispatcher. Used internally

auth(self)

source code 

Start authentication. Result can be obtained via "SASL.startsasl" attribute and will be either SASL_SUCCESS or SASL_FAILURE

Note that successfull auth will take at least two Dispatcher.Process() calls.

FeaturesHandler(self, conn, feats)

source code 
Used to determine if server supports SASL auth. Used internally

MechanismHandler(self)

source code 

SASLHandler(self, conn, challenge)

source code 
Perform next SASL auth step. Used internally

_convert_to_iso88591(string)
Static Method

source code 

set_password(self, password)

source code 

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.Presence-class.html0000644000175000017500000013564212321263757025315 0ustar asterixasterix00000000000000 nbxmpp.protocol.Presence
Package nbxmpp :: Module protocol :: Class Presence
[hide private]
[frames] | no frames]

Class Presence

source code


Instance Methods [hide private]
 
__init__(self, to=None, typ=None, priority=None, show=None, status=None, attrs={}, frm=None, timestamp=None, payload=[], xmlns='jabber:client', node=None)
You can specify recipient, type of message, priority, show and status values any additional attributes, sender of the presence, timestamp, any additional payload (f.e. jabber:x:delay element) and namespace in one go. Alternatively you can pass in the other XML object as the 'node' parameted to replicate it as presence
source code
 
getPriority(self)
Return the priority of the message
source code
 
getShow(self)
Return the show value of the message
source code
 
getStatus(self)
Return the status string of the message
source code
 
setPriority(self, val)
Set the priority of the message
source code
 
setShow(self, val)
Set the show value of the message
source code
 
setStatus(self, val)
Set the status string of the message
source code
 
_muc_getItemAttr(self, tag, attr) source code
 
_muc_getSubTagDataAttr(self, tag, attr) source code
 
getRole(self)
Return the presence role (for groupchat)
source code
 
getAffiliation(self)
Return the presence affiliation (for groupchat)
source code
 
getNewNick(self)
Return the status code of the presence (for groupchat)
source code
 
getJid(self)
Return the presence jid (for groupchat)
source code
 
getReason(self)
Returns the reason of the presence (for groupchat)
source code
 
getActor(self)
Return the reason of the presence (for groupchat)
source code
 
getStatusCode(self)
Return the status code of the presence (for groupchat)
source code

Inherited from Protocol: __setitem__, getError, getErrorCode, getErrorMsg, getFrom, getID, getProperties, getStatusConditions, getTimestamp, getTimestamp2, getTo, getType, setError, setFrom, setID, setTimestamp, setTo, setType

Inherited from simplexml.Node: __contains__, __delitem__, __getattr__, __getitem__, __str__, addChild, addData, clearData, delAttr, delChild, getAttr, getAttrs, getChildren, getData, getName, getNamespace, getParent, getPayload, getTag, getTagAttr, getTagData, getTags, has_attr, iterTags, lookup_nsp, setAttr, setData, setName, setNamespace, setParent, setPayload, setTag, setTagAttr, setTagData

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]

Inherited from simplexml.Node: FORCE_NODE_RECREATION

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, to=None, typ=None, priority=None, show=None, status=None, attrs={}, frm=None, timestamp=None, payload=[], xmlns='jabber:client', node=None)
(Constructor)

source code 
You can specify recipient, type of message, priority, show and status values any additional attributes, sender of the presence, timestamp, any additional payload (f.e. jabber:x:delay element) and namespace in one go. Alternatively you can pass in the other XML object as the 'node' parameted to replicate it as presence
Overrides: object.__init__

getPriority(self)

source code 
Return the priority of the message

getShow(self)

source code 
Return the show value of the message

getStatus(self)

source code 
Return the status string of the message

setPriority(self, val)

source code 
Set the priority of the message

setShow(self, val)

source code 
Set the show value of the message

setStatus(self, val)

source code 
Set the status string of the message

_muc_getItemAttr(self, tag, attr)

source code 

_muc_getSubTagDataAttr(self, tag, attr)

source code 

getRole(self)

source code 
Return the presence role (for groupchat)

getAffiliation(self)

source code 
Return the presence affiliation (for groupchat)

getNewNick(self)

source code 
Return the status code of the presence (for groupchat)

getJid(self)

source code 
Return the presence jid (for groupchat)

getReason(self)

source code 
Returns the reason of the presence (for groupchat)

getActor(self)

source code 
Return the reason of the presence (for groupchat)

getStatusCode(self)

source code 
Return the status code of the presence (for groupchat)

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_t_4.gif0000644000175000017500000003346612321263757025553 0ustar asterixasterix00000000000000GIF89a#LB<ĤBDtĢ$"$lfdĂjdl"lRLbdĺ䴒$<2,\NLvtĖ&$ Ԧ|vt2,\F<̞TB<|D2,"$|^TdNDܢdJDf\L:4ܪZ\tZT~t쾼*, JL,"jlvlԢ24\JL|f\䲤|̜~|jl亼 <.,z|rd,̚TF<ĊdRTt^T̢ndT>4,&$ĤFDĆndfdܶĞܾvt&$܌ܮ^\., NLnlԦ64nl侼~|̞ĎԮ ><!,#q H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۱ȝKݻx˷߿ vaY̸ǐ#KL˘3k Ϡ; 8ӨS^ͺװc˞M{vиsS]j Nxۺ+WțlUPΩSzpoݵ򥍫jOv҉O_wsUJd1BKNqR!2~`ԡڥWA`AH,Ci"D, ]`,$"#;`Vȣjȡ h|UYsBpDC`ThAE*eA] 7SGFuJ1T ** ۔HdPGj(ZɥK biifzf眝.yg{gSzf孇57!K0 Z0iޱ:@'0,͔6BZbviDZePEir[ZZv*,ƢJіlzjqmVskZ$X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|`=W ˑx1B0W?<>,r=D2 w5RQ- G BA"](KgL#A,2^iCdރtrgw}Ix3pW pnbS/=_4ӯ?/ӿ?? `$. 6> FN V^ fn v~  G Ơ ֠   !!&.!6>!Fm;nbxmpp-0.5.3/doc/apidocs/nbxmpp.idlequeue.IdleCommand-class.html0000644000175000017500000006632112321263757026043 0ustar asterixasterix00000000000000 nbxmpp.idlequeue.IdleCommand
Package nbxmpp :: Module idlequeue :: Class IdleCommand
[hide private]
[frames] | no frames]

Class IdleCommand

source code


Can be subclassed to execute commands asynchronously by the idlequeue. Result will be optained via file descriptor of created pipe
Instance Methods [hide private]
 
__init__(self, on_result) source code
 
set_idlequeue(self, idlequeue) source code
 
_return_result(self) source code
 
_compose_command_args(self) source code
 
_compose_command_line(self)
Return one line representation of command and its arguments
source code
 
wait_child(self) source code
 
start(self) source code
 
_start_nt(self) source code
 
_start_posix(self) source code
 
end(self) source code
 
pollend(self)
Called on stream failure
source code
 
pollin(self)
Called on new read event
source code
 
read_timeout(self)
Called when timeout happened
source code

Inherited from IdleObject: pollout

Instance Variables [hide private]

Inherited from IdleObject: fd

Method Details [hide private]

__init__(self, on_result)
(Constructor)

source code 
Overrides: IdleObject.__init__

set_idlequeue(self, idlequeue)

source code 

_return_result(self)

source code 

_compose_command_args(self)

source code 

_compose_command_line(self)

source code 
Return one line representation of command and its arguments

wait_child(self)

source code 

start(self)

source code 

_start_nt(self)

source code 

_start_posix(self)

source code 

end(self)

source code 

pollend(self)

source code 
Called on stream failure
Overrides: IdleObject.pollend
(inherited documentation)

pollin(self)

source code 
Called on new read event
Overrides: IdleObject.pollin
(inherited documentation)

read_timeout(self)

source code 
Called when timeout happened
Overrides: IdleObject.read_timeout
(inherited documentation)

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_i_3.gif0000644000175000017500000002126612321263757025532 0ustar asterixasterix00000000000000GIF89aMLB<ČJD\Ă$"$ĢlZ\jd䲤4bd\2,| dJD<2,ĺĖ|f\vtԦ\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Òh`̽9ƾZ</|ތ-k}ȃg4ɂy/̷wQ&z~i)}O ™L}T/v?G2tojSկBMԏI!2dIT9"otS-ywK\R e/KD[S%I<9f6VH&I TӚf6Mnvӛߴ&SQl/9 bҘ%9INx|g=US1LOД4P6ԡ<gEPRT2Tq#gá?؃.*R*V5uK Ǹ9.5HBO%W9Fkd5YQP'd Q p R`BX}2 R@ dkΖURhiYU*fxHl I%Bz 5xDI@v INN Df5(cDKR g98ka.ζ]mԦۉᖷo\Nōq*.lukN Dv]v׻b]򖷻P-N˪Do|;_׾o~ ~o<`׽}LwĠ T8/ xX0TA/+_+x+^1<C.lA<7 /eLc!cȂ*ˊ8BD|UXD1choe+;cvܿ5zվv _gy%uW\{Q|wr]{4w>'K|%?y|5yw}%;nbxmpp-0.5.3/doc/apidocs/nbxmpp.idlequeue.SelectIdleQueue-class.html0000644000175000017500000004356712321263757026720 0ustar asterixasterix00000000000000 nbxmpp.idlequeue.SelectIdleQueue
Package nbxmpp :: Module idlequeue :: Class SelectIdleQueue
[hide private]
[frames] | no frames]

Class SelectIdleQueue

source code


Extends IdleQueue to use select.select() for polling

This class exisists for the sake of gtk2.8 on windows, which doesn't seem to support io_add_watch properly (yet)

Instance Methods [hide private]
 
_init_idle(self)
Create a dict, which maps file/pipe/sock descriptor to glib event id
source code
 
_add_idle(self, fd, flags)
This method is called when we plug a new idle object. Remove descriptor to read/write/error lists, according flags
source code
 
_remove_idle(self, fd)
This method is called when we unplug a new idle object. Remove descriptor from read/write/error lists
source code
 
process(self)
Process idlequeue. Check for any pending timeout or alarm events. Call IdleObjects on possible and requested read, write and error events on their file descriptors
source code

Inherited from IdleQueue: __init__, current_time, plug_idle, remove_alarm, remove_timeout, set_alarm, set_read_timeout, unplug_idle

Inherited from IdleQueue (private): _check_time_events, _process_events

Class Variables [hide private]

Inherited from IdleQueue: PROCESS_TIMEOUT

Method Details [hide private]

_init_idle(self)

source code 
Create a dict, which maps file/pipe/sock descriptor to glib event id
Overrides: IdleQueue._init_idle

_add_idle(self, fd, flags)

source code 
This method is called when we plug a new idle object. Remove descriptor to read/write/error lists, according flags
Overrides: IdleQueue._add_idle

_remove_idle(self, fd)

source code 
This method is called when we unplug a new idle object. Remove descriptor from read/write/error lists
Overrides: IdleQueue._remove_idle

process(self)

source code 

Process idlequeue. Check for any pending timeout or alarm events. Call IdleObjects on possible and requested read, write and error events on their file descriptors

Call this in regular intervals.

Overrides: IdleQueue.process
(inherited documentation)

nbxmpp-0.5.3/doc/apidocs/nbxmpp.simplexml-module.html0000644000175000017500000004457712321263757024111 0ustar asterixasterix00000000000000 nbxmpp.simplexml
Package nbxmpp :: Module simplexml
[hide private]
[frames] | no frames]

Module simplexml

source code

Simplexml module provides xmpppy library with all needed tools to handle XML nodes and XML streams. I'm personally using it in many other separate projects. It is designed to be as standalone as possible
Classes [hide private]
  Node
Node class describes syntax of separate XML Node. It have a constructor that permits node creation from set of "namespace name", attributes and payload of text strings and other nodes. It does not natively support building node from text string and uses NodeBuilder class for that purpose. After creation node can be mangled in many ways so it can be completely changed. Also node can be serialised into string in one of two modes: default (where the textual representation of node describes it exactly) and "fancy" - with whitespace added to make indentation and thus make result more readable by human.
  T
Auxiliary class used to quick access to node's child nodes
  NT
Auxiliary class used to quick create node's child nodes
  NodeBuilder
Builds a Node class minidom from data parsed to it. This class used for two purposes:
Functions [hide private]
 
XMLescape(txt)
Return provided string with symbols & < > " replaced by their respective XML entities
source code
 
ustr(what)
Converts object "what" to unicode string using it's own __str__ method if accessible or unicode method otherwise
source code
 
XML2Node(xml)
Convert supplied textual string into XML node. Handy f.e. for reading configuration file. Raises xml.parser.expat.parsererror if provided string is not well-formed XML
source code
 
BadXML2Node(xml)
Convert supplied textual string into XML node. Survives if xml data is cutted half way round. I.e. "<html>some text <br>some more text". Will raise xml.parser.expat.parsererror on misplaced tags though. F.e. "<b>some text <br>some more text</b>" will not work
source code
Variables [hide private]
  log = logging.getLogger('nbxmpp.simplexml')
  ENCODING = 'utf-8'
  __package__ = 'nbxmpp'

Imports: xml, logging


Function Details [hide private]

XMLescape(txt)

source code 
Return provided string with symbols & < > " replaced by their respective XML entities

ustr(what)

source code 
Converts object "what" to unicode string using it's own __str__ method if accessible or unicode method otherwise

XML2Node(xml)

source code 
Convert supplied textual string into XML node. Handy f.e. for reading configuration file. Raises xml.parser.expat.parsererror if provided string is not well-formed XML

BadXML2Node(xml)

source code 
Convert supplied textual string into XML node. Survives if xml data is cutted half way round. I.e. "<html>some text <br>some more text". Will raise xml.parser.expat.parsererror on misplaced tags though. F.e. "<b>some text <br>some more text</b>" will not work

Variables Details [hide private]

log

Value:
logging.getLogger('nbxmpp.simplexml')

ENCODING

Value:
'utf-8'

__package__

Value:
'nbxmpp'

nbxmpp-0.5.3/doc/apidocs/toc-nbxmpp.tls_nb-module.html0000644000175000017500000000375412321263757024133 0ustar asterixasterix00000000000000 tls_nb

Module tls_nb


Classes

NonBlockingTLS
PyOpenSSLWrapper
SSLWrapper
StdlibSSLWrapper

Functions

gattr

Variables

PYOPENSSL
PYSTDLIB
USE_PYOPENSSL
__package__
log

[hide private] nbxmpp-0.5.3/doc/apidocs/nbxmpp.stringprepare.ILookupTable-class.html0000644000175000017500000001612112321263757027115 0ustar asterixasterix00000000000000 nbxmpp.stringprepare.ILookupTable
Package nbxmpp :: Module stringprepare :: Class ILookupTable
[hide private]
[frames] | no frames]

Class ILookupTable

source code

Interface for character lookup classes
Instance Methods [hide private]
 
lookup(self, c)
Return whether character is in this table
source code
Method Details [hide private]

lookup(self, c)

source code 
Return whether character is in this table

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_i_2.gif0000644000175000017500000001424212321263757025525 0ustar asterixasterix00000000000000GIF89a#LB4jlLBD̆||fdlVTܶ<244fddNLĚԪ~|><ܮ䶴Ğrt<.,*,~tԪT><ܾVTĎ侼̤NL̦nl\JL t^\TBD$tZ\̞,"$vtTFDnl4*,D64L><!,#- H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0c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5^Dxc9փ?aH p(5`fVun0'sIPi gtfgf^)giasq6guvgiHkq(^&@l_b+nk(_huz(^j&pwo'lɶ^ jV1r_;(^p`hpV$h^ƈ-^L ^KhՅ8~Hp^ploȂ䅉ØaEn cmxe cqr`s +gu`r (x&ps c|p 8p7_P @CxtItIw(^uW0uXetHtIkn c^7lWf I{g~>9w@~Ll/%/M^Oyy\ oIwKٕb aYi[9h^eYgnY^kImyu'3X'(ylG _xa_%aGB8c5Fnu`&cShItEX/U؊՚X蛲ɒ_ƛ%՜`כI\b1l}(i9n grɇꉆm(Igou9^{*&HijnuZ/šȒ*X%ڛ"'J`¨HyF4zm65:J H:jᆣIJڛ?:o^Ǎ㕢^^ʋWZ^8X:&cc Vme*melj^)a J|*dHysnr8iYH^^(^j]Gpרשp癘Z:" `Y.qV_ 9+Pp"6*i:3V%niJIl:\S~We FF՗wAg&姰0o kJ۱jI A˕v:ǘe#{^%+iV(k/s ~7,ՙ;`zI^0JfkTfeXvu@ KMx2%^HhTTjnI 9v&i P uH&cnX቟xq=~"v | (Hj ` -: jJ@ 9vn独kפBJ 99p`o p^ q^iZk:;q@ @Hs9%tf)ciꎅ*pz 5:@uZu)X0g[ʭ#?[`z{L(ܰ2 4l_6;8G<3X!H<+93`jZbk;WeAʃkffl_׷ƆGj/򕼩relՉ:^+pbfbrnXOZVrp н-ypel9kp#;ƿX rb[p9Y*9k(+B~\Hα ^i_OTNx'`^"{b7TMi)ۅIpNP̔ϒsf`x^j t/6,rlU] 4dILH4^o +ԭhVh V(.U͇ܔ<իҘ^`.^;[ø_~=^j5Ǩ;_^̺/E杖^0,ڬ"^LZڬ>جߕ^N+.of~f
QD-^ĘQF=~RH%MDRJ-]SL5męSN=} ;nbxmpp-0.5.3/doc/apidocs/toc-nbxmpp.c14n-module.html0000644000175000017500000000260112321263757023405 0ustar asterixasterix00000000000000 c14n

Module c14n


Functions

c14n
normalise_attr
normalise_text

Variables

__package__

[hide private] nbxmpp-0.5.3/doc/apidocs/nbxmpp.stringprepare.Profile-class.html0000644000175000017500000003567612321263757026203 0ustar asterixasterix00000000000000 nbxmpp.stringprepare.Profile
Package nbxmpp :: Module stringprepare :: Class Profile
[hide private]
[frames] | no frames]

Class Profile

source code

Instance Methods [hide private]
 
__init__(self, mappings=[], normalize=True, prohibiteds=[], check_unassigneds=True, check_bidi=True) source code
 
prepare(self, string) source code
 
map(self, string) source code
 
check_prohibiteds(self, string) source code
 
check_unassigneds(self, string) source code
 
check_bidirectionals(self, string) source code
Method Details [hide private]

__init__(self, mappings=[], normalize=True, prohibiteds=[], check_unassigneds=True, check_bidi=True)
(Constructor)

source code 

prepare(self, string)

source code 

map(self, string)

source code 

check_prohibiteds(self, string)

source code 

check_unassigneds(self, string)

source code 

check_bidirectionals(self, string)

source code 

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.InvalidID-class.html0000644000175000017500000002261512321263757025347 0ustar asterixasterix00000000000000 nbxmpp.protocol.InvalidID
Package nbxmpp :: Module protocol :: Class InvalidID
[hide private]
[frames] | no frames]

Class InvalidID

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/toc-nbxmpp.simplexml-module.html0000644000175000017500000000403512321263757024655 0ustar asterixasterix00000000000000 simplexml

Module simplexml


Classes

NT
Node
NodeBuilder
T

Functions

BadXML2Node
XML2Node
XMLescape
ustr

Variables

ENCODING
__package__
log

[hide private] nbxmpp-0.5.3/doc/apidocs/nbxmpp.simplexml.NodeBuilder-class.html0000644000175000017500000006603312321263757026113 0ustar asterixasterix00000000000000 nbxmpp.simplexml.NodeBuilder
Package nbxmpp :: Module simplexml :: Class NodeBuilder
[hide private]
[frames] | no frames]

Class NodeBuilder

source code

Builds a Node class minidom from data parsed to it. This class used for two purposes:

  1. Creation an XML Node from a textual representation. F.e. reading a config file. See an XML2Node method.
  2. Handling an incoming XML stream. This is done by mangling the __dispatch_depth parameter and redefining the dispatch method.

You do not need to use this class directly if you do not designing your own XML handler

Instance Methods [hide private]
 
__init__(self, data=None, initial_node=None)
Take two optional parameters: "data" and "initial_node"
source code
 
check_data_buffer(self) source code
 
destroy(self)
Method used to allow class instance to be garbage-collected
source code
 
starttag(self, tag, attrs)
XML Parser callback. Used internally
source code
 
endtag(self, tag)
XML Parser callback. Used internally
source code
 
handle_cdata(self, data) source code
 
handle_namespace_start(self, prefix, uri)
XML Parser callback. Used internally
source code
 
getDom(self)
Return just built Node
source code
 
dispatch(self, stanza)
Get called when the NodeBuilder reaches some level of depth on it's way up with the built node as argument. Can be redefined to convert incoming XML stanzas to program events
source code
 
stream_header_received(self, ns, tag, attrs)
Method called when stream just opened
source code
 
stream_footer_received(self)
Method called when stream just closed
source code
 
has_received_endtag(self, level=0)
Return True if at least one end tag was seen (at level)
source code
 
_inc_depth(self) source code
 
_dec_depth(self) source code
Method Details [hide private]

__init__(self, data=None, initial_node=None)
(Constructor)

source code 

Take two optional parameters: "data" and "initial_node"

By default class initialised with empty Node class instance. Though, if "initial_node" is provided it used as "starting point". You can think about it as of "node upgrade". "data" (if provided) feeded to parser immidiatedly after instance init.

check_data_buffer(self)

source code 

destroy(self)

source code 
Method used to allow class instance to be garbage-collected

starttag(self, tag, attrs)

source code 
XML Parser callback. Used internally

endtag(self, tag)

source code 
XML Parser callback. Used internally

handle_cdata(self, data)

source code 

handle_namespace_start(self, prefix, uri)

source code 
XML Parser callback. Used internally

getDom(self)

source code 
Return just built Node

dispatch(self, stanza)

source code 
Get called when the NodeBuilder reaches some level of depth on it's way up with the built node as argument. Can be redefined to convert incoming XML stanzas to program events

stream_header_received(self, ns, tag, attrs)

source code 
Method called when stream just opened

stream_footer_received(self)

source code 
Method called when stream just closed

has_received_endtag(self, level=0)

source code 
Return True if at least one end tag was seen (at level)

_inc_depth(self)

source code 

_dec_depth(self)

source code 

nbxmpp-0.5.3/doc/apidocs/nbxmpp.dispatcher_nb.Dispatcher-class.html0000644000175000017500000002433312321263757026575 0ustar asterixasterix00000000000000 nbxmpp.dispatcher_nb.Dispatcher
Package nbxmpp :: Module dispatcher_nb :: Class Dispatcher
[hide private]
[frames] | no frames]

Class Dispatcher

source code

Why is this here - I needed to redefine Dispatcher for BOSH and easiest way was to inherit original Dispatcher (now renamed to XMPPDispatcher). Trouble is that reference used to access dispatcher instance is in Client attribute named by __class__.__name__ of the dispatcher instance .. long story short:

I wrote following to avoid changing each client.Dispatcher.whatever() in xmpp

If having two kinds of dispatcher will go well, I will rewrite the dispatcher references in other scripts

Instance Methods [hide private]
 
PlugIn(self, client_obj, after_SASL=False, old_features=None) source code
Class Methods [hide private]
 
get_instance(cls, *args, **kwargs)
Factory Method for object creation
source code
Method Details [hide private]

PlugIn(self, client_obj, after_SASL=False, old_features=None)

source code 

get_instance(cls, *args, **kwargs)
Class Method

source code 

Factory Method for object creation

Use this instead of directly initializing the class in order to make unit testing much easier.


nbxmpp-0.5.3/doc/apidocs/epydoc.js0000644000175000017500000002452512321263757020233 0ustar asterixasterix00000000000000function toggle_private() { // Search for any private/public links on this page. Store // their old text in "cmd," so we will know what action to // take; and change their text to the opposite action. var cmd = "?"; var elts = document.getElementsByTagName("a"); for(var i=0; i...
"; elt.innerHTML = s; } } function toggle(id) { elt = document.getElementById(id+"-toggle"); if (elt.innerHTML == "-") collapse(id); else expand(id); return false; } function highlight(id) { var elt = document.getElementById(id+"-def"); if (elt) elt.className = "py-highlight-hdr"; var elt = document.getElementById(id+"-expanded"); if (elt) elt.className = "py-highlight"; var elt = document.getElementById(id+"-collapsed"); if (elt) elt.className = "py-highlight"; } function num_lines(s) { var n = 1; var pos = s.indexOf("\n"); while ( pos > 0) { n += 1; pos = s.indexOf("\n", pos+1); } return n; } // Collapse all blocks that mave more than `min_lines` lines. function collapse_all(min_lines) { var elts = document.getElementsByTagName("div"); for (var i=0; i 0) if (elt.id.substring(split, elt.id.length) == "-expanded") if (num_lines(elt.innerHTML) > min_lines) collapse(elt.id.substring(0, split)); } } function expandto(href) { var start = href.indexOf("#")+1; if (start != 0 && start != href.length) { if (href.substring(start, href.length) != "-") { collapse_all(4); pos = href.indexOf(".", start); while (pos != -1) { var id = href.substring(start, pos); expand(id); pos = href.indexOf(".", pos+1); } var id = href.substring(start, href.length); expand(id); highlight(id); } } } function kill_doclink(id) { var parent = document.getElementById(id); parent.removeChild(parent.childNodes.item(0)); } function auto_kill_doclink(ev) { if (!ev) var ev = window.event; if (!this.contains(ev.toElement)) { var parent = document.getElementById(this.parentID); parent.removeChild(parent.childNodes.item(0)); } } function doclink(id, name, targets_id) { var elt = document.getElementById(id); // If we already opened the box, then destroy it. // (This case should never occur, but leave it in just in case.) if (elt.childNodes.length > 1) { elt.removeChild(elt.childNodes.item(0)); } else { // The outer box: relative + inline positioning. var box1 = document.createElement("div"); box1.style.position = "relative"; box1.style.display = "inline"; box1.style.top = 0; box1.style.left = 0; // A shadow for fun var shadow = document.createElement("div"); shadow.style.position = "absolute"; shadow.style.left = "-1.3em"; shadow.style.top = "-1.3em"; shadow.style.background = "#404040"; // The inner box: absolute positioning. var box2 = document.createElement("div"); box2.style.position = "relative"; box2.style.border = "1px solid #a0a0a0"; box2.style.left = "-.2em"; box2.style.top = "-.2em"; box2.style.background = "white"; box2.style.padding = ".3em .4em .3em .4em"; box2.style.fontStyle = "normal"; box2.onmouseout=auto_kill_doclink; box2.parentID = id; // Get the targets var targets_elt = document.getElementById(targets_id); var targets = targets_elt.getAttribute("targets"); var links = ""; target_list = targets.split(","); for (var i=0; i" + target[0] + ""; } // Put it all together. elt.insertBefore(box1, elt.childNodes.item(0)); //box1.appendChild(box2); box1.appendChild(shadow); shadow.appendChild(box2); box2.innerHTML = "Which "+name+" do you want to see documentation for?" + ""; } return false; } function get_anchor() { var href = location.href; var start = href.indexOf("#")+1; if ((start != 0) && (start != href.length)) return href.substring(start, href.length); } function redirect_url(dottedName) { // Scan through each element of the "pages" list, and check // if "name" matches with any of them. for (var i=0; i-m" or "-c"; // extract the portion & compare it to dottedName. var pagename = pages[i].substring(0, pages[i].length-2); if (pagename == dottedName.substring(0,pagename.length)) { // We've found a page that matches `dottedName`; // construct its URL, using leftover `dottedName` // content to form an anchor. var pagetype = pages[i].charAt(pages[i].length-1); var url = pagename + ((pagetype=="m")?"-module.html": "-class.html"); if (dottedName.length > pagename.length) url += "#" + dottedName.substring(pagename.length+1, dottedName.length); return url; } } } nbxmpp-0.5.3/doc/apidocs/nbxmpp.transports_nb-module.html0000644000175000017500000006516012321263757024764 0ustar asterixasterix00000000000000 nbxmpp.transports_nb
Package nbxmpp :: Module transports_nb
[hide private]
[frames] | no frames]

Module transports_nb

source code

Transports are objects responsible for connecting to XMPP server and putting data to wrapped sockets in in desired form (SSL, TLS, TCP, for HTTP proxy, for SOCKS5 proxy...)

Transports are not aware of XMPP stanzas and only responsible for low-level connection handling.

Classes [hide private]
  NonBlockingTransport
Abstract class representing a transport
  NonBlockingTCP
Non-blocking TCP socket wrapper
  NonBlockingHTTP
Socket wrapper that creates HTTP message out of sent data and peels-off HTTP headers from incoming messages
  NonBlockingHTTPBOSH
Class for BOSH HTTP connections. Slightly redefines HTTP transport by calling bosh bodytag generating callback before putting data on wire
Functions [hide private]
 
urisplit(uri)
Function for splitting URI string to tuple (protocol, host, port, path). e.g. urisplit('http://httpcm.jabber.org:123/webclient') returns ('http', 'httpcm.jabber.org', 123, '/webclient') return 443 as default port if proto is https else 80
source code
 
get_proxy_data_from_dict(proxy) source code
Variables [hide private]
  log = logging.getLogger('nbxmpp.transports_nb')
  CONNECT_TIMEOUT_SECONDS = 30
timeout to connect to the server socket, it doesn't include auth
  DISCONNECT_TIMEOUT_SECONDS = 5
how long to wait for a disconnect to complete
  RECV_BUFSIZE = 32768
size of the buffer which reads data from server
  DATA_RECEIVED = 'DATA RECEIVED'
  DATA_SENT = 'DATA SENT'
  DATA_ERROR = 'DATA ERROR'
  DISCONNECTED = 'DISCONNECTED'
  DISCONNECTING = 'DISCONNECTING'
  CONNECTING = 'CONNECTING'
  PROXY_CONNECTING = 'PROXY_CONNECTING'
  CONNECTED = 'CONNECTED'
  STATES = ('DISCONNECTED', 'CONNECTING', 'PROXY_CONNECTING', 'C...
  __package__ = 'nbxmpp'

Imports: ustr, PlugIn, IdleObject, proxy_connectors, tls_nb, socket, errno, time, traceback, base64, urlparse, logging


Function Details [hide private]

urisplit(uri)

source code 
Function for splitting URI string to tuple (protocol, host, port, path). e.g. urisplit('http://httpcm.jabber.org:123/webclient') returns ('http', 'httpcm.jabber.org', 123, '/webclient') return 443 as default port if proto is https else 80

get_proxy_data_from_dict(proxy)

source code 

Variables Details [hide private]

log

Value:
logging.getLogger('nbxmpp.transports_nb')

CONNECT_TIMEOUT_SECONDS

timeout to connect to the server socket, it doesn't include auth
Value:
30

DISCONNECT_TIMEOUT_SECONDS

how long to wait for a disconnect to complete
Value:
5

RECV_BUFSIZE

size of the buffer which reads data from server
Value:
32768

DATA_RECEIVED

Value:
'DATA RECEIVED'

DATA_SENT

Value:
'DATA SENT'

DATA_ERROR

Value:
'DATA ERROR'

DISCONNECTED

Value:
'DISCONNECTED'

DISCONNECTING

Value:
'DISCONNECTING'

CONNECTING

Value:
'CONNECTING'

PROXY_CONNECTING

Value:
'PROXY_CONNECTING'

CONNECTED

Value:
'CONNECTED'

STATES

Value:
('DISCONNECTED',
 'CONNECTING',
 'PROXY_CONNECTING',
 'CONNECTED',
 'DISCONNECTING')

__package__

Value:
'nbxmpp'

nbxmpp-0.5.3/doc/apidocs/nbxmpp.idlequeue.GlibIdleQueue-class.html0000644000175000017500000005131312321263757026342 0ustar asterixasterix00000000000000 nbxmpp.idlequeue.GlibIdleQueue
Package nbxmpp :: Module idlequeue :: Class GlibIdleQueue
[hide private]
[frames] | no frames]

Class GlibIdleQueue

source code


Extends IdleQueue to use glib io_add_wath, instead of select/poll In another 'non gui' implementation of Gajim IdleQueue can be used safetly
Instance Methods [hide private]
 
_init_idle(self)
Creates a dict, which maps file/pipe/sock descriptor to glib event id
source code
 
_add_idle(self, fd, flags)
This method is called when we plug a new idle object. Start listening for events from fd
source code
 
_process_events(self, fd, flags) source code
 
_remove_idle(self, fd)
This method is called when we unplug a new idle object. Stop listening for events from fd
source code
 
process(self)
Process idlequeue. Check for any pending timeout or alarm events. Call IdleObjects on possible and requested read, write and error events on their file descriptors
source code

Inherited from IdleQueue: __init__, current_time, plug_idle, remove_alarm, remove_timeout, set_alarm, set_read_timeout, unplug_idle

Inherited from IdleQueue (private): _check_time_events

Class Variables [hide private]
  PROCESS_TIMEOUT = (2, True)
Method Details [hide private]

_init_idle(self)

source code 
Creates a dict, which maps file/pipe/sock descriptor to glib event id
Overrides: IdleQueue._init_idle

_add_idle(self, fd, flags)

source code 
This method is called when we plug a new idle object. Start listening for events from fd
Overrides: IdleQueue._add_idle

_process_events(self, fd, flags)

source code 
Overrides: IdleQueue._process_events

_remove_idle(self, fd)

source code 
This method is called when we unplug a new idle object. Stop listening for events from fd
Overrides: IdleQueue._remove_idle

process(self)

source code 

Process idlequeue. Check for any pending timeout or alarm events. Call IdleObjects on possible and requested read, write and error events on their file descriptors

Call this in regular intervals.

Overrides: IdleQueue.process
(inherited documentation)

Class Variable Details [hide private]

PROCESS_TIMEOUT

Value:
(2, True)

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_14.gif0000644000175000017500000002057212321263757025622 0ustar asterixasterix00000000000000GIF89aLB<ČBDlĢ$"$jdĂlfdbdĺlRLT><<2, ĖvldNDԦ"$\F<̞TJLBD|D2,vtnlTB<̪jldJDZ\L:4܄f\4.,ܪrl|^T쾼JL̢,"dRTԢ*,\JL24|f\,jlrttZT亼̚ ĊTF< ̴lVL<64̒z|dRL\JD䲤$Ğ4*$Ԫ|rdz| :4ND̢fdt$<.,ľ,&$t^TĆfd&$VT64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á?.*R*V5uK Ǹ9N6AO%W9Fkd6YQ a1P*E|Q :x"X}>:L dkΘ:hiYU*fxH:  I H`z6DI`v I^N Df5HDkU g98ka.ζ]mԦۉᖷo\Nōq*.lukN% Dv]v׻o ׼="S7O4X1_׾o~k_׿ů1<F0~`W+Sְ-|ӷpyW` wbh-h1̗C0|шC0€WX<"72q#ClPL_<&| .pAĘ/)b!.H`v1qda-9΍s܈c\qcșvWa?wVr#Q .aq*曈00AjK7ʍ1 Z{Y=. o1R7B ZHԘXy]x&v#F8b д݈^נt#^Mok]9\`>t[z8B#0e;mf47 K&/m6}'Pap@Q Rt|ܹ㜈x؍€ W tXNtU&S1,x|4́%4b -i/_{a |vݾi?>Ýpr{n8 zQ G|x7gC.wʣ~{5b/̇uJӧng}]oמ'{c |v|S^oc~|E_sڬg_m::G?wW@;nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.ImproperAddressing-class.html0000644000175000017500000002271412321263757027345 0ustar asterixasterix00000000000000 nbxmpp.protocol.ImproperAddressing
Package nbxmpp :: Module protocol :: Class ImproperAddressing
[hide private]
[frames] | no frames]

Class ImproperAddressing

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.InvalidNamespace-class.html0000644000175000017500000002271212321263757026745 0ustar asterixasterix00000000000000 nbxmpp.protocol.InvalidNamespace
Package nbxmpp :: Module protocol :: Class InvalidNamespace
[hide private]
[frames] | no frames]

Class InvalidNamespace

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/nbxmpp.dispatcher_nb.XMPPDispatcher-class.html0000644000175000017500000020236412321263757027304 0ustar asterixasterix00000000000000 nbxmpp.dispatcher_nb.XMPPDispatcher
Package nbxmpp :: Module dispatcher_nb :: Class XMPPDispatcher
[hide private]
[frames] | no frames]

Class XMPPDispatcher

source code


Handles XMPP stream and is the first who takes control over a fresh stanza

Is plugged into NonBlockingClient but can be replugged to restart handled stream headers (used by SASL f.e.).

Instance Methods [hide private]
 
__init__(self) source code
 
getAnID(self) source code
 
dumpHandlers(self)
Return set of user-registered callbacks in it's internal format. Used within the library to carry user handlers set over Dispatcher replugins
source code
 
restoreHandlers(self, handlers)
Restore user-registered callbacks structure from dump previously obtained via dumpHandlers. Used within the library to carry user handlers set over Dispatcher replugins.
source code
 
_init(self)
Register default namespaces/protocols/handlers. Used internally
source code
 
plugin(self, owner)
Plug the Dispatcher instance into Client class instance and send initial stream header. Used internally
source code
 
plugout(self)
Prepare instance to be destructed
source code
 
StreamInit(self)
Send an initial stream header
source code
 
_check_stream_start(self, ns, tag, attrs) source code
 
replace_non_character(self, data) source code
 
ProcessNonBlocking(self, data)
Check incoming stream for data waiting
source code
 
RegisterNamespace(self, xmlns, order='info')
Create internal structures for newly registered namespace
source code
 
RegisterProtocol(self, tag_name, Proto, xmlns=None, order='info')
Used to declare some top-level stanza name to dispatcher
source code
 
RegisterNamespaceHandler(self, xmlns, handler, typ='', ns='', makefirst=0, system=0)
Register handler for processing all stanzas for specified namespace
source code
 
RegisterHandler(self, name, handler, typ='', ns='', xmlns=None, makefirst=False, system=False)
Register user callback as stanzas handler of declared type
source code
 
RegisterHandlerOnce(self, name, handler, typ='', ns='', xmlns=None, makefirst=0, system=0)
Unregister handler after first call (not implemented yet)
source code
 
UnregisterHandler(self, name, handler, typ='', ns='', xmlns=None)
Unregister handler. "typ" and "ns" must be specified exactly the same as with registering.
source code
 
RegisterDefaultHandler(self, handler)
Specify the handler that will be used if no NodeProcessed exception were raised. This is returnStanzaHandler by default.
source code
 
RegisterEventHandler(self, handler)
Register handler that will process events. F.e. "FILERECEIVED" event. See common/connection: _event_dispatcher()
source code
 
returnStanzaHandler(self, conn, stanza)
Return stanza back to the sender with <feature-not-implemented/> error set
source code
 
RegisterCycleHandler(self, handler)
Register handler that will be called on every Dispatcher.Process() call
source code
 
UnregisterCycleHandler(self, handler)
Unregister handler that will is called on every Dispatcher.Process() call
source code
 
Event(self, realm, event, data)
Raise some event
source code
 
dispatch(self, stanza, session=None, direct=0)
Main procedure that performs XMPP stanza recognition and calling apppropriate handlers for it. Called by simplexml
source code
 
_WaitForData(self, data)
Internal wrapper around ProcessNonBlocking. Will check for
source code
 
SendAndWaitForResponse(self, stanza, timeout=None, func=None, args=None)
Send stanza and wait for recipient's response to it. Will call transports on_timeout callback if response is not retrieved in time
source code
 
SendAndCallForResponse(self, stanza, func=None, args=None)
Put stanza on the wire and call back when recipient replies. Additional callback arguments can be specified in args
source code
 
send(self, stanza, now=False)
Wrap transports send method when plugged into NonBlockingClient. Makes sure stanzas get ID and from tag.
source code

Inherited from plugin.PlugIn: PlugIn, PlugOut

Class Methods [hide private]

Inherited from plugin.PlugIn: get_instance

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Overrides: plugin.PlugIn.__init__

getAnID(self)

source code 

dumpHandlers(self)

source code 
Return set of user-registered callbacks in it's internal format. Used within the library to carry user handlers set over Dispatcher replugins

restoreHandlers(self, handlers)

source code 
Restore user-registered callbacks structure from dump previously obtained via dumpHandlers. Used within the library to carry user handlers set over Dispatcher replugins.

_init(self)

source code 
Register default namespaces/protocols/handlers. Used internally

plugin(self, owner)

source code 
Plug the Dispatcher instance into Client class instance and send initial stream header. Used internally

plugout(self)

source code 
Prepare instance to be destructed

StreamInit(self)

source code 
Send an initial stream header

_check_stream_start(self, ns, tag, attrs)

source code 

replace_non_character(self, data)

source code 

ProcessNonBlocking(self, data)

source code 
Check incoming stream for data waiting
Parameters:
  • data - data received from transports/IO sockets
Returns:
  1. length of processed data if some data were processed;

  2. '0' string if no data were processed but link is alive;

  3. 0 (zero) if underlying connection is closed.

RegisterNamespace(self, xmlns, order='info')

source code 

Create internal structures for newly registered namespace

You can register handlers for this namespace afterwards. By default one namespace is already registered (jabber:client or jabber:component:accept depending on context.

RegisterProtocol(self, tag_name, Proto, xmlns=None, order='info')

source code 

Used to declare some top-level stanza name to dispatcher

Needed to start registering handlers for such stanzas. Iq, message and presence protocols are registered by default.

RegisterNamespaceHandler(self, xmlns, handler, typ='', ns='', makefirst=0, system=0)

source code 
Register handler for processing all stanzas for specified namespace

RegisterHandler(self, name, handler, typ='', ns='', xmlns=None, makefirst=False, system=False)

source code 

Register user callback as stanzas handler of declared type

Callback arguments: dispatcher instance (for replying), incoming return of previous handlers. The callback must raise xmpp.NodeProcessed just before return if it wants to prevent other callbacks to be called with the same stanza as argument _and_, more importantly library from returning stanza to sender with error set.

Parameters:
  • name - name of stanza. F.e. "iq".
  • handler - user callback.
  • typ - value of stanza's "type" attribute. If not specified any value will match
  • ns - namespace of child that stanza must contain.
  • makefirst - insert handler in the beginning of handlers list instead of adding it to the end. Note that more common handlers i.e. w/o "typ" and " will be called first nevertheless.
  • system - call handler even if NodeProcessed Exception were raised already.

RegisterHandlerOnce(self, name, handler, typ='', ns='', xmlns=None, makefirst=0, system=0)

source code 
Unregister handler after first call (not implemented yet)

UnregisterHandler(self, name, handler, typ='', ns='', xmlns=None)

source code 
Unregister handler. "typ" and "ns" must be specified exactly the same as with registering.

RegisterDefaultHandler(self, handler)

source code 
Specify the handler that will be used if no NodeProcessed exception were raised. This is returnStanzaHandler by default.

RegisterEventHandler(self, handler)

source code 
Register handler that will process events. F.e. "FILERECEIVED" event. See common/connection: _event_dispatcher()

returnStanzaHandler(self, conn, stanza)

source code 
Return stanza back to the sender with <feature-not-implemented/> error set

RegisterCycleHandler(self, handler)

source code 
Register handler that will be called on every Dispatcher.Process() call

UnregisterCycleHandler(self, handler)

source code 
Unregister handler that will is called on every Dispatcher.Process() call

Event(self, realm, event, data)

source code 
Raise some event
Parameters:
  • realm - scope of event. Usually a namespace.
  • event - the event itself. F.e. "SUCCESSFUL SEND".
  • data - data that comes along with event. Depends on event.

dispatch(self, stanza, session=None, direct=0)

source code 
Main procedure that performs XMPP stanza recognition and calling apppropriate handlers for it. Called by simplexml

_WaitForData(self, data)

source code 
Internal wrapper around ProcessNonBlocking. Will check for

SendAndWaitForResponse(self, stanza, timeout=None, func=None, args=None)

source code 

Send stanza and wait for recipient's response to it. Will call transports on_timeout callback if response is not retrieved in time

Be aware: Only timeout of latest call of SendAndWait is active.

SendAndCallForResponse(self, stanza, func=None, args=None)

source code 
Put stanza on the wire and call back when recipient replies. Additional callback arguments can be specified in args

send(self, stanza, now=False)

source code 
Wrap transports send method when plugged into NonBlockingClient. Makes sure stanzas get ID and from tag.

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_36.gif0000644000175000017500000002144312321263757025624 0ustar asterixasterix00000000000000GIF89aLB<ČBDĢl$"$lfdĂjdlRLbdĺT>< <2,Ėvt\NLԦzt"$\F<ܬRT|b\D:424tܲ$ĚvtlZ\Ԫ|jlܺ4&$ndrt ><̞TB4,&$Ćfd&$VT64ܶĞܾvt  FDnl^\ܮNLԦ.,64侼̞ Ď̖Ԯ><̦LBD<24Ԧ\FD|bdD:<$nl̞TBD~|dNLtZ\,"$vt|fdjdTFDt^\lVTzt4*,D64L><!,[ H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ -AѣH*]ʴӧPJJU@9µׯ`ÊKٳhӪ]GȝKݻx˷߿v Wa+^8pb; whᑦʛ7c{YqdG-ZRŽ:sSg))i1EiN o}ӦTЮ&$"\O$R`3rÃ7;uW]rHGuv}xͅFu)JS<FmxR%2TꍹzLPqz~"$}0u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_a-BD^ٕj%`k٥~pt]v}xz|~p$ׄ]؆}{Cspؐ+p _٘ p٠M l z@ 0A 7P =+q Q t@ۼm/00L]"1c1 1 }a۲M]Q lpm`m cPL7p>~ >^} =$&~Ɲ*, 1׈=45:N׊@*%PMF] }ɈHM~I~ɦn%MN̻9:Iaُp "rU!Yͨhf? !'A򉃮S,!+:s0)) Bz7+qѸ*E)7mWn7ھD7쉦"v|bVNn2d[m4BSqwK}=N.s,ЮSvk8)ʌsl;ښy$ 3ԅX#o3;@}𓳭 9BMN]$\ɜ;ͮ2t8o]<\@B/ѥ1_35/bK?^LT7Z;Cb?S<BG|}0\FÒh`̽9ƾZ</|ތ-k}ȃg4ɂy/̷wQ&z~i)}O ™L}T/v?G2tojSկBMԏIty 0Ėe8˙>rb&#hyp [ eȲ.L+meXq.k/L#3_OhFB@0 `aSZ55kmlk<C2n2c;5}d7ԹuW̊ -2-i`ѴÊpa+NW ȯK/g3cCb~<,}i| 1΃{*ɒ sr\ pEzj8-(C;"B4D4d`FtGHIJKLM|Dj0C|C?QD@l>$TT2԰UtWOPZCST]C\]`C_tA nbxmpp.protocol.BOSHBody
Package nbxmpp :: Module protocol :: Class BOSHBody
[hide private]
[frames] | no frames]

Class BOSHBody

source code


<body> tag that wraps usual XMPP stanzas in XMPP over BOSH
Instance Methods [hide private]
 
__init__(self, attrs={}, payload=[], node=None)
Takes "tag" argument as the name of node (prepended by namespace, if needed and separated from it by a space), attrs dictionary as the set of arguments, payload list as the set of textual strings and child nodes that this node carries within itself and "parent" argument that is another node that this one will be the child of. Also the __init__ can be provided with "node" argument that is either a text string containing exactly one node or another Node instance to begin with. If both "node" and other arguments is provided then the node initially created as replica of "node" provided and then modified to be compliant with other arguments.
source code

Inherited from simplexml.Node: __contains__, __delitem__, __getattr__, __getitem__, __setitem__, __str__, addChild, addData, clearData, delAttr, delChild, getAttr, getAttrs, getChildren, getData, getName, getNamespace, getParent, getPayload, getTag, getTagAttr, getTagData, getTags, has_attr, iterTags, lookup_nsp, setAttr, setData, setName, setNamespace, setParent, setPayload, setTag, setTagAttr, setTagData

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]

Inherited from simplexml.Node: FORCE_NODE_RECREATION

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, attrs={}, payload=[], node=None)
(Constructor)

source code 
Takes "tag" argument as the name of node (prepended by namespace, if needed and separated from it by a space), attrs dictionary as the set of arguments, payload list as the set of textual strings and child nodes that this node carries within itself and "parent" argument that is another node that this one will be the child of. Also the __init__ can be provided with "node" argument that is either a text string containing exactly one node or another Node instance to begin with. If both "node" and other arguments is provided then the node initially created as replica of "node" provided and then modified to be compliant with other arguments.
Overrides: object.__init__
(inherited documentation)

nbxmpp-0.5.3/doc/apidocs/nbxmpp.stringprepare-pysrc.html0000644000175000017500000023415012321263757024623 0ustar asterixasterix00000000000000 nbxmpp.stringprepare
Package nbxmpp :: Module stringprepare
[hide private]
[frames] | no frames]

Source Code for Module nbxmpp.stringprepare

  1  # -*- coding:utf-8 -*- 
  2  ## src/common/xmpp/stringprepare.py 
  3  ## 
  4  ## Copyright (C) 2001-2005 Twisted Matrix Laboratories 
  5  ## Copyright (C) 2005-2012 Yann Leboulanger <asterix AT lagaule.org> 
  6  ## Copyright (C) 2006 Stefan Bethge <stefan AT lanpartei.de> 
  7  ## Copyright (C) 2007 Jean-Marie Traissard <jim AT lapin.org> 
  8  ## 
  9  ## This file is part of Gajim. 
 10  ## 
 11  ## Gajim is free software; you can redistribute it and/or modify 
 12  ## it under the terms of the GNU General Public License as published 
 13  ## by the Free Software Foundation; version 3 only. 
 14  ## 
 15  ## Gajim is distributed in the hope that it will be useful, 
 16  ## but WITHOUT ANY WARRANTY; without even the implied warranty of 
 17  ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
 18  ## GNU General Public License for more details. 
 19  ## 
 20  ## You should have received a copy of the GNU General Public License 
 21  ## along with Gajim. If not, see <http://www.gnu.org/licenses/>. 
 22  ## 
 23   
 24  import stringprep 
 25  import unicodedata 
 26  from encodings import idna 
 27   
28 -class ILookupTable:
29 """ 30 Interface for character lookup classes 31 """ 32
33 - def lookup(self, c):
34 """ 35 Return whether character is in this table 36 """ 37 pass
38
39 -class IMappingTable:
40 """ 41 Interface for character mapping classes 42 """ 43
44 - def map(self, c):
45 """ 46 Return mapping for character 47 """ 48 pass
49
51 52 __implements__ = ILookupTable 53
54 - def __init__(self, in_table_function):
55 self.lookup = in_table_function
56
57 -class LookupTable:
58 59 __implements__ = ILookupTable 60
61 - def __init__(self, table):
62 self._table = table
63
64 - def lookup(self, c):
65 return c in self._table
66
68 69 __implements__ = IMappingTable 70
71 - def __init__(self, map_table_function):
72 self.map = map_table_function
73
74 -class EmptyMappingTable:
75 76 __implements__ = IMappingTable 77
78 - def __init__(self, in_table_function):
79 self._in_table_function = in_table_function
80
81 - def map(self, c):
82 if self._in_table_function(c): 83 return None 84 else: 85 return c
86
87 -class Profile:
88 - def __init__(self, mappings=[], normalize=True, prohibiteds=[], 89 check_unassigneds=True, check_bidi=True):
90 self.mappings = mappings 91 self.normalize = normalize 92 self.prohibiteds = prohibiteds 93 self.do_check_unassigneds = check_unassigneds 94 self.do_check_bidi = check_bidi
95
96 - def prepare(self, string):
97 result = self.map(string) 98 if self.normalize: 99 result = unicodedata.normalize("NFKC", result) 100 self.check_prohibiteds(result) 101 if self.do_check_unassigneds: 102 self.check_unassigneds(result) 103 if self.do_check_bidi: 104 self.check_bidirectionals(result) 105 return result
106
107 - def map(self, string):
108 result = [] 109 110 for c in string: 111 result_c = c 112 113 for mapping in self.mappings: 114 result_c = mapping.map(c) 115 if result_c != c: 116 break 117 118 if result_c is not None: 119 result.append(result_c) 120 121 return u"".join(result)
122
123 - def check_prohibiteds(self, string):
124 for c in string: 125 for table in self.prohibiteds: 126 if table.lookup(c): 127 raise UnicodeError, "Invalid character %s" % repr(c)
128
129 - def check_unassigneds(self, string):
130 for c in string: 131 if stringprep.in_table_a1(c): 132 raise UnicodeError, "Unassigned code point %s" % repr(c)
133
134 - def check_bidirectionals(self, string):
135 found_LCat = False 136 found_RandALCat = False 137 138 for c in string: 139 if stringprep.in_table_d1(c): 140 found_RandALCat = True 141 if stringprep.in_table_d2(c): 142 found_LCat = True 143 144 if found_LCat and found_RandALCat: 145 raise UnicodeError, "Violation of BIDI Requirement 2" 146 147 if found_RandALCat and not (stringprep.in_table_d1(string[0]) and 148 stringprep.in_table_d1(string[-1])): 149 raise UnicodeError, "Violation of BIDI Requirement 3"
150 151
152 -class NamePrep:
153 """ 154 Implements preparation of internationalized domain names 155 156 This class implements preparing internationalized domain names using the 157 rules defined in RFC 3491, section 4 (Conversion operations). 158 159 We do not perform step 4 since we deal with unicode representations of 160 domain names and do not convert from or to ASCII representations using 161 punycode encoding. When such a conversion is needed, the L{idna} standard 162 library provides the C{ToUnicode()} and C{ToASCII()} functions. Note that 163 L{idna} itself assumes UseSTD3ASCIIRules to be false. 164 165 The following steps are performed by C{prepare()}: 166 167 * Split the domain name in labels at the dots (RFC 3490, 3.1) 168 * Apply nameprep proper on each label (RFC 3491) 169 * Enforce the restrictions on ASCII characters in host names by 170 assuming STD3ASCIIRules to be true. (STD 3) 171 * Rejoin the labels using the label separator U+002E (full stop). 172 """ 173 174 # Prohibited characters. 175 prohibiteds = [unichr(n) for n in range(0x00, 0x2c + 1) + 176 range(0x2e, 0x2f + 1) + 177 range(0x3a, 0x40 + 1) + 178 range(0x5b, 0x60 + 1) + 179 range(0x7b, 0x7f + 1) ] 180
181 - def prepare(self, string):
182 result = [] 183 184 labels = idna.dots.split(string) 185 186 if labels and len(labels[-1]) == 0: 187 trailing_dot = '.' 188 del labels[-1] 189 else: 190 trailing_dot = '' 191 192 for label in labels: 193 result.append(self.nameprep(label)) 194 195 return ".".join(result)+trailing_dot
196
197 - def check_prohibiteds(self, string):
198 for c in string: 199 if c in self.prohibiteds: 200 raise UnicodeError, "Invalid character %s" % repr(c)
201
202 - def nameprep(self, label):
203 label = idna.nameprep(label) 204 self.check_prohibiteds(label) 205 if len(label) == 0: 206 raise UnicodeError, "Invalid empty name" 207 if label[0] == '-': 208 raise UnicodeError, "Invalid leading hyphen-minus" 209 if label[-1] == '-': 210 raise UnicodeError, "Invalid trailing hyphen-minus" 211 return label
212 213 C_11 = LookupTableFromFunction(stringprep.in_table_c11) 214 C_12 = LookupTableFromFunction(stringprep.in_table_c12) 215 C_21 = LookupTableFromFunction(stringprep.in_table_c21) 216 C_22 = LookupTableFromFunction(stringprep.in_table_c22) 217 C_3 = LookupTableFromFunction(stringprep.in_table_c3) 218 C_4 = LookupTableFromFunction(stringprep.in_table_c4) 219 C_5 = LookupTableFromFunction(stringprep.in_table_c5) 220 C_6 = LookupTableFromFunction(stringprep.in_table_c6) 221 C_7 = LookupTableFromFunction(stringprep.in_table_c7) 222 C_8 = LookupTableFromFunction(stringprep.in_table_c8) 223 C_9 = LookupTableFromFunction(stringprep.in_table_c9) 224 225 B_1 = EmptyMappingTable(stringprep.in_table_b1) 226 B_2 = MappingTableFromFunction(stringprep.map_table_b2) 227 228 nodeprep = Profile(mappings=[B_1, B_2], 229 prohibiteds=[C_11, C_12, C_21, C_22, 230 C_3, C_4, C_5, C_6, C_7, C_8, C_9, 231 LookupTable([u'"', u'&', u"'", u'/', 232 u':', u'<', u'>', u'@'])]) 233 234 resourceprep = Profile(mappings=[B_1,], 235 prohibiteds=[C_12, C_21, C_22, 236 C_3, C_4, C_5, C_6, C_7, C_8, C_9]) 237 238 nameprep = NamePrep() 239

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_31.gif0000644000175000017500000002065712321263757025625 0ustar asterixasterix00000000000000GIF89aLB<<2, \NLvtĖԦzt"$D:4\F4̚dRTt^T ̢lVL<64̒\JD$zlԪ4*$z| rt:<̬LBD<24ԦD:<\FD|bd$TBDL:<~|̞dNLtZ\,"$vt|fdjdTFDL>Y(ZXb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׻ox/@EozѺ@Խ{׾o~׿~ ;(.@9 ށ+т MBx#vK_[x@fb8h.bd(D~a\IdN%D̜dЂ++e'CX_<( erЭx0~p942[C';Dc@("fF#Z"E(fYB3A_QYè\>؀ ( ;@/kǃSd-bCOe3b}l9?1D.z+iYy^6,Mjw#=.VԻ& u8~e-8 l6&m?x|@,(u`p` <3o)cھxa.sߦFs?%7N\$c03`]\za[|xrXv];$ ˸0>cǭrWx7U<xS>|5m=|['G}Uzַ}O ^ț}k2{8z~-ˇ>}oGӟC}?ӾGw/ާؗ[{M}vk^k<3@gjRdt@ t;nbxmpp-0.5.3/doc/apidocs/nbxmpp.client_nb-pysrc.html0000644000175000017500000061152112321263757023674 0ustar asterixasterix00000000000000 nbxmpp.client_nb
Package nbxmpp :: Module client_nb
[hide private]
[frames] | no frames]

Source Code for Module nbxmpp.client_nb

  1  ##   client_nb.py 
  2  ##         based on client.py, changes backported up to revision 1.60 
  3  ## 
  4  ##   Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov 
  5  ##         modified by Dimitur Kirov <dkirov@gmail.com> 
  6  ## 
  7  ##   This program is free software; you can redistribute it and/or modify 
  8  ##   it under the terms of the GNU General Public License as published by 
  9  ##   the Free Software Foundation; either version 2, or (at your option) 
 10  ##   any later version. 
 11  ## 
 12  ##   This program is distributed in the hope that it will be useful, 
 13  ##   but WITHOUT ANY WARRANTY; without even the implied warranty of 
 14  ##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 15  ##   GNU General Public License for more details. 
 16   
 17  # $Id: client.py,v 1.52 2006/01/02 19:40:55 normanr Exp $ 
 18   
 19  """ 
 20  Client class establishs connection to XMPP Server and handles authentication 
 21  """ 
 22   
 23  import socket 
 24  import transports_nb, dispatcher_nb, auth_nb, roster_nb, protocol, bosh 
 25  from protocol import NS_TLS 
 26   
 27  import logging 
 28  log = logging.getLogger('nbxmpp.client_nb') 
 29   
 30   
31 -class NonBlockingClient:
32 """ 33 Client class is XMPP connection mountpoint. Objects for authentication, 34 network communication, roster, xml parsing ... are plugged to client object. 35 Client implements the abstract behavior - mostly negotioation and callbacks 36 handling, whereas underlying modules take care of feature-specific logic 37 """ 38
39 - def __init__(self, domain, idlequeue, caller=None):
40 """ 41 Caches connection data 42 43 :param domain: domain - for to: attribute (from account info) 44 :param idlequeue: processing idlequeue 45 :param caller: calling object - it has to implement methods 46 _event_dispatcher which is called from dispatcher instance 47 """ 48 self.Namespace = protocol.NS_CLIENT 49 self.defaultNamespace = self.Namespace 50 51 self.idlequeue = idlequeue 52 self.disconnect_handlers = [] 53 54 self.Server = domain 55 self.xmpp_hostname = None # FQDN hostname to connect to 56 57 # caller is who initiated this client, it is in needed to register 58 # the EventDispatcher 59 self._caller = caller 60 self._owner = self 61 self._registered_name = None # our full jid, set after successful auth 62 self.connected = '' 63 self.ip_addresses = [] 64 self.socket = None 65 self.on_connect = None 66 self.on_proxy_failure = None 67 self.on_connect_failure = None 68 self.proxy = None 69 self.got_features = False 70 self.got_see_other_host = None 71 self.stream_started = False 72 self.disconnecting = False 73 self.protocol_type = 'XMPP'
74
75 - def disconnect(self, message=''):
76 """ 77 Called on disconnection - disconnect callback is picked based on state of 78 the client. 79 """ 80 # to avoid recursive calls 81 if self.ip_addresses: 82 self._try_next_ip() 83 return 84 if self.disconnecting: return 85 86 log.info('Disconnecting NBClient: %s' % message) 87 88 sasl_failed = False 89 if 'NonBlockingRoster' in self.__dict__: 90 self.NonBlockingRoster.PlugOut() 91 if 'NonBlockingBind' in self.__dict__: 92 self.NonBlockingBind.PlugOut() 93 if 'NonBlockingNonSASL' in self.__dict__: 94 self.NonBlockingNonSASL.PlugOut() 95 if 'SASL' in self.__dict__: 96 if 'startsasl' in self.SASL.__dict__ and \ 97 self.SASL.startsasl == 'failure-in-process': 98 sasl_failed = True 99 self.SASL.startsasl = 'failure' 100 self._on_start_sasl() 101 else: 102 self.SASL.PlugOut() 103 if 'NonBlockingTCP' in self.__dict__: 104 self.NonBlockingTCP.PlugOut() 105 if 'NonBlockingHTTP' in self.__dict__: 106 self.NonBlockingHTTP.PlugOut() 107 if 'NonBlockingBOSH' in self.__dict__: 108 self.NonBlockingBOSH.PlugOut() 109 # FIXME: we never unplug dispatcher, only on next connect 110 # See _xmpp_connect_machine and SASLHandler 111 112 connected = self.connected 113 stream_started = self.stream_started 114 115 self.connected = '' 116 self.stream_started = False 117 118 self.disconnecting = True 119 120 log.debug('Client disconnected..') 121 # Don't call any callback when it's a SASL failure. 122 # SASL handler is already called 123 if connected == '' and not sasl_failed: 124 # if we're disconnecting before connection to XMPP sever is opened, 125 # we don't call disconnect handlers but on_connect_failure callback 126 if self.proxy: 127 # with proxy, we have different failure callback 128 log.debug('calling on_proxy_failure cb') 129 self.on_proxy_failure(reason=message) 130 else: 131 log.debug('calling on_connect_failure cb') 132 self.on_connect_failure() 133 elif not sasl_failed: 134 # we are connected to XMPP server 135 if not stream_started: 136 # if error occur before XML stream was opened, e.g. no response on 137 # init request, we call the on_connect_failure callback because 138 # proper connection is not established yet and it's not a proxy 139 # issue 140 log.debug('calling on_connect_failure cb') 141 self._caller.streamError = message 142 self.on_connect_failure() 143 else: 144 # with open connection, we are calling the disconnect handlers 145 for i in reversed(self.disconnect_handlers): 146 log.debug('Calling disconnect handler %s' % i) 147 i() 148 self.disconnecting = False
149
150 - def connect(self, on_connect, on_connect_failure, hostname=None, port=5222, 151 on_proxy_failure=None, on_stream_error_cb=None, proxy=None, 152 secure_tuple=('plain', None, None)):
153 """ 154 Open XMPP connection (open XML streams in both directions) 155 156 :param on_connect: called after stream is successfully opened 157 :param on_connect_failure: called when error occures during connection 158 :param hostname: hostname of XMPP server from SRV request 159 :param port: port number of XMPP server 160 :param on_proxy_failure: called if error occurres during TCP connection to 161 proxy server or during proxy connecting process 162 :param proxy: dictionary with proxy data. It should contain at least 163 values for keys 'host' and 'port' - connection details for proxy serve 164 and optionally keys 'user' and 'pass' as proxy credentials 165 :param secure_tuple: tuple of (desired connection type, cacerts, mycerts) 166 connection type can be 'ssl' - TLS established after TCP connection, 167 'tls' - TLS established after negotiation with starttls, or 'plain'. 168 cacerts, mycerts - see tls_nb.NonBlockingTLS constructor for more 169 details 170 """ 171 self.on_connect = on_connect 172 self.on_connect_failure=on_connect_failure 173 self.on_proxy_failure = on_proxy_failure 174 self.on_stream_error_cb = on_stream_error_cb 175 self.desired_security, self.cacerts, self.mycerts = secure_tuple 176 self.Connection = None 177 self.Port = port 178 self.proxy = proxy 179 180 if hostname: 181 self.xmpp_hostname = hostname 182 else: 183 self.xmpp_hostname = self.Server 184 185 # We only check for SSL here as for TLS we will first have to start a 186 # PLAIN connection and negotiate TLS afterwards. 187 # establish_tls will instruct transport to start secure connection 188 # directly 189 establish_tls = self.desired_security == 'ssl' 190 certs = (self.cacerts, self.mycerts) 191 192 proxy_dict = {} 193 tcp_host = self.xmpp_hostname 194 tcp_port = self.Port 195 196 if proxy: 197 # with proxies, client connects to proxy instead of directly to 198 # XMPP server ((hostname, port)) 199 # tcp_host is hostname of machine used for socket connection 200 # (DNS request will be done for proxy or BOSH CM hostname) 201 tcp_host, tcp_port, proxy_user, proxy_pass = \ 202 transports_nb.get_proxy_data_from_dict(proxy) 203 204 if proxy['type'] == 'bosh': 205 # Setup BOSH transport 206 self.socket = bosh.NonBlockingBOSH.get_instance( 207 on_disconnect=self.disconnect, 208 raise_event=self.raise_event, 209 idlequeue=self.idlequeue, 210 estabilish_tls=establish_tls, 211 certs=certs, 212 proxy_creds=(proxy_user, proxy_pass), 213 xmpp_server=(self.xmpp_hostname, self.Port), 214 domain=self.Server, 215 bosh_dict=proxy) 216 self.protocol_type = 'BOSH' 217 self.wait_for_restart_response = \ 218 proxy['bosh_wait_for_restart_response'] 219 else: 220 # http proxy 221 proxy_dict['type'] = proxy['type'] 222 proxy_dict['xmpp_server'] = (self.xmpp_hostname, self.Port) 223 proxy_dict['credentials'] = (proxy_user, proxy_pass) 224 225 if not proxy or proxy['type'] != 'bosh': 226 # Setup ordinary TCP transport 227 self.socket = transports_nb.NonBlockingTCP.get_instance( 228 on_disconnect=self.disconnect, 229 raise_event=self.raise_event, 230 idlequeue=self.idlequeue, 231 estabilish_tls=establish_tls, 232 certs=certs, 233 proxy_dict=proxy_dict) 234 235 # plug transport into client as self.Connection 236 self.socket.PlugIn(self) 237 238 self._resolve_hostname( 239 hostname=tcp_host, 240 port=tcp_port, 241 on_success=self._try_next_ip)
242
243 - def _resolve_hostname(self, hostname, port, on_success):
244 """ 245 Wrapper for getaddinfo call 246 247 FIXME: getaddinfo blocks 248 """ 249 try: 250 self.ip_addresses = socket.getaddrinfo(hostname, port, 251 socket.AF_UNSPEC, socket.SOCK_STREAM) 252 except socket.gaierror, (errnum, errstr): 253 self.disconnect(message='Lookup failure for %s:%s, hostname: %s - %s' % 254 (self.Server, self.Port, hostname, errstr)) 255 except socket.error , (errnum, errstr): 256 # Catches an unexpected error with the socket 257 self.disconnect(message='General socket error for %s:%s, hostname: %s - %s' % 258 (self.Server, self.Port, hostname, errstr)) 259 else: 260 on_success()
261
262 - def _try_next_ip(self, err_message=None):
263 """ 264 Iterate over IP addresses tries to connect to it 265 """ 266 if err_message: 267 log.debug('While looping over DNS A records: %s' % err_message) 268 if self.ip_addresses == []: 269 msg = 'Run out of hosts for name %s:%s.' % (self.Server, self.Port) 270 msg = msg + ' Error for last IP: %s' % err_message 271 self.disconnect(msg) 272 else: 273 self.current_ip = self.ip_addresses.pop(0) 274 self.socket.connect( 275 conn_5tuple=self.current_ip, 276 on_connect=lambda: self._xmpp_connect(), 277 on_connect_failure=self._try_next_ip)
278
279 - def incoming_stream_version(self):
280 """ 281 Get version of xml stream 282 """ 283 if 'version' in self.Dispatcher.Stream._document_attrs: 284 return self.Dispatcher.Stream._document_attrs['version'] 285 else: 286 return None
287
288 - def _xmpp_connect(self, socket_type=None):
289 """ 290 Start XMPP connecting process - open the XML stream. Is called after TCP 291 connection is established or after switch to TLS when successfully 292 negotiated with <starttls>. 293 """ 294 # socket_type contains info which transport connection was established 295 if not socket_type: 296 if self.Connection.ssl_lib: 297 # When ssl_lib is set we connected via SSL 298 socket_type = 'ssl' 299 else: 300 # PLAIN is default 301 socket_type = 'plain' 302 self.connected = socket_type 303 self._xmpp_connect_machine()
304
305 - def _xmpp_connect_machine(self, mode=None, data=None):
306 """ 307 Finite automaton taking care of stream opening and features tag handling. 308 Calls _on_stream_start when stream is started, and disconnect() on 309 failure. 310 """ 311 log.info('-------------xmpp_connect_machine() >> mode: %s, data: %s...' % 312 (mode, str(data)[:20])) 313 314 def on_next_receive(mode): 315 """ 316 Set desired on_receive callback on transport based on the state of 317 connect_machine. 318 """ 319 log.info('setting %s on next receive' % mode) 320 if mode is None: 321 self.onreceive(None) # switch to Dispatcher.ProcessNonBlocking 322 else: 323 self.onreceive(lambda _data:self._xmpp_connect_machine(mode, _data))
324 325 if not mode: 326 # starting state 327 if self.__dict__.has_key('Dispatcher'): 328 self.Dispatcher.PlugOut() 329 self.got_features = False 330 dispatcher_nb.Dispatcher.get_instance().PlugIn(self) 331 on_next_receive('RECEIVE_DOCUMENT_ATTRIBUTES') 332 333 elif mode == 'FAILURE': 334 self.disconnect('During XMPP connect: %s' % data) 335 336 elif mode == 'RECEIVE_DOCUMENT_ATTRIBUTES': 337 if data: 338 self.Dispatcher.ProcessNonBlocking(data) 339 self.ip_addresses = [] 340 if not hasattr(self, 'Dispatcher') or \ 341 self.Dispatcher.Stream._document_attrs is None: 342 self._xmpp_connect_machine( 343 mode='FAILURE', 344 data='Error on stream open') 345 return 346 347 # if terminating stanza was received after init request then client gets 348 # disconnected from bosh transport plugin and we have to end the stream 349 # negotiating process straight away. 350 # fixes #4657 351 if not self.connected: return 352 353 if self.incoming_stream_version() == '1.0': 354 if not self.got_features: 355 on_next_receive('RECEIVE_STREAM_FEATURES') 356 else: 357 log.info('got STREAM FEATURES in first recv') 358 self._xmpp_connect_machine(mode='STREAM_STARTED') 359 else: 360 log.info('incoming stream version less than 1.0') 361 self._xmpp_connect_machine(mode='STREAM_STARTED') 362 363 elif mode == 'RECEIVE_STREAM_FEATURES': 364 if data: 365 # sometimes <features> are received together with document 366 # attributes and sometimes on next receive... 367 self.Dispatcher.ProcessNonBlocking(data) 368 if self.got_see_other_host: 369 log.info('got see-other-host') 370 self.onreceive(None) 371 self.on_stream_error_cb(self, self.got_see_other_host) 372 elif not self.got_features: 373 self._xmpp_connect_machine(mode='FAILURE', 374 data='Missing <features> in 1.0 stream') 375 else: 376 log.info('got STREAM FEATURES in second recv') 377 self._xmpp_connect_machine(mode='STREAM_STARTED') 378 379 elif mode == 'STREAM_STARTED': 380 self._on_stream_start()
381
382 - def _on_stream_start(self):
383 """ 384 Called after XMPP stream is opened. TLS negotiation may follow if 385 supported and desired. 386 """ 387 self.stream_started = True 388 if not hasattr(self, 'onreceive'): 389 # we may already have been disconnected 390 return 391 self.onreceive(None) 392 393 if self.connected == 'plain': 394 if self.desired_security == 'plain': 395 # if we want and have plain connection, we're done now 396 self._on_connect() 397 else: 398 # try to negotiate TLS 399 if self.incoming_stream_version() != '1.0': 400 # if stream version is less than 1.0, we can't do more 401 log.info('While connecting with type = "tls": stream version ' + 402 'is less than 1.0') 403 self._on_connect() 404 return 405 if self.Dispatcher.Stream.features.getTag('starttls'): 406 # Server advertises TLS support, start negotiation 407 self.stream_started = False 408 log.info('TLS supported by remote server. Requesting TLS start.') 409 self._tls_negotiation_handler() 410 else: 411 log.info('While connecting with type = "tls": TLS unsupported ' + 412 'by remote server') 413 self._on_connect() 414 415 elif self.connected in ['ssl', 'tls']: 416 self._on_connect() 417 else: 418 assert False, 'Stream opened for unsupported connection'
419
420 - def _tls_negotiation_handler(self, con=None, tag=None):
421 """ 422 Take care of TLS negotioation with <starttls> 423 """ 424 log.info('-------------tls_negotiaton_handler() >> tag: %s' % tag) 425 if not con and not tag: 426 # starting state when we send the <starttls> 427 self.RegisterHandlerOnce('proceed', self._tls_negotiation_handler, 428 xmlns=NS_TLS) 429 self.RegisterHandlerOnce('failure', self._tls_negotiation_handler, 430 xmlns=NS_TLS) 431 self.send('<starttls xmlns="%s"/>' % NS_TLS) 432 else: 433 # we got <proceed> or <failure> 434 if tag.getNamespace() != NS_TLS: 435 self.disconnect('Unknown namespace: %s' % tag.getNamespace()) 436 return 437 tagname = tag.getName() 438 if tagname == 'failure': 439 self.disconnect('TLS <failure> received: %s' % tag) 440 return 441 log.info('Got starttls proceed response. Switching to TLS/SSL...') 442 # following call wouldn't work for BOSH transport but it doesn't matter 443 # because <starttls> negotiation with BOSH is forbidden 444 self.Connection.tls_init( 445 on_succ = lambda: self._xmpp_connect(socket_type='tls'), 446 on_fail = lambda: self.disconnect('error while etabilishing TLS'))
447
448 - def _on_connect(self):
449 """ 450 Preceed call of on_connect callback 451 """ 452 self.onreceive(None) 453 self.on_connect(self, self.connected)
454
455 - def raise_event(self, event_type, data):
456 """ 457 Raise event to connection instance. DATA_SENT and DATA_RECIVED events 458 are used in XML console to show XMPP traffic 459 """ 460 log.info('raising event from transport: :::::%s::::\n_____________\n%s\n_____________\n' % (event_type, data)) 461 if hasattr(self, 'Dispatcher'): 462 self.Dispatcher.Event('', event_type, data)
463 464 ############################################################################### 465 ### follows code for authentication, resource bind, session and roster download 466 ############################################################################### 467
468 - def auth(self, user, password, resource='', sasl=True, on_auth=None):
469 """ 470 Authenticate connnection and bind resource. If resource is not provided 471 random one or library name used 472 473 :param user: XMPP username 474 :param password: XMPP password 475 :param resource: resource that shall be used for auth/connecting 476 :param sasl: Boolean indicating if SASL shall be used. (default: True) 477 :param on_auth: Callback, called after auth. On auth failure, argument 478 is None. 479 """ 480 self._User, self._Password = user, password 481 self._Resource, self._sasl = resource, sasl 482 self.on_auth = on_auth 483 self._on_doc_attrs() 484 return
485
486 - def _on_old_auth(self, res):
487 """ 488 Callback used by NON-SASL auth. On auth failure, res is None 489 """ 490 if res: 491 self.connected += '+old_auth' 492 self.on_auth(self, 'old_auth') 493 else: 494 self.on_auth(self, None)
495
496 - def _on_sasl_auth(self, res):
497 """ 498 Used internally. On auth failure, res is None 499 """ 500 self.onreceive(None) 501 if res: 502 self.connected += '+sasl' 503 self.on_auth(self, 'sasl') 504 else: 505 self.on_auth(self, None)
506
507 - def _on_doc_attrs(self):
508 """ 509 Plug authentication objects and start auth 510 """ 511 if self._sasl: 512 auth_nb.SASL.get_instance(self._User, self._Password, 513 self._on_start_sasl).PlugIn(self) 514 if not hasattr(self, 'SASL'): 515 return 516 if not self._sasl or self.SASL.startsasl == 'not-supported': 517 if not self._Resource: 518 self._Resource = 'xmpppy' 519 auth_nb.NonBlockingNonSASL.get_instance(self._User, self._Password, 520 self._Resource, self._on_old_auth).PlugIn(self) 521 return 522 self.SASL.auth() 523 return True
524
525 - def _on_start_sasl(self, data=None):
526 """ 527 Callback used by SASL, called on each auth step 528 """ 529 if data: 530 self.Dispatcher.ProcessNonBlocking(data) 531 if not 'SASL' in self.__dict__: 532 # SASL is pluged out, possible disconnect 533 return 534 if self.SASL.startsasl == 'in-process': 535 return 536 self.onreceive(None) 537 if self.SASL.startsasl == 'failure': 538 # wrong user/pass, stop auth 539 if 'SASL' in self.__dict__: 540 self.SASL.PlugOut() 541 self.connected = None # FIXME: is this intended? We use ''elsewhere 542 self._on_sasl_auth(None) 543 elif self.SASL.startsasl == 'success': 544 nb_bind = auth_nb.NonBlockingBind.get_instance() 545 sm = self._caller.sm 546 if sm._owner and sm.resumption: 547 nb_bind.resuming = True 548 sm.set_owner(self) 549 self.Dispatcher.sm = sm 550 nb_bind.PlugIn(self) 551 self.on_auth(self, 'sasl') 552 return 553 554 nb_bind.PlugIn(self) 555 self.onreceive(self._on_auth_bind) 556 return True
557
558 - def _on_auth_bind(self, data):
559 # FIXME: Why use this callback and not bind directly? 560 if data: 561 self.Dispatcher.ProcessNonBlocking(data) 562 if self.NonBlockingBind.bound is None: 563 return 564 self.NonBlockingBind.NonBlockingBind(self._Resource, self._on_sasl_auth) 565 return True
566
567 - def initRoster(self, version=''):
568 """ 569 Plug in the roster 570 """ 571 if not self.__dict__.has_key('NonBlockingRoster'): 572 return roster_nb.NonBlockingRoster.get_instance(version=version).PlugIn(self)
573
574 - def getRoster(self, on_ready=None, force=False):
575 """ 576 Return the Roster instance, previously plugging it in and requesting 577 roster from server if needed 578 """ 579 if self.__dict__.has_key('NonBlockingRoster'): 580 return self.NonBlockingRoster.getRoster(on_ready, force) 581 return None
582
583 - def sendPresence(self, jid=None, typ=None, requestRoster=0):
584 """ 585 Send some specific presence state. Can also request roster from server if 586 according agrument is set 587 """ 588 if requestRoster: 589 # FIXME: used somewhere? 590 roster_nb.NonBlockingRoster.get_instance().PlugIn(self) 591 self.send(dispatcher_nb.Presence(to=jid, typ=typ))
592 593 ############################################################################### 594 ### following methods are moved from blocking client class of xmpppy 595 ############################################################################### 596
597 - def RegisterDisconnectHandler(self, handler):
598 """ 599 Register handler that will be called on disconnect 600 """ 601 self.disconnect_handlers.append(handler)
602
603 - def UnregisterDisconnectHandler(self, handler):
604 """ 605 Unregister handler that is called on disconnect 606 """ 607 self.disconnect_handlers.remove(handler)
608
609 - def DisconnectHandler(self):
610 """ 611 Default disconnect handler. Just raises an IOError. If you choosed to use 612 this class in your production client, override this method or at least 613 unregister it. 614 """ 615 raise IOError('Disconnected from server.')
616
617 - def get_connect_type(self):
618 """ 619 Return connection state. F.e.: None / 'tls' / 'plain+non_sasl' 620 """ 621 return self.connected
622
623 - def get_peerhost(self):
624 """ 625 Gets the ip address of the account, from which is made connection to the 626 server (e.g. IP and port of socket) 627 628 We will create listening socket on the same ip 629 """ 630 # FIXME: tuple (ip, port) is expected (and checked for) but port num is 631 # useless 632 return self.socket.peerhost
633

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_20.gif0000644000175000017500000002045212321263757025614 0ustar asterixasterix00000000000000GIF89aLB<ČBDlĢ$"$lfdĂjdlRLbdĺT><<2, \NLĖvlԦ\F<ܺTB4,&$Ćfd&$VT64ܶĞvt  ܾFDnl^\ܮNLԦ.,64侼 Ď̞nl̖Ԯ><!,Y H*\ȰÇ#JHŋ3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$ǰ'0p>q0N/a<Ș7~h?rBGa)MJczy hW\&'.RjWZ)qo$.3:׼ .186)2Kayem?gBN܆#XB8SW! }4 Hp|s& @Љ>fY}2TXxwi d8¨>xB/(>Q[ 78W~B󟟛:qP`D( 9~)Ez!}3‡@]A{ DwGcAOEc Q>諀S<1P7D!'B7$_8&a;F@[;0(?kc#p ;@ӄ3*L PdtA,StA5T+ 4#A%\&$3579,%&/01$243D4A$8<,DTD5C7 EHC8BIDHlDO{LOCJ8KRMN4UDQ8RdXd6G[DWd8XC[B_\_E4DENS=FA|dF0EEFF&`F2\f4bcjDiPJD1' 7x+vBfF3$x"XEm4nB !7,F9ExtG1zGS|Ɓ/Pp (%pGx$ E[P@SGGG/|NP(C0HodI4R|HH/6i@xNFNx@GNPpH/C6v|DJK/˫JkTF/1 nbxmpp.auth_nb.NonBlockingBind
Package nbxmpp :: Module auth_nb :: Class NonBlockingBind
[hide private]
[frames] | no frames]

Class NonBlockingBind

source code


Bind some JID to the current connection to allow router know of our location. Must be plugged after successful SASL auth
Instance Methods [hide private]
 
__init__(self) source code
 
plugin(self, owner)
Start resource binding, if allowed at this time. Used internally.
source code
 
FeaturesHandler(self, conn, feats)
Determine if server supports resource binding and set some internal attributes accordingly.
source code
 
plugout(self)
Remove Bind handler from owner's dispatcher. Used internally
source code
 
NonBlockingBind(self, resource=None, on_bound=None)
Perform binding. Use provided resource name or random (if not provided).
source code
 
_on_bound(self, resp) source code
 
_on_session(self, resp) source code

Inherited from plugin.PlugIn: PlugIn, PlugOut

Class Methods [hide private]

Inherited from plugin.PlugIn: get_instance

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Overrides: plugin.PlugIn.__init__

plugin(self, owner)

source code 
Start resource binding, if allowed at this time. Used internally.

FeaturesHandler(self, conn, feats)

source code 

Determine if server supports resource binding and set some internal attributes accordingly.

It also checks if server supports stream management

plugout(self)

source code 
Remove Bind handler from owner's dispatcher. Used internally

NonBlockingBind(self, resource=None, on_bound=None)

source code 
Perform binding. Use provided resource name or random (if not provided).

_on_bound(self, resp)

source code 

_on_session(self, resp)

source code 

nbxmpp-0.5.3/doc/apidocs/nbxmpp.auth_nb-pysrc.html0000644000175000017500000103767312321263757023372 0ustar asterixasterix00000000000000 nbxmpp.auth_nb
Package nbxmpp :: Module auth_nb
[hide private]
[frames] | no frames]

Source Code for Module nbxmpp.auth_nb

  1  ##   auth_nb.py 
  2  ##       based on auth.py, changes backported up to revision 1.41 
  3  ## 
  4  ##   Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov 
  5  ##       modified by Dimitur Kirov <dkirov@gmail.com> 
  6  ## 
  7  ##   This program is free software; you can redistribute it and/or modify 
  8  ##   it under the terms of the GNU General Public License as published by 
  9  ##   the Free Software Foundation; either version 2, or (at your option) 
 10  ##   any later version. 
 11  ## 
 12  ##   This program is distributed in the hope that it will be useful, 
 13  ##   but WITHOUT ANY WARRANTY; without even the implied warranty of 
 14  ##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 15  ##   GNU General Public License for more details. 
 16   
 17  """ 
 18  Provides plugs for SASL and NON-SASL authentication mechanisms. 
 19  Can be used both for client and transport authentication 
 20   
 21  See client_nb.py 
 22  """ 
 23   
 24  from protocol import NS_SASL, NS_SESSION, NS_STREAMS, NS_BIND, NS_AUTH 
 25  from protocol import NS_STREAM_MGMT 
 26  from protocol import Node, NodeProcessed, isResultNode, Iq, Protocol, JID 
 27  from plugin import PlugIn 
 28  from smacks import Smacks 
 29  import base64 
 30  import random 
 31  import itertools 
 32  import dispatcher_nb 
 33  import hashlib 
 34  import hmac 
 35  import hashlib 
 36   
 37  import logging 
 38  log = logging.getLogger('nbxmpp.auth_nb') 
39 40 -def HH(some): return hashlib.md5(some).hexdigest()
41 -def H(some): return hashlib.md5(some).digest()
42 -def C(some): return ':'.join(some)
43 44 try: 45 kerberos = __import__('kerberos') 46 have_kerberos = True 47 except ImportError: 48 have_kerberos = False 49 50 GSS_STATE_STEP = 0 51 GSS_STATE_WRAP = 1 52 SASL_FAILURE_IN_PROGRESS = 'failure-in-process' 53 SASL_FAILURE = 'failure' 54 SASL_SUCCESS = 'success' 55 SASL_UNSUPPORTED = 'not-supported' 56 SASL_IN_PROCESS = 'in-process'
57 58 -def challenge_splitter(data):
59 """ 60 Helper function that creates a dict from challenge string 61 62 Sample challenge string: 63 - username="example.org",realm="somerealm", 64 nonce="OA6MG9tEQGm2hh",cnonce="OA6MHXh6VqTrRk", 65 nc=00000001,qop="auth,auth-int,auth-conf",charset=utf-8 66 67 Expected result for challan: 68 - dict['qop'] = ('auth','auth-int','auth-conf') 69 - dict['realm'] = 'somerealm' 70 """ 71 X_KEYWORD, X_VALUE, X_END = 0, 1, 2 72 quotes_open = False 73 keyword, value = '', '' 74 dict_ = {} 75 arr = None 76 77 expecting = X_KEYWORD 78 for iter_ in range(len(data) + 1): 79 end = False 80 if iter_ == len(data): 81 expecting = X_END 82 end = True 83 else: 84 char = data[iter_] 85 if expecting == X_KEYWORD: 86 if char == '=': 87 expecting = X_VALUE 88 elif char in (',', ' ', '\t'): 89 pass 90 else: 91 keyword = '%s%c' % (keyword, char) 92 elif expecting == X_VALUE: 93 if char == '"': 94 if quotes_open: 95 end = True 96 else: 97 quotes_open = True 98 elif char in (',', ' ', '\t'): 99 if quotes_open: 100 if not arr: 101 arr = [value] 102 else: 103 arr.append(value) 104 value = "" 105 else: 106 end = True 107 else: 108 value = '%s%c' % (value, char) 109 if end: 110 if arr: 111 arr.append(value) 112 dict_[keyword] = arr 113 arr = None 114 else: 115 dict_[keyword] = value 116 value, keyword = '', '' 117 expecting = X_KEYWORD 118 quotes_open = False 119 return dict_
120
121 -def scram_parse(chatter):
122 return dict(s.split('=', 1) for s in chatter.split(','))
123
124 -class SASL(PlugIn):
125 """ 126 Implements SASL authentication. Can be plugged into NonBlockingClient 127 to start authentication 128 """ 129
130 - def __init__(self, username, password, on_sasl):
131 """ 132 :param username: XMPP username 133 :param password: XMPP password 134 :param on_sasl: Callback, will be called after each SASL auth-step. 135 """ 136 PlugIn.__init__(self) 137 self.username = username 138 self.password = password 139 self.on_sasl = on_sasl 140 self.realm = None
141
142 - def plugin(self, owner):
143 if 'version' not in self._owner.Dispatcher.Stream._document_attrs: 144 self.startsasl = SASL_UNSUPPORTED 145 elif self._owner.Dispatcher.Stream.features: 146 try: 147 self.FeaturesHandler(self._owner.Dispatcher, 148 self._owner.Dispatcher.Stream.features) 149 except NodeProcessed: 150 pass 151 else: 152 self.startsasl = None
153
154 - def plugout(self):
155 """ 156 Remove SASL handlers from owner's dispatcher. Used internally 157 """ 158 if 'features' in self._owner.__dict__: 159 self._owner.UnregisterHandler('features', self.FeaturesHandler, 160 xmlns=NS_STREAMS) 161 if 'challenge' in self._owner.__dict__: 162 self._owner.UnregisterHandler('challenge', self.SASLHandler, 163 xmlns=NS_SASL) 164 if 'failure' in self._owner.__dict__: 165 self._owner.UnregisterHandler('failure', self.SASLHandler, 166 xmlns=NS_SASL) 167 if 'success' in self._owner.__dict__: 168 self._owner.UnregisterHandler('success', self.SASLHandler, 169 xmlns=NS_SASL)
170
171 - def auth(self):
172 """ 173 Start authentication. Result can be obtained via "SASL.startsasl" 174 attribute and will be either SASL_SUCCESS or SASL_FAILURE 175 176 Note that successfull auth will take at least two Dispatcher.Process() 177 calls. 178 """ 179 if self.startsasl: 180 pass 181 elif self._owner.Dispatcher.Stream.features: 182 try: 183 self.FeaturesHandler(self._owner.Dispatcher, 184 self._owner.Dispatcher.Stream.features) 185 except NodeProcessed: 186 pass 187 else: 188 self._owner.RegisterHandler('features', 189 self.FeaturesHandler, xmlns=NS_STREAMS)
190
191 - def FeaturesHandler(self, conn, feats):
192 """ 193 Used to determine if server supports SASL auth. Used internally 194 """ 195 if not feats.getTag('mechanisms', namespace=NS_SASL): 196 self.startsasl='not-supported' 197 log.info('SASL not supported by server') 198 return 199 self.mecs = [] 200 for mec in feats.getTag('mechanisms', namespace=NS_SASL).getTags( 201 'mechanism'): 202 self.mecs.append(mec.getData()) 203 204 self._owner.RegisterHandler('challenge', self.SASLHandler, 205 xmlns=NS_SASL) 206 self._owner.RegisterHandler('failure', self.SASLHandler, xmlns=NS_SASL) 207 self._owner.RegisterHandler('success', self.SASLHandler, xmlns=NS_SASL) 208 self.MechanismHandler()
209
210 - def MechanismHandler(self):
211 if 'ANONYMOUS' in self.mecs and self.username is None: 212 self.mecs.remove('ANONYMOUS') 213 node = Node('auth', attrs={'xmlns': NS_SASL, 214 'mechanism': 'ANONYMOUS'}) 215 self.mechanism = 'ANONYMOUS' 216 self.startsasl = SASL_IN_PROCESS 217 self._owner.send(str(node)) 218 raise NodeProcessed 219 if "EXTERNAL" in self.mecs: 220 self.mecs.remove('EXTERNAL') 221 sasl_data = u'%s@%s' % (self.username, self._owner.Server) 222 sasl_data = sasl_data.encode('utf-8').encode('base64').replace( 223 '\n', '') 224 node = Node('auth', attrs={'xmlns': NS_SASL, 225 'mechanism': 'EXTERNAL'}, payload=[sasl_data]) 226 self.mechanism = 'EXTERNAL' 227 self.startsasl = SASL_IN_PROCESS 228 self._owner.send(str(node)) 229 raise NodeProcessed 230 if 'GSSAPI' in self.mecs and have_kerberos: 231 self.mecs.remove('GSSAPI') 232 try: 233 self.gss_vc = kerberos.authGSSClientInit('xmpp@' + \ 234 self._owner.xmpp_hostname)[1] 235 kerberos.authGSSClientStep(self.gss_vc, '') 236 response = kerberos.authGSSClientResponse(self.gss_vc) 237 node=Node('auth', attrs={'xmlns': NS_SASL, 238 'mechanism': 'GSSAPI'}, payload=(response or '')) 239 self.mechanism = 'GSSAPI' 240 self.gss_step = GSS_STATE_STEP 241 self.startsasl = SASL_IN_PROCESS 242 self._owner.send(str(node)) 243 raise NodeProcessed 244 except kerberos.GSSError, e: 245 log.info('GSSAPI authentication failed: %s' % str(e)) 246 if 'SCRAM-SHA-1' in self.mecs: 247 self.mecs.remove('SCRAM-SHA-1') 248 self.mechanism = 'SCRAM-SHA-1' 249 self._owner._caller.get_password(self.set_password, self.mechanism) 250 self.scram_step = 0 251 self.startsasl = SASL_IN_PROCESS 252 raise NodeProcessed 253 if 'DIGEST-MD5' in self.mecs: 254 self.mecs.remove('DIGEST-MD5') 255 node = Node('auth', attrs={'xmlns': NS_SASL, 256 'mechanism': 'DIGEST-MD5'}) 257 self.mechanism = 'DIGEST-MD5' 258 self.startsasl = SASL_IN_PROCESS 259 self._owner.send(str(node)) 260 raise NodeProcessed 261 if 'PLAIN' in self.mecs: 262 self.mecs.remove('PLAIN') 263 self.mechanism = 'PLAIN' 264 self._owner._caller.get_password(self.set_password, self.mechanism) 265 self.startsasl = SASL_IN_PROCESS 266 raise NodeProcessed 267 if 'X-MESSENGER-OAUTH2' in self.mecs: 268 self.mecs.remove('X-MESSENGER-OAUTH2') 269 self.mechanism = 'X-MESSENGER-OAUTH2' 270 self._owner._caller.get_password(self.set_password, self.mechanism) 271 self.startsasl = SASL_IN_PROCESS 272 raise NodeProcessed 273 self.startsasl = SASL_FAILURE 274 log.info('I can only use EXTERNAL, SCRAM-SHA-1, DIGEST-MD5, GSSAPI and ' 275 'PLAIN mecanisms.') 276 if self.on_sasl: 277 self.on_sasl() 278 return
279
280 - def SASLHandler(self, conn, challenge):
281 """ 282 Perform next SASL auth step. Used internally 283 """ 284 if challenge.getNamespace() != NS_SASL: 285 return 286 287 def scram_base64(s): 288 return ''.join(s.encode('base64').split('\n'))
289 290 incoming_data = challenge.getData() 291 data=base64.decodestring(incoming_data) 292 ### Handle Auth result 293 def on_auth_fail(reason): 294 log.info('Failed SASL authentification: %s' % reason) 295 self._owner.send(str(Node('abort', attrs={'xmlns': NS_SASL}))) 296 if len(self.mecs) > 0: 297 # There are other mechanisms to test, but wait for <failure> 298 # answer from server 299 self.startsasl = SASL_FAILURE_IN_PROGRESS 300 raise NodeProcessed 301 if self.on_sasl: 302 self.on_sasl() 303 raise NodeProcessed
304 305 if challenge.getName() == 'failure': 306 if self.startsasl == SASL_FAILURE_IN_PROGRESS: 307 self.MechanismHandler() 308 raise NodeProcessed 309 self.startsasl = SASL_FAILURE 310 try: 311 reason = challenge.getChildren()[0] 312 except Exception: 313 reason = challenge 314 on_auth_fail(reason) 315 elif challenge.getName() == 'success': 316 if self.mechanism == 'SCRAM-SHA-1': 317 # check data-with-success 318 data = scram_parse(data) 319 if data['v'] != scram_base64(self.scram_ServerSignature): 320 on_auth_fail('ServerSignature is wrong') 321 322 self.startsasl = SASL_SUCCESS 323 log.info('Successfully authenticated with remote server.') 324 handlers = self._owner.Dispatcher.dumpHandlers() 325 326 # Bosh specific dispatcher replugging 327 # save old features. They will be used in case we won't get response 328 # on stream restart after SASL auth (happens with XMPP over BOSH 329 # with Openfire) 330 old_features = self._owner.Dispatcher.Stream.features 331 self._owner.Dispatcher.PlugOut() 332 dispatcher_nb.Dispatcher.get_instance().PlugIn(self._owner, 333 after_SASL=True, old_features=old_features) 334 self._owner.Dispatcher.restoreHandlers(handlers) 335 self._owner.User = self.username 336 337 if self.on_sasl: 338 self.on_sasl() 339 raise NodeProcessed 340 341 ### Perform auth step 342 log.info('Got challenge:' + data) 343 344 if self.mechanism == 'GSSAPI': 345 if self.gss_step == GSS_STATE_STEP: 346 rc = kerberos.authGSSClientStep(self.gss_vc, incoming_data) 347 if rc != kerberos.AUTH_GSS_CONTINUE: 348 self.gss_step = GSS_STATE_WRAP 349 elif self.gss_step == GSS_STATE_WRAP: 350 rc = kerberos.authGSSClientUnwrap(self.gss_vc, incoming_data) 351 response = kerberos.authGSSClientResponse(self.gss_vc) 352 rc = kerberos.authGSSClientWrap(self.gss_vc, response, 353 kerberos.authGSSClientUserName(self.gss_vc)) 354 response = kerberos.authGSSClientResponse(self.gss_vc) 355 if not response: 356 response = '' 357 self._owner.send(Node('response', attrs={'xmlns': NS_SASL}, 358 payload=response).__str__()) 359 raise NodeProcessed 360 if self.mechanism == 'SCRAM-SHA-1': 361 hashfn = hashlib.sha1 362 363 def HMAC(k, s): 364 return hmac.HMAC(key=k, msg=s, digestmod=hashfn).digest() 365 366 def XOR(x, y): 367 r = (chr(ord(px) ^ ord(py)) for px, py in zip(x, y)) 368 return ''.join(r) 369 370 def Hi(s, salt, iters): 371 ii = 1 372 try: 373 s = s.encode('utf-8') 374 except: 375 pass 376 ui_1 = HMAC(s, salt + '\0\0\0\01') 377 ui = ui_1 378 for i in range(iters - 1): 379 ii += 1 380 ui_1 = HMAC(s, ui_1) 381 ui = XOR(ui, ui_1) 382 return ui 383 384 def scram_H(s): 385 return hashfn(s).digest() 386 387 if self.scram_step == 0: 388 self.scram_step = 1 389 self.scram_soup += ',' + data + ',' 390 data = scram_parse(data) 391 # TODO: Should check cnonce here. 392 # TODO: Channel binding data goes in here too. 393 r = 'c=' + scram_base64(self.scram_gs2) 394 r += ',r=' + data['r'] 395 self.scram_soup += r 396 salt = data['s'].decode('base64') 397 iter = int(data['i']) 398 SaltedPassword = Hi(self.password, salt, iter) 399 # TODO: Could cache this, along with salt+iter. 400 ClientKey = HMAC(SaltedPassword, 'Client Key') 401 StoredKey = scram_H(ClientKey) 402 ClientSignature = HMAC(StoredKey, self.scram_soup) 403 ClientProof = XOR(ClientKey, ClientSignature) 404 r += ',p=' + scram_base64(ClientProof) 405 ServerKey = HMAC(SaltedPassword, 'Server Key') 406 self.scram_ServerSignature = HMAC(ServerKey, self.scram_soup) 407 sasl_data = scram_base64(r) 408 node = Node('response', attrs={'xmlns': NS_SASL}, 409 payload=[sasl_data]) 410 self._owner.send(str(node)) 411 raise NodeProcessed 412 413 if self.scram_step == 1: 414 data = scram_parse(data) 415 if data['v'].decode('base64') != self.scram_ServerSignature: 416 # TODO: Not clear what to do here - need to abort. 417 raise Exception 418 node = Node('response', attrs={'xmlns': NS_SASL}); 419 self._owner.send(str(node)) 420 raise NodeProcessed 421 422 # magic foo... 423 chal = challenge_splitter(data) 424 if not self.realm and 'realm' in chal: 425 self.realm = chal['realm'] 426 if 'qop' in chal and ((isinstance(chal['qop'], str) and \ 427 chal['qop'] =='auth') or (isinstance(chal['qop'], list) and 'auth' in \ 428 chal['qop'])): 429 self.resp = {} 430 self.resp['username'] = self.username 431 if self.realm: 432 self.resp['realm'] = self.realm 433 else: 434 self.resp['realm'] = self._owner.Server 435 self.resp['nonce'] = chal['nonce'] 436 self.resp['cnonce'] = ''.join("%x" % randint(0, 2**28) for randint \ 437 in itertools.repeat(random.randint, 7)) 438 self.resp['nc'] = ('00000001') 439 self.resp['qop'] = 'auth' 440 self.resp['digest-uri'] = 'xmpp/' + self._owner.Server 441 self.resp['charset'] = 'utf-8' 442 # Password is now required 443 self._owner._caller.get_password(self.set_password, self.mechanism) 444 elif 'rspauth' in chal: 445 # Check rspauth value 446 if chal['rspauth'] != self.digest_rspauth: 447 on_auth_fail('rspauth is wrong') 448 self._owner.send(str(Node('response', attrs={'xmlns':NS_SASL}))) 449 else: 450 self.startsasl = SASL_FAILURE 451 log.info('Failed SASL authentification: unknown challenge') 452 if self.on_sasl: 453 self.on_sasl() 454 raise NodeProcessed 455 456 @staticmethod
457 - def _convert_to_iso88591(string):
458 try: 459 string = string.decode('utf-8').encode('iso-8859-1') 460 except UnicodeEncodeError: 461 pass 462 return string
463
464 - def set_password(self, password):
465 self.password = '' if password is None else password 466 if self.mechanism == 'SCRAM-SHA-1': 467 nonce = ''.join('%x' % randint(0, 2 ** 28) for randint in \ 468 itertools.repeat(random.randint, 7)) 469 self.scram_soup = 'n=' + self.username + ',r=' + nonce 470 self.scram_gs2 = 'n,,' # No CB yet. 471 sasl_data = (self.scram_gs2 + self.scram_soup).encode('base64').\ 472 replace('\n', '') 473 node = Node('auth', attrs={'xmlns': NS_SASL, 474 'mechanism': self.mechanism}, payload=[sasl_data]) 475 elif self.mechanism == 'DIGEST-MD5': 476 hash_username = self._convert_to_iso88591(self.resp['username']) 477 hash_realm = self._convert_to_iso88591(self.resp['realm']) 478 hash_password = self._convert_to_iso88591(self.password) 479 A1 = C([H(C([hash_username, hash_realm, hash_password])), 480 self.resp['nonce'], self.resp['cnonce']]) 481 A2 = C(['AUTHENTICATE', self.resp['digest-uri']]) 482 response = HH(C([HH(A1), self.resp['nonce'], self.resp['nc'], 483 self.resp['cnonce'], self.resp['qop'], HH(A2)])) 484 A2 = C(['', self.resp['digest-uri']]) 485 self.digest_rspauth = HH(C([HH(A1), self.resp['nonce'], 486 self.resp['nc'], self.resp['cnonce'], self.resp['qop'], 487 HH(A2)])) 488 self.resp['response'] = response 489 sasl_data = u'' 490 for key in ('charset', 'username', 'realm', 'nonce', 'nc', 'cnonce', 491 'digest-uri', 'response', 'qop'): 492 if key in ('nc', 'qop', 'response', 'charset'): 493 sasl_data += u"%s=%s," % (key, self.resp[key]) 494 else: 495 sasl_data += u'%s="%s",' % (key, self.resp[key]) 496 sasl_data = sasl_data[:-1].encode('utf-8').encode('base64').replace( 497 '\r', '').replace('\n', '') 498 node = Node('response', attrs={'xmlns': NS_SASL}, 499 payload=[sasl_data]) 500 elif self.mechanism == 'PLAIN': 501 sasl_data = u'\x00%s\x00%s' % (self.username, self.password) 502 sasl_data = sasl_data.encode('utf-8').encode('base64').replace( 503 '\n', '') 504 node = Node('auth', attrs={'xmlns': NS_SASL, 'mechanism': 'PLAIN'}, 505 payload=[sasl_data]) 506 elif self.mechanism == 'X-MESSENGER-OAUTH2': 507 node = Node('auth', attrs={'xmlns': NS_SASL, 508 'mechanism': 'X-MESSENGER-OAUTH2'}) 509 node.addData(password) 510 self._owner.send(str(node))
511
512 513 -class NonBlockingNonSASL(PlugIn):
514 """ 515 Implements old Non-SASL (JEP-0078) authentication used in jabberd1.4 and 516 transport authentication 517 """ 518
519 - def __init__(self, user, password, resource, on_auth):
520 """ 521 Caches username, password and resource for auth 522 """ 523 PlugIn.__init__(self) 524 self.user = user 525 if password is None: 526 self.password = '' 527 else: 528 self.password = password 529 self.resource = resource 530 self.on_auth = on_auth
531
532 - def plugin(self, owner):
533 """ 534 Determine the best auth method (digest/0k/plain) and use it for auth. 535 Returns used method name on success. Used internally 536 """ 537 log.info('Querying server about possible auth methods') 538 self.owner = owner 539 540 owner.Dispatcher.SendAndWaitForResponse( 541 Iq('get', NS_AUTH, payload=[Node('username', payload=[self.user])]), 542 func=self._on_username)
543
544 - def _on_username(self, resp):
545 if not isResultNode(resp): 546 log.info('No result node arrived! Aborting...') 547 return self.on_auth(None) 548 549 iq=Iq(typ='set', node=resp) 550 query = iq.getTag('query') 551 query.setTagData('username', self.user) 552 query.setTagData('resource', self.resource) 553 554 if query.getTag('digest'): 555 log.info("Performing digest authentication") 556 query.setTagData('digest', 557 hashlib.sha1(self.owner.Dispatcher.Stream._document_attrs['id'] 558 + self.password).hexdigest()) 559 if query.getTag('password'): 560 query.delChild('password') 561 self._method = 'digest' 562 elif query.getTag('token'): 563 token = query.getTagData('token') 564 seq = query.getTagData('sequence') 565 log.info("Performing zero-k authentication") 566 567 def hasher(s): 568 return hashlib.sha1(s).hexdigest()
569 570 def hash_n_times(s, count): 571 return count and hasher(hash_n_times(s, count-1)) or s
572 573 hash_ = hash_n_times(hasher(hasher(self.password) + token), 574 int(seq)) 575 query.setTagData('hash', hash_) 576 self._method='0k' 577 else: 578 log.warn("Secure methods unsupported, performing plain text \ 579 authentication") 580 self._method = 'plain' 581 self._owner._caller.get_password(self._on_password, self._method) 582 return 583 resp = self.owner.Dispatcher.SendAndWaitForResponse(iq, 584 func=self._on_auth) 585
586 - def _on_password(self, password):
587 self.password = '' if password is None else password 588 iq=Iq('set', NS_AUTH) 589 query = iq.getTag('query') 590 query.setTagData('username', self.user) 591 query.setTagData('resource', self.resource) 592 query.setTagData('password', self.password) 593 resp = self.owner.Dispatcher.SendAndWaitForResponse(iq, 594 func=self._on_auth)
595
596 - def _on_auth(self, resp):
597 if isResultNode(resp): 598 log.info('Sucessfully authenticated with remote host.') 599 self.owner.User = self.user 600 self.owner.Resource = self.resource 601 self.owner._registered_name = self.owner.User + '@' + \ 602 self.owner.Server+ '/' + self.owner.Resource 603 return self.on_auth(self._method) 604 log.info('Authentication failed!') 605 return self.on_auth(None)
606
607 608 -class NonBlockingBind(PlugIn):
609 """ 610 Bind some JID to the current connection to allow router know of our 611 location. Must be plugged after successful SASL auth 612 """ 613
614 - def __init__(self):
615 PlugIn.__init__(self) 616 self.bound = None 617 self.supports_sm = False 618 self.resuming = False
619
620 - def plugin(self, owner):
621 ''' Start resource binding, if allowed at this time. Used internally. ''' 622 if self._owner.Dispatcher.Stream.features: 623 try: 624 self.FeaturesHandler(self._owner.Dispatcher, 625 self._owner.Dispatcher.Stream.features) 626 except NodeProcessed: 627 pass 628 else: 629 self._owner.RegisterHandler('features', self.FeaturesHandler, 630 xmlns=NS_STREAMS)
631
632 - def FeaturesHandler(self, conn, feats):
633 """ 634 Determine if server supports resource binding and set some internal 635 attributes accordingly. 636 637 It also checks if server supports stream management 638 """ 639 640 if feats.getTag('sm', namespace=NS_STREAM_MGMT): 641 self.supports_sm = True # server supports stream management 642 if self.resuming: 643 self._owner._caller.sm.resume_request() 644 645 if not feats.getTag('bind', namespace=NS_BIND): 646 log.info('Server does not requested binding.') 647 # we try to bind resource anyway 648 #self.bound='failure' 649 self.bound = [] 650 return 651 if feats.getTag('session', namespace=NS_SESSION): 652 self.session = 1 653 else: 654 self.session = -1 655 self.bound = []
656
657 - def plugout(self):
658 """ 659 Remove Bind handler from owner's dispatcher. Used internally 660 """ 661 self._owner.UnregisterHandler('features', self.FeaturesHandler, 662 xmlns=NS_STREAMS)
663
664 - def NonBlockingBind(self, resource=None, on_bound=None):
665 """ 666 Perform binding. Use provided resource name or random (if not provided). 667 """ 668 if self.resuming: # We don't bind if we resume the stream 669 return 670 self.on_bound = on_bound 671 self._resource = resource 672 if self._resource: 673 self._resource = [Node('resource', payload=[self._resource])] 674 else: 675 self._resource = [] 676 677 self._owner.onreceive(None) 678 self._owner.Dispatcher.SendAndWaitForResponse( 679 Protocol('iq', typ='set', payload=[Node('bind', 680 attrs={'xmlns': NS_BIND}, payload=self._resource)]), 681 func=self._on_bound)
682
683 - def _on_bound(self, resp):
684 if isResultNode(resp): 685 if resp.getTag('bind') and resp.getTag('bind').getTagData('jid'): 686 self.bound.append(resp.getTag('bind').getTagData('jid')) 687 log.info('Successfully bound %s.' % self.bound[-1]) 688 jid = JID(resp.getTag('bind').getTagData('jid')) 689 self._owner.User = jid.getNode() 690 self._owner.Resource = jid.getResource() 691 # Only negociate stream management after bounded 692 sm = self._owner._caller.sm 693 if self.supports_sm: 694 # starts negociation 695 sm.supports_sm = True 696 sm.set_owner(self._owner) 697 sm.negociate() 698 self._owner.Dispatcher.sm = sm 699 700 if hasattr(self, 'session') and self.session == -1: 701 # Server don't want us to initialize a session 702 log.info('No session required.') 703 self.on_bound('ok') 704 else: 705 self._owner.SendAndWaitForResponse(Protocol('iq', typ='set', 706 payload=[Node('session', attrs={'xmlns':NS_SESSION})]), 707 func=self._on_session) 708 return 709 if resp: 710 log.info('Binding failed: %s.' % resp.getTag('error')) 711 self.on_bound(None) 712 else: 713 log.info('Binding failed: timeout expired.') 714 self.on_bound(None)
715
716 - def _on_session(self, resp):
717 self._owner.onreceive(None) 718 if isResultNode(resp): 719 log.info('Successfully opened session.') 720 self.session = 1 721 self.on_bound('ok') 722 else: 723 log.error('Session open failed.') 724 self.session = 0 725 self.on_bound(None)
726

nbxmpp-0.5.3/doc/apidocs/nbxmpp-pysrc.html0000644000175000017500000003003312321263757021731 0ustar asterixasterix00000000000000 nbxmpp
Package nbxmpp
[hide private]
[frames] | no frames]

Source Code for Package nbxmpp

 1  # $Id: __init__.py,v 1.9 2005/03/07 09:34:51 snakeru Exp $ 
 2   
 3  """ 
 4  This is a fork of the xmpppy jabber python library. Most of the code is 
 5  inherited but has been extended by implementation of non-blocking transports 
 6  and new features like BOSH. 
 7   
 8  Most of the xmpp classes are ancestors of PlugIn class to share a single set of methods in order to compile a featured and extensible XMPP client. 
 9   
10  Thanks and credits to the xmpppy developers. See: http://xmpppy.sourceforge.net/ 
11  """ 
12   
13  from protocol import * 
14  import simplexml, protocol, auth_nb, transports_nb, roster_nb 
15  import dispatcher_nb, features_nb, idlequeue, bosh, tls_nb, proxy_connectors 
16  from client_nb import NonBlockingClient 
17  from plugin import PlugIn 
18  from smacks import Smacks 
19   

nbxmpp-0.5.3/doc/apidocs/toc-nbxmpp.proxy_connectors-module.html0000644000175000017500000000310212321263757026253 0ustar asterixasterix00000000000000 proxy_connectors

Module proxy_connectors


Classes

HTTPCONNECTConnector
ProxyConnector
SOCKS5Connector

Variables

__package__
log

[hide private] nbxmpp-0.5.3/doc/apidocs/nbxmpp.stringprepare.NamePrep-class.html0000644000175000017500000004002412321263757026271 0ustar asterixasterix00000000000000 nbxmpp.stringprepare.NamePrep
Package nbxmpp :: Module stringprepare :: Class NamePrep
[hide private]
[frames] | no frames]

Class NamePrep

source code

Implements preparation of internationalized domain names

This class implements preparing internationalized domain names using the rules defined in RFC 3491, section 4 (Conversion operations).

We do not perform step 4 since we deal with unicode representations of domain names and do not convert from or to ASCII representations using punycode encoding. When such a conversion is needed, the L{idna} standard library provides the C{ToUnicode()} and C{ToASCII()} functions. Note that L{idna} itself assumes UseSTD3ASCIIRules to be false.

The following steps are performed by C{prepare()}:

  • Split the domain name in labels at the dots (RFC 3490, 3.1)

  • Apply nameprep proper on each label (RFC 3491)

  • Enforce the restrictions on ASCII characters in host names by

    assuming STD3ASCIIRules to be true. (STD 3)

  • Rejoin the labels using the label separator U+002E (full stop).

Instance Methods [hide private]
 
prepare(self, string) source code
 
check_prohibiteds(self, string) source code
 
nameprep(self, label) source code
Class Variables [hide private]
  prohibiteds = [u'', u'', u'', u'', u'', u'', u'', u'',...
  n = 127
Method Details [hide private]

prepare(self, string)

source code 

check_prohibiteds(self, string)

source code 

nameprep(self, label)

source code 

Class Variable Details [hide private]

prohibiteds

Value:
[u'',
 u'',
 u'',
 u'',
 u'',
 u'',
 u'',
 u'',
...

n

Value:
127

nbxmpp-0.5.3/doc/apidocs/nbxmpp.c14n-pysrc.html0000644000175000017500000005244412321263757022507 0ustar asterixasterix00000000000000 nbxmpp.c14n
Package nbxmpp :: Module c14n
[hide private]
[frames] | no frames]

Source Code for Module nbxmpp.c14n

 1  # -*- coding:utf-8 -*- 
 2  ## c14n.py 
 3  ## 
 4  ## Copyright (C) 2007-2008 Brendan Taylor <whateley AT gmail.com> 
 5  ## 
 6  ## This file is part of Gajim. 
 7  ## 
 8  ## Gajim is free software; you can redistribute it and/or modify 
 9  ## it under the terms of the GNU General Public License as published 
10  ## by the Free Software Foundation; version 3 only. 
11  ## 
12  ## Gajim is distributed in the hope that it will be useful, 
13  ## but WITHOUT ANY WARRANTY; without even the implied warranty of 
14  ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
15  ## GNU General Public License for more details. 
16  ## 
17  ## You should have received a copy of the GNU General Public License 
18  ## along with Gajim. If not, see <http://www.gnu.org/licenses/>. 
19  ## 
20   
21  """ 
22  XML canonicalisation methods (for XEP-0116) 
23  """ 
24   
25  from simplexml import ustr 
26   
27 -def c14n(node, is_buggy):
28 s = "<" + node.name 29 if node.namespace: 30 if not node.parent or node.parent.namespace != node.namespace: 31 s = s + ' xmlns="%s"' % node.namespace 32 33 sorted_attrs = sorted(node.attrs.keys()) 34 for key in sorted_attrs: 35 if not is_buggy and key == 'xmlns': 36 continue 37 val = ustr(node.attrs[key]) 38 # like XMLescape() but with whitespace and without &gt; 39 s = s + ' %s="%s"' % ( key, normalise_attr(val) ) 40 s = s + ">" 41 cnt = 0 42 if node.kids: 43 for a in node.kids: 44 if (len(node.data)-1) >= cnt: 45 s = s + normalise_text(node.data[cnt]) 46 s = s + c14n(a, is_buggy) 47 cnt=cnt+1 48 if (len(node.data)-1) >= cnt: s = s + normalise_text(node.data[cnt]) 49 if not node.kids and s.endswith('>'): 50 s=s[:-1]+' />' 51 else: 52 s = s + "</" + node.name + ">" 53 return s.encode('utf-8')
54
55 -def normalise_attr(val):
56 return val.replace('&', '&amp;').replace('<', '&lt;').replace('"', '&quot;').replace('\t', '&#x9;').replace('\n', '&#xA;').replace('\r', '&#xD;')
57
58 -def normalise_text(val):
59 return val.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('\r', '&#xD;')
60

nbxmpp-0.5.3/doc/apidocs/toc-nbxmpp.smacks-module.html0000644000175000017500000000242012321263757024120 0ustar asterixasterix00000000000000 smacks

Module smacks


Classes

Smacks

Variables

__package__
log

[hide private] nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.XMLNotWellFormed-class.html0000644000175000017500000002271412321263757026646 0ustar asterixasterix00000000000000 nbxmpp.protocol.XMLNotWellFormed
Package nbxmpp :: Module protocol :: Class XMLNotWellFormed
[hide private]
[frames] | no frames]

Class XMLNotWellFormed

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.BadFormat-class.html0000644000175000017500000002261112321263757025377 0ustar asterixasterix00000000000000 nbxmpp.protocol.BadFormat
Package nbxmpp :: Module protocol :: Class BadFormat
[hide private]
[frames] | no frames]

Class BadFormat

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/toc-nbxmpp.idlequeue-module.html0000644000175000017500000000516512321263757024632 0ustar asterixasterix00000000000000 idlequeue

Module idlequeue


Classes

GlibIdleQueue
IdleCommand
IdleObject
IdleQueue
SelectIdleQueue

Functions

get_idlequeue

Variables

FLAG_CLOSE
FLAG_READ
FLAG_READ_WRITE
FLAG_WRITE
HAVE_GOBJECT
IS_CLOSED
PENDING_READ
PENDING_WRITE
__package__
log

[hide private] nbxmpp-0.5.3/doc/apidocs/help.html0000644000175000017500000002600612321263757020224 0ustar asterixasterix00000000000000 Help
 
[hide private]
[frames] | no frames]

API Documentation

This document contains the API (Application Programming Interface) documentation for python-nbxmpp. Documentation for the Python objects defined by the project is divided into separate pages for each package, module, and class. The API documentation also includes two pages containing information about the project as a whole: a trees page, and an index page.

Object Documentation

Each Package Documentation page contains:

  • A description of the package.
  • A list of the modules and sub-packages contained by the package.
  • A summary of the classes defined by the package.
  • A summary of the functions defined by the package.
  • A summary of the variables defined by the package.
  • A detailed description of each function defined by the package.
  • A detailed description of each variable defined by the package.

Each Module Documentation page contains:

  • A description of the module.
  • A summary of the classes defined by the module.
  • A summary of the functions defined by the module.
  • A summary of the variables defined by the module.
  • A detailed description of each function defined by the module.
  • A detailed description of each variable defined by the module.

Each Class Documentation page contains:

  • A class inheritance diagram.
  • A list of known subclasses.
  • A description of the class.
  • A summary of the methods defined by the class.
  • A summary of the instance variables defined by the class.
  • A summary of the class (static) variables defined by the class.
  • A detailed description of each method defined by the class.
  • A detailed description of each instance variable defined by the class.
  • A detailed description of each class (static) variable defined by the class.

Project Documentation

The Trees page contains the module and class hierarchies:

  • The module hierarchy lists every package and module, with modules grouped into packages. At the top level, and within each package, modules and sub-packages are listed alphabetically.
  • The class hierarchy lists every class, grouped by base class. If a class has more than one base class, then it will be listed under each base class. At the top level, and under each base class, classes are listed alphabetically.

The Index page contains indices of terms and identifiers:

  • The term index lists every term indexed by any object's documentation. For each term, the index provides links to each place where the term is indexed.
  • The identifier index lists the (short) name of every package, module, class, method, function, variable, and parameter. For each identifier, the index provides a short description, and a link to its documentation.

The Table of Contents

The table of contents occupies the two frames on the left side of the window. The upper-left frame displays the project contents, and the lower-left frame displays the module contents:

Project
Contents
...
API
Documentation
Frame


Module
Contents
 
...
 

The project contents frame contains a list of all packages and modules that are defined by the project. Clicking on an entry will display its contents in the module contents frame. Clicking on a special entry, labeled "Everything," will display the contents of the entire project.

The module contents frame contains a list of every submodule, class, type, exception, function, and variable defined by a module or package. Clicking on an entry will display its documentation in the API documentation frame. Clicking on the name of the module, at the top of the frame, will display the documentation for the module itself.

The "frames" and "no frames" buttons below the top navigation bar can be used to control whether the table of contents is displayed or not.

The Navigation Bar

A navigation bar is located at the top and bottom of every page. It indicates what type of page you are currently viewing, and allows you to go to related pages. The following table describes the labels on the navigation bar. Note that not some labels (such as [Parent]) are not displayed on all pages.

Label Highlighted when... Links to...
[Parent] (never highlighted) the parent of the current package
[Package] viewing a package the package containing the current object
[Module] viewing a module the module containing the current object
[Class] viewing a class the class containing the current object
[Trees] viewing the trees page the trees page
[Index] viewing the index page the index page
[Help] viewing the help page the help page

The "show private" and "hide private" buttons below the top navigation bar can be used to control whether documentation for private objects is displayed. Private objects are usually defined as objects whose (short) names begin with a single underscore, but do not end with an underscore. For example, "_x", "__pprint", and "epydoc.epytext._tokenize" are private objects; but "re.sub", "__init__", and "type_" are not. However, if a module defines the "__all__" variable, then its contents are used to decide which objects are private.

A timestamp below the bottom navigation bar indicates when each page was last updated.

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_35.gif0000644000175000017500000002116712321263757025626 0ustar asterixasterix00000000000000GIF89aLB<ČBDlĢ$"$lfdjdĂlRLbdĺT>< <2,ĖvtdNDԦ\F<"$RTztܲD:424|b\$ĚvtlZ\Ԫܺ|jlt4&$rt TJLnd><̞TB4NDfd̢z|䶴t$ľ,&$Ćfd&$VTܶ64Ğܾvt  rdFDnl^\ܮNLԦ.,64侼̞ Ďnl̖Ԯ><̦LBD<24dNLԦ\FDD:<$̞TBD~|tZ\jd,"$vtTFDt^\lVT|fdzt4*,D64L><!,S H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ -AѣH*]ʴӧPJJ4µׯ`ÊKٳhӪ]BȝKݻx˷߿v Wa+^8pb; whOʛ7c{YqdG-ZPp:sSS Ed&'17FdF!oyС&ЮB"j\LJ`1r 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TWBԡpQ&GnNvצ~ F@RP)6`JڤK%| FBŬpLNT`ٴ^[Nd J[T8 m!4\_Y |k0l!6pCeEImVђZA\rPE2\u @@ ]ΣeJ*Y\0u-1K7  ( hӎ0!JBDj_ǥqG@&!"a驯4n 5,鲡e%|+ZQ|O_|$}y܏߅/gg~H/ Ox]#%c֯1_ :J4{B\ /?K(u(A͏._.1<8AXJ򋰈B +Vܪ)xp``L]"TJժZ**iua o&2ǝl+_[59 @^ e[qU~(ьbLb'`!P1Fm|QX\lbL#^iH!26x]g.a+;RL[\DIJRj\¾mb,$ \Id5`MkDdRc&d U9.m\[\Ly[6֕0.0m`2}0;+ O @ 6{ GL8WXčH 48αw@L!2v &;PL*[Xβ|$o`Lf1w#)Pr\fM :IexAq4eaxCPFv,gE"" 3 Ü'!%3H؄@8gBӧ'ǀKvwMt00yOe@N *`P&dh*h-eا}ܧ 3lf*PkidhV `d^PodXxG爐H@y/yWqzfP Popw6P ixZmd@pT 0xOƋ (6uLJ3'fl ud Xggv֧eK u6w i‰ q0F!g0xm2dzwY 9u<7QY)nreK6vikPvWhp'wdtq֑fvyegxgx=fLx)wƓteWy=y7d{wH){7|*P|zϷ|0{WЗ{CZ)|gz_|:ebIe dy9svVɊVƈ}~hl~7`X恢xQ֘(Pd *قGIU$&ؔK菮d9he ,e3 p *9eFJLPRUheDdљK e=)md*w?dWrJ enra8exRiek؆_ȟٟweR*dvWɚTkPhHKvXNfLơJ e7Xw d2yeɸ h؋8NSf7HXLO֙O6 LfMkhV9w#bv&cιsƦ9kƧ_V禂Zs*Y,y#q:)Xpک:ZZ*)tڪ!ja:ZzګZ;nbxmpp-0.5.3/doc/apidocs/nbxmpp.tls_nb.PyOpenSSLWrapper-class.html0000644000175000017500000003564512321263757026330 0ustar asterixasterix00000000000000 nbxmpp.tls_nb.PyOpenSSLWrapper
Package nbxmpp :: Module tls_nb :: Class PyOpenSSLWrapper
[hide private]
[frames] | no frames]

Class PyOpenSSLWrapper

source code


Wrapper class for PyOpenSSL's recv() and send() methods
Nested Classes [hide private]

Inherited from SSLWrapper: Error

Instance Methods [hide private]
 
__init__(self, *args) source code
 
is_numtoolarge(self, e)
Magic methods don't need documentation
source code
 
recv(self, bufsize, flags=None)
Receive wrapper for SSL object
source code
 
send(self, data, flags=None, now=False)
Send wrapper for SSL object
source code
Method Details [hide private]

__init__(self, *args)
(Constructor)

source code 
Overrides: SSLWrapper.__init__

is_numtoolarge(self, e)

source code 
Magic methods don't need documentation

recv(self, bufsize, flags=None)

source code 

Receive wrapper for SSL object

We can return None out of this function to signal that no data is available right now. Better than an exception, which differs depending on which SSL lib we're using. Unfortunately returning '' can indicate that the socket has been closed, so to be sure, we avoid this by returning None.

Overrides: SSLWrapper.recv
(inherited documentation)

send(self, data, flags=None, now=False)

source code 
Send wrapper for SSL object
Overrides: SSLWrapper.send
(inherited documentation)

nbxmpp-0.5.3/doc/apidocs/frames.html0000644000175000017500000000111012321263757020536 0ustar asterixasterix00000000000000 python-nbxmpp nbxmpp-0.5.3/doc/apidocs/nbxmpp.protocol.RemoteConnectionFailed-class.html0000644000175000017500000002276512321263757030132 0ustar asterixasterix00000000000000 nbxmpp.protocol.RemoteConnectionFailed
Package nbxmpp :: Module protocol :: Class RemoteConnectionFailed
[hide private]
[frames] | no frames]

Class RemoteConnectionFailed

source code


Instance Methods [hide private]

Inherited from exceptions.Exception: __init__, __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

nbxmpp-0.5.3/doc/apidocs/uml_class_diagram_for_nbxmpp_p_32.gif0000644000175000017500000012427512321263757025627 0ustar asterixasterix00000000000000GIF89alB>lfd<.,̎l"$fd<ĢBDĂTF@Ԧ"$f\t䲤vtrdd.,2.lRLRT$ܶ  D:4dRMt,&$j^ܮ24̞b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kٖosYw{ٗY٘YٙYٚYٛYǙٜYיٝY癞ٞYٟZ ڠZڡ#Z'+ڢ/3Z7;ڣ?@CZGKڤOSZW[ڥ_cZgkڦosZw{ڧZڨ9 ;nbxmpp-0.5.3/doc/apidocs/toc-nbxmpp.plugin-module.html0000644000175000017500000000242012321263757024135 0ustar asterixasterix00000000000000 plugin

Module plugin


Classes

PlugIn

Variables

__package__
log

[hide private] nbxmpp-0.5.3/setup.py0000755000175000017500000000045612552000226015717 0ustar asterixasterix00000000000000#!/usr/bin/env python from distutils.core import setup setup(name='nbxmpp', version='0.5.3', description='Non blocking Jabber/XMPP module', author='Yann Leboulanger', author_email='asterix@lagaule.org', url='http://python-nbxmpp.gajim.org', packages=['nbxmpp'], ) nbxmpp-0.5.3/README0000644000175000017500000000076312321263757015101 0ustar asterixasterix00000000000000 python-nbxmpp http://python-nbxmpp.gajim.org The goal of this python library is to provide a way for python applications to use Jabber/XMPP networks in a non-blocking way. This library is initialy a fork of xmpppy one, but using non-blocking sockets. Installation Simply run 'python setup.py install' as root Usage You have to 'import xmpppy' in your program. Then look at examples in ths doc folder. 2012-05-08 Yann Leboulanger