Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. [SOLVED]QXmpp creating a MUC room (xep--0045) on the server
QtWS25 Last Chance

[SOLVED]QXmpp creating a MUC room (xep--0045) on the server

Scheduled Pinned Locked Moved 3rd Party Software
qxmpp
4 Posts 3 Posters 1.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • musimbateM Offline
    musimbateM Offline
    musimbate
    wrote on last edited by musimbate
    #1

    Hi,
    I am trying to add MUC capabilities to my application with QXmpp, I am following this info in the QXmppMucManager.h header file

    /// \brief The QXmppMucManager class makes it possible to interact with
    /// multi-user chat rooms as defined by XEP-0045: Multi-User Chat.
    ///
    /// To make use of this manager, you need to instantiate it and load it into
    /// the QXmppClient instance as follows:
    ///
    /// \code
    /// QXmppMucManager *manager = new QXmppMucManager;
    /// client->addExtension(manager);
    /// \endcode
    ///
    /// You can then join a room as follows:
    ///
    /// \code
    /// QXmppMucRoom *room = manager->addRoom("room@conference.example.com");
    /// room->setNickName("mynick");
    /// room->join();
    /// \endcode
    ///
    /// \ingroup Managers
    

    In a constructor of one of my classes I am adding a MuCManager like this

    QXmppMucManager *manager = new QXmppMucManager;
    m_xmppClient.addExtension(manager);
    

    and in a slot to create an Muc group I am doing this

    QXmppMucRoom *room = manager->addRoom("livefit@mthinkpad");
    room->setNickName("mThinkpad");
    room->join();
    

    I expect this to create a room and join if it doesn't exist and join if it already exists but it is just crashing my application.I can't wrap my brains around how qxmpp implements the xep--0045.I would appreciate it if somebody helped point what I am doing wrong or how I can create an Muc room on my server from my client.
    My server is a local ejabberd installation and I can access it at the "mthinkpad" domain.

    [edit: Added missing coding tags 3 ` before and after the code SGaist]

    Why join the navy if you can be a pirate?-Steve Jobs

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Although QXmpp is not an official Qt module, what does a run through the debugger tell you ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • MayEnjoyM Offline
        MayEnjoyM Offline
        MayEnjoy
        wrote on last edited by
        #3

        @musimbate said:

        QXmppMucRoom

        here is a example

        I am a engineer.

        1 Reply Last reply
        1
        • musimbateM Offline
          musimbateM Offline
          musimbate
          wrote on last edited by
          #4

          Thanks,really helpful.

          Why join the navy if you can be a pirate?-Steve Jobs

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved