Replace functions which called once with their bodies
[pidgin-git.git] / libpurple / win32 / win32dep.h
blob622472ffbdd6dc04fc9920967048580b7f2726d4
1 /*
2 * purple
4 * File: win32dep.h
6 * Copyright (C) 2002-2003, Herman Bloggs <hermanator12002@yahoo.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., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
23 #ifndef PURPLE_WIN32_WIN32DEP_H
24 #define PURPLE_WIN32_WIN32DEP_H
26 #include <config.h>
28 #include <winsock2.h>
29 #include <windows.h>
30 #include <shlobj.h>
31 #include <process.h>
32 #include "wpurpleerror.h"
33 #include "libc_interface.h"
35 G_BEGIN_DECLS
37 /* the winapi headers don't yet have winhttp.h, so we use the struct from msdn directly */
38 typedef struct {
39 BOOL fAutoDetect;
40 LPWSTR lpszAutoConfigUrl;
41 LPWSTR lpszProxy;
42 LPWSTR lpszProxyBypass;
43 } WINHTTP_CURRENT_USER_IE_PROXY_CONFIG;
45 /* rpcndr.h defines small as char, causing problems, so we need to undefine it */
46 #undef small
49 * PROTOS
52 /**
53 ** win32dep.c
54 **/
55 /* Windows helper functions */
56 FARPROC wpurple_find_and_loadproc(const char *dllname, const char *procedure);
57 gboolean wpurple_reg_val_exists(HKEY rootkey, const char *subkey, const char *valname);
58 gboolean wpurple_read_reg_dword(HKEY rootkey, const char *subkey, const char *valname, LPDWORD result);
59 char *wpurple_read_reg_string(HKEY rootkey, const char *subkey, const char *valname); /* needs to be g_free'd */
60 gboolean wpurple_write_reg_string(HKEY rootkey, const char *subkey, const char *valname, const char *value);
61 char *wpurple_escape_dirsep(const char *filename); /* needs to be g_free'd */
63 /* Simulate unix pipes by creating a pair of connected sockets */
64 int wpurple_input_pipe(int pipefd[2]);
66 /* Determine Purple paths */
67 gchar *wpurple_get_special_folder(int folder_type); /* needs to be g_free'd */
68 const char *wpurple_bin_dir(void);
69 const char *wpurple_data_dir(void);
70 const char *wpurple_lib_dir(const char *subdir);
71 const char *wpurple_locale_dir(void);
72 const char *wpurple_home_dir(void);
73 const char *wpurple_sysconf_dir(void);
75 /* init / cleanup */
76 void wpurple_init(void);
77 void wpurple_cleanup(void);
79 G_END_DECLS
81 #endif /* PURPLE_WIN32_WIN32DEP_H */