chenqiyang
2021-08-20 7b95fb4d4549d3452ee17165236186afc1f2b393
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
/*
 * Copyright (c) 2010-2019 Belledonne Communications SARL.
 *
 * This file is part of Liblinphone.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
 
#ifndef _L_C_EVENT_LOG_H_
#define _L_C_EVENT_LOG_H_
 
#include "linphone/api/c-types.h"
 
// =============================================================================
 
#ifdef __cplusplus
    extern "C" {
#endif // ifdef __cplusplus
 
/**
 * @addtogroup events
 * @{
 */
 
// -----------------------------------------------------------------------------
// EventLog.
// -----------------------------------------------------------------------------
 
/**
 * Increment reference count of #LinphoneEventLog object.
 **/
LINPHONE_PUBLIC LinphoneEventLog *linphone_event_log_ref (LinphoneEventLog *event_log);
 
/**
 * Decrement reference count of #LinphoneEventLog object. When dropped to zero, memory is freed.
 **/
LINPHONE_PUBLIC void linphone_event_log_unref (LinphoneEventLog *event_log);
 
/**
 * Returns the type of a event log.
 * @param[in] event_log A #LinphoneEventLog object
 * @return The event type
 */
LINPHONE_PUBLIC LinphoneEventLogType linphone_event_log_get_type (const LinphoneEventLog *event_log);
 
/**
 * Returns the creation time of a event log.
 * @param[in] event_log A #LinphoneEventLog object
 * @return The event creation time
 */
LINPHONE_PUBLIC time_t linphone_event_log_get_creation_time (const LinphoneEventLog *event_log);
 
/**
 * Delete event log from database.
 * @param[in] event_log A #LinphoneEventLog object
 */
LINPHONE_PUBLIC void linphone_event_log_delete_from_database (LinphoneEventLog *event_log);
 
// -----------------------------------------------------------------------------
// ConferenceEvent.
// -----------------------------------------------------------------------------
 
/**
 * Returns the peer address of a conference event.
 * @param[in] event_log A #LinphoneEventLog object.
 * @return The peer address.
 */
LINPHONE_PUBLIC const LinphoneAddress *linphone_event_log_get_peer_address (const LinphoneEventLog *event_log);
 
/**
 * Returns the local address of a conference event.
 * @param[in] event_log A #LinphoneEventLog object.
 * @return The local address.
 */
LINPHONE_PUBLIC const LinphoneAddress *linphone_event_log_get_local_address (const LinphoneEventLog *event_log);
 
// -----------------------------------------------------------------------------
// ConferenceNotifiedEvent.
// -----------------------------------------------------------------------------
 
/**
 * Returns the notify id of a conference notified event.
 * @param[in] event_log A #LinphoneEventLog object.
 * @return The conference notify id.
 */
LINPHONE_PUBLIC unsigned int linphone_event_log_get_notify_id (const LinphoneEventLog *event_log);
 
// -----------------------------------------------------------------------------
// ConferenceCallEvent.
// -----------------------------------------------------------------------------
 
/**
 * Returns the call of a conference call event.
 * @param[in] event_log A #LinphoneEventLog object.
 * @return The conference call.
 */
LINPHONE_PUBLIC LinphoneCall *linphone_event_log_get_call (const LinphoneEventLog *event_log);
 
// -----------------------------------------------------------------------------
// ConferenceChatMessageEvent.
// -----------------------------------------------------------------------------
 
/**
 * Returns the chat message of a conference chat message event.
 * @param[in] event_log A #LinphoneEventLog object.
 * @return The conference chat message.
 */
LINPHONE_PUBLIC LinphoneChatMessage *linphone_event_log_get_chat_message (const LinphoneEventLog *event_log);
 
// -----------------------------------------------------------------------------
// ConferenceParticipantEvent.
// -----------------------------------------------------------------------------
 
/**
 * Returns the participant address of a conference participant event.
 * @param[in] event_log A ConferenceParticipantEvent object.
 * @return The conference participant address.
 */
LINPHONE_PUBLIC const LinphoneAddress *linphone_event_log_get_participant_address (const LinphoneEventLog *event_log);
 
// -----------------------------------------------------------------------------
// ConferenceParticipantDeviceEvent.
// -----------------------------------------------------------------------------
 
/**
 * Returns the device address of a conference participant device event.
 * @param[in] event_log A #LinphoneEventLog object.
 * @return The conference device address.
 */
LINPHONE_PUBLIC const LinphoneAddress *linphone_event_log_get_device_address (const LinphoneEventLog *event_log);
 
// -----------------------------------------------------------------------------
// ConferenceSecurityEvent.
// -----------------------------------------------------------------------------
 
/**
 * Returns the type of security event.
 * @param[in] event_log A #LinphoneEventLog object.
 * @return The security event type.
 */
LINPHONE_PUBLIC LinphoneSecurityEventType linphone_event_log_get_security_event_type (const LinphoneEventLog *event_log);
 
/**
 * Returns the faulty device address of a conference security event.
 * @param[in] event_log A #LinphoneEventLog object.
 * @return The address of the faulty device.
 */
LINPHONE_PUBLIC LinphoneAddress *linphone_event_log_get_security_event_faulty_device_address (const LinphoneEventLog *event_log);
 
// -----------------------------------------------------------------------------
// ConferenceSubjectEvent.
// -----------------------------------------------------------------------------
 
/**
 * Returns the subject of a conference subject event.
 * @param[in] event_log A #LinphoneEventLog object.
 * @return The conference subject.
 */
LINPHONE_PUBLIC const char *linphone_event_log_get_subject (const LinphoneEventLog *event_log);
 
// -----------------------------------------------------------------------------
// ConferenceEphemeralMessageEvent.
// -----------------------------------------------------------------------------
 
/**
 * Returns the ephemeral message lifetime of a conference ephemeral message event.
 * Ephemeral lifetime means the time before an ephemeral message which has been viewed gets deleted.
 * @param[in] event_log A #LinphoneEventLog object.
 * @return The ephemeral message lifetime.
 */
LINPHONE_PUBLIC long linphone_event_log_get_ephemeral_message_lifetime (const LinphoneEventLog *event_log);
/**
 * @}
 */
 
#ifdef __cplusplus
    }
#endif // ifdef __cplusplus
 
#endif // ifndef _L_C_EVENT_LOG_H_