Functions | |
TCHAR * | GetStringField (UINT32 nIndex, UINT32 nCompositeStringID) |
String_256 | MakeURL (const String_256 &rRelativePath, const String_256 &rRootURL) |
Allows us to obtain the URL of a file knowing its relative path (from the main clipart index file) and the root URL. The URL is necessary to download the file. | |
String_256 | MakeLocalPath (const String_256 &rRelPath) |
BOOL | GetTempInetDir (String_256 *pTempDir) |
Get path to the internet cache directory used to download web clipart files. | |
BOOL | GetAppDataPath (String_256 *pPath) |
BOOL | GetAppCachePath (String_256 *pPath) |
BOOL | DeleteDirectoryTree (const String_256 &rPath) |
remove a directory tree from the hard drive |
nCompositeStringID | - ID of the composite string [INPUTS] nIndex - relative position of the field within the composite string |
|
remove a directory tree from the hard drive
Definition at line 3153 of file sgliboil.cpp. 03154 { 03155 PathNameEx dirPath(rPath); 03156 return dirPath.Remove(); 03157 }}
|
|
Definition at line 3123 of file sgliboil.cpp. 03124 { 03125 if (!GetAppDataPath(pPath)) 03126 return FALSE; 03127 03128 *pPath += String_256(_R(IDS_CACHEPATH)); // _R(IDS_CACHEPATH) == "Cache\\" 03129 03130 return TRUE; 03131 }
|
|
Definition at line 3095 of file sgliboil.cpp. 03096 { 03097 #if defined(__WXMSW__) 03098 if (!SUCCEEDED(SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA | CSIDL_FLAG_CREATE, 03099 NULL, 0, static_cast<TCHAR *>(*pPath)))) 03100 return FALSE; 03101 #else 03102 #pragma error( "No equiverlent for SHGetFolderPath" ) 03103 #endif 03104 03105 *pPath += wxT("\\"); 03106 *pPath += String_256(PRODUCT_MANUFACTURER); // PRODUCT_MANUFACTURER == "Xara" 03107 *pPath += wxT("\\"); 03108 *pPath += String_256(PROGRAM_NAME); // PROGRAM_NAME == "Xara X" || "Xara X (debug)" 03109 *pPath += wxT("\\"); 03110 03111 return TRUE; 03112 }
|
|
Definition at line 2979 of file sgliboil.cpp. 02980 { 02981 PORTNOTETRACE("dialog","GetStringField - do nothing"); 02982 #ifndef EXCLUDE_FROM_XARALX 02983 TCHAR rgtchBuff[1024]; 02984 BOOL bLoad = ::LoadString(AfxGetResourceHandle(), nCompositeStringID, rgtchBuff, sizeof(rgtchBuff)); 02985 ERROR3IF(!bLoad, "Failed to load string from resource"); 02986 TCHAR* szField = _tcstok(rgtchBuff, _T("|")); 02987 for (UINT32 i = 0; i < nIndex && szField; i++) 02988 szField = _tcstok(NULL, _T("|")); 02989 return szField; 02990 #else 02991 return NULL; 02992 #endif 02993 }
|
|
Get path to the internet cache directory used to download web clipart files. > BOOL InetUtils::GetTempInetDir(String_256* pTempDir)
Definition at line 3071 of file sgliboil.cpp. 03072 { 03073 #if defined(__WXMSW__) 03074 if (!SUCCEEDED(SHGetFolderPath(NULL, CSIDL_INTERNET_CACHE | CSIDL_FLAG_CREATE, 03075 NULL, 0, static_cast<TCHAR *>(*pTempDir)))) 03076 return FALSE; 03077 #else 03078 #pragma error( "No equiverlent for SHGetFolderPath" ) 03079 #endif 03080 03081 *pTempDir += wxT("\\"); 03082 03083 return TRUE; 03084 }
|
|
Definition at line 3049 of file sgliboil.cpp. 03050 { 03051 String_256 strAppDataPath; 03052 GetAppDataPath(&strAppDataPath); 03053 if (strAppDataPath.IsEmpty()) // failed to get the path for some reason 03054 return strAppDataPath; 03055 PathNameEx appDataPath(strAppDataPath); 03056 String_256 strLocalPath = appDataPath.GetLocation(TRUE); 03057 strLocalPath += String_256(_R(IDS_CACHEPATH)); 03058 strLocalPath += rRelPath; 03059 return strLocalPath; 03060 }
|
|
Allows us to obtain the URL of a file knowing its relative path (from the main clipart index file) and the root URL. The URL is necessary to download the file.
Definition at line 3017 of file sgliboil.cpp. 03018 { 03019 String_256 strURL = rRootURL; 03020 INT32 nCharCount = rRelativePath.Length(); 03021 if (camStrstr( (const TCHAR *)strURL, _T("file://") ) ) 03022 strURL += rRelativePath; 03023 else for (INT32 i = 0; i < nCharCount; i++) 03024 { 03025 // Walk down the relative path string, appending characters to the URL as we go along 03026 // Backslashes are converted to normal slashes 03027 if (rRelativePath[i] == _T('\\')) 03028 strURL += _T('/'); 03029 else 03030 strURL += camTolower( rRelativePath[i] ); 03031 } 03032 return strURL; 03033 }
|