Lines Matching refs:pImpl
737 FileHandle_Impl * pImpl = new FileHandle_Impl (fd); in osl_createFileHandleFromFD() local
738 if (0 == pImpl) in osl_createFileHandleFromFD()
742 pImpl->m_state |= FileHandle_Impl::STATE_WRITEABLE; in osl_createFileHandleFromFD()
746 pImpl->m_state &= ~FileHandle_Impl::STATE_SEEKABLE; in osl_createFileHandleFromFD()
751 pImpl->m_size = sal::static_int_cast< sal_uInt64 >(aFileStat.st_size); in osl_createFileHandleFromFD()
755 pImpl->m_fd, rtl_string_getStr(pImpl->m_strFilePath)); in osl_createFileHandleFromFD()
756 return (oslFileHandle)(pImpl); in osl_createFileHandleFromFD()
942 FileHandle_Impl * pImpl = new FileHandle_Impl (fd, buffer); in osl_openFile() local
943 if (!pImpl) in osl_openFile()
950 pImpl->m_state |= FileHandle_Impl::STATE_WRITEABLE; in osl_openFile()
951 pImpl->m_size = sal::static_int_cast< sal_uInt64 >(aFileStat.st_size); in osl_openFile()
953 OSL_TRACE("osl_openFile(%d, %s) => %s", pImpl->m_fd, in osl_openFile()
955 rtl_string_getStr(pImpl->m_strFilePath)); in osl_openFile()
957 *pHandle = (oslFileHandle)(pImpl); in osl_openFile()
967 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_closeFile() local
969 if ((pImpl == 0) || (pImpl->m_fd < 0)) in osl_closeFile()
972 (void) pthread_mutex_lock (&(pImpl->m_mutex)); in osl_closeFile()
975 OSL_TRACE("osl_closeFile(%d) => %s", pImpl->m_fd, rtl_string_getStr(pImpl->m_strFilePath)); in osl_closeFile()
976 oslFileError result = pImpl->syncFile(); in osl_closeFile()
980 (void) close (pImpl->m_fd); in osl_closeFile()
982 else if (-1 == close (pImpl->m_fd)) in osl_closeFile()
988 (void) pthread_mutex_unlock (&(pImpl->m_mutex)); in osl_closeFile()
989 delete pImpl; in osl_closeFile()
999 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_syncFile() local
1001 if ((0 == pImpl) || (-1 == pImpl->m_fd)) in osl_syncFile()
1004 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_syncFile()
1006 OSL_TRACE("osl_syncFile(%d)", pImpl->m_fd); in osl_syncFile()
1007 oslFileError result = pImpl->syncFile(); in osl_syncFile()
1010 if (-1 == fsync (pImpl->m_fd)) in osl_syncFile()
1028 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_mapFile() local
1030 if ((0 == pImpl) || (-1 == pImpl->m_fd) || (0 == ppAddr)) in osl_mapFile()
1044 void* p = mmap(NULL, nLength, PROT_READ, MAP_SHARED, pImpl->m_fd, nOffset); in osl_mapFile()
1131 FileHandle_Impl * pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_readLine() local
1133 if ((0 == pImpl) || (-1 == pImpl->m_fd) || (0 == ppSequence)) in osl_readLine()
1138 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_readLine()
1139 oslFileError result = pImpl->readLineAt ( in osl_readLine()
1140 pImpl->m_fileptr, ppSequence, &uBytesRead); in osl_readLine()
1142 pImpl->m_fileptr += uBytesRead; in osl_readLine()
1156 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_readFile() local
1158 if ((0 == pImpl) || (-1 == pImpl->m_fd) || (0 == pBuffer) || (0 == pBytesRead)) in osl_readFile()
1167 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_readFile()
1168 oslFileError result = pImpl->readFileAt ( in osl_readFile()
1169 pImpl->m_fileptr, pBuffer, nBytesRequested, pBytesRead); in osl_readFile()
1171 pImpl->m_fileptr += *pBytesRead; in osl_readFile()
1185 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_writeFile() local
1187 if ((0 == pImpl) || (-1 == pImpl->m_fd) || (0 == pBuffer) || (0 == pBytesWritten)) in osl_writeFile()
1189 if (0 == (pImpl->m_state & FileHandle_Impl::STATE_WRITEABLE)) in osl_writeFile()
1198 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_writeFile()
1199 oslFileError result = pImpl->writeFileAt ( in osl_writeFile()
1200 pImpl->m_fileptr, pBuffer, nBytesToWrite, pBytesWritten); in osl_writeFile()
1202 pImpl->m_fileptr += *pBytesWritten; in osl_writeFile()
1217 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_readFileAt() local
1219 if ((0 == pImpl) || (-1 == pImpl->m_fd) || (0 == pBuffer) || (0 == pBytesRead)) in osl_readFileAt()
1221 if (0 == (pImpl->m_state & FileHandle_Impl::STATE_SEEKABLE)) in osl_readFileAt()
1235 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_readFileAt()
1236 return pImpl->readFileAt (nOffset, pBuffer, nBytesRequested, pBytesRead); in osl_readFileAt()
1250 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_writeFileAt() local
1252 if ((0 == pImpl) || (-1 == pImpl->m_fd) || (0 == pBuffer) || (0 == pBytesWritten)) in osl_writeFileAt()
1254 if (0 == (pImpl->m_state & FileHandle_Impl::STATE_SEEKABLE)) in osl_writeFileAt()
1256 if (0 == (pImpl->m_state & FileHandle_Impl::STATE_WRITEABLE)) in osl_writeFileAt()
1270 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_writeFileAt()
1271 return pImpl->writeFileAt (nOffset, pBuffer, nBytesToWrite, pBytesWritten); in osl_writeFileAt()
1280 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_isEndOfFile() local
1282 if ((0 == pImpl) || (-1 == pImpl->m_fd) || (0 == pIsEOF)) in osl_isEndOfFile()
1285 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_isEndOfFile()
1286 *pIsEOF = (pImpl->getPos() == pImpl->getSize()); in osl_isEndOfFile()
1296 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_getFilePos() local
1298 if ((0 == pImpl) || (-1 == pImpl->m_fd) || (0 == pPos)) in osl_getFilePos()
1301 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_getFilePos()
1302 *pPos = pImpl->getPos(); in osl_getFilePos()
1312 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_setFilePos() local
1314 if ((0 == pImpl) || (-1 == pImpl->m_fd)) in osl_setFilePos()
1322 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_setFilePos()
1331 nPos = sal::static_int_cast< off_t >(pImpl->getPos()); in osl_setFilePos()
1339 nPos = sal::static_int_cast< off_t >(pImpl->getSize()); in osl_setFilePos()
1350 return pImpl->setPos (nPos + nOffset); in osl_setFilePos()
1359 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_getFileSize() local
1361 if ((0 == pImpl) || (-1 == pImpl->m_fd) || (0 == pSize)) in osl_getFileSize()
1364 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_getFileSize()
1365 *pSize = pImpl->getSize(); in osl_getFileSize()
1375 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_setFileSize() local
1377 if ((0 == pImpl) || (-1 == pImpl->m_fd)) in osl_setFileSize()
1379 if (0 == (pImpl->m_state & FileHandle_Impl::STATE_WRITEABLE)) in osl_setFileSize()
1386 oslFileError result = pImpl->syncFile(); in osl_setFileSize()
1389 pImpl->m_bufptr = -1, pImpl->m_buflen = 0; in osl_setFileSize()
1391 return pImpl->setSize (uSize); in osl_setFileSize()