gSOAP-based onvif C + + library

Source: Internet
Author: User

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 (&notify, 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 (&notify)) = = Soap_invalid_socket) {pri      NTF ("Soap_accept accepting failed");      return 0;            } if ((Soap_begin_serve (&notify)) = 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.