C++ reference
C++ API overview
The cross-platform C++ SDK is the shared native foundation for Lanying Chat clients on Linux, embedded targets, desktop wrappers, iOS, and Android.
Architecture and entry point
The SDK implements the BMX object model over the XSYNC protocol. BMXClient owns connectivity and service access, smart-pointer model types carry state, and listener interfaces report asynchronous updates without tying the core to a UI framework.
Reference map
Choose the narrowest reference for your task. Each item links to the locally hosted generated API page.
BMXClientConfiguration, authentication, connection state, and access to user, chat, roster, group, and push services.BMXChatServiceConversation access, message delivery, history, receipts, recall, and attachments.BMXRosterServiceRelationships, applications, contact profiles, and block lists.BMXGroupServiceGroup creation, membership, roles, moderation, announcements, and files.BMXUserServiceAuthentication, user profiles, device state, and account operations.Listener interfacesNetwork, chat, user, roster, group, and push callbacks for asynchronous state.Recommended integration flow
- Build a BMXSDKConfig for the deployment, filesystem locations, platform, and logging policy.
- Create one BMXClient and register listeners before authentication and initial synchronisation.
- Keep service calls and callbacks on deliberate application threads; do not assume UI-thread delivery.
- Use the Ptr aliases and documented ownership rules when passing model and attachment instances.
- Unregister listeners and destroy services in an order that prevents callbacks into released application objects.
What to keep in mind
- The same BMX names appear in mobile wrappers, making the C++ reference useful when a generated wrapper omits implementation detail.
- Exact ABI, compiler, and architecture support depends on the distributed SDK package.
- API names containing RTC are compatibility identifiers; product documentation calls the feature voice & video.