You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
797 B

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #include "onvifclientrecording.hpp"
  2. inline OnvifClientRecording::OnvifClientRecording(OnvifClientDevice &device)
  3. : m_Device(device), recordingProxy(SOAP_C_UTFSTRING)
  4. {
  5. }
  6. inline OnvifClientRecording::~OnvifClientRecording()
  7. {
  8. }
  9. ONVIFLIB_API inline int OnvifClientRecording::GetRecordings(_trc__GetRecordingsResponse &recordings)
  10. {
  11. _trc__GetRecordings req;
  12. string strUrl;
  13. string strUser;
  14. string strPass;
  15. if (m_Device.GetUserPasswd(strUser, strPass) == false
  16. || m_Device.GetRecordingUrl(strUrl) == false)
  17. {
  18. return SOAP_ERR;
  19. }
  20. recordingProxy.soap_endpoint = strUrl.c_str();
  21. soap_wsse_add_Security(&recordingProxy);
  22. soap_wsse_add_UsernameTokenDigest(&recordingProxy, "Id",
  23. strUser.c_str() , strPass.c_str());
  24. return recordingProxy.GetRecordings( &req, &recordings);
  25. }