Fix #3198585: Extra line breaks
[siplcs.git] / src / core / sip-csta.h
blob743d4a1f18ec627eb709b450169aa9c921a7ac5d
1 /**
2 * @file sip-csta.h
4 * pidgin-sipe
6 * Copyright (C) 2009 pier11 <pier11@operamail.com>
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
24 * Interface dependencies:
26 * <glib.h>
29 /* Forward declarations */
30 struct sipmsg;
31 struct sip_dialog;
32 struct sipe_core_private;
34 /** Data model for interaction with SIP/CSTA Gateway */
35 struct sip_csta {
36 gchar *line_uri;
37 /** SIP/CSTA Gateway's SIP URI */
38 gchar *gateway_uri;
39 /** dialog with SIP/CSTA Gateway */
40 struct sip_dialog *dialog;
42 gchar *gateway_status;
43 gchar *monitor_cross_ref_id;
45 gchar *line_status;
46 /** destination tel: URI */
47 gchar *to_tel_uri;
48 gchar *call_id;
49 /* our device ID as reported by SIP/CSTA gateway */
50 gchar *device_id;
53 /** Transform telephone number representation
54 * to tel: URI form.
55 * Removes white space, parenthesis ( ), hyphen - symbols
57 * Must be g_free()'d after use.
59 * @param phone Ex. +32 2 245 00 00
60 * @return Ex. tel:+3222450000 or NULL
62 gchar *
63 sip_to_tel_uri(const gchar *phone);
66 /** Transform telephone number from tel: URI representation
67 * to more human readable form.
68 * Removes tel: prefix if such exist.
69 * (Maybe will add spaces in the future according to local
70 * phone patterns.)
72 * Must be g_free()'d after use.
74 * @param tel_uri Ex. tel:+3222450000
75 * @return Ex. +3222450000
77 gchar *
78 sip_tel_uri_denormalize(const gchar *tel_uri);
80 /** Initializes GSTA
81 * @param line_uri (in) our line tel URI. Ex.: tel:73124;phone-context=dialstring;partition=BE_BRS_INT
82 * @param server (in) SIP URI of SIP/CSTA Gateway. Ex.: sip:73124@euuklhccups01.eu.company.local
84 void
85 sip_csta_open(struct sipe_core_private *sipe_private,
86 const gchar *line_uri,
87 const gchar *server);
89 /** Closes GSTA */
90 void
91 sip_csta_close(struct sipe_core_private *sipe_private);
93 /** Makes Call
94 * @param to_tel_uri (in) tel URI of called party. Ex.: tel:+3222220220
96 void
97 sip_csta_make_call(struct sipe_core_private *sipe_private,
98 const gchar* to_tel_uri);
100 /** Processes incoming CSTA commands
102 void
103 process_incoming_info_csta(struct sipe_core_private *sipe_private,
104 struct sipmsg *msg);