buddy: fix use after free in process_buddy_photo_response()
[siplcs.git] / src / core / sipe-media.h
blobcb17d9153e44e1a6a0bd1c6bf772d38747ff49e4
1 /**
2 * @file sipe-media.h
4 * pidgin-sipe
6 * Copyright (C) 2010 Jakub Adam <jakub.adam@ktknet.cz>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 /* Forward declarations */
24 struct sipmsg;
25 struct sipe_core_private;
26 struct sipe_media_call_private;
28 /**
29 * Handles incoming SIP INVITE message to start a media session.
31 * @param sipe_private (in) SIPE core data.
32 * @param msg (in) a SIP INVITE message
34 void process_incoming_invite_call(struct sipe_core_private *sipe_private,
35 struct sipmsg *msg);
37 /**
38 * Handles incoming SIP CANCEL message.
40 * @param sipe_private (in) SIPE core data.
41 * @param msg (in) a SIP CANCEL message
43 void process_incoming_cancel_call(struct sipe_core_private *sipe_private,
44 struct sipmsg *msg);
46 /**
47 * Hangs up a media session and closes all allocated resources.
49 * @param sipe_private (in) media call data.
51 void sipe_media_hangup(struct sipe_media_call_private *call_private);
53 /**
54 * Call before SIP account logs of the server. Function hangs up the call and
55 * notifies remote participant according to the actual state of call
56 * negotiation.
58 * @param call_private (in) media call data
60 void sipe_media_handle_going_offline(struct sipe_media_call_private *call_private);
62 /**
63 * Checks whether the given media is a conference call.
65 * @return @c TRUE if call is a conference, @c FALSE when it is a PC2PC call.
67 gboolean sipe_media_is_conference_call(struct sipe_media_call_private *call_private);
69 /**
70 * Checks whether SIP message belongs to the session of the given media call.
72 * Test is done on the basis of the Call-ID of the message.
74 * @param call_private (in) media call data
75 * @param msg (in) a SIP message
77 * @return @c TRUE if the SIP message belongs to the media session.
79 gboolean is_media_session_msg(struct sipe_media_call_private *call_private,
80 struct sipmsg *msg);
82 /**
83 * Sends a request to mras URI for the credentials to the A/V edge server.
84 * Given @c sipe_core_private must have non-NULL mras_uri. When the valid
85 * response is received, media_relay_username, media_relay_password and
86 * media_relays attributes of the sipe core are filled.
88 * @param sipe_private (in) SIPE core data.
90 void sipe_media_get_av_edge_credentials(struct sipe_core_private *sipe_private);
92 /**
93 * Deallocates the opaque list of media relay structures
95 * @param list (in) GSList to free
97 void sipe_media_relay_list_free(GSList *list);