Mercurial > pidgin
annotate src/protocols/msn/httpconn.h @ 13545:cfc2f7fcb3dd
[gaim-migrate @ 15922]
Way more changes that I initially thought I was going to make. I apologize
for the commit message spam. These changes bring a lot of consistency to
our capitalization and punctuation, especially of words like "e-mail".
For reference, I've used these rules (after discussing in #gaim):
e-mail, a case of two words joined:
"e-mail" - in the middle of a sentence caps context
"E-mail" - start of text in a sentence caps context
"E-Mail" - in a header (title) caps context
re-enable, a single word, would be:
"re-enable", "Re-enable", and "Re-enable" (respectively)
The reason this changeset exploded is that, as I went through and verified
these changes, I realized we were using improper capitalization (e.g. header
instead of sentence) in a number of dialogs. I fixed a number of these
cases before, and this corrects another pile.
This looks like I've made a LOT of work for the translators, but the impact
is significantly mitigated by three factors: 1) Many of these changes use
strings that already exist, or change one string in many places. 2) I've
used sed to correct the .po files where possible. 3) The actual changes
are extremely trivial.
committer: Tailor Script <tailor@pidgin.im>
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Tue, 21 Mar 2006 04:32:45 +0000 |
| parents | 8754a0fe2297 |
| children | 3ae8a3935406 |
| rev | line source |
|---|---|
| 10463 | 1 /** |
| 2 * @file httpconn.h HTTP connection | |
| 3 * | |
| 4 * gaim | |
| 5 * | |
| 6 * Gaim is the legal property of its developers, whose names are too numerous | |
| 7 * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 8 * source distribution. | |
| 9 * | |
| 10 * This program is free software; you can redistribute it and/or modify | |
| 11 * it under the terms of the GNU General Public License as published by | |
| 12 * the Free Software Foundation; either version 2 of the License, or | |
| 13 * (at your option) any later version. | |
| 14 * | |
| 15 * This program is distributed in the hope that it will be useful, | |
| 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 18 * GNU General Public License for more details. | |
| 19 * | |
| 20 * You should have received a copy of the GNU General Public License | |
| 21 * along with this program; if not, write to the Free Software | |
| 22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 23 */ | |
| 24 #ifndef _MSN_HTTPCONN_H_ | |
| 25 #define _MSN_HTTPCONN_H_ | |
| 26 | |
| 27 typedef struct _MsnHttpConn MsnHttpConn; | |
| 28 | |
| 29 #include "servconn.h" | |
|
13200
33bef17125c2
[gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10481
diff
changeset
|
30 #include "gaim_buffer.h" |
| 10463 | 31 |
| 10481 | 32 /** |
| 33 * An HTTP Connection. | |
| 34 */ | |
| 10463 | 35 struct _MsnHttpConn |
| 36 { | |
| 10481 | 37 MsnSession *session; /**< The MSN Session. */ |
| 38 MsnServConn *servconn; /**< The connection object. */ | |
| 10463 | 39 |
| 10481 | 40 char *full_session_id; /**< The full session id. */ |
| 41 char *session_id; /**< The trimmed session id. */ | |
| 10463 | 42 |
| 10481 | 43 int timer; /**< The timer for polling. */ |
| 10463 | 44 |
| 10481 | 45 gboolean waiting_response; /**< The flag that states if we are waiting |
| 46 a response from the server. */ | |
| 47 gboolean dirty; /**< The flag that states if we should poll. */ | |
| 48 gboolean connected; /**< The flag that states if the connection is on. */ | |
| 49 gboolean virgin; /**< The flag that states if this connection | |
| 50 should specify the host (not gateway) to | |
| 51 connect to. */ | |
| 10463 | 52 |
| 10481 | 53 char *host; /**< The HTTP gateway host. */ |
| 10463 | 54 |
| 10481 | 55 int fd; /**< The connection's file descriptor. */ |
|
13200
33bef17125c2
[gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10481
diff
changeset
|
56 guint inpa; /**< The connection's input handler. */ |
| 10463 | 57 |
| 10481 | 58 char *rx_buf; /**< The receive buffer. */ |
|
13200
33bef17125c2
[gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10481
diff
changeset
|
59 int rx_len; /**< The receive buffer length. */ |
|
33bef17125c2
[gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10481
diff
changeset
|
60 |
|
33bef17125c2
[gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10481
diff
changeset
|
61 GaimCircBuffer *tx_buf; |
|
33bef17125c2
[gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10481
diff
changeset
|
62 guint tx_handler; |
| 10463 | 63 }; |
| 64 | |
| 10481 | 65 /** |
| 66 * Creates a new HTTP connection object. | |
| 67 * | |
| 68 * @param servconn The connection object. | |
| 69 * | |
| 70 * @return The new object. | |
| 71 */ | |
| 10463 | 72 MsnHttpConn *msn_httpconn_new(MsnServConn *servconn); |
| 73 | |
| 74 /** | |
| 10481 | 75 * Destroys an HTTP connection object. |
| 10463 | 76 * |
| 10481 | 77 * @param httpconn The HTTP connection object. |
| 10463 | 78 */ |
| 10481 | 79 void msn_httpconn_destroy(MsnHttpConn *httpconn); |
| 10463 | 80 |
| 81 /** | |
| 10481 | 82 * Writes a chunk of data to the HTTP connection. |
| 10463 | 83 * |
| 84 * @param servconn The server connection. | |
| 10481 | 85 * @param data The data to write. |
| 10463 | 86 * @param size The size of the data to write. |
| 87 * | |
| 88 * @return The number of bytes written. | |
| 89 */ | |
|
13270
8754a0fe2297
[gaim-migrate @ 15636]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
13200
diff
changeset
|
90 ssize_t msn_httpconn_write(MsnHttpConn *httpconn, const char *data, size_t size); |
| 10463 | 91 |
| 92 /** | |
| 10481 | 93 * Connects the HTTP connection object to a host. |
| 10463 | 94 * |
| 10481 | 95 * @param httpconn The HTTP connection object. |
| 96 * @param host The host to connect to. | |
| 97 * @param port The port to connect to. | |
| 98 */ | |
| 99 gboolean msn_httpconn_connect(MsnHttpConn *httpconn, | |
| 100 const char *host, int port); | |
| 101 | |
| 102 /** | |
| 103 * Disconnects the HTTP connection object. | |
| 10463 | 104 * |
| 10481 | 105 * @param httpconn The HTTP connection object. |
| 10463 | 106 */ |
| 10481 | 107 void msn_httpconn_disconnect(MsnHttpConn *httpconn); |
| 10463 | 108 |
| 109 #endif /* _MSN_HTTPCONN_H_ */ |
