Fix #3198585: Extra line breaks
[siplcs.git] / src / core / sipe-media.h
blob3fc51d32fdd2984363ccd4c4c023bc442911530b
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 SIP message belongs to the session of the given media call.
65 * Test is done on the basis of the Call-ID of the message.
67 * @param call_private (in) media call data
68 * @param msg (in) a SIP message
70 * @return @c TRUE if the SIP message belongs to the media session.
72 gboolean is_media_session_msg(struct sipe_media_call_private *call_private,
73 struct sipmsg *msg);
75 /**
76 * Sends a request to mras URI for the credentials to the A/V edge server.
77 * Given @c sipe_core_private must have non-NULL mras_uri. When the valid
78 * response is received, media_relay_username, media_relay_password and
79 * media_relays attributes of the sipe core are filled.
81 * @param sipe_private (in) SIPE core data.
83 void sipe_media_get_av_edge_credentials(struct sipe_core_private *sipe_private);
85 /**
86 * Deallocates the opaque list of media relay structures
88 * @param list (in) GSList to free
90 void sipe_media_relay_list_free(GSList *list);