Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Any mosquittopp users on Linux here?

18 views
Skip to first unread message

Josef Moellers

unread,
Nov 30, 2017, 10:37:51 AM11/30/17
to
I have written a small Qt program which displays a set of topics
subscribed from a mosquitto broker. At present, the program uses
libmosquitto, but I'd like to make it use libmosquittopp (it is also a
learning exercise).
The set of topics is not static, the topics are passed on the command
line, so I need a means to hand this set (forged into a QStringList) to
the on_connect() method in order to subscribe to all the topics given.

There is the user_data_set(void *userdata) method in the class
mosquittopp but it only passes the "userdata"-pointer to the underlying
mosquitto code. Any callback specified by
mosquitto_connect_callback_set() will then get this pointer but not the
on_connect() method!

Any hints?

Thanks,
Josef

Öö Tiib

unread,
Nov 30, 2017, 11:33:15 AM11/30/17
to
Very interesting. We are here on comp.lang.c++ discussing C++
language itself. With C++ it is possible to integrate anything with
anything but from your post it is not very clear what the issue is.
Is with mosquitto or with Qt or with your own C++ code?

To difficulties with mosquitto you perhaps get best hints from
https://groups.google.com/forum/#!forum/mqtt

To difficulties with Qt you get perhaps best hints at
https://forum.qt.io

If it is your own code that causes trouble then we can likely help
but can you give us illustrating example of the problem without
using neither Qt nor mosquitto?

Josef Moellers

unread,
Nov 30, 2017, 12:57:12 PM11/30/17
to
On 30.11.2017 17:32, Öö Tiib wrote:
> On Thursday, 30 November 2017 17:37:51 UTC+2, Josef Moellers wrote:
>> I have written a small Qt program which displays a set of topics
>> subscribed from a mosquitto broker. At present, the program uses
>> libmosquitto, but I'd like to make it use libmosquittopp (it is also a
>> learning exercise).
>> The set of topics is not static, the topics are passed on the command
>> line, so I need a means to hand this set (forged into a QStringList) to
>> the on_connect() method in order to subscribe to all the topics given.
>>
>> There is the user_data_set(void *userdata) method in the class
>> mosquittopp but it only passes the "userdata"-pointer to the underlying
>> mosquitto code. Any callback specified by
>> mosquitto_connect_callback_set() will then get this pointer but not the
>> on_connect() method!
>>
>> Any hints?
>
> Very interesting. We are here on comp.lang.c++ discussing C++
> language itself. With C++ it is possible to integrate anything with
> anything but from your post it is not very clear what the issue is.
> Is with mosquitto or with Qt or with your own C++ code?

It is actually with the mosquitto code. I searched the list of
newsgroups my provider has and it had nothing that adressed this issue,
so I tried here. I'll go where you told me to go:
>
> To difficulties with mosquitto you perhaps get best hints from
> https://groups.google.com/forum/#!forum/mqtt
Sorry for the inconvenience,

Josef
0 new messages