Mobile API Reference  MicroStrategy 2019
DataSourceUtil Class Reference

#include <DSSDataSource.h>

Static Public Member Functions

static int getLocalPath (MBase::CString &orPath)
 
static int createFolder (MBase::CString &orPath)
 
static int removeLocalFolder ()
 
static long ReserveSize (int iSize)
 
static void CommitSize (int iSize, long iTicket)
 
static void ReleaseSize (int iSize)
 
static void ReserveSize (int iSize, std::string &iComponentID)
 
static void ReleaseSize (int iSize, std::string &iComponentID)
 
static int removeSubFolder (MBase::CString &irPath)
 
static bool isMappedFileSupported ()
 
static int createMappedFileBuffer (int nBlockCount, const void **ippDataBlocks, int *ipBlockSize, const char *ipFilePath, bool *iobUseNewFile, void **oppBuffer, int *opBuferSize, void **oppBufAligned, int *opOffset=NULL, int *opOffsetAligned=NULL)
 
static int releaseMappedFileBuffer (void *ipBuffer, int iBufSize)
 
static int reloadMappedFileBuffer (const char *ipFilePath, int length, int offset, int offsetAligned, void **oppBuffer, void **oppBufAligned)
 
static int GetTimeIntervalSince1970 (const char *ipFilePath, int iFlag, Int64 &oCreateTime)
 
static int RemoveOldFiles (const char *ipDir, int iDay)
 
static int GetPageSize ()
 
static int AddDebugLog (const char *className, const char *method, int line, void *ipThis, const char *message1, const char *message2=NULL, const char *message3=NULL)
 
static int AddDebugLog (const char *className, const char *method, int line, void *ipThis, const char *message1, const char *message2, int message3)
 
static int AddDebugLog (const char *className, const char *method, int line, void *ipThis, const char *message1, const char *message2, const wchar_t *message3, unsigned int wchar_string_size)
 
static int getLocalPath (MBase::CString &orPath)
 
static int createFolder (MBase::CString &orPath)
 
static int removeLocalFolder ()
 
static long ReserveSize (int iSize)
 
static void CommitSize (int iSize, long iTicket)
 
static void ReleaseSize (int iSize)
 
static void ReserveSize (int iSize, std::string &iComponentID)
 
static void ReleaseSize (int iSize, std::string &iComponentID)
 
static int removeSubFolder (MBase::CString &irPath)
 
static bool isMappedFileSupported ()
 
static int createMappedFileBuffer (int nBlockCount, const void **ippDataBlocks, int *ipBlockSize, const char *ipFilePath, bool *iobUseNewFile, void **oppBuffer, int *opBuferSize, void **oppBufAligned, int *opOffset=NULL, int *opOffsetAligned=NULL)
 
static int releaseMappedFileBuffer (void *ipBuffer, int iBufSize)
 
static int reloadMappedFileBuffer (const char *ipFilePath, int length, int offset, int offsetAligned, void **oppBuffer, void **oppBufAligned)
 
static int GetTimeIntervalSince1970 (const char *ipFilePath, int iFlag, Int64 &oCreateTime)
 
static int RemoveOldFiles (const char *ipDir, int iDay)
 
static int GetPageSize ()
 
static int AddDebugLog (const char *className, const char *method, int line, void *ipThis, const char *message1, const char *message2=NULL, const char *message3=NULL)
 
static int AddDebugLog (const char *className, const char *method, int line, void *ipThis, const char *message1, const char *message2, int message3)
 
static int AddDebugLog (const char *className, const char *method, int line, void *ipThis, const char *message1, const char *message2, const wchar_t *message3, unsigned int wchar_string_size)
 

Member Function Documentation

◆ AddDebugLog() [1/6]

static int DataSourceUtil::AddDebugLog ( const char *  className,
const char *  method,
int  line,
void *  ipThis,
const char *  message1,
const char *  message2 = NULL,
const char *  message3 = NULL 
)
static

◆ AddDebugLog() [2/6]

static int DataSourceUtil::AddDebugLog ( const char *  className,
const char *  method,
int  line,
void *  ipThis,
const char *  message1,
const char *  message2 = NULL,
const char *  message3 = NULL 
)
static

◆ AddDebugLog() [3/6]

static int DataSourceUtil::AddDebugLog ( const char *  className,
const char *  method,
int  line,
void *  ipThis,
const char *  message1,
const char *  message2,
int  message3 
)
static

◆ AddDebugLog() [4/6]

static int DataSourceUtil::AddDebugLog ( const char *  className,
const char *  method,
int  line,
void *  ipThis,
const char *  message1,
const char *  message2,
int  message3 
)
static

◆ AddDebugLog() [5/6]

static int DataSourceUtil::AddDebugLog ( const char *  className,
const char *  method,
int  line,
void *  ipThis,
const char *  message1,
const char *  message2,
const wchar_t *  message3,
unsigned int  wchar_string_size 
)
static

◆ AddDebugLog() [6/6]

static int DataSourceUtil::AddDebugLog ( const char *  className,
const char *  method,
int  line,
void *  ipThis,
const char *  message1,
const char *  message2,
const wchar_t *  message3,
unsigned int  wchar_string_size 
)
static

◆ CommitSize() [1/2]

static void DataSourceUtil::CommitSize ( int  iSize,
long  iTicket 
)
static

◆ CommitSize() [2/2]

static void DataSourceUtil::CommitSize ( int  iSize,
long  iTicket 
)
static

