mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
Set timestamp_to_string method accessible from other coreAPI files
This commit is contained in:
parent
8417c0b18d
commit
ce0d3bde0e
2 changed files with 9 additions and 2 deletions
|
|
@ -170,7 +170,7 @@ static time_t parse_timestamp(const char *timestamp) {
|
||||||
return seconds - timezone;
|
return seconds - timezone;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char * timestamp_to_string(time_t timestamp) {
|
char * linphone_timestamp_to_rfc3339_string(time_t timestamp) {
|
||||||
char timestamp_str[22];
|
char timestamp_str[22];
|
||||||
struct tm *ret;
|
struct tm *ret;
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
|
@ -1604,7 +1604,7 @@ static void write_xml_presence_note_obj(LinphonePresenceNote *note, struct _pres
|
||||||
|
|
||||||
static int write_xml_presence_timestamp(xmlTextWriterPtr writer, time_t timestamp) {
|
static int write_xml_presence_timestamp(xmlTextWriterPtr writer, time_t timestamp) {
|
||||||
int err;
|
int err;
|
||||||
char *timestamp_str = timestamp_to_string(timestamp);
|
char *timestamp_str = linphone_timestamp_to_rfc3339_string(timestamp);
|
||||||
err = xmlTextWriterWriteElement(writer, (const xmlChar *)"timestamp", (const xmlChar *)timestamp_str);
|
err = xmlTextWriterWriteElement(writer, (const xmlChar *)"timestamp", (const xmlChar *)timestamp_str);
|
||||||
if (timestamp_str) ms_free(timestamp_str);
|
if (timestamp_str) ms_free(timestamp_str);
|
||||||
return err;
|
return err;
|
||||||
|
|
|
||||||
|
|
@ -854,11 +854,18 @@ char * linphone_get_xml_text_content(xmlparsing_context_t *xml_ctx, const char *
|
||||||
void linphone_free_xml_text_content(const char *text);
|
void linphone_free_xml_text_content(const char *text);
|
||||||
xmlXPathObjectPtr linphone_get_xml_xpath_object_for_node_list(xmlparsing_context_t *xml_ctx, const char *xpath_expression);
|
xmlXPathObjectPtr linphone_get_xml_xpath_object_for_node_list(xmlparsing_context_t *xml_ctx, const char *xpath_expression);
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* OTHER UTILITY FUNCTIONS *
|
||||||
|
****************************************************************************/
|
||||||
|
char * linphone_timestamp_to_rfc3339_string(time_t timestamp);
|
||||||
|
|
||||||
|
|
||||||
static inline const LinphoneErrorInfo *linphone_error_info_from_sal_op(const SalOp *op){
|
static inline const LinphoneErrorInfo *linphone_error_info_from_sal_op(const SalOp *op){
|
||||||
if (op==NULL) return (LinphoneErrorInfo*)sal_error_info_none();
|
if (op==NULL) return (LinphoneErrorInfo*)sal_error_info_none();
|
||||||
return (const LinphoneErrorInfo*)sal_op_get_error_info(op);
|
return (const LinphoneErrorInfo*)sal_op_get_error_info(op);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Belle Sip-based objects need unique ids
|
/** Belle Sip-based objects need unique ids
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue