{
    "content": [
        {
            "type": "text",
            "text": "# Net::XMPP::Protocol (perldoc)\n\n## NAME\n\nNet::XMPP::Protocol - XMPP Protocol Module\n\n## SYNOPSIS\n\nNet::XMPP::Protocol is a module that provides a developer easy access to the XMPP Instant\nMessaging protocol. It provides high level functions to the Net::XMPP Client object. These\nfunctions are inherited by that modules.\n\n## DESCRIPTION\n\nProtocol.pm seeks to provide enough high level APIs and automation of the low level APIs that\nwriting a XMPP Client in Perl is trivial. For those that wish to work with the low level you can\ndo that too, but those functions are covered in the documentation for each module.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (11 subsections)\n- **METHODS** (9 subsections)\n- **AUTHOR**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Net::XMPP::Protocol",
        "section": "",
        "mode": "perldoc",
        "summary": "Net::XMPP::Protocol - XMPP Protocol Module",
        "synopsis": "Net::XMPP::Protocol is a module that provides a developer easy access to the XMPP Instant\nMessaging protocol. It provides high level functions to the Net::XMPP Client object. These\nfunctions are inherited by that modules.",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 13,
                "subsections": [
                    {
                        "name": "Modes",
                        "lines": 17
                    },
                    {
                        "name": "Basic Functions",
                        "lines": 67
                    },
                    {
                        "name": "Namespace Functions",
                        "lines": 8
                    },
                    {
                        "name": "Message Functions",
                        "lines": 6
                    },
                    {
                        "name": "Presence Functions",
                        "lines": 5
                    },
                    {
                        "name": "Subscription Functions",
                        "lines": 12
                    },
                    {
                        "name": "Presence DB Functions",
                        "lines": 16
                    },
                    {
                        "name": "Auth Functions",
                        "lines": 5
                    },
                    {
                        "name": "Register Functions",
                        "lines": 12
                    },
                    {
                        "name": "Roster Functions",
                        "lines": 9
                    },
                    {
                        "name": "Roster DB Functions",
                        "lines": 33
                    }
                ]
            },
            {
                "name": "METHODS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Basic Functions",
                        "lines": 233
                    },
                    {
                        "name": "Namespace Functions",
                        "lines": 9
                    },
                    {
                        "name": "Message Functions",
                        "lines": 6
                    },
                    {
                        "name": "Presence Functions",
                        "lines": 9
                    },
                    {
                        "name": "Subscription Functions",
                        "lines": 13
                    },
                    {
                        "name": "Presence DB Functions",
                        "lines": 34
                    },
                    {
                        "name": "Auth Functions",
                        "lines": 45
                    },
                    {
                        "name": "Roster Functions",
                        "lines": 51
                    },
                    {
                        "name": "Roster DB Functions",
                        "lines": 70
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Net::XMPP::Protocol - XMPP Protocol Module\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "Net::XMPP::Protocol is a module that provides a developer easy access to the XMPP Instant\nMessaging protocol. It provides high level functions to the Net::XMPP Client object. These\nfunctions are inherited by that modules.\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Protocol.pm seeks to provide enough high level APIs and automation of the low level APIs that\nwriting a XMPP Client in Perl is trivial. For those that wish to work with the low level you can\ndo that too, but those functions are covered in the documentation for each module.\n\nNet::XMPP::Protocol provides functions to login, send and receive messages, set personal\ninformation, create a new user account, manage the roster, and disconnect. You can use all or\nnone of the functions, there is no requirement.\n\nFor more information on how the details for how Net::XMPP is written please see the help for\nNet::XMPP itself.\n\nFor more information on writing a Client see Net::XMPP::Client.\n",
                "subsections": [
                    {
                        "name": "Modes",
                        "content": "Several of the functions take a mode argument that let you specify how the function should\nbehave:\n\nblock\nsend the packet with an ID, and then block until an answer comes back. You can optionally\nspecify a timeout so that you do not block forever.\n\nnonblock\nsend the packet with an ID, but then return that id and control to the master program.\nNet::XMPP is still tracking this packet, so you must use the CheckID function to tell when\nit comes in. (This might not be very useful...)\n\npassthru\nsend the packet with an ID, but do NOT register it with Net::XMPP, then return the ID. This\nis useful when combined with the XPath function because you can register a one shot function\ntied to the id you get back.\n"
                    },
                    {
                        "name": "Basic Functions",
                        "content": "use Net::XMPP qw( Client );\n$Con = Net::XMPP::Client->new();                  # From\n$status = $Con->Connect(hostname=>\"jabber.org\"); # Net::XMPP::Client\n\n$Con->SetCallBacks(send=>\\&sendCallBack,\nreceive=>\\&receiveCallBack,\nmessage=>\\&messageCallBack,\niq=>\\&handleTheIQTag);\n\n$Con->SetMessageCallBacks(normal=>\\&messageNormalCB,\nchat=>\\&messageChatCB);\n\n$Con->SetPresenceCallBacks(available=>\\&presenceAvailableCB,\nunavailable=>\\&presenceUnavailableCB);\n\n$Con->SetIQCallBacks(\"custom-namespace\"=>\n{\nget=>\\&iqCustomGetCB,\nset=>\\&iqCustomSetCB,\nresult=>\\&iqCustomResultCB,\n},\netc...\n);\n\n$Con->SetXPathCallBacks(\"/message[@type='chat']\"=>&messageChatCB,\n\"/message[@type='chat']\"=>&otherMessageChatCB,\n...\n);\n\n$Con->RemoveXPathCallBacks(\"/message[@type='chat']\"=>&otherMessageChatCB);\n\n$Con->SetDirectXPathCallBacks(\"/anything\"=>&anythingCB,\n\"/anotherthing[@foo='bar']\"=>&anotherthingFooBarCB,\n...\n);\n\n$Con->RemoveDirectXPathCallBacks(\"/message[@type='chat']\"=>&otherMessageChatCB);\n\n$error = $Con->GetErrorCode();\n$Con->SetErrorCode(\"Timeout limit reached\");\n\n$status = $Con->Process();\n$status = $Con->Process(5);\n\n$Con->Send($object);\n$Con->Send(\"<tag>XML</tag>\");\n\n$Con->Send($object,1);\n$Con->Send(\"<tag>XML</tag>\",1);\n\n$Con->Disconnect();\n\nID Functions\n$id         = $Con->SendWithID($sendObj);\n$id         = $Con->SendWithID(\"<tag>XML</tag>\");\n$receiveObj = $Con->SendAndReceiveWithID($sendObj);\n$receiveObj = $Con->SendAndReceiveWithID($sendObj,\n10);\n$receiveObj = $Con->SendAndReceiveWithID(\"<tag>XML</tag>\");\n$receiveObj = $Con->SendAndReceiveWithID(\"<tag>XML</tag>\",\n5);\n$yesno      = $Con->ReceivedID($id);\n$receiveObj = $Con->GetID($id);\n$receiveObj = $Con->WaitForID($id);\n$receiveObj = $Con->WaitForID($id,\n20);\n"
                    },
                    {
                        "name": "Namespace Functions",
                        "content": "$Con->AddNamespace(ns=>\"foo:bar\",\ntag=>\"myfoo\",\nxpath=>{Foo=>{ path=> \"foo/text()\" },\nBar=>{ path=> \"bar/text()\" },\nFooBar=>{ type=> \"master\" },\n}\n);\n"
                    },
                    {
                        "name": "Message Functions",
                        "content": "$Con->MessageSend(to=>\"bob@jabber.org\",\nsubject=>\"Lunch\",\nbody=>\"Let's go grab some...\\n\",\nthread=>\"ABC123\",\npriority=>10);\n"
                    },
                    {
                        "name": "Presence Functions",
                        "content": "$Con->PresenceSend();\n$Con->PresenceSend(type=>\"unavailable\");\n$Con->PresenceSend(show=>\"away\");\n$Con->PresenceSend(signature=>...signature...);\n"
                    },
                    {
                        "name": "Subscription Functions",
                        "content": "$Con->Subscription(type=>\"subscribe\",\nto=>\"bob@jabber.org\");\n\n$Con->Subscription(type=>\"unsubscribe\",\nto=>\"bob@jabber.org\");\n\n$Con->Subscription(type=>\"subscribed\",\nto=>\"bob@jabber.org\");\n\n$Con->Subscription(type=>\"unsubscribed\",\nto=>\"bob@jabber.org\");\n"
                    },
                    {
                        "name": "Presence DB Functions",
                        "content": "$Con->PresenceDB();\n\n$Con->PresenceDBParse(Net::XMPP::Presence);\n\n$Con->PresenceDBDelete(\"bob\\@jabber.org\");\n$Con->PresenceDBDelete(Net::XMPP::JID);\n\n$Con->PresenceDBClear();\n\n$presence  = $Con->PresenceDBQuery(\"bob\\@jabber.org\");\n$presence  = $Con->PresenceDBQuery(Net::XMPP::JID);\n\n@resources = $Con->PresenceDBResources(\"bob\\@jabber.org\");\n@resources = $Con->PresenceDBResources(Net::XMPP::JID);\n\nIQ  Functions"
                    },
                    {
                        "name": "Auth Functions",
                        "content": "@result = $Con->AuthSend();\n@result = $Con->AuthSend(username=>\"bob\",\npassword=>\"bobrulez\",\nresource=>\"Bob\");\n"
                    },
                    {
                        "name": "Register Functions",
                        "content": "%hash   = $Con->RegisterRequest();\n%hash   = $Con->RegisterRequest(to=>\"transport.jabber.org\");\n%hash   = $Con->RegisterRequest(to=>\"transport.jabber.org\",\ntimeout=>10);\n\n@result = $Con->RegisterSend(to=>\"somewhere\",\nusername=>\"newuser\",\nresource=>\"New User\",\npassword=>\"imanewbie\",\nemail=>\"newguy@new.com\",\nkey=>\"some key\");\n"
                    },
                    {
                        "name": "Roster Functions",
                        "content": "$Roster = $Con->Roster();\n\n%roster = $Con->RosterParse($iq);\n%roster = $Con->RosterGet();\n$Con->RosterRequest();\n$Con->RosterAdd(jid=>\"bob\\@jabber.org\",\nname=>\"Bob\");\n$Con->RosterRemove(jid=>\"bob@jabber.org\");\n"
                    },
                    {
                        "name": "Roster DB Functions",
                        "content": "$Con->RosterDB();\n\n$Con->RosterDBParse(Net::XMPP::IQ);\n\n$Con->RosterDBAdd(\"bob\\@jabber.org\",\nname=>\"Bob\",\ngroups=>[\"foo\"]\n);\n\n$Con->RosterDBRemove(\"bob\\@jabber.org\");\n$Con->RosterDBRemove(Net::XMPP::JID);\n\n$Con->RosterDBClear();\n\nif ($Con->RosterDBExists(\"bob\\@jabber.org\")) { ...\nif ($Con->RosterDBExists(Net::XMPP::JID)) { ...\n\n@jids = $Con->RosterDBJIDs();\n\nif ($Con->RosterDBGroupExists(\"foo\")) { ...\n\n@groups = $Con->RosterDBGroups();\n\n@jids = $Con->RosterDBGroupJIDs(\"foo\");\n\n@jids = $Con->RosterDBNonGroupJIDs();\n\n%hash = $Con->RosterDBQuery(\"bob\\@jabber.org\");\n%hash = $Con->RosterDBQuery(Net::XMPP::JID);\n\n$value = $Con->RosterDBQuery(\"bob\\@jabber.org\",\"name\");\n$value = $Con->RosterDBQuery(Net::XMPP::JID,\"groups\");\n"
                    }
                ]
            },
            "METHODS": {
                "content": "",
                "subsections": [
                    {
                        "name": "Basic Functions",
                        "content": "GetErrorCode()\nreturns a string that will hopefully contain some useful information about why a function\nreturned an undef to you.\n\nSetErrorCode\nSetErrorCode(string)\n\nset a useful error message before you return an undef to the caller.\n\nSetCallBacks\nSetCallBacks(message=>function,\npresence=>function,\niq=>function,\nsend=>function,\nreceive=>function,\nupdate=>function)\n\nsets the callback functions for the top level tags listed. The available tags to look for\nare <message/>, <presence/>, and <iq/>. If a packet is received with an ID which is found in\nthe registered ID list (see RegisterID below) then it is not sent to these functions,\ninstead it is inserted into a LIST and can be retrieved by some functions we will mention\nlater.\n\nsend and receive are used to log what XML is sent and received. update is used as way to\nupdate your program while waiting for a packet with an ID to be returned (useful for GUI\napps).\n\nA major change that came with the last release is that the session id is passed to the\ncallback as the first argument. This was done to facilitate the Server module.\n\nThe next argument depends on which callback you are talking about. message, presence, and iq\nall get passed in Net::XMPP objects that match those types. send and receive get passed in\nstrings. update gets passed nothing, not even the session id.\n\nIf you set the function to undef, then the callback is removed from the list.\n\nSetPresenceCallBacks\nSetPresenceCallBacks(type=>function etc...)\n\nsets the callback functions for the specified presence type. The function takes types as the\nmain key, and lets you specify a function for each type of packet you can get.\n\n\"available\"\n\"unavailable\"\n\"subscribe\"\n\"unsubscribe\"\n\"subscribed\"\n\"unsubscribed\"\n\"probe\"\n\"error\"\n\nWhen it gets a <presence/> packet it checks the type='' for a defined callback. If there is\none then it calls the function with two arguments:\n\nthe session ID, and the\nNet::XMPP::Presence object.\n\nIf you set the function to undef, then the callback is removed from the list.\n\nNOTE: If you use this, which is a cleaner method, then you must *NOT* specify a callback for\npresence in the SetCallBacks function.\n\nNet::XMPP defines a few default\ncallbacks for various types:\n\n\"subscribe\" -\nreplies with subscribed\n\n\"unsubscribe\" -\nreplies with unsubscribed\n\n\"subscribed\" -\nreplies with subscribed\n\n\"unsubscribed\" -\nreplies with unsubscribed\n\nSetMessageCallBacks\nSetMessageCallBacks(type=>function, etc...)\n\nsets the callback functions for the specified message type. The function takes types as the\nmain key, and lets you specify a function for each type of packet you can get.\n\n\"normal\"\n\"chat\"\n\"groupchat\"\n\"headline\"\n\"error\"\n\nWhen it gets a <message/> packet it checks the type='' for a defined callback. If there is\none then it calls the function with two arguments:\n\nthe session ID, and the\nNet::XMPP::Message object.\n\nIf you set the function to undef, then the callback is removed from the list.\n\nNOTE: If you use this, which is a cleaner method, then you must *NOT* specify a callback for\nmessage in the SetCallBacks function.\n\nSetIQCallBacks\nSetIQCallBacks(namespace=>{\nget=>function,\nset=>function,\nresult=>function\n},\netc...)\n\nsets the callback functions for the specified namespace. The function takes namespaces as\nthe main key, and lets you specify a function for each type of packet you can get.\n\n\"get\"\n\"set\"\n\"result\"\n\nWhen it gets an <iq/> packet it checks the type='' and the xmlns='' for a defined callback.\nIf there is one then it calls the function with two arguments: the session ID, and the\nNet::XMPP::xxxx object.\n\nIf you set the function to undef, then the callback is removed from the list.\n\nNOTE: If you use this, which is a cleaner method, then you must *NOT* specify a callback for\niq in the SetCallBacks function.\n\nSetXPathCallBacks\nSetXPathCallBacks(xpath=>function, etc...)\n\nregisters a callback function for each xpath specified. If Net::XMPP matches the xpath, then\nit calls the function with two arguments:\n\nthe session ID, and the\nNet::XMPP::Message object.\n\nXpaths are rooted at each packet:\n\n/message[@type=\"chat\"]\n/iq/*[xmlns=\"jabber:iq:roster\"][1]\n...\n\nRemoveXPathCallBacks\nRemoveXPathCallBacks(xpath=>function, etc...)\n\nunregisters a callback function for each xpath specified.\n\nSetDirectXPathCallBacks\nSetDirectXPathCallBacks(xpath=>function, etc...)\n\nregisters a callback function for each xpath specified. If Net::XMPP matches the xpath, then\nit calls the function with two arguments:\n\nthe session ID, and the\nXML::Stream::Node object.\n\nXpaths are rooted at each packet:\n\n/anything\n/anotherthing/foo/[1]\n...\n\nThe big difference between this and regular XPathCallBacks is the fact that this passes in\nthe XML directly and not a Net::XMPP based object.\n\nRemoveDirectXPathCallBacks\nRemoveDirectXPathCallBacks(xpath=>function, etc...)\n\nunregisters a callback function for each xpath specified.\n\nProcess\nProcess(integer)\ntakes the timeout period as an argument.  If no\ntimeout is listed then the function blocks until\na packet is received.  Otherwise it waits that\nnumber of seconds and then exits so your program\ncan continue doing useful things.  NOTE: This is\nimportant for GUIs.  You need to leave time to\nprocess GUI commands even if you are waiting for\npackets.  The following are the possible return\nvalues, and what they mean:\n\n1   - Status ok, data received.\n0   - Status ok, no data received.\nundef - Status not ok, stop processing.\n\nIMPORTANT: You need to check the output of every Process. If you get an undef then the\nconnection died and you should behave accordingly.\n\nSend\nSend(object, ignoreActivity)\nSend(string, ignoreActivity)\n\ntakes either a Net::XMPP::xxxxx object or an XML string as an argument and sends it to the\nserver. If you set ignoreActivty to 1, then the XML::Stream module will not record this\npacket as couting towards user activity.\n\nID Functions\nSendWithID\nSendWithID(object)\nSendWithID(string)\n\ntakes either a Net::XMPP::xxxxx object or an XML string as an argument, adds the next\navailable ID number and sends that packet to the server. Returns the ID number assigned.\n\nSendAndReceiveWithID\nSendAndReceiveWithID(object, timeout)\nSendAndReceiveWithID(string, timeout)\n\nuses SendWithID and WaitForID to provide a complete way to send and receive packets with\nIDs. Can take either a Net::XMPP::xxxxx object or an XML string. Returns the proper\nNet::XMPP::xxxxx object based on the type of packet received. The timeout is passed on to\nWaitForID, see that function for how the timeout works.\n\nReceivedID\nReceivedID(integer)\n\nreturns 1 if a packet has been received with specified ID, 0 otherwise.\n\nGetID\nGetID(integer)\n\nreturns the proper Net::XMPP::xxxxx object based on the type of packet received with the\nspecified ID. If the ID has been received the GetID returns 0.\n\nWaitForID\nWaitForID(integer, timeout)\n\nblocks until a packet with the ID is received. Returns the proper Net::XMPP::xxxxx object\nbased on the type of packet received. If the timeout limit is reached then if the packet\ndoes come in, it will be discarded.\n\nNOTE: Only <iq/> officially support ids, so sending a <message/>, or <presence/> with an id\nis a risk. The server will ignore the id tag and pass it through, so both clients must\nsupport the id tag for these functions to be useful.\n"
                    },
                    {
                        "name": "Namespace Functions",
                        "content": "AddNamespace\nAddNamespace(ns=>string,\ntag=>string,\nxpath=>hash)\n\nThis function is very complex. It is a little too complex to discuss within the confines of\nthis small paragraph. Please refer to the man page for Net::XMPP::Namespaces for the full\ndocumentation on this subject.\n"
                    },
                    {
                        "name": "Message Functions",
                        "content": "MessageSend\nMessageSend(hash)\n\ntakes the hash and passes it to SetMessage in Net::XMPP::Message (refer there for valid\nsettings). Then it sends the message to the server.\n"
                    },
                    {
                        "name": "Presence Functions",
                        "content": "PresenceSend\nPresenceSend()\nPresenceSend(hash, signature=>string)\n\nNo arguments will send an empty Presence to the server to tell it that you are available. If\nyou provide a hash, then it will pass that hash to the SetPresence() function as defined in\nthe Net::XMPP::Presence module. Optionally, you can specify a signature and a\njabber:x:signed will be placed in the <presence/>.\n"
                    },
                    {
                        "name": "Subscription Functions",
                        "content": "Subscription\nSubscription(hash)\n\ntaks the hash and passes it to SetPresence in Net::XMPP::Presence (refer there for valid\nsettings). Then it sends the subscription to server.\n\nThe valid types of subscription are:\n\nsubscribe    - subscribe to JID's presence\nunsubscribe  - unsubscribe from JID's presence\nsubscribed   - response to a subscribe\nunsubscribed - response to an unsubscribe\n"
                    },
                    {
                        "name": "Presence DB Functions",
                        "content": "PresenceDB\nPresenceDB()\n\nTell the object to initialize the callbacks to automatically populate the Presence DB.\n\nPresenceDBParse\nPresenceDBParse(Net::XMPP::Presence)\n\nfor every presence that you receive pass the Presence object to the DB so that it can track\nthe resources and priorities for you. Returns either the presence passed in, if it not able\nto parsed for the DB, or the current presence as found by the PresenceDBQuery function.\n\nPresenceDBDelete\nPresenceDBDelete(string|Net::XMPP::JID)\n\ndelete thes JID entry from the DB.\n\nPresenceDBClear\nPresenceDBClear()\n\ndelete all entries in the database.\n\nPresenceDBQuery\nPresenceDBQuery(string|Net::XMPP::JID)\n\nreturns the NX::Presence that was last received for the highest priority of this JID. You\ncan pass it a string or a NX::JID object.\n\nPresenceDBResources\nPresenceDBResources(string|Net::XMPP::JID)\n\nreturns an array of resources in order from highest priority to lowest.\n\nIQ Functions"
                    },
                    {
                        "name": "Auth Functions",
                        "content": "AuthSend\nAuthSend(username=>string,\npassword=>string,\nresource=>string)\n\ntakes all of the information and builds a Net::XMPP::IQ::Auth packet. It then sends that\npacket to the server with an ID and waits for that ID to return. Then it looks in resulting\npacket and determines if authentication was successful for not. The array returned from\nAuthSend looks like this:\n\n[ type , message ]\n\nIf type is \"ok\" then authentication was successful, otherwise message contains a little more\ndetail about the error.\n\nIQ::Register Functions\nRegisterRequest\nRegisterRequest(to=>string,  timeout=>int)\nRegisterRequest()\n\nsend an <iq/> request to the specified server/transport, if not specified it sends to the\ncurrent active server. The function returns a hash that contains the required fields. Here\nis an example of the hash:\n\n$hash{fields} - The raw fields from the iq:register. To be used if there is no x:data in the\npacket.\n\n$hash{instructions} - How to fill out the form.\n\n$hash{form} - The new dynamic forms.\n\nIn $hash{form}, the fields that are present are the required fields the server needs.\n\nRegisterSend\nRegisterSend(hash)\n\ntakes the contents of the hash and passes it to the SetRegister function in the module\nNet::XMPP::Query jabber:iq:register namespace. This function returns an array that looks\nlike this:\n\n[ type , message ]\n\nIf type is \"ok\" then registration was successful, otherwise message contains a little more\ndetail about the error.\n"
                    },
                    {
                        "name": "Roster Functions",
                        "content": "Roster\nRoster()\n\nreturns a Net::XMPP::Roster object. This will automatically intercept all of the roster and\npresence packets sent from the server and give you an accurate Roster. For more information\nplease read the man page for Net::XMPP::Roster.\n\nRosterParse\nRosterParse(IQ object)\n\nreturns a hash that contains the roster parsed into the following data structure:\n\n$roster{'bob@jabber.org'}->{name}\n- Name you stored in the roster\n\n$roster{'bob@jabber.org'}->{subscription}\n- Subscription status\n(to, from, both, none)\n\n$roster{'bob@jabber.org'}->{ask}\n- The ask status from this user\n(subscribe, unsubscribe)\n\n$roster{'bob@jabber.org'}->{groups}\n- Array of groups that\nbob@jabber.org is in\n\nRosterGet\nRosterGet()\n\nsends an empty Net::XMPP::IQ::Roster tag to the server so the server will send the Roster to\nthe client. Returns the above hash from RosterParse.\n\nRosterRequest\nRosterRequest()\n\nsends an empty Net::XMPP::IQ::Roster tag to the server so the server will send the Roster to\nthe client.\n\nRosterAdd\nRosterAdd(hash)\n\nsends a packet asking that the jid be added to the roster. The hash format is defined in the\nSetItem function in the Net::XMPP::Query jabber:iq:roster namespace.\n\nRosterRemove\nRosterRemove(hash)\n\nsends a packet asking that the jid be removed from the roster. The hash format is defined in\nthe SetItem function in the Net::XMPP::Query jabber:iq:roster namespace.\n"
                    },
                    {
                        "name": "Roster DB Functions",
                        "content": "RosterDB\nRosterDB()\n\nTell the object to initialize the callbacks to automatically populate the Roster DB. If you\ndo this, then make sure that you call RosterRequest() instead of RosterGet() so that the\ncallbacks can catch it and parse it.\n\nRosterDBParse\nRosterDBParse(IQ object)\n\nIf you want to manually control the database, then you can pass in all iq packets with\njabber:iq:roster queries to this function.\n\nRosterDBAdd\nRosterDBAdd(jid,hash)\n\nAdd a new JID into the roster DB. The JID is either a string, or a Net::XMPP::JID object.\nThe hash must be the same format as the has returned by RosterParse above, and is the actual\nhash, not a reference.\n\nRosterDBRemove\nRosterDBRemove(jid)\n\nRemove a JID from the roster DB. The JID is either a string, or a Net::XMPP::JID object.\n\nRosterDBClear\nRemove all JIDs from the roster DB.\n\nRosterDBExists\nRosterDBExists(jid)\n\nreturn 1 if the JID exists in the roster DB, undef otherwise. The JID is either a string, or\na Net::XMPP::JID object.\n\nRosterDBJIDs\nRosterDBJIDs()\n\nreturns a list of Net::XMPP::JID objects that represents all of the JIDs in the DB.\n\nRosterDBGroups\nreturns the complete list of roster groups in the roster.\n\nRosterDBGroupExists\nRosterDBGroupExists(group)\n\nreturn 1 if the group is a group in the roster DB, undef otherwise.\n\nRosterDBGroupJIDs\nRosterDBGroupJIDs(group)\n\nreturns a list of Net::XMPP::JID objects that represents all of the JIDs in the specified\nroster group.\n\nRosterDBNonGroupJIDs\nreturns a list of Net::XMPP::JID objects that represents all of the JIDs not in a roster\ngroup.\n\nRosterDBQuery\nRosterDBQuery(jid)\n\nreturns a hash containing the data from the roster DB for the specified JID. The JID is\neither a string, or a Net::XMPP::JID object. The hash format the same as in RosterParse\nabove.\n\nRosterDBQuery\nRosterDBQuery(jid,key)\n\nreturns the entry from the above hash for the given key. The available keys are: name, ask,\nsubsrcription and groups The JID is either a string, or a Net::XMPP::JID object.\n"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Originally authored by Ryan Eatmon.\n\nPreviously maintained by Eric Hacker.\n\nCurrently maintained by Darian Anthony Patrick.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "This module is free software, you can redistribute it and/or modify it under the LGPL 2.1.\n",
                "subsections": []
            }
        }
    }
}