diff options
author | Gluzskiy Alexandr <sss123next@gmail.com> | 2010-02-15 05:51:01 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@gmail.com> | 2010-02-15 05:51:01 +0300 |
commit | 7fd9fe181150f166a098eaf4e006f878c28cb770 (patch) | |
tree | 093af9d26a08e6bac60112a9c5f2f870ddef0fe8 /stringlist.h | |
parent | 6f32ef233b95d78efb905c97081193a2a454590e (diff) |
sort
Diffstat (limited to 'stringlist.h')
-rw-r--r-- | stringlist.h | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/stringlist.h b/stringlist.h new file mode 100644 index 0000000..ec10883 --- /dev/null +++ b/stringlist.h @@ -0,0 +1,81 @@ +/*
+
+"Spam Filter"-Plugin for Miranda IM
+
+Copyright 2003-2006 Heiko Herkenrath
+
+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 ("SpamFilter-License.txt"); if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#ifndef SF_STRINGLIST_H__
+#define SF_STRINGLIST_H__ 1
+
+
+// -- Structs
+typedef struct {
+ UINT uCount; // protected by csListAccess
+ WCHAR** papszList; // protected by csListAccess
+ CRITICAL_SECTION csListAccess;
+} STRINGLIST, *LPSTRINGLIST;
+
+// -- Defines
+#define SL_MIN_POS 0
+#define SL_INVALID_POS (-1)
+
+// -- Prototypes
+LPSTRINGLIST SLNewList(void);
+void SLFreeList(LPSTRINGLIST psl);
+BOOL SLClearList(LPSTRINGLIST psl);
+BOOL SLMergeList(LPSTRINGLIST pslDest, LPSTRINGLIST pslFrom);
+
+int SLGetMaxPos(LPSTRINGLIST psl);
+int SLGetSize(LPSTRINGLIST psl, BOOL bAlsoTerminatingZeros); // character count size
+int SLGetItemCount(LPSTRINGLIST psl);
+WCHAR* SLGetItem(LPSTRINGLIST psl, int iPos);
+BOOL SLIsValid(LPSTRINGLIST psl, int iPos);
+
+BOOL SLMoveItem(LPSTRINGLIST psl, int iOldPos, int iNewPos, BOOL bOnlySwitch);
+BOOL SLItemPrintf(LPSTRINGLIST psl, int iPos, int cchArgMaxLen, ...);
+BOOL SLSetItemLength(LPSTRINGLIST psl, int iPos, int cchLength);
+BOOL SLChangeItem(LPSTRINGLIST psl, int iPos, WCHAR* pszNewStr, BOOL bDoAppend);
+
+BOOL SLDeleteItem(LPSTRINGLIST psl, int iPos);
+BOOL SLDeleteItems(LPSTRINGLIST psl, int iPosFirst, int iPosLast);
+
+BOOL SLAddItems(LPSTRINGLIST psl, const WCHAR* apszNewItems[], UINT uNewItemsCount);
+int SLAddItem(LPSTRINGLIST psl, const WCHAR* pszNewItem);
+int SLAddItemPair(LPSTRINGLIST psl, const WCHAR* pszNewItem1, const WCHAR* pszNewItem2);
+int SLPrepareItem(LPSTRINGLIST psl, int cchLength);
+
+BOOL SLIsItem(LPSTRINGLIST psl, const WCHAR* pszItem, BOOL bCaseSensitive);
+int SLFindItem(LPSTRINGLIST psl, const WCHAR* pszItem, BOOL bCaseSensitive, int iStartPos);
+
+WCHAR* SLConvertToString(LPSTRINGLIST psl, const WCHAR* pszSeparator, BOOL bAlsoDoFirst, BOOL bAlsoDoLast, int* piSize);
+void SLFreeReturn(void* pszPntr);
+BOOL SLConvertToStringBuf(LPSTRINGLIST psl, WCHAR* pszOutput, int cchMaxSize, const WCHAR* pszSeparator, BOOL bAlsoDoFirst, BOOL bAlsoDoLast);
+BOOL SLConvertFromString(LPSTRINGLIST psl, const WCHAR* pszString, int cchSize, const WCHAR* pszSeparator, BOOL bIgnoreEmptyItems);
+
+BOOL SLLoadFromFile(LPSTRINGLIST psl, const WCHAR* pszSearchPath);
+BOOL SLSaveToFile(LPSTRINGLIST psl, const WCHAR* pszFileName);
+BOOL SLLoadFromIniFile(LPSTRINGLIST psl, const WCHAR* pszSearchPath, const WCHAR* pszSection, const WCHAR* pszSettingPrefix);
+BOOL SLSaveToIniFile(LPSTRINGLIST psl, const WCHAR* pszFileName, const WCHAR* pszSection, const WCHAR* pszSettingPrefix);
+
+BOOL SLRetrieveFromListBoxCtrl(LPSTRINGLIST psl, HWND hwndListBox);
+BOOL SLAssignToListBoxCtrl(LPSTRINGLIST psl, HWND hwndListBox);
+
+BOOL SLBlockList(LPSTRINGLIST psl);
+BOOL SLUnBlockList(LPSTRINGLIST psl);
+
+#endif // SF_STRINGLIST_H__
\ No newline at end of file |