Mon, 24 Mar 2008 16:11:21 +0000
Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
| 3630 | 1 | /* |
| 15884 | 2 | * purple |
|
5913
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5084
diff
changeset
|
3 | * |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5084
diff
changeset
|
4 | * File: win32dep.h |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5084
diff
changeset
|
5 | * |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5084
diff
changeset
|
6 | * Copyright (C) 2002-2003, Herman Bloggs <hermanator12002@yahoo.com> |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5084
diff
changeset
|
7 | * |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5084
diff
changeset
|
8 | * This program is free software; you can redistribute it and/or modify |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5084
diff
changeset
|
9 | * it under the terms of the GNU General Public License as published by |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5084
diff
changeset
|
10 | * the Free Software Foundation; either version 2 of the License, or |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5084
diff
changeset
|
11 | * (at your option) any later version. |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5084
diff
changeset
|
12 | * |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5084
diff
changeset
|
13 | * This program is distributed in the hope that it will be useful, |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5084
diff
changeset
|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5084
diff
changeset
|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5084
diff
changeset
|
16 | * GNU General Public License for more details. |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5084
diff
changeset
|
17 | * |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5084
diff
changeset
|
18 | * You should have received a copy of the GNU General Public License |
|
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5084
diff
changeset
|
19 | * along with this program; if not, write to the Free Software |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
15884
diff
changeset
|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
5913
4d016c00bb36
[gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents:
5084
diff
changeset
|
21 | * |
| 3630 | 22 | */ |
| 23 | #ifndef _WIN32DEP_H_ | |
| 24 | #define _WIN32DEP_H_ | |
|
10673
3177232170c7
[gaim-migrate @ 12213]
Richard Laager <rlaager@pidgin.im>
parents:
10240
diff
changeset
|
25 | #include <shlobj.h> |
|
8244
014ff38feea9
[gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents:
7523
diff
changeset
|
26 | #include <winsock2.h> |
|
5084
21d2e7ec99ce
[gaim-migrate @ 5439]
Herman Bloggs <herman@bluedigits.com>
parents:
5008
diff
changeset
|
27 | #include <process.h> |
| 15884 | 28 | #include "wpurpleerror.h" |
|
3778
7d3d0c93cb2d
[gaim-migrate @ 3918]
Herman Bloggs <herman@bluedigits.com>
parents:
3712
diff
changeset
|
29 | #include "libc_interface.h" |
| 3630 | 30 | |
|
22686
d41016d7812d
Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents:
20597
diff
changeset
|
31 | #ifdef __cplusplus |
|
d41016d7812d
Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents:
20597
diff
changeset
|
32 | extern "C" { |
|
d41016d7812d
Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents:
20597
diff
changeset
|
33 | #endif /* __cplusplus */ |
|
d41016d7812d
Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents:
20597
diff
changeset
|
34 | |
|
15459
2b5e94b4b17a
Fix win32 build for status icon changes
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
35 | /* rpcndr.h defines small as char, causing problems, so we need to undefine it */ |
|
2b5e94b4b17a
Fix win32 build for status icon changes
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
36 | #undef small |
|
2b5e94b4b17a
Fix win32 build for status icon changes
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
37 | |
|
3712
d926a65b5f89
[gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents:
3630
diff
changeset
|
38 | /* |
|
d926a65b5f89
[gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents:
3630
diff
changeset
|
39 | * PROTOS |
|
d926a65b5f89
[gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents:
3630
diff
changeset
|
40 | */ |
|
d926a65b5f89
[gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents:
3630
diff
changeset
|
41 | |
|
3950
0cab330f1cd6
[gaim-migrate @ 4129]
Herman Bloggs <herman@bluedigits.com>
parents:
3907
diff
changeset
|
42 | /** |
|
0cab330f1cd6
[gaim-migrate @ 4129]
Herman Bloggs <herman@bluedigits.com>
parents:
3907
diff
changeset
|
43 | ** win32dep.c |
|
0cab330f1cd6
[gaim-migrate @ 4129]
Herman Bloggs <herman@bluedigits.com>
parents:
3907
diff
changeset
|
44 | **/ |
|
5084
21d2e7ec99ce
[gaim-migrate @ 5439]
Herman Bloggs <herman@bluedigits.com>
parents:
5008
diff
changeset
|
45 | /* Windows helper functions */ |
| 15884 | 46 | FARPROC wpurple_find_and_loadproc(const char *dllname, const char *procedure); |
| 47 | char *wpurple_read_reg_string(HKEY rootkey, const char *subkey, const char *valname); /* needs to be g_free'd */ | |
| 48 | gboolean wpurple_write_reg_string(HKEY rootkey, const char *subkey, const char *valname, const char *value); | |
| 49 | char *wpurple_escape_dirsep(const char *filename); /* needs to be g_free'd */ | |
| 50 | GIOChannel *wpurple_g_io_channel_win32_new_socket(int socket); /* Until we get the post-2.8 glib win32 giochannel implementation working, use the thread-based one */ | |
|
15032
65a111aba7a8
[gaim-migrate @ 17749]
Daniel Atallah <datallah@pidgin.im>
parents:
14792
diff
changeset
|
51 | /** Check for changes to the system proxy settings and update the HTTP_PROXY env. var. if there have been changes */ |
| 15884 | 52 | gboolean wpurple_check_for_proxy_changes(void); |
|
12497
a17568773be3
[gaim-migrate @ 14809]
Richard Laager <rlaager@pidgin.im>
parents:
11709
diff
changeset
|
53 | |
| 15884 | 54 | /* Determine Purple paths */ |
|
22686
d41016d7812d
Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents:
20597
diff
changeset
|
55 | gchar *wpurple_get_special_folder(int folder_type); /* needs to be g_free'd */ |
| 15884 | 56 | const char *wpurple_install_dir(void); |
| 57 | const char *wpurple_lib_dir(void); | |
| 58 | const char *wpurple_locale_dir(void); | |
| 59 | const char *wpurple_data_dir(void); | |
|
12497
a17568773be3
[gaim-migrate @ 14809]
Richard Laager <rlaager@pidgin.im>
parents:
11709
diff
changeset
|
60 | |
|
3950
0cab330f1cd6
[gaim-migrate @ 4129]
Herman Bloggs <herman@bluedigits.com>
parents:
3907
diff
changeset
|
61 | /* init / cleanup */ |
| 15884 | 62 | void wpurple_init(void); |
| 63 | void wpurple_cleanup(void); | |
|
12497
a17568773be3
[gaim-migrate @ 14809]
Richard Laager <rlaager@pidgin.im>
parents:
11709
diff
changeset
|
64 | |
|
20587
55af483c9e86
3rd time the charm? Fixes #2990, maybe
Ka-Hing Cheung <khc@pidgin.im>
parents:
15884
diff
changeset
|
65 | long wpurple_get_tz_offset(void); |
| 3630 | 66 | |
|
3712
d926a65b5f89
[gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents:
3630
diff
changeset
|
67 | /* |
|
d926a65b5f89
[gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents:
3630
diff
changeset
|
68 | * MACROS |
|
d926a65b5f89
[gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents:
3630
diff
changeset
|
69 | */ |
|
d926a65b5f89
[gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents:
3630
diff
changeset
|
70 | |
|
d926a65b5f89
[gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents:
3630
diff
changeset
|
71 | /* |
| 15884 | 72 | * Purple specific |
|
3712
d926a65b5f89
[gaim-migrate @ 3845]
Herman Bloggs <herman@bluedigits.com>
parents:
3630
diff
changeset
|
73 | */ |
| 15884 | 74 | #define DATADIR wpurple_install_dir() |
| 75 | #define LIBDIR wpurple_lib_dir() | |
| 76 | #define LOCALEDIR wpurple_locale_dir() | |
| 3630 | 77 | |
|
22686
d41016d7812d
Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents:
20597
diff
changeset
|
78 | #ifdef __cplusplus |
|
d41016d7812d
Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents:
20597
diff
changeset
|
79 | } |
|
d41016d7812d
Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents:
20597
diff
changeset
|
80 | #endif /* __cplusplus */ |
|
d41016d7812d
Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents:
20597
diff
changeset
|
81 | |
| 3630 | 82 | #endif /* _WIN32DEP_H_ */ |
| 83 |