118 lines
3.8 KiB
C
118 lines
3.8 KiB
C
/***************************************************************************************
|
|
*
|
|
* IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
|
*
|
|
* By downloading, copying, installing or using the software you agree to this license.
|
|
* If you do not agree to this license, do not download, install,
|
|
* copy or use the software.
|
|
*
|
|
* Copyright (C) 2014-2024, Happytimesoft Corporation, all rights reserved.
|
|
*
|
|
* Redistribution and use in binary forms, with or without modification, are permitted.
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software distributed
|
|
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
|
|
* language governing permissions and limitations under the License.
|
|
*
|
|
****************************************************************************************/
|
|
#ifndef ONVIF_API_H
|
|
#define ONVIF_API_H
|
|
|
|
#include "sys_inc.h"
|
|
#include "onvif.h"
|
|
#include "onvif_cln.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
HT_API BOOL GetCapabilities(ONVIF_DEVICE * p_dev);
|
|
HT_API BOOL GetServices(ONVIF_DEVICE * p_dev);
|
|
HT_API BOOL GetSystemDateAndTime(ONVIF_DEVICE * p_dev);
|
|
HT_API BOOL SetSystemDateAndTime(ONVIF_DEVICE * p_dev);
|
|
HT_API BOOL GetDeviceInformation(ONVIF_DEVICE * p_dev);
|
|
HT_API BOOL GetProfiles(ONVIF_DEVICE * p_dev);
|
|
HT_API BOOL GetStreamUris(ONVIF_DEVICE * p_dev, onvif_TransportProtocol proto);
|
|
HT_API BOOL GetVideoSourceConfigurations(ONVIF_DEVICE * p_dev);
|
|
HT_API BOOL GetAudioSourceConfigurations(ONVIF_DEVICE * p_dev);
|
|
HT_API BOOL GetVideoEncoderConfigurations(ONVIF_DEVICE * p_dev);
|
|
HT_API BOOL GetAudioEncoderConfigurations(ONVIF_DEVICE * p_dev);
|
|
HT_API BOOL GetNodes(ONVIF_DEVICE * p_dev);
|
|
HT_API BOOL GetConfigurations(ONVIF_DEVICE * p_dev);
|
|
HT_API BOOL GetVideoSources(ONVIF_DEVICE * p_dev);
|
|
HT_API BOOL GetAudioSources(ONVIF_DEVICE * p_dev);
|
|
HT_API BOOL GetImagingSettings(ONVIF_DEVICE * p_dev);
|
|
HT_API BOOL Subscribe(ONVIF_DEVICE * p_dev, int index);
|
|
HT_API BOOL Unsubscribe(ONVIF_DEVICE * p_dev);
|
|
HT_API BOOL CreatePullPointSubscription(ONVIF_DEVICE * p_dev);
|
|
HT_API BOOL PullMessages(ONVIF_DEVICE * p_dev, int timeout, int message_limit, tev_PullMessages_RES * p_res);
|
|
|
|
/**
|
|
* @desc Get the device snapshot
|
|
* @param
|
|
* p_buf [out] return the snapshot buffer
|
|
* buflen [out] return the snapshot buffer length
|
|
*
|
|
* @note if call success, the caller should call FreeSnapshotBuff to free the snapshot buffer
|
|
*
|
|
*/
|
|
HT_API BOOL GetSnapshot(ONVIF_DEVICE * p_dev, const char * profile_token, unsigned char ** p_buf, int * buflen);
|
|
|
|
/**
|
|
* @desc Free the buffer
|
|
* @param
|
|
* p_buf the buffer
|
|
*
|
|
*/
|
|
HT_API void FreeBuff(unsigned char * p_buf);
|
|
|
|
/**
|
|
* @desc Firmware upgrade
|
|
* @param
|
|
* filename the upgrade filename
|
|
*
|
|
*/
|
|
HT_API BOOL FirmwareUpgrade(ONVIF_DEVICE * p_dev, const char * filename);
|
|
|
|
/**
|
|
* @desc backup system settings
|
|
* @param
|
|
* filename , save as system backup
|
|
*
|
|
*/
|
|
HT_API BOOL SystemBackup(ONVIF_DEVICE * p_dev, const char * filename);
|
|
|
|
/**
|
|
* @desc restore system settings
|
|
* @param
|
|
* filename the system backup filename
|
|
*
|
|
*/
|
|
HT_API BOOL SystemRestore(ONVIF_DEVICE * p_dev, const char * filename);
|
|
|
|
// media service 2 interface
|
|
HT_API BOOL tr2_GetProfiles(ONVIF_DEVICE * p_dev);
|
|
|
|
/**
|
|
* @desc GetStreamUris
|
|
* @param
|
|
* proto:
|
|
* RtspUnicast -- RTSP streaming RTP as UDP Unicast
|
|
* RtspMulticast -- RTSP streaming RTP as UDP Multicast
|
|
* RTSP -- RTSP streaming RTP over TCP
|
|
* RtspOverHttp -- Tunneling both the RTSP control channel and the RTP stream over HTTP or HTTPS
|
|
*/
|
|
HT_API BOOL tr2_GetStreamUris(ONVIF_DEVICE * p_dev, const char * proto);
|
|
HT_API BOOL tr2_GetVideoSourceConfigurations(ONVIF_DEVICE * p_dev);
|
|
HT_API BOOL tr2_GetAudioSourceConfigurations(ONVIF_DEVICE * p_dev);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|