diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-07-19 07:47:08 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-07-19 07:47:08 +0000 |
commit | a63798c1b60eeb77352323ad4545630cdc5458f2 (patch) | |
tree | e4503c80295e80e2bb7f2fce430c8f83e0fd9714 /plugins/Folders/src/utils.h | |
parent | b63b1e9d1c0e5d1edf1c5ae6d932b03184d6aef3 (diff) |
Folders: changed folder structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@1032 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Folders/src/utils.h')
-rw-r--r-- | plugins/Folders/src/utils.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/plugins/Folders/src/utils.h b/plugins/Folders/src/utils.h new file mode 100644 index 0000000000..066c822900 --- /dev/null +++ b/plugins/Folders/src/utils.h @@ -0,0 +1,62 @@ +/*
+Custom profile folders plugin for Miranda IM
+
+Copyright © 2005 Cristian Libotean
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#ifndef M_FOLDERS_UTILS_H
+#define M_FOLDERS_UTILS_H
+
+#include <stdarg.h>
+#include "commonheaders.h"
+
+int Log(char *format, ...);
+
+char *StrReplace(char *source, const char *what, const char *withWhat);
+char *StrCopy(char *source, size_t index, const char *what, size_t count);
+char *StrDelete(char *source, size_t index, size_t count);
+char *StrInsert(char *source, size_t index, const char *what);
+char *StrTrim(char *szText, const char *szTrimChars);
+
+wchar_t *StrReplace(wchar_t *source, const wchar_t *what, const wchar_t *withWhat);
+wchar_t *StrCopy(wchar_t *source, size_t index, const wchar_t *what, size_t count);
+wchar_t *StrDelete(wchar_t *source, size_t index, size_t count);
+wchar_t *StrInsert(wchar_t *source, size_t index, const wchar_t *what);
+wchar_t *StrTrim(wchar_t *szText, const wchar_t *szTrimChars);
+
+void CreateDirectories(char *szPath);
+void RemoveDirectories(char *szPath);
+int DirectoryExists(char *szPath);
+
+void CreateDirectories(wchar_t *szPath);
+void RemoveDirectories(wchar_t *szPath);
+int DirectoryExists(wchar_t *szPath);
+
+int GetStringFromDatabase(char *szSettingName, const char *szError, char *szResult, size_t size);
+int WriteStringToDatabase(char *szSettingName, const char *szValue);
+
+int GetStringFromDatabase(char *szSettingName, const wchar_t *szError, wchar_t *szResult, size_t size);
+int WriteStringToDatabase(char *szSettingName, const wchar_t *szValue);
+
+__inline static wchar_t *Utils_ReplaceVarsW(wchar_t *szData) {
+ REPLACEVARSDATA dat = {0};
+ dat.cbSize = sizeof(dat);
+ dat.dwFlags = RVF_UNICODE;
+ return (wchar_t *) CallService(MS_UTILS_REPLACEVARS, (WPARAM) szData, (LPARAM) &dat);
+}
+
+#endif
\ No newline at end of file |