l10n: sync translations with transifex.com (es, pt_BR)
[siplcs.git] / src / core / sip-csta.h
blob6659603280947cfc388499e5250e2c43f4759674
1 /**
2 * @file sip-csta.h
4 * pidgin-sipe
6 * Copyright (C) 2011 SIPE Project <http://sipe.sourceforge.net/>
7 * Copyright (C) 2009 pier11 <pier11@operamail.com>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 * Interface dependencies:
27 * <glib.h>
30 /* Forward declarations */
31 struct sipmsg;
32 struct sipe_core_private;
34 /**
35 * Transform telephone number representation to tel: URI form.
36 * Removes white space, parenthesis ( ), hyphen - symbols
38 * @param phone Ex. +32 2 245 00 00
39 * @return Ex. tel:+3222450000 or @c NULL. Must be @c g_free()'d after use.
41 gchar *sip_to_tel_uri(const gchar *phone);
43 /**
44 * Transform telephone number from tel: URI representation
45 * to more human readable form.
46 * Removes tel: prefix if such exist.
47 * (Maybe will add spaces in the future according to local phone patterns.)
49 * @param tel_uri Ex. tel:+3222450000
50 * @return Ex. +3222450000. Must be @c g_free()'d after use.
52 gchar *sip_tel_uri_denormalize(const gchar *tel_uri);
54 /**
55 * Initializes CSTA
57 * @param line_uri (in) our line tel URI. Ex.: tel:73124;phone-context=dialstring;partition=BE_BRS_INT
58 * @param server (in) SIP URI of SIP/CSTA Gateway. Ex.: sip:73124@euuklhccups01.eu.company.local
60 void sip_csta_open(struct sipe_core_private *sipe_private,
61 const gchar *line_uri,
62 const gchar *server);
64 /**
65 * Closes CSTA
67 void sip_csta_close(struct sipe_core_private *sipe_private);
69 /**
70 * Processes incoming CSTA commands
72 void process_incoming_info_csta(struct sipe_core_private *sipe_private,
73 struct sipmsg *msg);
75 /**
76 * Is CSTA in idle state?
78 gboolean sip_csta_is_idle(struct sipe_core_private *sipe_private);