I can answer for the C library. Libstrophe is low-level library and provides interface for creating, sending and receiving xmpp stanzas. It performs connection and authentication process, but you need to implement any high-level logic by your own. This is the idea to build everything from bricks. Libstrophe allows you to implement pubsub, but this will be not 1-2 calls of the interface functions.
I think the best example will be project Profanity
. It doesn't implement pubsub, but shows how to use the library.
So short answer is that libstrophe doesn't provides pubsub interface, but allows to implement it.
. You can repeat your question there as well.