◆ createFolder() [1/2]

static int DataSourceUtil::createFolder ( MBase::CString orPath)
static

◆ createFolder() [2/2]

static int DataSourceUtil::createFolder ( MBase::CString orPath)
static

◆ createMappedFileBuffer() [1/2]

static int DataSourceUtil::createMappedFileBuffer ( int  nBlockCount,
const void **  ippDataBlocks,
int *  ipBlockSize,
const char *  ipFilePath,
bool *  iobUseNewFile,
void **  oppBuffer,
int *  opBuferSize,
void **  oppBufAligned,
int *  opOffset = NULL,
int *  opOffsetAligned = NULL 
)
static

save the content of a memory block to a local file.

  1. if ipFilePath already exist, check iFlag. If iFlag != 0, return failure. Otherwise, append ipData to the end of the file.
  2. Since mmap requires the offset to be aligned at page size, we need return both the original mapped filed memory address and the adjusted memory address.

◆ createMappedFileBuffer() [2/2]

static int DataSourceUtil::createMappedFileBuffer ( int  nBlockCount,
const void **  ippDataBlocks,
int *  ipBlockSize,
const char *  ipFilePath,
bool *  iobUseNewFile,
void **  oppBuffer,
int *  opBuferSize,
void **  oppBufAligned,
int *  opOffset = NULL,
int *  opOffsetAligned = NULL 
)
static

save the content of a memory block to a local file.

  1. if ipFilePath already exist, check iFlag. If iFlag != 0, return failure. Otherwise, append ipData to the end of the file.
  2. Since mmap requires the offset to be aligned at page size, we need return both the original mapped filed memory address and the adjusted memory address.

◆ getLocalPath() [1/2]

static int DataSourceUtil::getLocalPath ( MBase::CString orPath)
static

◆ getLocalPath() [2/2]

static int DataSourceUtil::getLocalPath ( MBase::CString orPath)
static

◆ GetPageSize() [1/2]

static int DataSourceUtil::GetPageSize ( )
static

◆ GetPageSize() [2/2]

static int DataSourceUtil::GetPageSize ( )
static

◆ GetTimeIntervalSince1970() [1/2]

static int DataSourceUtil::GetTimeIntervalSince1970 ( const char *  ipFilePath,
int  iFlag,
Int64 oCreateTime 
)
static

◆ GetTimeIntervalSince1970() [2/2]

static int DataSourceUtil::GetTimeIntervalSince1970 ( const char *  ipFilePath,
int  iFlag,
Int64 oCreateTime 
)
static

◆ isMappedFileSupported() [1/2]

static bool DataSourceUtil::isMappedFileSupported ( )
static

◆ isMappedFileSupported() [2/2]

static bool DataSourceUtil::isMappedFileSupported ( )
static

◆ releaseMappedFileBuffer() [1/2]

static int DataSourceUtil::releaseMappedFileBuffer ( void *  ipBuffer,
int  iBufSize 
)
static

◆ releaseMappedFileBuffer() [2/2]

static int DataSourceUtil::releaseMappedFileBuffer ( void *  ipBuffer,
int  iBufSize 
)
static

◆ ReleaseSize() [1/4]

static void DataSourceUtil::ReleaseSize ( int  iSize)
static

◆ ReleaseSize() [2/4]

static void DataSourceUtil::ReleaseSize ( int  iSize)
static

◆ ReleaseSize() [3/4]

static void DataSourceUtil::ReleaseSize ( int  iSize,
std::string &  iComponentID 
)
static

◆ ReleaseSize() [4/4]

static void DataSourceUtil::ReleaseSize ( int  iSize,
std::string &  iComponentID 
)
static

◆ reloadMappedFileBuffer() [1/2]

static int DataSourceUtil::reloadMappedFileBuffer ( const char *  ipFilePath,
int  length,
int  offset,
int  offsetAligned,
void **  oppBuffer,
void **  oppBufAligned 
)
static

◆ reloadMappedFileBuffer() [2/2]

static int DataSourceUtil::reloadMappedFileBuffer ( const char *  ipFilePath,
int  length,
int  offset,
int  offsetAligned,
void **  oppBuffer,
void **  oppBufAligned 
)
static

◆ removeLocalFolder() [1/2]

static int DataSourceUtil::removeLocalFolder ( )
static

◆ removeLocalFolder() [2/2]

static int DataSourceUtil::removeLocalFolder ( )
static

◆ RemoveOldFiles() [1/2]

static int DataSourceUtil::RemoveOldFiles ( const char *  ipDir,
int  iDay 
)
static

◆ RemoveOldFiles() [2/2]

static int DataSourceUtil::RemoveOldFiles ( const char *  ipDir,
int  iDay 
)
static

◆ removeSubFolder() [1/2]

static int DataSourceUtil::removeSubFolder ( MBase::CString irPath)
static

◆ removeSubFolder() [2/2]

static int DataSourceUtil::removeSubFolder ( MBase::CString irPath)
static

◆ ReserveSize() [1/4]

static long DataSourceUtil::ReserveSize ( int  iSize)
static

◆ ReserveSize() [2/4]

static long DataSourceUtil::ReserveSize ( int  iSize)
static

◆ ReserveSize() [3/4]

static void DataSourceUtil::ReserveSize ( int  iSize,
std::string &  iComponentID 
)
static

◆ ReserveSize() [4/4]

static void DataSourceUtil::ReserveSize ( int  iSize,
std::string &  iComponentID 
)
static