Lines Matching refs:pImpl
739 FileHandle_Impl * pImpl = new FileHandle_Impl (fd); in osl_createFileHandleFromFD() local
740 if (0 == pImpl) in osl_createFileHandleFromFD()
744 pImpl->m_state |= FileHandle_Impl::STATE_WRITEABLE; in osl_createFileHandleFromFD()
748 pImpl->m_state &= ~FileHandle_Impl::STATE_SEEKABLE; in osl_createFileHandleFromFD()
753 pImpl->m_size = sal::static_int_cast< sal_uInt64 >(aFileStat.st_size); in osl_createFileHandleFromFD()
757 pImpl->m_fd, rtl_string_getStr(pImpl->m_strFilePath)); in osl_createFileHandleFromFD()
758 return (oslFileHandle)(pImpl); in osl_createFileHandleFromFD()
944 FileHandle_Impl * pImpl = new FileHandle_Impl (fd, buffer); in osl_openFile() local
945 if (!pImpl) in osl_openFile()
952 pImpl->m_state |= FileHandle_Impl::STATE_WRITEABLE; in osl_openFile()
953 pImpl->m_size = sal::static_int_cast< sal_uInt64 >(aFileStat.st_size); in osl_openFile()
955 OSL_TRACE("osl_openFile(%d, %s) => %s", pImpl->m_fd, in osl_openFile()
957 rtl_string_getStr(pImpl->m_strFilePath)); in osl_openFile()
959 *pHandle = (oslFileHandle)(pImpl); in osl_openFile()
969 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_closeFile() local
971 if ((pImpl == 0) || (pImpl->m_fd < 0)) in osl_closeFile()
974 (void) pthread_mutex_lock (&(pImpl->m_mutex)); in osl_closeFile()
977 OSL_TRACE("osl_closeFile(%d) => %s", pImpl->m_fd, rtl_string_getStr(pImpl->m_strFilePath)); in osl_closeFile()
978 oslFileError result = pImpl->syncFile(); in osl_closeFile()
982 (void) close (pImpl->m_fd); in osl_closeFile()
984 else if (-1 == close (pImpl->m_fd)) in osl_closeFile()
990 (void) pthread_mutex_unlock (&(pImpl->m_mutex)); in osl_closeFile()
991 delete pImpl; in osl_closeFile()
1001 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_syncFile() local
1003 if ((0 == pImpl) || (-1 == pImpl->m_fd)) in osl_syncFile()
1006 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_syncFile()
1008 OSL_TRACE("osl_syncFile(%d)", pImpl->m_fd); in osl_syncFile()
1009 oslFileError result = pImpl->syncFile(); in osl_syncFile()
1012 if (-1 == fsync (pImpl->m_fd)) in osl_syncFile()
1030 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_mapFile() local
1032 if ((0 == pImpl) || (-1 == pImpl->m_fd) || (0 == ppAddr)) in osl_mapFile()
1046 void* p = mmap(NULL, nLength, PROT_READ, MAP_SHARED, pImpl->m_fd, nOffset); in osl_mapFile()
1133 FileHandle_Impl * pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_readLine() local
1135 if ((0 == pImpl) || (-1 == pImpl->m_fd) || (0 == ppSequence)) in osl_readLine()
1140 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_readLine()
1141 oslFileError result = pImpl->readLineAt ( in osl_readLine()
1142 pImpl->m_fileptr, ppSequence, &uBytesRead); in osl_readLine()
1144 pImpl->m_fileptr += uBytesRead; in osl_readLine()
1158 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_readFile() local
1160 if ((0 == pImpl) || (-1 == pImpl->m_fd) || (0 == pBuffer) || (0 == pBytesRead)) in osl_readFile()
1169 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_readFile()
1170 oslFileError result = pImpl->readFileAt ( in osl_readFile()
1171 pImpl->m_fileptr, pBuffer, nBytesRequested, pBytesRead); in osl_readFile()
1173 pImpl->m_fileptr += *pBytesRead; in osl_readFile()
1187 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_writeFile() local
1189 if ((0 == pImpl) || (-1 == pImpl->m_fd) || (0 == pBuffer) || (0 == pBytesWritten)) in osl_writeFile()
1191 if (0 == (pImpl->m_state & FileHandle_Impl::STATE_WRITEABLE)) in osl_writeFile()
1200 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_writeFile()
1201 oslFileError result = pImpl->writeFileAt ( in osl_writeFile()
1202 pImpl->m_fileptr, pBuffer, nBytesToWrite, pBytesWritten); in osl_writeFile()
1204 pImpl->m_fileptr += *pBytesWritten; in osl_writeFile()
1219 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_readFileAt() local
1221 if ((0 == pImpl) || (-1 == pImpl->m_fd) || (0 == pBuffer) || (0 == pBytesRead)) in osl_readFileAt()
1223 if (0 == (pImpl->m_state & FileHandle_Impl::STATE_SEEKABLE)) in osl_readFileAt()
1237 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_readFileAt()
1238 return pImpl->readFileAt (nOffset, pBuffer, nBytesRequested, pBytesRead); in osl_readFileAt()
1252 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_writeFileAt() local
1254 if ((0 == pImpl) || (-1 == pImpl->m_fd) || (0 == pBuffer) || (0 == pBytesWritten)) in osl_writeFileAt()
1256 if (0 == (pImpl->m_state & FileHandle_Impl::STATE_SEEKABLE)) in osl_writeFileAt()
1258 if (0 == (pImpl->m_state & FileHandle_Impl::STATE_WRITEABLE)) in osl_writeFileAt()
1272 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_writeFileAt()
1273 return pImpl->writeFileAt (nOffset, pBuffer, nBytesToWrite, pBytesWritten); in osl_writeFileAt()
1282 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_isEndOfFile() local
1284 if ((0 == pImpl) || (-1 == pImpl->m_fd) || (0 == pIsEOF)) in osl_isEndOfFile()
1287 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_isEndOfFile()
1288 *pIsEOF = (pImpl->getPos() == pImpl->getSize()); in osl_isEndOfFile()
1298 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_getFilePos() local
1300 if ((0 == pImpl) || (-1 == pImpl->m_fd) || (0 == pPos)) in osl_getFilePos()
1303 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_getFilePos()
1304 *pPos = pImpl->getPos(); in osl_getFilePos()
1314 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_setFilePos() local
1316 if ((0 == pImpl) || (-1 == pImpl->m_fd)) in osl_setFilePos()
1324 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_setFilePos()
1333 nPos = sal::static_int_cast< off_t >(pImpl->getPos()); in osl_setFilePos()
1341 nPos = sal::static_int_cast< off_t >(pImpl->getSize()); in osl_setFilePos()
1352 return pImpl->setPos (nPos + nOffset); in osl_setFilePos()
1361 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_getFileSize() local
1363 if ((0 == pImpl) || (-1 == pImpl->m_fd) || (0 == pSize)) in osl_getFileSize()
1366 FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); in osl_getFileSize()
1367 *pSize = pImpl->getSize(); in osl_getFileSize()
1377 FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); in osl_setFileSize() local
1379 if ((0 == pImpl) || (-1 == pImpl->m_fd)) in osl_setFileSize()
1381 if (0 == (pImpl->m_state & FileHandle_Impl::STATE_WRITEABLE)) in osl_setFileSize()
1388 oslFileError result = pImpl->syncFile(); in osl_setFileSize()
1391 pImpl->m_bufptr = -1, pImpl->m_buflen = 0; in osl_setFileSize()
1393 return pImpl->setSize (uSize); in osl_setFileSize()