53 lines
2.2 KiB
C
53 lines
2.2 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_UTILS_H_
|
|
#define _ONVIF_UTILS_H_
|
|
|
|
#include "sys_inc.h"
|
|
#include "onvif.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
HT_API void onvif_get_time_str(char * buff, int len, int sec_off);
|
|
HT_API void onvif_get_time_str_s(char * buff, int len, time_t nowtime, int sec_off);
|
|
HT_API BOOL onvif_is_valid_hostname(const char * name);
|
|
HT_API BOOL onvif_is_valid_timezone(const char * tz);
|
|
HT_API void onvif_get_timezone(char * tz, int len, BOOL * daylight);
|
|
HT_API char * onvif_uuid_create(char * uuid, int len);
|
|
HT_API time_t onvif_timegm(struct tm *T);
|
|
HT_API int onvif_parse_xaddr(const char * pdata, char * host, int hostsize, char * url, int urlsize, int * port, int * https);
|
|
HT_API time_t onvif_datetime_to_time_t(onvif_DateTime * p_datetime);
|
|
HT_API void onvif_time_t_to_datetime(time_t n, onvif_DateTime * p_datetime);
|
|
HT_API char * onvif_format_datetime_str(time_t n, int flag, const char * format, char * buff, int buflen);
|
|
HT_API time_t onvif_timegm(struct tm *T);
|
|
HT_API int onvif_parse_uri(const char * p_in, char * p_out, int outlen);
|
|
HT_API char * onvif_format_float_num(float num, int precision, char * buff, int len);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
|
|