Https://github.com/xsmart/onvifcpplib
The library supports profiles and Profileg. This is currently being developed and now has a support event
Here is a sample client
int _tmain (int argc, _tchar* argv[]) {int ret;/* 192.168.1.1 are the NVT, 192.168.1.234 is the NVC */string url = "Http://19 2.168.1.1/onvif/device_service ";/* Below is where to receive the event */string eventnotify =" http://192.168.1.234:9090/ Subscription-2 "; string user =" Admin "; string pass =" admin "; onvifclientdevice onvifdevice (URL, user, pass); _tds__ Getcapabilitiesresponse capabilitiesresponse;onvifdevice.getcapabilities (); Onvifclientmedia Media (OnvifDevice); _ Trt__getprofilesresponse Profiles;media. Getprofiles (profiles); Onvifclientevent onvifevent (Onvifdevice); Onvifevent.subscribe (eventnotify); O Nvifclienteventnotify Notify (Soap_new ()); if (ret = Soap_bind (¬ify, NULL, 9090, + = = Soap_invalid_socket)) {printf ("Onvifclienteventnotify::soa P_bind Binding on%d port failed ", 9090); return 0; }//loop to Recevie the Eventwhile (1) {if (ret = soap_accept (¬ify)) = = Soap_invalid_socket) {pri NTF ("Soap_accept accepting failed"); return 0; } if ((Soap_begin_serve (¬ify)) = SOAP_OK) {printf ("Soap_begin_serve serve%d failed", ret); Continue } ret = Notify.dispatch (); Continue;} return 0;}
Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.
gSOAP-based onvif C + + library