diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-01 21:55:47 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-01 21:55:47 +0000 |
commit | 12012a3ea4d58c6624f8065c2ca2afb96090b70f (patch) | |
tree | 47e60353bc84f956e1c71241ef563c54dbc8765b /protocols | |
parent | b2269a81668efaf157d541f2ffd67e52b89417c6 (diff) |
service call replaced with helper
git-svn-id: http://svn.miranda-ng.org/main/trunk@3825 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/AimOscar/src/avatars.cpp | 2 | ||||
-rw-r--r-- | protocols/AimOscar/src/file.cpp | 2 | ||||
-rw-r--r-- | protocols/AimOscar/src/utility.cpp | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/communication.cpp | 2 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/avatar.cpp | 2 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/image.cpp | 2 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/icq_avatar.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_misc.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/MraAvatars.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_misc.cpp | 4 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_avatar.cpp | 6 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_picture.cpp | 6 | ||||
-rw-r--r-- | protocols/Twitter/src/utility.cpp | 2 | ||||
-rw-r--r-- | protocols/Yahoo/src/avatar.cpp | 2 |
14 files changed, 19 insertions, 19 deletions
diff --git a/protocols/AimOscar/src/avatars.cpp b/protocols/AimOscar/src/avatars.cpp index 9eacdc6dad..a2277658de 100644 --- a/protocols/AimOscar/src/avatars.cpp +++ b/protocols/AimOscar/src/avatars.cpp @@ -202,7 +202,7 @@ int CAimProto::get_avatar_filename(HANDLE hContact, TCHAR* pszDest, size_t cbLen }
if (ext && _taccess(pszDest, 0))
- CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)pszDest);
+ CreateDirectoryTreeT(pszDest);
size_t tPathLen2 = tPathLen;
diff --git a/protocols/AimOscar/src/file.cpp b/protocols/AimOscar/src/file.cpp index 14e453ef42..12ef935cd7 100644 --- a/protocols/AimOscar/src/file.cpp +++ b/protocols/AimOscar/src/file.cpp @@ -361,7 +361,7 @@ int CAimProto::receiving_file(file_transfer *ft, HANDLE hServerPacketRecver, NET if (ft->pfts.tszCurrentFile)
{
TCHAR* dir = get_dir(ft->pfts.tszCurrentFile);
- CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)dir);
+ CreateDirectoryTreeT(dir);
mir_free(dir);
oft->type = _htons(ft->pfts.currentFileProgress ? 0x0205 : 0x0202);
diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp index 5ebf065227..549f2e4235 100644 --- a/protocols/AimOscar/src/utility.cpp +++ b/protocols/AimOscar/src/utility.cpp @@ -606,7 +606,7 @@ int CAimProto::open_contact_file(const char* sn, const TCHAR* file, const char* }
if (_taccess(path, 0))
- CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)path);
+ CreateDirectoryTreeT(path);
mir_sntprintf(path + pos, MAX_PATH - pos, _T("\\%s"), file);
int fid = _topen(path, _O_CREAT | _O_RDWR | _O_BINARY, _S_IREAD);
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index c51f757fe3..6f4d94a7ff 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -1235,7 +1235,7 @@ bool facebook_client::save_url(const std::string &url,const std::tstring &filena // Create folder if necessary
std::tstring dir = filename.substr(0,filename.rfind('\\'));
if( _taccess(dir.c_str(),0))
- CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)dir.c_str());
+ CreateDirectoryTreeT(dir.c_str());
// Write to file
FILE *f = _tfopen(filename.c_str(), _T("wb"));
diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp index c6b49157fd..f3d2b87807 100644 --- a/protocols/Gadu-Gadu/src/avatar.cpp +++ b/protocols/Gadu-Gadu/src/avatar.cpp @@ -40,7 +40,7 @@ void GGPROTO::getAvatarFilename(HANDLE hContact, TCHAR *pszDest, int cbLen) }
if (_taccess(pszDest, 0)) {
- int ret = CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)pszDest);
+ int ret = CreateDirectoryTreeT(pszDest);
if (ret == 0){
netlog("getAvatarFilename(): Created new directory for avatar cache: %S.", pszDest);
} else {
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp index 4bb12b042b..da9104004b 100644 --- a/protocols/Gadu-Gadu/src/image.cpp +++ b/protocols/Gadu-Gadu/src/image.cpp @@ -826,7 +826,7 @@ int GGPROTO::img_displayasmsg(HANDLE hContact, void *img) }
if ( _taccess(szPath, 0)){
- int ret = CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)szPath);
+ int ret = CreateDirectoryTreeT(szPath);
if (ret == 0){
netlog("img_displayasmsg(): Created new directory for image cache: %S.", szPath);
} else {
diff --git a/protocols/IcqOscarJ/src/icq_avatar.cpp b/protocols/IcqOscarJ/src/icq_avatar.cpp index f1db812a5e..56f2ce55c4 100644 --- a/protocols/IcqOscarJ/src/icq_avatar.cpp +++ b/protocols/IcqOscarJ/src/icq_avatar.cpp @@ -145,7 +145,7 @@ void CIcqProto::GetAvatarFileName(int dwUin, const char *szUid, TCHAR *pszDest, int tPathLen = strlennull(pszDest);
// make sure the avatar cache directory exists
- CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)szPath);
+ CreateDirectoryTreeT(szPath);
if (dwUin != 0)
{
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index abb15774a3..ce13696af7 100644 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -276,7 +276,7 @@ void CJabberProto::GetAvatarFileName(HANDLE hContact, TCHAR* pszDest, size_t cbL DWORD dwAttributes = GetFileAttributes(pszDest);
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
- CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)pszDest);
+ CreateDirectoryTreeT(pszDest);
pszDest[ tPathLen++ ] = '\\';
diff --git a/protocols/MRA/src/MraAvatars.cpp b/protocols/MRA/src/MraAvatars.cpp index aec806c687..584b8adca6 100644 --- a/protocols/MRA/src/MraAvatars.cpp +++ b/protocols/MRA/src/MraAvatars.cpp @@ -550,7 +550,7 @@ DWORD CMraProto::MraAvatarsGetFileName(HANDLE hAvatarsQueueHandle, HANDLE hConta if (dwPathSize) {
// some path in buff and free space for file name is avaible
- CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)lpszPath);
+ CreateDirectoryTreeT(lpszPath);
if (dwFormat != PA_FORMAT_DEFAULT) {
if ( mraGetStaticStringW(hContact, "e-mail", lpszCurPath, dwPathSize-5, &dwEMailSize)) {
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index 7c52fb5b9c..68c488fd9f 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -221,7 +221,7 @@ void CMsnProto::MSN_GetAvatarFileName(HANDLE hContact, TCHAR* pszDest, size_t c }
if (_taccess(pszDest, 0))
- CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)pszDest);
+ CreateDirectoryTreeT(pszDest);
size_t tPathLen2 = tPathLen;
if (hContact != NULL) {
@@ -451,7 +451,7 @@ void CMsnProto::MSN_GetCustomSmileyFileName(HANDLE hContact, TCHAR* pszDest, si }
if (!exist)
- CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)pszDest);
+ CreateDirectoryTreeT(pszDest);
TCHAR *sztSmileyName = mir_a2t(SmileyName);
mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%s.%s"), sztSmileyName,
diff --git a/protocols/Tlen/src/tlen_avatar.cpp b/protocols/Tlen/src/tlen_avatar.cpp index 07de0e6b58..f6460e905b 100644 --- a/protocols/Tlen/src/tlen_avatar.cpp +++ b/protocols/Tlen/src/tlen_avatar.cpp @@ -41,9 +41,9 @@ void TlenGetAvatarFileName(TlenProtocol *proto, JABBER_LIST_ITEM *item, TCHAR* p tPathLen = mir_sntprintf( ptszDest, cbLen, TEXT("%s\\Tlen"), tmpPath );
mir_free(tmpPath);
dwAttributes = GetFileAttributes( ptszDest );
- if ( dwAttributes == 0xffffffff || ( dwAttributes & FILE_ATTRIBUTE_DIRECTORY ) == 0 ) {
- CallService( MS_UTILS_CREATEDIRTREET, 0, ( LPARAM )ptszDest );
- }
+ if (dwAttributes == 0xffffffff || ( dwAttributes & FILE_ATTRIBUTE_DIRECTORY ) == 0)
+ CreateDirectoryTreeT(ptszDest);
+
ptszDest[ tPathLen++ ] = '\\';
if (item != NULL) {
format = item->avatarFormat;
diff --git a/protocols/Tlen/src/tlen_picture.cpp b/protocols/Tlen/src/tlen_picture.cpp index 8a86c1e2e5..d61842d8dd 100644 --- a/protocols/Tlen/src/tlen_picture.cpp +++ b/protocols/Tlen/src/tlen_picture.cpp @@ -224,9 +224,9 @@ void TlenProcessPic(XmlNode *node, TlenProtocol *proto) { int tPathLen = mir_snprintf( fileName, MAX_PATH, "%s\\Images\\Tlen", tmpPath );
long oldSize = 0, lSize = atol(size);
DWORD dwAttributes = GetFileAttributesA( fileName );
- if ( dwAttributes == 0xffffffff || ( dwAttributes & FILE_ATTRIBUTE_DIRECTORY ) == 0 ) {
- CallService( MS_UTILS_CREATEDIRTREE, 0, ( LPARAM )fileName );
- }
+ if ( dwAttributes == 0xffffffff || ( dwAttributes & FILE_ATTRIBUTE_DIRECTORY ) == 0 )
+ CreateDirectoryTree(fileName);
+
mir_free(tmpPath);
fileName[ tPathLen++ ] = '\\';
mir_snprintf( fileName + tPathLen, MAX_PATH - tPathLen, "%s.%s", crc, ext );
diff --git a/protocols/Twitter/src/utility.cpp b/protocols/Twitter/src/utility.cpp index 515399348f..f40eecc2e5 100644 --- a/protocols/Twitter/src/utility.cpp +++ b/protocols/Twitter/src/utility.cpp @@ -190,7 +190,7 @@ bool save_url(HANDLE hNetlib,const std::string &url,const std::tstring &filename // Create folder if necessary
std::tstring dir = filename.substr(0,filename.rfind('\\'));
if( _taccess(dir.c_str(),0))
- CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)dir.c_str());
+ CreateDirectoryTreeT(dir.c_str());
// Write to file
FILE *f = _tfopen(filename.c_str(), _T("wb"));
diff --git a/protocols/Yahoo/src/avatar.cpp b/protocols/Yahoo/src/avatar.cpp index bc0a6ef32f..05cb9b9113 100644 --- a/protocols/Yahoo/src/avatar.cpp +++ b/protocols/Yahoo/src/avatar.cpp @@ -647,7 +647,7 @@ void CYahooProto::GetAvatarFileName(HANDLE hContact, TCHAR* pszDest, int cbLen, }
if ( _taccess(pszDest, 0))
- CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)pszDest);
+ CreateDirectoryTreeT(pszDest);
if (hContact != NULL) {
int ck_sum = db_get_dw(hContact, m_szModuleName,"PictCK", 0);
|