summaryrefslogtreecommitdiff
path: root/store/source/store.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'store/source/store.cxx')
-rw-r--r--store/source/store.cxx335
1 files changed, 0 insertions, 335 deletions
diff --git a/store/source/store.cxx b/store/source/store.cxx
index 1b5107fc3837..beedbee91ea7 100644
--- a/store/source/store.cxx
+++ b/store/source/store.cxx
@@ -200,77 +200,6 @@ storeError SAL_CALL store_flushFile (
return xManager->flush();
}
-/*
- * store_getFileRefererCount.
- */
-storeError SAL_CALL store_getFileRefererCount (
- storeFileHandle Handle,
- sal_uInt32 *pnRefCount
-) SAL_THROW_EXTERN_C()
-{
- OStoreHandle<OStorePageManager> xManager (
- OStoreHandle<OStorePageManager>::query (Handle));
- if (!xManager.is())
- return store_E_InvalidHandle;
-
- if (!pnRefCount)
- return store_E_InvalidParameter;
-
- *pnRefCount = xManager->getRefererCount();
- return store_E_None;
-}
-
-/*
- * store_getFileSize.
- */
-storeError SAL_CALL store_getFileSize (
- storeFileHandle Handle,
- sal_uInt32 *pnSize
-) SAL_THROW_EXTERN_C()
-{
- OStoreHandle<OStorePageManager> xManager (
- OStoreHandle<OStorePageManager>::query (Handle));
- if (!xManager.is())
- return store_E_InvalidHandle;
-
- if (!pnSize)
- return store_E_InvalidParameter;
-
- return xManager->size (*pnSize);
-}
-
-/*
- * store_rebuildFile.
- */
-storeError SAL_CALL store_rebuildFile (
- rtl_uString *pSrcFilename,
- rtl_uString *pDstFilename
-) SAL_THROW_EXTERN_C()
-{
- storeError eErrCode = store_E_None;
-
- if (!(pSrcFilename && pDstFilename))
- return store_E_InvalidParameter;
-
- Reference<OStorePageManager> xManager (new OStorePageManager());
- if (!xManager.is())
- return store_E_OutOfMemory;
-
- Reference<ILockBytes> xSrcLB;
- eErrCode = FileLockBytes_createInstance (xSrcLB, pSrcFilename, store_AccessReadOnly);
- if (eErrCode != store_E_None)
- return eErrCode;
- OSL_ASSERT(xSrcLB.is());
-
- Reference<ILockBytes> xDstLB;
- eErrCode = FileLockBytes_createInstance (xDstLB, pDstFilename, store_AccessCreate);
- if (eErrCode != store_E_None)
- return eErrCode;
- OSL_ASSERT(xDstLB.is());
-
- return xManager->rebuild (&*xSrcLB, &*xDstLB);
-}
-
/*========================================================================
*
* storeDirectoryHandle implementation.
@@ -317,22 +246,6 @@ storeError SAL_CALL store_openDirectory (
}
/*
- * store_closeDirectory.
- */
-storeError SAL_CALL store_closeDirectory (
- storeDirectoryHandle Handle
-) SAL_THROW_EXTERN_C()
-{
- OStoreDirectory_Impl *pDirectory =
- OStoreHandle<OStoreDirectory_Impl>::query (Handle);
- if (!pDirectory)
- return store_E_InvalidHandle;
-
- pDirectory->release();
- return store_E_None;
-}
-
-/*
* store_findFirst.
*/
storeError SAL_CALL store_findFirst (
@@ -427,22 +340,6 @@ storeError SAL_CALL store_openStream (
}
/*
- * store_closeStream.
- */
-storeError SAL_CALL store_closeStream (
- storeStreamHandle Handle
-) SAL_THROW_EXTERN_C()
-{
- OStoreLockBytes *pLockBytes =
- OStoreHandle<OStoreLockBytes>::query (Handle);
- if (!pLockBytes)
- return store_E_InvalidHandle;
-
- pLockBytes->release();
- return store_E_None;
-}
-
-/*
* store_readStream.
*/
storeError SAL_CALL store_readStream (
@@ -487,238 +384,6 @@ storeError SAL_CALL store_writeStream (
}
/*
- * store_flushStream.
- */
-storeError SAL_CALL store_flushStream (
- storeStreamHandle Handle
-) SAL_THROW_EXTERN_C()
-{
- OStoreHandle<OStoreLockBytes> xLockBytes (
- OStoreHandle<OStoreLockBytes>::query (Handle));
- if (!xLockBytes.is())
- return store_E_InvalidHandle;
-
- return xLockBytes->flush();
-}
-
-/*
- * store_getStreamSize.
- */
-storeError SAL_CALL store_getStreamSize (
- storeStreamHandle Handle,
- sal_uInt32 *pnSize
-) SAL_THROW_EXTERN_C()
-{
- OStoreHandle<OStoreLockBytes> xLockBytes (
- OStoreHandle<OStoreLockBytes>::query (Handle));
- if (!xLockBytes.is())
- return store_E_InvalidHandle;
-
- if (!pnSize)
- return store_E_InvalidParameter;
-
- return xLockBytes->stat (*pnSize);
-}
-
-/*
- * store_setStreamSize.
- */
-storeError SAL_CALL store_setStreamSize (
- storeStreamHandle Handle,
- sal_uInt32 nSize
-) SAL_THROW_EXTERN_C()
-{
- OStoreHandle<OStoreLockBytes> xLockBytes (
- OStoreHandle<OStoreLockBytes>::query (Handle));
- if (!xLockBytes.is())
- return store_E_InvalidHandle;
-
- return xLockBytes->setSize (nSize);
-}
-
-/*========================================================================
- *
- * Common storeDirectoryHandle and storeStreamHandle operations.
- *
- *======================================================================*/
-/*
- * store_attrib.
- */
-storeError SAL_CALL store_attrib (
- storeFileHandle Handle,
- rtl_uString *pPath,
- rtl_uString *pName,
- sal_uInt32 nMask1,
- sal_uInt32 nMask2,
- sal_uInt32 *pnAttrib
-) SAL_THROW_EXTERN_C()
-{
- storeError eErrCode = store_E_None;
- if (pnAttrib)
- *pnAttrib = 0;
-
- OStoreHandle<OStorePageManager> xManager (
- OStoreHandle<OStorePageManager>::query (Handle));
- if (!xManager.is())
- return store_E_InvalidHandle;
-
- if (!(pPath && pName))
- return store_E_InvalidParameter;
-
- // Setup page key.
- OString aPath (pPath->buffer, pPath->length, RTL_TEXTENCODING_UTF8);
- OString aName (pName->buffer, pName->length, RTL_TEXTENCODING_UTF8);
- OStorePageKey aKey;
-
- eErrCode = OStorePageManager::namei (aPath.pData, aName.pData, aKey);
- if (eErrCode != store_E_None)
- return eErrCode;
-
- // Obtain or modify page attributes.
- sal_uInt32 nAttrib = 0;
- eErrCode = xManager->attrib (aKey, nMask1, nMask2, nAttrib);
- if (pnAttrib)
- *pnAttrib = nAttrib;
- return eErrCode;
-}
-
-/*
- * store_link.
- */
-storeError SAL_CALL store_link (
- storeFileHandle Handle,
- rtl_uString *pSrcPath, rtl_uString *pSrcName,
- rtl_uString *pDstPath, rtl_uString *pDstName
-) SAL_THROW_EXTERN_C()
-{
- storeError eErrCode = store_E_None;
-
- OStoreHandle<OStorePageManager> xManager (
- OStoreHandle<OStorePageManager>::query (Handle));
- if (!xManager.is())
- return store_E_InvalidHandle;
-
- if (!(pSrcPath && pSrcName))
- return store_E_InvalidParameter;
-
- if (!(pDstPath && pDstName))
- return store_E_InvalidParameter;
-
- // Setup 'Source' page key.
- OString aSrcPath (
- pSrcPath->buffer, pSrcPath->length, RTL_TEXTENCODING_UTF8);
- OString aSrcName (
- pSrcName->buffer, pSrcName->length, RTL_TEXTENCODING_UTF8);
- OStorePageKey aSrcKey;
-
- eErrCode = OStorePageManager::namei (
- aSrcPath.pData, aSrcName.pData, aSrcKey);
- if (eErrCode != store_E_None)
- return eErrCode;
-
- // Setup 'Destination' page key.
- OString aDstPath (
- pDstPath->buffer, pDstPath->length, RTL_TEXTENCODING_UTF8);
- OString aDstName (
- pDstName->buffer, pDstName->length, RTL_TEXTENCODING_UTF8);
- OStorePageKey aDstKey;
-
- eErrCode = OStorePageManager::namei (
- aDstPath.pData, aDstName.pData, aDstKey);
- if (eErrCode != store_E_None)
- return eErrCode;
-
- // Link 'Source' hard to 'Destination'.
- return xManager->link (aSrcKey, aDstKey);
-}
-
-/*
- * store_symlink.
- */
-storeError SAL_CALL store_symlink (
- storeFileHandle Handle,
- rtl_uString *pSrcPath, rtl_uString *pSrcName,
- rtl_uString *pDstPath, rtl_uString *pDstName
-) SAL_THROW_EXTERN_C()
-{
- storeError eErrCode = store_E_None;
-
- OStoreHandle<OStorePageManager> xManager (
- OStoreHandle<OStorePageManager>::query (Handle));
- if (!xManager.is())
- return store_E_InvalidHandle;
-
- if (!(pSrcPath && pSrcName))
- return store_E_InvalidParameter;
-
- if (!(pDstPath && pDstName))
- return store_E_InvalidParameter;
-
- // Setup 'Destination' page key.
- OString aDstPath (
- pDstPath->buffer, pDstPath->length, RTL_TEXTENCODING_UTF8);
- OString aDstName (
- pDstName->buffer, pDstName->length, RTL_TEXTENCODING_UTF8);
- OStorePageKey aDstKey;
-
- eErrCode = OStorePageManager::namei (
- aDstPath.pData, aDstName.pData, aDstKey);
- if (eErrCode != store_E_None)
- return eErrCode;
-
- // Insert 'Source' as symlink to 'Destination'.
- OString aSrcPath (
- pSrcPath->buffer, pSrcPath->length, RTL_TEXTENCODING_UTF8);
- OString aSrcName (
- pSrcName->buffer, pSrcName->length, RTL_TEXTENCODING_UTF8);
-
- return xManager->symlink (aSrcPath.pData, aSrcName.pData, aDstKey);
-}
-
-/*
- * store_rename.
- */
-storeError SAL_CALL store_rename (
- storeFileHandle Handle,
- rtl_uString *pSrcPath, rtl_uString *pSrcName,
- rtl_uString *pDstPath, rtl_uString *pDstName
-) SAL_THROW_EXTERN_C()
-{
- storeError eErrCode = store_E_None;
-
- OStoreHandle<OStorePageManager> xManager (
- OStoreHandle<OStorePageManager>::query (Handle));
- if (!xManager.is())
- return store_E_InvalidHandle;
-
- if (!(pSrcPath && pSrcName))
- return store_E_InvalidParameter;
-
- if (!(pDstPath && pDstName))
- return store_E_InvalidParameter;
-
- // Setup 'Source' page key.
- OString aSrcPath (
- pSrcPath->buffer, pSrcPath->length, RTL_TEXTENCODING_UTF8);
- OString aSrcName (
- pSrcName->buffer, pSrcName->length, RTL_TEXTENCODING_UTF8);
- OStorePageKey aSrcKey;
-
- eErrCode = OStorePageManager::namei (
- aSrcPath.pData, aSrcName.pData, aSrcKey);
- if (eErrCode != store_E_None)
- return eErrCode;
-
- // Rename 'Source' into 'Destination'.
- OString aDstPath (
- pDstPath->buffer, pDstPath->length, RTL_TEXTENCODING_UTF8);
- OString aDstName (
- pDstName->buffer, pDstName->length, RTL_TEXTENCODING_UTF8);
-
- return xManager->rename (aSrcKey, aDstPath.pData, aDstName.pData);
-}
-
-/*
* store_remove.
*/
storeError SAL_CALL store_remove (