summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/ex_import
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-28 14:55:49 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-28 14:55:49 +0000
commit056d2be888a4235a109a123b7b2a715aa3ff72ba (patch)
treeb1956081bb951f44ced81414db7656a832613b71 /plugins/UserInfoEx/src/ex_import
parent5f03619d3bbda7a617f50ded2698cffc434dd525 (diff)
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@4225 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/ex_import')
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp22
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactBase.h42
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp64
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactXML.h34
-rw-r--r--plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp10
-rw-r--r--plugins/UserInfoEx/src/ex_import/dlg_ExImModules.h2
-rw-r--r--plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp16
-rw-r--r--plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.h4
-rw-r--r--plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp18
-rw-r--r--plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.h12
-rw-r--r--plugins/UserInfoEx/src/ex_import/mir_rfcCodecs.h4
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp20
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImINI.h4
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp56
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h42
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp14
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImXML.h14
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp8
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImport.h2
19 files changed, 194 insertions, 194 deletions
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
index a03ae1b855..16cd75e6d7 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
@@ -88,10 +88,10 @@ CExImContactBase::~CExImContactBase()
* param: hContact - handle to contact whose information to read
* return: TRUE if successful or FALSE otherwise
**/
-BOOLEAN CExImContactBase::fromDB(HANDLE hContact)
+BYTE CExImContactBase::fromDB(HANDLE hContact)
{
- BOOLEAN ret = FALSE;
- BOOLEAN isChatRoom = FALSE;
+ BYTE ret = FALSE;
+ BYTE isChatRoom = FALSE;
LPSTR pszProto;
LPCSTR uidSetting;
DBVARIANT dbv;
@@ -174,7 +174,7 @@ BOOLEAN CExImContactBase::fromDB(HANDLE hContact)
* param: row - the rows data
* return: TRUE if successful or FALSE otherwise
**/
-BOOLEAN CExImContactBase::fromIni(LPSTR& row)
+BYTE CExImContactBase::fromIni(LPSTR& row)
{
LPSTR p1, p2 = NULL;
LPSTR pszUIDValue, pszUIDSetting, pszProto = NULL;
@@ -307,7 +307,7 @@ HANDLE CExImContactBase::toDB()
* param: file - pointer to the opened file
* return: nothing
**/
-VOID CExImContactBase::toIni(FILE* file, int modCount)
+void CExImContactBase::toIni(FILE* file, int modCount)
{
// getting dbeditor++ NickFromHContact(hContact)
static char name[512] = "";
@@ -362,7 +362,7 @@ VOID CExImContactBase::toIni(FILE* file, int modCount)
}
}
-BOOLEAN CExImContactBase::compareUID(DBVARIANT *dbv)
+BYTE CExImContactBase::compareUID(DBVARIANT *dbv)
{
DWORD hash = 0;
switch (dbv->type) {
@@ -409,7 +409,7 @@ BOOLEAN CExImContactBase::compareUID(DBVARIANT *dbv)
return FALSE;
}
-LPSTR CExImContactBase::uid2String(BOOLEAN bPrependType)
+LPSTR CExImContactBase::uid2String(BYTE bPrependType)
{
CHAR szUID[MAX_PATH];
LPSTR ptr = szUID;
@@ -497,16 +497,16 @@ LPSTR CExImContactBase::uid2String(BOOLEAN bPrependType)
return mir_strdup(szUID);
}
-BOOLEAN CExImContactBase::isMeta() const
+BYTE CExImContactBase::isMeta() const
{
return DB::Module::IsMeta(_pszProto);
}
-BOOLEAN CExImContactBase::isHandle(HANDLE hContact)
+BYTE CExImContactBase::isHandle(HANDLE hContact)
{
LPCSTR pszProto;
DBVARIANT dbv;
- BOOLEAN isEqual = FALSE;
+ BYTE isEqual = FALSE;
// owner contact ?
if (!_pszProto) return hContact == NULL;
@@ -530,7 +530,7 @@ BOOLEAN CExImContactBase::isHandle(HANDLE hContact)
if (dbv.type == DBVT_UTF8 && dbv.pszVal && !mir_stricmp(dbv.pszVal,_pszNick)) {
LPTSTR ptszNick = mir_utf8decodeT(_pszNick);
LPTSTR ptszProto = mir_a2t(_pszProto);
- INT ans = MsgBox(NULL, MB_ICONQUESTION|MB_YESNO, LPGENT("Question"), LPGENT("contact identificaion"),
+ int ans = MsgBox(NULL, MB_ICONQUESTION|MB_YESNO, LPGENT("Question"), LPGENT("contact identificaion"),
LPGENT("The contact %s(%s) has no unique id in the vCard,\nbut there is a contact in your clist with the same nick and protocol.\nDo you wish to use this contact?"),
ptszNick, ptszProto);
MIR_FREE(ptszNick);
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h
index c93f7c838b..377b341c3e 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h
@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
HANDLE CListFindGroup(LPCSTR pszGroup);
class CExImContactBase {
- BOOLEAN compareUID(DBVARIANT *dbv);
+ BYTE compareUID(DBVARIANT *dbv);
protected:
LPSTR _pszNick; // utf8 encoded
@@ -37,7 +37,7 @@ protected:
DWORD _dbvUIDHash;
DBVARIANT _dbvUID;
HANDLE _hContact;
- BOOLEAN _isNewContact; // is this contact a new one?
+ BYTE _isNewContact; // is this contact a new one?
HANDLE findHandle();
@@ -54,22 +54,22 @@ public:
__inline DBVARIANT& uid() { return _dbvUID; }
__inline HANDLE handle() const { return _hContact; }
- __inline VOID disp(LPCSTR val) { _pszDisp = val ? mir_strdup(val): NULL; }
- __inline VOID group(LPCSTR val) { _pszGroup = val ? mir_strdup(val): NULL; }
- __inline VOID nick(LPCSTR val) { _pszNick = val ? mir_strdup(val): NULL; }
- __inline VOID proto(LPCSTR val) { _pszProto = val ? mir_strdup(val): NULL; }
- __inline VOID ampro(LPCSTR val) { _pszAMPro = val ? mir_strdup(val): NULL; }
- __inline VOID uidk(LPCSTR val) { _pszUIDKey = val ? mir_strdup(val): NULL; }
- __inline VOID uid(BYTE val) { _dbvUID.type = DBVT_BYTE; _dbvUID.bVal = val; }
- __inline VOID uid(WORD val) { _dbvUID.type = DBVT_WORD; _dbvUID.wVal = val; }
- __inline VOID uid(DWORD val) { _dbvUID.type = DBVT_DWORD; _dbvUID.dVal = val; }
- __inline VOID uidn(PBYTE val, DWORD len) { _dbvUID.type = DBVT_BLOB; _dbvUID.pbVal= val; _dbvUID.cpbVal = (WORD)len; }
- __inline VOID uida(LPCSTR val)
+ __inline void disp(LPCSTR val) { _pszDisp = val ? mir_strdup(val): NULL; }
+ __inline void group(LPCSTR val) { _pszGroup = val ? mir_strdup(val): NULL; }
+ __inline void nick(LPCSTR val) { _pszNick = val ? mir_strdup(val): NULL; }
+ __inline void proto(LPCSTR val) { _pszProto = val ? mir_strdup(val): NULL; }
+ __inline void ampro(LPCSTR val) { _pszAMPro = val ? mir_strdup(val): NULL; }
+ __inline void uidk(LPCSTR val) { _pszUIDKey = val ? mir_strdup(val): NULL; }
+ __inline void uid(BYTE val) { _dbvUID.type = DBVT_BYTE; _dbvUID.bVal = val; }
+ __inline void uid(WORD val) { _dbvUID.type = DBVT_WORD; _dbvUID.wVal = val; }
+ __inline void uid(DWORD val) { _dbvUID.type = DBVT_DWORD; _dbvUID.dVal = val; }
+ __inline void uidn(PBYTE val, DWORD len) { _dbvUID.type = DBVT_BLOB; _dbvUID.pbVal= val; _dbvUID.cpbVal = (WORD)len; }
+ __inline void uida(LPCSTR val)
{
_dbvUID.type = (_dbvUID.pszVal = mir_utf8decodeA(val))? DBVT_ASCIIZ : DBVT_DELETED;
_dbvUIDHash = hashSetting_M2(_dbvUID.pszVal);
}
- __inline VOID uidu(LPCSTR val)
+ __inline void uidu(LPCSTR val)
{
_dbvUID.type = (_dbvUID.pszVal = mir_strdup(val))? DBVT_UTF8 : DBVT_DELETED;
LPWSTR temp = mir_utf8decodeW(val);
@@ -77,16 +77,16 @@ public:
mir_free(temp);
}
- BOOLEAN isHandle(HANDLE hContact);
- BOOLEAN isMeta() const;
+ BYTE isHandle(HANDLE hContact);
+ BYTE isMeta() const;
- LPSTR uid2String(BOOLEAN bPrependType);
+ LPSTR uid2String(BYTE bPrependType);
- BOOLEAN fromDB(HANDLE hContact);
- BOOLEAN fromIni(LPSTR& row);
+ BYTE fromDB(HANDLE hContact);
+ BYTE fromIni(LPSTR& row);
HANDLE toDB();
- VOID toIni(FILE* file, int modCount);
+ void toIni(FILE* file, int modCount);
- BOOLEAN operator = (HANDLE hContact) { return fromDB(hContact); }
+ BYTE operator = (HANDLE hContact) { return fromDB(hContact); }
};
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
index 1f726d3181..1fe64c96bf 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
@@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* item2 - item to compare
* return: the difference
**/
-static INT SortProc(const LPDWORD item1, const LPDWORD item2)
+static int SortProc(const LPDWORD item1, const LPDWORD item2)
{
return *item1 - *item2;
}
@@ -60,7 +60,7 @@ CExImContactXML::CExImContactXML(CFileXml * pXmlFile)
* param: pszKey - the settings key to check
* return: TRUE if pszKey is a valid contact information
**/
-BOOLEAN CExImContactXML::IsContactInfo(LPCSTR pszKey)
+BYTE CExImContactXML::IsContactInfo(LPCSTR pszKey)
{
// This is a sorted list of all hashvalues of the contact information.
// This is the same as the szCiKey[] array below but sorted
@@ -81,7 +81,7 @@ BOOLEAN CExImContactXML::IsContactInfo(LPCSTR pszKey)
char buf[MAXSETTING];
// convert to hash and make bsearch as it is much faster then working with strings
const DWORD dwHash = hashSetting(_strlwr(mir_strncpy(buf, pszKey, SIZEOF(buf))));
- return bsearch(&dwHash, dwCiHash, SIZEOF(dwCiHash), sizeof(dwCiHash[0]), (INT (*)(const VOID*, const VOID*))SortProc) != NULL;
+ return bsearch(&dwHash, dwCiHash, SIZEOF(dwCiHash), sizeof(dwCiHash[0]), (int (*)(const void*, const void*))SortProc) != NULL;
}
return FALSE;
/*
@@ -117,7 +117,7 @@ BOOLEAN CExImContactXML::IsContactInfo(LPCSTR pszKey)
hash[i] = hashSetting(_strlwr((char*)buf));
}
qsort(hash, SIZEOF(szCiKey), sizeof(hash[0]),
- (INT (*)(const VOID*, const VOID*))SortProc);
+ (int (*)(const void*, const void*))SortProc);
FILE* fil = fopen("D:\\temp\\id.txt", "wt");
for (i = 0; i < SIZEOF(szCiKey); i++) {
@@ -185,11 +185,11 @@ TiXmlElement* CExImContactXML::CreateXmlElement()
* param: none
* return: ERROR_OK on success or any other on failure
**/
-INT CExImContactXML::ExportContact(DB::CEnumList* pModules)
+int CExImContactXML::ExportContact(DB::CEnumList* pModules)
{
if (_pXmlFile->_wExport & EXPORT_DATA) {
if (pModules) {
- INT i;
+ int i;
LPSTR p;
for (i = 0; i < pModules->getCount(); i++) {
@@ -217,7 +217,7 @@ INT CExImContactXML::ExportContact(DB::CEnumList* pModules)
* param: none
* return: ERROR_OK on success or any other on failure
**/
-INT CExImContactXML::ExportSubContact(CExImContactXML *vMetaContact, DB::CEnumList* pModules)
+int CExImContactXML::ExportSubContact(CExImContactXML *vMetaContact, DB::CEnumList* pModules)
{
// create xmlNode
if (!CreateXmlElement())
@@ -243,7 +243,7 @@ INT CExImContactXML::ExportSubContact(CExImContactXML *vMetaContact, DB::CEnumLi
* pModules - list of modules to export for each contact
* return: ERROR_OK on success or any other on failure
**/
-INT CExImContactXML::Export(FILE *xmlfile, DB::CEnumList* pModules)
+int CExImContactXML::Export(FILE *xmlfile, DB::CEnumList* pModules)
{
if (!xmlfile)
{
@@ -265,10 +265,10 @@ INT CExImContactXML::Export(FILE *xmlfile, DB::CEnumList* pModules)
{
CExImContactXML vContact(_pXmlFile);
- const INT cnt = DB::MetaContact::SubCount(_hContact);
- const INT def = DB::MetaContact::SubDefNum(_hContact);
+ const int cnt = DB::MetaContact::SubCount(_hContact);
+ const int def = DB::MetaContact::SubDefNum(_hContact);
HANDLE hSubContact = DB::MetaContact::Sub(_hContact, def);
- INT i;
+ int i;
// export default subcontact
if (hSubContact && vContact.fromDB(hSubContact))
@@ -313,14 +313,14 @@ INT CExImContactXML::Export(FILE *xmlfile, DB::CEnumList* pModules)
* params: pszModule - the module which is to export
* return: ERROR_OK on success or any other on failure
**/
-INT CExImContactXML::ExportModule(LPCSTR pszModule)
+int CExImContactXML::ExportModule(LPCSTR pszModule)
{
DB::CEnumList Settings;
if (!pszModule || !*pszModule) {
return ERROR_INVALID_PARAMS;
}
if (!Settings.EnumSettings(_hContact, pszModule)) {
- INT i;
+ int i;
TiXmlElement *xmod;
xmod = new TiXmlElement(XKEY_MOD);
if (!xmod) {
@@ -348,7 +348,7 @@ INT CExImContactXML::ExportModule(LPCSTR pszModule)
* pszSetting - the setting which is to export
* return: pointer to the added element
**/
-INT CExImContactXML::ExportSetting(TiXmlElement *xmlModule, LPCSTR pszModule, LPCSTR pszSetting)
+int CExImContactXML::ExportSetting(TiXmlElement *xmlModule, LPCSTR pszModule, LPCSTR pszSetting)
{
DBVARIANT dbv;
TiXmlElement *xmlEntry = NULL;
@@ -458,7 +458,7 @@ INT CExImContactXML::ExportSetting(TiXmlElement *xmlModule, LPCSTR pszModule, LP
* hContact - handle of the contact whose event chain is to export
* return: TRUE on success, FALSE otherwise
**/
-BOOLEAN CExImContactXML::ExportEvents()
+BYTE CExImContactXML::ExportEvents()
{
DBEVENTINFO dbei;
HANDLE hDbEvent;
@@ -551,7 +551,7 @@ BOOLEAN CExImContactXML::ExportEvents()
* params: xmlContact - the contact, who is the owner of the keys to count
* return: nothing
**/
-VOID CExImContactXML::CountKeys(DWORD &numSettings, DWORD &numEvents)
+void CExImContactXML::CountKeys(DWORD &numSettings, DWORD &numEvents)
{
TiXmlNode *xmod, *xkey;
@@ -577,7 +577,7 @@ VOID CExImContactXML::CountKeys(DWORD &numSettings, DWORD &numEvents)
* param: xContact - TiXmlElement representing a contact
* return: ERROR_OK if successful or any other error number otherwise
**/
-INT CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact)
+int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact)
{
if (xContact == NULL) return ERROR_INVALID_PARAMS;
@@ -692,7 +692,7 @@ INT CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact)
* param: none
* return: ERROR_OK on success or any other error number otherwise
**/
-INT CExImContactXML::ImportContact()
+int CExImContactXML::ImportContact()
{
TiXmlNode *xmod;
@@ -717,7 +717,7 @@ INT CExImContactXML::ImportContact()
if (ImportModule(xmod) == ERROR_ABORTED) {
// ask to delete new incomplete contact
if (_isNewContact && _hContact != NULL) {
- INT result = MsgBox(NULL, MB_YESNO|MB_ICONWARNING,
+ int result = MsgBox(NULL, MB_YESNO|MB_ICONWARNING,
LPGENT("Question"),
LPGENT("Importing a new contact was aborted!"),
LPGENT("You aborted import of a new contact.\nSome information may be missing for this contact.\n\nDo you want to delete the incomplete contact?"));
@@ -743,9 +743,9 @@ INT CExImContactXML::ImportContact()
* param: none
* return: ERROR_OK on success or any other error number otherwise
**/
-INT CExImContactXML::ImportNormalContact()
+int CExImContactXML::ImportNormalContact()
{
- INT err = ImportContact();
+ int err = ImportContact();
// remove contact from a metacontact
if (err == ERROR_OK && CallService(MS_MC_GETMETACONTACT, (WPARAM)_hContact, NULL)) {
@@ -763,9 +763,9 @@ INT CExImContactXML::ImportNormalContact()
* param: TRUE = keepMetaSubContact
* return: ERROR_OK on success or any other error number otherwise
**/
-INT CExImContactXML::Import(BOOLEAN keepMetaSubContact)
+int CExImContactXML::Import(BYTE keepMetaSubContact)
{
- INT result;
+ int result;
TiXmlElement *xContact = _xmlNode->FirstChildElement("CONTACT");
// xml contact contains subcontacts?
@@ -842,9 +842,9 @@ INT CExImContactXML::Import(BOOLEAN keepMetaSubContact)
* param: pMetaContact - the meta contact to add this one to
* return:
**/
-INT CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact)
+int CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact)
{
- INT err = ImportContact();
+ int err = ImportContact();
// abort here if contact was not imported correctly
if (err != ERROR_OK) return err;
@@ -858,7 +858,7 @@ INT CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact)
if (_isNewContact && _hContact != NULL) {
LPTSTR ptszNick = mir_utf8decodeT(_pszNick);
LPTSTR ptszMetaNick = mir_utf8decodeT(pMetaContact->_pszNick);
- INT result = MsgBox(NULL, MB_YESNO|MB_ICONWARNING,
+ int result = MsgBox(NULL, MB_YESNO|MB_ICONWARNING,
LPGENT("Question"),
LPGENT("Importing a new meta subcontact failed!"),
LPGENT("The newly created MetaSubContact '%s'\ncould not be added to MetaContact '%s'!\n\nDo you want to delete this contact?"),
@@ -885,13 +885,13 @@ INT CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact)
* stat - structure used to collect some statistics
* return: ERROR_OK on success or one other element of ImportError to tell the type of failure
**/
-INT CExImContactXML::ImportModule(TiXmlNode* xmlModule)
+int CExImContactXML::ImportModule(TiXmlNode* xmlModule)
{
TiXmlElement *xMod;
TiXmlElement *xKey;
LPCSTR pszModule;
- BOOLEAN isProtoModule;
- BOOLEAN isMetaModule;
+ BYTE isProtoModule;
+ BYTE isMetaModule;
// check if parent is really a module
if (!xmlModule || mir_stricmp(xmlModule->Value(), XKEY_MOD))
@@ -945,7 +945,7 @@ INT CExImContactXML::ImportModule(TiXmlNode* xmlModule)
}
// import event
else if (!mir_stricmp(xKey->Value(), XKEY_EVT)) {
- INT error = ImportEvent(pszModule, xKey->ToElement());
+ int error = ImportEvent(pszModule, xKey->ToElement());
switch (error) {
case ERROR_OK:
_pXmlFile->_numEventsDone++;
@@ -969,7 +969,7 @@ INT CExImContactXML::ImportModule(TiXmlNode* xmlModule)
* xmlEntry - xmlnode representing the setting to import
* return: ERROR_OK on success or one other element of ImportError to tell the type of failure
**/
-INT CExImContactXML::ImportSetting(LPCSTR pszModule, TiXmlElement *xmlEntry)
+int CExImContactXML::ImportSetting(LPCSTR pszModule, TiXmlElement *xmlEntry)
{
DBCONTACTWRITESETTING cws = {0};
TiXmlText* xval;
@@ -1055,7 +1055,7 @@ INT CExImContactXML::ImportSetting(LPCSTR pszModule, TiXmlElement *xmlEntry)
* xmlEvent - xmlnode representing the event to import
* return: ERROR_OK on success or one other element of ImportError to tell the type of failure
**/
-INT CExImContactXML::ImportEvent(LPCSTR pszModule, TiXmlElement *xmlEvent)
+int CExImContactXML::ImportEvent(LPCSTR pszModule, TiXmlElement *xmlEvent)
{
DBEVENTINFO dbei;
TiXmlText *xmlValue;
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.h b/plugins/UserInfoEx/src/ex_import/classExImContactXML.h
index 512ab9b08e..b88d1b8097 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.h
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.h
@@ -51,37 +51,37 @@ class CExImContactXML : public CExImContactBase {
TiXmlElement* _xmlNode; // xmlnode with contact information
HANDLE _hEvent;
- BOOLEAN IsContactInfo(LPCSTR pszKey);
+ BYTE IsContactInfo(LPCSTR pszKey);
// private importing methods
- INT ImportModule(TiXmlNode* xmlModule);
- INT ImportSetting(LPCSTR pszModule, TiXmlElement *xmlEntry);
- INT ImportEvent(LPCSTR pszModule, TiXmlElement *xmlEvent);
- INT ImportContact();
- INT ImportNormalContact();
- INT ImportMetaSubContact(CExImContactXML * pMetaContact);
- VOID CountKeys(DWORD &numSettings, DWORD &numEvents);
+ int ImportModule(TiXmlNode* xmlModule);
+ int ImportSetting(LPCSTR pszModule, TiXmlElement *xmlEntry);
+ int ImportEvent(LPCSTR pszModule, TiXmlElement *xmlEvent);
+ int ImportContact();
+ int ImportNormalContact();
+ int ImportMetaSubContact(CExImContactXML * pMetaContact);
+ void CountKeys(DWORD &numSettings, DWORD &numEvents);
// private exporting methods
- INT ExportModule(LPCSTR pszModule);
- INT ExportSetting(TiXmlElement *xmlModule, LPCSTR pszModule, LPCSTR pszSetting);
- BOOLEAN ExportEvents();
+ int ExportModule(LPCSTR pszModule);
+ int ExportSetting(TiXmlElement *xmlModule, LPCSTR pszModule, LPCSTR pszSetting);
+ BYTE ExportEvents();
- INT ExportContact(DB::CEnumList* pModules);
- INT ExportSubContact(CExImContactXML *vMetaContact, DB::CEnumList* pModules);
+ int ExportContact(DB::CEnumList* pModules);
+ int ExportSubContact(CExImContactXML *vMetaContact, DB::CEnumList* pModules);
public:
CExImContactXML(CFileXml * pXmlFile);
// exporting stuff
TiXmlElement* CreateXmlElement();
- INT Export(FILE *xmlfile, DB::CEnumList* pModules);
+ int Export(FILE *xmlfile, DB::CEnumList* pModules);
// importing stuff
- INT LoadXmlElemnt(TiXmlElement *xContact);
- INT Import(BOOLEAN keepMetaSubContact = FALSE);
+ int LoadXmlElemnt(TiXmlElement *xContact);
+ int Import(BYTE keepMetaSubContact = FALSE);
- BOOLEAN operator = (TiXmlElement* xmlContact) {
+ BYTE operator = (TiXmlElement* xmlContact) {
return LoadXmlElemnt(xmlContact) == ERROR_OK;
}
};
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp
index 81c15c9e8a..1512c7dfb9 100644
--- a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp
+++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp
@@ -111,7 +111,7 @@ HTREEITEM ExportTree_FindItem(HWND hTree, HTREEITEM hParent, LPSTR pszText)
* bState - 0-hide checkbox/1-unchecked/2-checked
* return: return handle to added treeitem
**/
-HTREEITEM ExportTree_AddItem(HWND hTree, HTREEITEM hParent, LPSTR pszDesc, BOOLEAN bUseImages, BYTE bState)
+HTREEITEM ExportTree_AddItem(HWND hTree, HTREEITEM hParent, LPSTR pszDesc, BYTE bUseImages, BYTE bState)
{
TVINSERTSTRUCTA tvii;
HTREEITEM hItem = NULL;
@@ -147,7 +147,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar
case WM_INITDIALOG:
{
HWND hTree;
- BOOLEAN bImagesLoaded = 0;
+ BYTE bImagesLoaded = 0;
// get tree handle and set treeview style
if (!(hTree = GetDlgItem(hDlg, IDC_TREE))) break;
@@ -171,7 +171,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar
{ ICO_BTN_EXPORT, BM_SETIMAGE, IDOK },
{ ICO_BTN_CANCEL, BM_SETIMAGE, IDCANCEL }
};
- const INT numIconsToSet = DB::Setting::GetByte(SET_ICONS_BUTTONS, 1) ? SIZEOF(idIcon) : 2;
+ const int numIconsToSet = DB::Setting::GetByte(SET_ICONS_BUTTONS, 1) ? SIZEOF(idIcon) : 2;
IcoLib_SetCtrlIcons(hDlg, idIcon, numIconsToSet);
// create imagelist for treeview
@@ -280,7 +280,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar
if (!Modules.EnumModules()) // init Modul list
{
- INT i;
+ int i;
LPSTR p;
for (i = 0; i < Modules.getCount(); i++)
@@ -442,7 +442,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar
* hParent - handle to a window which should act as the parent of the created dialog
* return: 0 if user pressed ok, 1 on cancel
**/
-INT DlgExImModules_SelectModulesToExport(lpExImParam ExImContact, DB::CEnumList* pModules, HWND hParent)
+int DlgExImModules_SelectModulesToExport(lpExImParam ExImContact, DB::CEnumList* pModules, HWND hParent)
{
EXPORTDATA dat;
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.h b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.h
index 5b2ce8b2a7..74e64a1e75 100644
--- a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.h
+++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.h
@@ -22,6 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _DLG_EXIMMODULES_H_
#define _DLG_EXIMMODULES_H_
-INT DlgExImModules_SelectModulesToExport(lpExImParam ExImContact, DB::CEnumList* pModules, HWND hParent);
+int DlgExImModules_SelectModulesToExport(lpExImParam ExImContact, DB::CEnumList* pModules, HWND hParent);
#endif /* _DLG_EXIMMODULES_H_ */
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp
index 2621e83e9c..9a84faf5c5 100644
--- a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp
+++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp
@@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* @param nothing
* @return nothing
**/
-static VOID InitAlteredPlacesBar()
+static void InitAlteredPlacesBar()
{
// do not try it on a win9x Box
if (IsWinVer2000Plus())
@@ -92,7 +92,7 @@ static VOID InitAlteredPlacesBar()
* params: nothing
* return: nothing
**/
-static VOID ResetAlteredPlaceBars()
+static void ResetAlteredPlaceBars()
{
// make sure not to call the following on a Win9x Box
if (IsWinVer2000Plus())
@@ -115,7 +115,7 @@ static LRESULT CALLBACK PlacesBarSubclassProc(HWND hWnd, UINT uMsg, WPARAM wPara
if (uMsg == TB_ADDBUTTONS) {
TBBUTTON *tbb = (TBBUTTON *)lParam;
TCHAR szBtnText[MAX_PATH];
- INT iString;
+ int iString;
HWND hWndToolTip;
if (tbb) {
@@ -208,7 +208,7 @@ static LRESULT CALLBACK OpenSaveFileDialogHook(HWND hDlg, UINT uMsg, WPARAM wPar
* pszInitialDir - buffer to store the initial dir to (size must be MAX_PATH)
* return: nothing
**/
-static VOID GetInitialDir(LPSTR pszInitialDir)
+static void GetInitialDir(LPSTR pszInitialDir)
{
CHAR szRelative[MAX_PATH];
@@ -235,7 +235,7 @@ static VOID GetInitialDir(LPSTR pszInitialDir)
* pszInitialDir - buffer to store the initial dir to (size must be MAX_PATH)
* return: nothing
**/
-static VOID SaveInitialDir(LPSTR pszInitialDir)
+static void SaveInitialDir(LPSTR pszInitialDir)
{
CHAR szRelative[MAX_PATH];
LPSTR p;
@@ -261,7 +261,7 @@ static VOID SaveInitialDir(LPSTR pszInitialDir)
* pszFile - this is the buffer to store the file to (size must be MAX_PATH)
* return: nothing
**/
-static VOID InitOpenFileNameStruct(OPENFILENAMEA *pofn, HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszInitialDir, LPSTR pszFile)
+static void InitOpenFileNameStruct(OPENFILENAMEA *pofn, HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszInitialDir, LPSTR pszFile)
{
ZeroMemory(pofn, sizeof(OPENFILENAME));
@@ -298,7 +298,7 @@ static VOID InitOpenFileNameStruct(OPENFILENAMEA *pofn, HWND hWndParent, LPCSTR
* pszFile - this is the buffer to store the file to (size must be MAX_PATH)
* return: -1 on error/abort or filter index otherwise
**/
-INT DlgExIm_OpenFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszFile)
+int DlgExIm_OpenFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszFile)
{
OPENFILENAMEA ofn;
CHAR szInitialDir[MAX_PATH];
@@ -323,7 +323,7 @@ INT DlgExIm_OpenFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPS
* pszFile - this is the buffer to store the file to (size must be MAX_PATH)
* return: -1 on error/abort or filter index otherwise
**/
-INT DlgExIm_SaveFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszFile)
+int DlgExIm_SaveFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszFile)
{
OPENFILENAMEA ofn;
CHAR szInitialDir[MAX_PATH];
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.h b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.h
index 338e64ac23..8ba9117bbb 100644
--- a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.h
+++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.h
@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma once
-INT DlgExIm_OpenFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszFile);
-INT DlgExIm_SaveFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszFile);
+int DlgExIm_OpenFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszFile);
+int DlgExIm_SaveFileName(HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszFile);
#endif /* _DLG_EXIMOPENSAVEFFILE_H_ */
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp
index 4a73d11182..e3a1ecdf8d 100644
--- a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp
+++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp
@@ -42,7 +42,7 @@ INT_PTR CALLBACK DlgProcProgress(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPar
{ ICO_DLG_IMPORT, STM_SETIMAGE, ICO_DLGLOGO },
{ ICO_BTN_CANCEL, BM_SETIMAGE, IDCANCEL }
};
- const INT numIconsToSet = DB::Setting::GetByte(SET_ICONS_BUTTONS, 1) ? SIZEOF(idIcon) : 2;
+ const int numIconsToSet = DB::Setting::GetByte(SET_ICONS_BUTTONS, 1) ? SIZEOF(idIcon) : 2;
IcoLib_SetCtrlIcons(hDlg, idIcon, numIconsToSet);
TranslateDialogDefault(hDlg);
@@ -114,7 +114,7 @@ CProgress::~CProgress()
* params: numContacts - the number of contacts
* return: nothing
**/
-VOID CProgress::SetContactCount(DWORD numContacts)
+void CProgress::SetContactCount(DWORD numContacts)
{
if (_hDlg) {
HWND hProgress = GetDlgItem(_hDlg, IDC_PROGRESS2);
@@ -130,7 +130,7 @@ VOID CProgress::SetContactCount(DWORD numContacts)
* params: numSettings - the number of settings & events
* return: nothing
**/
-VOID CProgress::SetSettingsCount(DWORD numSettings)
+void CProgress::SetSettingsCount(DWORD numSettings)
{
if (_hDlg) {
HWND hProgress = GetDlgItem(_hDlg, IDC_PROGRESS);
@@ -146,7 +146,7 @@ VOID CProgress::SetSettingsCount(DWORD numSettings)
* params: none
* return: nothing
**/
-VOID CProgress::Hide()
+void CProgress::Hide()
{
ShowWindow(_hDlg, SW_HIDE);
}
@@ -158,7 +158,7 @@ VOID CProgress::Hide()
* params: nothing
* return: FALSE if user pressed cancel, TRUE otherwise
**/
-BOOLEAN CProgress::Update()
+BYTE CProgress::Update()
{
MSG msg;
@@ -185,7 +185,7 @@ BOOLEAN CProgress::Update()
* params: pszFormat - the text to display for the contact
* return: FALSE if user pressed cancel, TRUE otherwise
**/
-BOOLEAN CProgress::UpdateContact(LPCTSTR pszFormat, ...)
+BYTE CProgress::UpdateContact(LPCTSTR pszFormat, ...)
{
if (_hDlg != NULL) {
HWND hProg = GetDlgItem(_hDlg, IDC_PROGRESS2);
@@ -198,7 +198,7 @@ BOOLEAN CProgress::UpdateContact(LPCTSTR pszFormat, ...)
va_end(vl);
SetDlgItemText(_hDlg, TXT_CONTACT, buf);
}
- SendMessage(hProg, PBM_SETPOS, (INT)SendMessage(hProg, PBM_GETPOS, 0, 0) + 1, 0);
+ SendMessage(hProg, PBM_SETPOS, (int)SendMessage(hProg, PBM_GETPOS, 0, 0) + 1, 0);
return Update();
}
return TRUE;
@@ -211,7 +211,7 @@ BOOLEAN CProgress::UpdateContact(LPCTSTR pszFormat, ...)
* params: pszFormat - the text to display for the setting
* return: FALSE if user pressed cancel, TRUE otherwise
**/
-BOOLEAN CProgress::UpdateSetting(LPCTSTR pszFormat, ...)
+BYTE CProgress::UpdateSetting(LPCTSTR pszFormat, ...)
{
if (_hDlg != NULL) {
HWND hProg = GetDlgItem(_hDlg, IDC_PROGRESS);
@@ -227,7 +227,7 @@ BOOLEAN CProgress::UpdateSetting(LPCTSTR pszFormat, ...)
if(mir_tcsicmp(tmp,buf))
SetDlgItemText(_hDlg, TXT_SETTING, buf);
}
- SendMessage(hProg, PBM_SETPOS, (INT)SendMessage(hProg, PBM_GETPOS, 0, 0) + 1, 0);
+ SendMessage(hProg, PBM_SETPOS, (int)SendMessage(hProg, PBM_GETPOS, 0, 0) + 1, 0);
return Update();
}
return TRUE;
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.h b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.h
index 8605900911..379df3c7c1 100644
--- a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.h
+++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.h
@@ -29,19 +29,19 @@ class CProgress
HWND _hDlg;
DWORD _dwStartTime;
- BOOLEAN Update();
+ BYTE Update();
public:
CProgress();
~CProgress();
- VOID Hide();
+ void Hide();
- VOID SetContactCount(DWORD numContacts);
- VOID SetSettingsCount(DWORD numSettings);
+ void SetContactCount(DWORD numContacts);
+ void SetSettingsCount(DWORD numSettings);
- BOOLEAN UpdateContact(LPCTSTR pszFormat, ...);
- BOOLEAN UpdateSetting(LPCTSTR pszFormat, ...);
+ BYTE UpdateContact(LPCTSTR pszFormat, ...);
+ BYTE UpdateSetting(LPCTSTR pszFormat, ...);
};
#endif /* _DLG_EXIMPROGRESS_H_ */
diff --git a/plugins/UserInfoEx/src/ex_import/mir_rfcCodecs.h b/plugins/UserInfoEx/src/ex_import/mir_rfcCodecs.h
index 17934e4131..d30fddca4a 100644
--- a/plugins/UserInfoEx/src/ex_import/mir_rfcCodecs.h
+++ b/plugins/UserInfoEx/src/ex_import/mir_rfcCodecs.h
@@ -239,14 +239,14 @@ inline INT_PTR QPDecodeGetRequiredLength(INT_PTR nSrcLen)
return nSrcLen;
}
-inline BOOL QPEncode(BYTE* pbSrcData, INT_PTR nSrcLen, LPSTR szDest, INT_PTR* pnDestLen, BOOLEAN *bEncoded, DWORD dwFlags = 0)
+inline BOOL QPEncode(BYTE* pbSrcData, INT_PTR nSrcLen, LPSTR szDest, INT_PTR* pnDestLen, BYTE *bEncoded, DWORD dwFlags = 0)
{
//The hexadecimal character set
static const CHAR s_chHexChars[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'};
INT_PTR nRead = 0, nWritten = 0, nLineLen = 0;
CHAR ch;
- BOOLEAN bChanged = FALSE;
+ BYTE bChanged = FALSE;
if (!pbSrcData || !szDest || !pnDestLen) {
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
index efa977f9e4..77a638e44a 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
@@ -37,7 +37,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* file - file to write the settings to
* return nothing
**/
-static VOID ExportModule(HANDLE hContact, LPCSTR pszModule, FILE* file)
+static void ExportModule(HANDLE hContact, LPCSTR pszModule, FILE* file)
{
DB::CEnumList Settings;
@@ -46,7 +46,7 @@ static VOID ExportModule(HANDLE hContact, LPCSTR pszModule, FILE* file)
DBVARIANT dbv;
LPSTR here;
WORD j;
- INT i;
+ int i;
LPSTR pszSetting;
//char tmp[32];
@@ -126,7 +126,7 @@ static VOID ExportModule(HANDLE hContact, LPCSTR pszModule, FILE* file)
* pModules - module to export, NULL to export all modules of a contact
* file - ini file to write the contact to
**/
-static BOOLEAN ExportContact(HANDLE hContact, DB::CEnumList* pModules, FILE* file)
+static BYTE ExportContact(HANDLE hContact, DB::CEnumList* pModules, FILE* file)
{
CExImContactBase vcc;
@@ -134,7 +134,7 @@ static BOOLEAN ExportContact(HANDLE hContact, DB::CEnumList* pModules, FILE* fil
{
if ((vcc = hContact) >= NULL)
{
- INT i;
+ int i;
LPSTR p;
vcc.toIni(file, pModules->getCount()-1);
@@ -161,7 +161,7 @@ static BOOLEAN ExportContact(HANDLE hContact, DB::CEnumList* pModules, FILE* fil
* param: hContact - contact to export or -1 to export all contacts
* pszFileName - ini-filename to write the contact to
**/
-INT SvcExImINI_Export(lpExImParam ExImContact, LPCSTR pszFileName)
+int SvcExImINI_Export(lpExImParam ExImContact, LPCSTR pszFileName)
{
FILE* file;
errno_t err;
@@ -225,7 +225,7 @@ INT SvcExImINI_Export(lpExImParam ExImContact, LPCSTR pszFileName)
* importing stuff
***********************************************************************************************************/
-LPSTR strnrchr(LPSTR string, INT ch, DWORD len)
+LPSTR strnrchr(LPSTR string, int ch, DWORD len)
{
LPSTR start = (LPSTR)string;
@@ -248,7 +248,7 @@ static DWORD ImportreadLine(FILE* file, LPSTR &str)
{
CHAR c;
DWORD l = 0;
- BOOLEAN bComment = 0;
+ BYTE bComment = 0;
str[0] = 0;
while (!feof(file)) {
@@ -300,7 +300,7 @@ static DWORD ImportreadLine(FILE* file, LPSTR &str)
* cchBuf - character count of the buffer
* return: handle to the contact that matches the information or NULL if no match
**/
-static HANDLE ImportFindContact(HANDLE hContact, LPSTR &strBuf, BOOLEAN bCanCreate)
+static HANDLE ImportFindContact(HANDLE hContact, LPSTR &strBuf, BYTE bCanCreate)
{
CExImContactBase vcc;
@@ -324,7 +324,7 @@ static HANDLE ImportFindContact(HANDLE hContact, LPSTR &strBuf, BOOLEAN bCanCrea
* strLine - string with the setting and its value to write to db
* return: 0 if writing was ok, 1 otherwise
**/
-INT ImportSetting(HANDLE hContact, LPCSTR pszModule, LPSTR &strLine)
+int ImportSetting(HANDLE hContact, LPCSTR pszModule, LPSTR &strLine)
{
DBCONTACTWRITESETTING cws;
LPSTR end, value;
@@ -437,7 +437,7 @@ INT ImportSetting(HANDLE hContact, LPCSTR pszModule, LPSTR &strLine)
* strLine - string with the setting and its value to write to db
* return: 0 if writing was ok, 1 otherwise
**/
-INT SvcExImINI_Import(HANDLE hContact, LPCSTR pszFileName)
+int SvcExImINI_Import(HANDLE hContact, LPCSTR pszFileName)
{
FILE *file;
HANDLE hNewContact = INVALID_HANDLE_VALUE;
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h
index 572d2d06aa..6961b1b6f7 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h
@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma once
- INT SvcExImINI_Export(lpExImParam ExImContact, LPCSTR pszFileName);
- INT SvcExImINI_Import(HANDLE hContact, LPCSTR pszFileName);
+ int SvcExImINI_Export(lpExImParam ExImContact, LPCSTR pszFileName);
+ int SvcExImINI_Import(HANDLE hContact, LPCSTR pszFileName);
#endif /* _SVC_EXIMINI_H_ */
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
index c419a0e34c..7a5ca3ae94 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
@@ -36,11 +36,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* return TRUE or FALSE
**/
-BOOLEAN IsUSASCII(LPCSTR pBuffer, LPDWORD pcbBuffer)
+BYTE IsUSASCII(LPCSTR pBuffer, LPDWORD pcbBuffer)
{
BYTE c;
PBYTE s = (PBYTE)pBuffer;
- BOOLEAN bIsUTF = 0;
+ BYTE bIsUTF = 0;
if (s == NULL) return 1;
while ((c = *s++) != 0) {
@@ -93,7 +93,7 @@ CLineBuffer::~CLineBuffer()
*
* return: TRUE if reallocation successful or memoryblock is large enough, FALSE otherwise
**/
-BOOLEAN CLineBuffer::_resizeBuf(const size_t cbReq)
+BYTE CLineBuffer::_resizeBuf(const size_t cbReq)
{
if (cbReq > _cbVal - _cbUsed) {
if (!(_pVal = (PBYTE)mir_realloc(_pVal, BLOCKSIZE + _cbVal + 1))) {
@@ -318,7 +318,7 @@ LPCSTR CLineBuffer::GetBuffer()
*
* return: nothing
**/
-VOID CLineBuffer::TruncToLength(size_t cbLength)
+void CLineBuffer::TruncToLength(size_t cbLength)
{
if (cbLength < _cbUsed) {
_cbUsed = cbLength;
@@ -333,7 +333,7 @@ VOID CLineBuffer::TruncToLength(size_t cbLength)
*
* return: nothing
**/
-VOID CLineBuffer::Truncate(size_t count)
+void CLineBuffer::Truncate(size_t count)
{
if (_cbUsed <= count) {
_cbUsed = 0;
@@ -352,7 +352,7 @@ VOID CLineBuffer::Truncate(size_t count)
*
* return: nothing
**/
-VOID CLineBuffer::TruncateSMS()
+void CLineBuffer::TruncateSMS()
{
if (!strncmp((LPSTR)(_pVal + _cbUsed - 4), " SMS", 4)) {
_cbUsed -= 4;
@@ -367,7 +367,7 @@ VOID CLineBuffer::TruncateSMS()
*
* return: nothing
**/
-VOID CLineBuffer::fput(FILE *outfile)
+void CLineBuffer::fput(FILE *outfile)
{
if (_pVal) {
_pVal[_cbUsed] = 0;
@@ -384,7 +384,7 @@ VOID CLineBuffer::fput(FILE *outfile)
*
* return: nothing
**/
-VOID CLineBuffer::fputEncoded(FILE *outFile)
+void CLineBuffer::fputEncoded(FILE *outFile)
{
PBYTE pVal = _pVal;
@@ -437,7 +437,7 @@ VOID CLineBuffer::fputEncoded(FILE *outFile)
*
* return: nothing
**/
-INT CLineBuffer::fgetEncoded(FILE *inFile)
+int CLineBuffer::fgetEncoded(FILE *inFile)
{
CHAR c;
CHAR hex[3];
@@ -557,10 +557,10 @@ size_t CLineBuffer::GetTokenNext(const CHAR delim, CLineBuffer * pBuf)
*
* return: 0 if successful, 1 otherwise
**/
-INT CLineBuffer::DBWriteTokenFirst(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
+int CLineBuffer::DBWriteTokenFirst(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
{
PBYTE here;
- INT iRet = 1;
+ int iRet = 1;
_pTok = _pVal;
if (_pTok && *_pTok) {
@@ -594,10 +594,10 @@ INT CLineBuffer::DBWriteTokenFirst(HANDLE hContact, const CHAR* pszModule, const
*
* return: 0 if successful, 1 otherwise
**/
-INT CLineBuffer::DBWriteTokenNext(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
+int CLineBuffer::DBWriteTokenNext(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
{
PBYTE here;
- INT iRet = 1;
+ int iRet = 1;
if (_pTok && *_pTok) {
for (here = _pTok;; here++) {
@@ -628,7 +628,7 @@ INT CLineBuffer::DBWriteTokenNext(HANDLE hContact, const CHAR* pszModule, const
*
* return: 0 if successful, 1 otherwise
**/
-INT CLineBuffer::DBWriteSettingString(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting)
+int CLineBuffer::DBWriteSettingString(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting)
{
if (_pVal && _cbUsed > 0)
return DB::Setting::WriteAString(hContact, pszModule, pszSetting, (LPSTR)_pVal);
@@ -667,7 +667,7 @@ CVCardFileVCF::CVCardFileVCF()
*
* return number of the added bytes
**/
-size_t CVCardFileVCF::packList(LPIDSTRLIST pList, UINT nList, INT iID, size_t *cbRew)
+size_t CVCardFileVCF::packList(LPIDSTRLIST pList, UINT nList, int iID, size_t *cbRew)
{
UINT i;
WORD wAdd = 0;
@@ -691,7 +691,7 @@ size_t CVCardFileVCF::packList(LPIDSTRLIST pList, UINT nList, INT iID, size_t *c
*
* return value type
**/
-BOOLEAN CVCardFileVCF::GetSetting(const CHAR *pszModule, const CHAR *pszSetting, DBVARIANT *dbv)
+BYTE CVCardFileVCF::GetSetting(const CHAR *pszModule, const CHAR *pszSetting, DBVARIANT *dbv)
{
DBCONTACTGETSETTING cgs;
@@ -762,7 +762,7 @@ size_t CVCardFileVCF::packDB(const CHAR *pszModule, const CHAR *pszSetting, size
*
* return number of bytes, added to the linebuffer
**/
-size_t CVCardFileVCF::packDBList(const CHAR *pszModule, const CHAR *pszSetting, MIRANDASERVICE GetList, BOOLEAN bSigned, size_t *cbRew)
+size_t CVCardFileVCF::packDBList(const CHAR *pszModule, const CHAR *pszSetting, MIRANDASERVICE GetList, BYTE bSigned, size_t *cbRew)
{
DBVARIANT dbv;
UINT nList;
@@ -772,13 +772,13 @@ size_t CVCardFileVCF::packDBList(const CHAR *pszModule, const CHAR *pszSetting,
GetList((WPARAM)&nList, (LPARAM)&pList);
switch (GetSetting(pszModule, pszSetting, &dbv)) {
case DBVT_BYTE:
- wAdd = packList(pList, nList, (INT)(bSigned ? dbv.cVal : dbv.bVal), cbRew);
+ wAdd = packList(pList, nList, (int)(bSigned ? dbv.cVal : dbv.bVal), cbRew);
break;
case DBVT_WORD:
- wAdd = packList(pList, nList, (INT)(bSigned ? dbv.sVal : dbv.wVal), cbRew);
+ wAdd = packList(pList, nList, (int)(bSigned ? dbv.sVal : dbv.wVal), cbRew);
break;
case DBVT_DWORD:
- wAdd = packList(pList, nList, (INT)(bSigned ? dbv.lVal : dbv.dVal), cbRew);
+ wAdd = packList(pList, nList, (int)(bSigned ? dbv.lVal : dbv.dVal), cbRew);
break;
case DBVT_UTF8:
case DBVT_ASCIIZ:
@@ -805,7 +805,7 @@ size_t CVCardFileVCF::packDBList(const CHAR *pszModule, const CHAR *pszSetting,
*
* return number of bytes, added to the linebuffer
**/
-VOID CVCardFileVCF::writeLine(const CHAR *szSet, size_t *cbRew)
+void CVCardFileVCF::writeLine(const CHAR *szSet, size_t *cbRew)
{
if (cbRew) {
_clVal.Truncate(*cbRew);
@@ -834,7 +834,7 @@ VOID CVCardFileVCF::writeLine(const CHAR *szSet, size_t *cbRew)
*
* return number of bytes, added to the linebuffer
**/
-VOID CVCardFileVCF::writeLineEncoded(const CHAR *szSet, size_t *cbRew)
+void CVCardFileVCF::writeLineEncoded(const CHAR *szSet, size_t *cbRew)
{
if (cbRew) {
_clVal.Truncate(*cbRew);
@@ -860,7 +860,7 @@ VOID CVCardFileVCF::writeLineEncoded(const CHAR *szSet, size_t *cbRew)
* pszMode - the mode the file should be opened with
* return TRUE or FALSE
**/
-BOOLEAN CVCardFileVCF::Open(HANDLE hContact, LPCSTR pszFileName, LPCSTR pszMode)
+BYTE CVCardFileVCF::Open(HANDLE hContact, LPCSTR pszFileName, LPCSTR pszMode)
{
if (!(_pFile = fopen(pszFileName, pszMode)))
return FALSE;
@@ -879,7 +879,7 @@ BOOLEAN CVCardFileVCF::Open(HANDLE hContact, LPCSTR pszFileName, LPCSTR pszMode)
* pszMode - the mode the file should be opened with
* return TRUE or FALSE
**/
-VOID CVCardFileVCF::Close(VOID)
+void CVCardFileVCF::Close(void)
{
if (_pFile)
fclose(_pFile);
@@ -894,7 +894,7 @@ VOID CVCardFileVCF::Close(VOID)
* param: none
* return TRUE or FALSE
**/
-BOOLEAN CVCardFileVCF::Export(BOOLEAN bExportUtf)
+BYTE CVCardFileVCF::Export(BYTE bExportUtf)
{
size_t cbRew = 0;
@@ -1122,7 +1122,7 @@ BOOLEAN CVCardFileVCF::Export(BOOLEAN bExportUtf)
*
* return: number of characters read from the file or EOF
**/
-INT CVCardFileVCF::readLine(LPSTR szVCFSetting, WORD cchSetting)
+int CVCardFileVCF::readLine(LPSTR szVCFSetting, WORD cchSetting)
{
LPSTR here;
@@ -1152,11 +1152,11 @@ INT CVCardFileVCF::readLine(LPSTR szVCFSetting, WORD cchSetting)
*
* return: number of characters read from the file or EOF
**/
-BOOLEAN CVCardFileVCF::Import()
+BYTE CVCardFileVCF::Import()
{
CHAR szEnt[MAX_PATH];
LPSTR pszParam;
- INT cbLine;
+ int cbLine;
BYTE numEmails = 0;
while (EOF != (cbLine = readLine(szEnt, MAX_PATH))) {
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h
index c5a938ea13..3fbab056e7 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h
@@ -29,7 +29,7 @@ private:
size_t _cbVal;
size_t _cbUsed;
- BOOLEAN _resizeBuf(const size_t cbReq);
+ BYTE _resizeBuf(const size_t cbReq);
public:
CLineBuffer();
@@ -49,19 +49,19 @@ public:
size_t GetLength();
LPCSTR GetBuffer();
- VOID TruncToLength(size_t cbLength);
- VOID Truncate(size_t count);
- VOID TruncateSMS();
+ void TruncToLength(size_t cbLength);
+ void Truncate(size_t count);
+ void TruncateSMS();
- VOID fput(FILE *outfile);
- VOID fputEncoded(FILE *outFile);
- INT fgetEncoded(FILE *inFile);
+ void fput(FILE *outfile);
+ void fputEncoded(FILE *outFile);
+ int fgetEncoded(FILE *inFile);
size_t GetTokenFirst(const CHAR delim, CLineBuffer * pBuf);
size_t GetTokenNext(const CHAR delim, CLineBuffer * pBuf);
- INT DBWriteTokenFirst(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim);
- INT DBWriteTokenNext(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim);
- INT DBWriteSettingString(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting);
+ int DBWriteTokenFirst(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim);
+ int DBWriteTokenNext(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim);
+ int DBWriteSettingString(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting);
};
class CVCardFileVCF
@@ -72,23 +72,23 @@ private:
HANDLE _hContact;
const CHAR *_pszBaseProto;
WORD _cbRew;
- BOOLEAN _useUtf8;
+ BYTE _useUtf8;
WORD _hasUtf8;
- size_t packList(LPIDSTRLIST pList, UINT nList, INT iID, size_t *cbRew = NULL);
- BOOLEAN GetSetting(const CHAR *pszModule, const CHAR *pszSetting, DBVARIANT *dbv);
+ size_t packList(LPIDSTRLIST pList, UINT nList, int iID, size_t *cbRew = NULL);
+ BYTE GetSetting(const CHAR *pszModule, const CHAR *pszSetting, DBVARIANT *dbv);
size_t packDB(const CHAR *pszModule, const CHAR *pszSetting, size_t *cbRew = NULL);
- size_t packDBList(const CHAR *pszModule, const CHAR *pszSetting, MIRANDASERVICE GetList, BOOLEAN bSigned = FALSE, size_t *cbRew = NULL);
+ size_t packDBList(const CHAR *pszModule, const CHAR *pszSetting, MIRANDASERVICE GetList, BYTE bSigned = FALSE, size_t *cbRew = NULL);
- VOID writeLine(const CHAR *szSet, size_t *cbRew = NULL);
- VOID writeLineEncoded(const CHAR *szSet, size_t *cbRew = NULL);
- INT readLine(LPSTR szVCFSetting, WORD cchSetting);
+ void writeLine(const CHAR *szSet, size_t *cbRew = NULL);
+ void writeLineEncoded(const CHAR *szSet, size_t *cbRew = NULL);
+ int readLine(LPSTR szVCFSetting, WORD cchSetting);
public:
CVCardFileVCF();
- BOOLEAN Open(HANDLE hContact, LPCSTR pszFileName, LPCSTR pszMode);
- VOID Close(VOID);
- BOOLEAN Export(BOOLEAN bExportUtf);
- BOOLEAN Import();
+ BYTE Open(HANDLE hContact, LPCSTR pszFileName, LPCSTR pszMode);
+ void Close(void);
+ BYTE Export(BYTE bExportUtf);
+ BYTE Import();
};
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp
index a5f5dcc4e2..9b211ce7ad 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp
@@ -35,7 +35,7 @@ INT_PTR CALLBACK DlgProc_DataHistory(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
{ ICO_BTN_EXPORT, BM_SETIMAGE, IDOK },
{ ICO_BTN_CANCEL, BM_SETIMAGE, IDCANCEL }
};
- const INT numIconsToSet = DB::Setting::GetByte(SET_ICONS_BUTTONS, 1) ? SIZEOF(idIcon) : 2;
+ const int numIconsToSet = DB::Setting::GetByte(SET_ICONS_BUTTONS, 1) ? SIZEOF(idIcon) : 2;
IcoLib_SetCtrlIcons(hDlg, idIcon, numIconsToSet);
TranslateDialogDefault(hDlg);
@@ -86,7 +86,7 @@ INT_PTR CALLBACK DlgProc_DataHistory(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
* pszFileName - full qualified path to the xml file which is destination for the export process
* return: 0 on success, 1 otherwise
**/
-INT CFileXml::Export(lpExImParam ExImContact, LPCSTR pszFileName)
+int CFileXml::Export(lpExImParam ExImContact, LPCSTR pszFileName)
{
FILE *xmlfile;
DB::CEnumList Modules;
@@ -230,7 +230,7 @@ CFileXml::CFileXml()
* stat - structure used to collect some statistics
* return: ERROR_OK on success or one other element of ImportError to tell the type of failure
**/
-INT CFileXml::ImportOwner(TiXmlElement* xContact)
+int CFileXml::ImportOwner(TiXmlElement* xContact)
{
CExImContactXML vContact(this);
@@ -249,11 +249,11 @@ INT CFileXml::ImportOwner(TiXmlElement* xContact)
* stat - structure used to collect some statistics
* return: ERROR_OK if at least one contact was successfully imported
**/
-INT CFileXml::ImportContacts(TiXmlElement* xmlParent)
+int CFileXml::ImportContacts(TiXmlElement* xmlParent)
{
TiXmlElement *xContact;
CExImContactXML vContact(this);
- INT result;
+ int result;
LPTSTR pszNick;
// import contacts
@@ -348,7 +348,7 @@ DWORD CFileXml::CountContacts(TiXmlElement* xmlParent)
* pszFileName - full qualified path to the xml file which is to import
* return: ERROR_OK on success or one other element of ImportError to tell the type of failure
**/
-INT CFileXml::Import(HANDLE hContact, LPCSTR pszFileName)
+int CFileXml::Import(HANDLE hContact, LPCSTR pszFileName)
{
TiXmlDocument doc;
TiXmlElement *xmlCard = NULL;
@@ -374,7 +374,7 @@ INT CFileXml::Import(HANDLE hContact, LPCSTR pszFileName)
// is owner contact to import ?
if (_hContactToWorkOn == NULL) {
- INT ret;
+ int ret;
// disable database safty mode to speed up the operation
CallService(MS_DB_SETSAFETYMODE, 0, 0);
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h
index 6fd12366f5..3ec0ca998a 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h
@@ -43,21 +43,21 @@ class CFileXml {
CProgress _progress;
- INT ImportOwner(TiXmlElement* xmlContact);
- INT ImportContacts(TiXmlElement* xmlParent);
+ int ImportOwner(TiXmlElement* xmlContact);
+ int ImportContacts(TiXmlElement* xmlParent);
DWORD CountContacts(TiXmlElement* xmlParent);
/*
- INT ExportOwner(FILE *xmlfile, BOOLEAN bExportEvents);
- INT ExportContact(FILE *xmlfile, HANDLE hContact, BOOLEAN bExportEvents, LPENUMLIST pModules);
- INT ExportSubContact(TiXmlElement *xContact, HANDLE hContact, BOOLEAN bExportEvents);
+ int ExportOwner(FILE *xmlfile, BYTE bExportEvents);
+ int ExportContact(FILE *xmlfile, HANDLE hContact, BYTE bExportEvents, LPENUMLIST pModules);
+ int ExportSubContact(TiXmlElement *xContact, HANDLE hContact, BYTE bExportEvents);
*/
public:
CFileXml();
- INT Import(HANDLE hContact, LPCSTR pszFileName);
- INT Export(lpExImParam ExImContact, LPCSTR pszFileName);
+ int Import(HANDLE hContact, LPCSTR pszFileName);
+ int Export(lpExImParam ExImContact, LPCSTR pszFileName);
};
#endif /* _SVC_FILEXML_INCLUDED_ */ \ No newline at end of file
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
index e51bde3e9c..f331f1f3e3 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
@@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* cchFileName - number of maximum characters the filename can be
* return: nothing
**/
-static VOID DisplayNameToFileName(lpExImParam ExImContact, LPSTR pszFileName, WORD cchFileName)
+static void DisplayNameToFileName(lpExImParam ExImContact, LPSTR pszFileName, WORD cchFileName)
{
LPCSTR disp = 0;
LPSTR temp = 0;
@@ -116,7 +116,7 @@ INT_PTR SvcExImport_Export(lpExImParam ExImContact, HWND hwndParent)
CHAR szFileName[MAX_PATH] = { 0 };
// create the filename to suggest the user for the to export contact
DisplayNameToFileName(ExImContact, szFileName, SIZEOF(szFileName));
- INT nIndex = DlgExIm_SaveFileName(hwndParent,
+ int nIndex = DlgExIm_SaveFileName(hwndParent,
Translate("Select a destination file..."),
FilterString(ExImContact),
szFileName);
@@ -160,7 +160,7 @@ INT_PTR SvcExImport_Import(lpExImParam ExImContact, HWND hwndParent)
// create the filename to suggest the user for the to export contact
DisplayNameToFileName(ExImContact, szFileName, SIZEOF(szFileName));
- INT nIndex = DlgExIm_OpenFileName(hwndParent,
+ int nIndex = DlgExIm_OpenFileName(hwndParent,
Translate("Import User Details from VCard"),
FilterString(ExImContact),
szFileName);
@@ -353,7 +353,7 @@ INT_PTR svcExIm_Account_Service(WPARAM wParam, LPARAM lParam)
*
* return: 0 or 1
**/
-VOID SvcExImport_LoadModule()
+void SvcExImport_LoadModule()
{
CreateServiceFunction(MS_USERINFO_VCARD_EXPORTALL, svcExIm_MainExport_Service);
CreateServiceFunction(MS_USERINFO_VCARD_IMPORTALL, svcExIm_MainImport_Service);
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.h b/plugins/UserInfoEx/src/ex_import/svc_ExImport.h
index e6a60f1229..16c64c25e3 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.h
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.h
@@ -48,6 +48,6 @@ INT_PTR svcExIm_ContactImport_Service(WPARAM wParam, LPARAM lParam);
INT_PTR svcExIm_Group_Service(WPARAM wParam,LPARAM lParam);
INT_PTR svcExIm_Account_Service(WPARAM wParam,LPARAM lParam);
-VOID SvcExImport_LoadModule();
+void SvcExImport_LoadModule();
#endif /* _SVC_EXIMPORT_INCLUDED_ */ \ No newline at end of file