diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2009-03-13 15:52:34 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2009-03-13 15:52:34 +0000 |
commit | cbedb240486a21c5d5676e7a7f4e2ba17a55dbab (patch) | |
tree | ec2690bb5e5d18df0a9493c54cfac64f9e5ab494 /store/inc | |
parent | 32a3f76b3695cbf54fecc77730395bbace21c8bc (diff) |
CWS-TOOLING: integrate CWS mhu17
2009-01-23 14:08:09 +0100 mhu r266816 : CWS-TOOLING: rebase CWS mhu17 to trunk@266428 (milestone: DEV300:m39)
2009-01-16 17:49:37 +0100 mhu r266442 : #i98151# Migration to subversion.
2009-01-16 17:48:53 +0100 mhu r266441 : #i98151# Migration to subversion.
2009-01-16 17:47:56 +0100 mhu r266440 : #i98151# Migration to subversion.
Diffstat (limited to 'store/inc')
-rw-r--r-- | store/inc/store/filelckb.hxx | 162 | ||||
-rw-r--r-- | store/inc/store/lockbyte.hxx | 122 | ||||
-rw-r--r-- | store/inc/store/memlckb.hxx | 152 | ||||
-rw-r--r-- | store/inc/store/object.hxx | 134 |
4 files changed, 0 insertions, 570 deletions
diff --git a/store/inc/store/filelckb.hxx b/store/inc/store/filelckb.hxx deleted file mode 100644 index 77f6702e5bca..000000000000 --- a/store/inc/store/filelckb.hxx +++ /dev/null @@ -1,162 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: filelckb.hxx,v $ - * $Revision: 1.5 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _STORE_FILELCKB_HXX_ -#define _STORE_FILELCKB_HXX_ "$Revision: 1.5 $" - -#include <sal/types.h> -#include <rtl/ustring.h> -#include <osl/mutex.hxx> -#include <store/object.hxx> -#include <store/lockbyte.hxx> - -namespace store -{ - -class OFileLockBytes_Impl; - -/*======================================================================== - * - * OFileLockBytes interface. - * - *======================================================================*/ -class OFileLockBytes : - public store::OStoreObject, - public store::ILockBytes -{ -public: - /** Construction. - */ - OFileLockBytes (void); - - /** create. - @param pFilename [in] - @param eAccessMode [in] - @return store_E_None upon success - */ - storeError create ( - rtl_uString *pFilename, - storeAccessMode eAccessMode); - - /** Read at Offset into Buffer. - @param nOffset [in] - @param pBuffer [out] - @param nBytes [in] - @param rnDone [out] - @return store_E_None upon success - */ - virtual storeError readAt ( - sal_uInt32 nOffset, - void *pBuffer, - sal_uInt32 nBytes, - sal_uInt32 &rnDone); - - /** Write at Offset from Buffer. - @param nOffset [in] - @param pBuffer [in] - @param nBytes [in] - @param rnDone [out] - @return store_E_None upon success - */ - virtual storeError writeAt ( - sal_uInt32 nOffset, - const void *pBuffer, - sal_uInt32 nBytes, - sal_uInt32 &rnDone); - - /** flush. - @return store_E_None upon success - */ - virtual storeError flush (void); - - /** setSize. - @param nSize [in] - @return store_E_None upon success - */ - virtual storeError setSize (sal_uInt32 nSize); - - /** stat. - @param rnSize [out] - @return store_E_None upon success - */ - virtual storeError stat (sal_uInt32 &rnSize); - - /** Lock range at Offset. - @param nOffset [in] - @param nBytes [in] - @return store_E_None upon success - store_E_LockingViolation - */ - virtual storeError lockRange ( - sal_uInt32 nOffset, - sal_uInt32 nBytes); - - /** Unlock range at Offset. - @param nOffset [in] - @param nBytes [in] - @return store_E_None upon success - store_E_LockingViolation - */ - virtual storeError unlockRange ( - sal_uInt32 nOffset, - sal_uInt32 nBytes); - - /** Delegate multiple inherited IReference. - */ - virtual oslInterlockedCount SAL_CALL acquire (void); - virtual oslInterlockedCount SAL_CALL release (void); - -protected: - /** Destruction. - */ - virtual ~OFileLockBytes (void); - -private: - /** Representation. - */ - osl::Mutex m_aMutex; - OFileLockBytes_Impl *m_pImpl; - - /** Not implemented. - */ - OFileLockBytes (const OFileLockBytes&); - OFileLockBytes& operator= (const OFileLockBytes&); -}; - -/*======================================================================== - * - * The End. - * - *======================================================================*/ - -} // namespace store - -#endif /* !_STORE_FILELCKB_HXX_ */ - diff --git a/store/inc/store/lockbyte.hxx b/store/inc/store/lockbyte.hxx deleted file mode 100644 index a7e8c9751e4e..000000000000 --- a/store/inc/store/lockbyte.hxx +++ /dev/null @@ -1,122 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: lockbyte.hxx,v $ - * $Revision: 1.6 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _STORE_LOCKBYTE_HXX_ -#define _STORE_LOCKBYTE_HXX_ "$Revision: 1.6 $" - -#include <sal/types.h> -#include <rtl/ref.hxx> -#include <store/types.h> - -namespace store -{ - -/*======================================================================== - * - * ILockBytes interface. - * - *======================================================================*/ -class ILockBytes : public rtl::IReference -{ -public: - /** - @param nOffset [in] - @param pBuffer [out] - @param nBytes [in] - @param rnDone [out] - @return store_E_None upon success - */ - virtual storeError readAt ( - sal_uInt32 nOffset, - void *pBuffer, - sal_uInt32 nBytes, - sal_uInt32 &rnDone) = 0; - - /** - @param nOffset [in] - @param pBuffer [in] - @param nBytes [in] - @param rnDone [out] - @return store_E_None upon success - */ - virtual storeError writeAt ( - sal_uInt32 nOffset, - const void *pBuffer, - sal_uInt32 nBytes, - sal_uInt32 &rnDone) = 0; - - /** - @return store_E_None upon success - */ - virtual storeError flush (void) = 0; - - /** - @param nSize [in] - @return store_E_None upon success - */ - virtual storeError setSize (sal_uInt32 nSize) = 0; - - /** - @param rnSize [out] - @return store_E_None upon success - */ - virtual storeError stat (sal_uInt32 &rnSize) = 0; - - /** - @param nOffset [in] - @param nBytes [in] - @return store_E_None upon success - store_E_LockingViolation - */ - virtual storeError lockRange ( - sal_uInt32 nOffset, - sal_uInt32 nBytes) = 0; - - /** - @param nOffset [in] - @param nBytes [in] - @return store_E_None upon success - store_E_LockingViolation - */ - virtual storeError unlockRange ( - sal_uInt32 nOffset, - sal_uInt32 nBytes) = 0; -}; - -/*======================================================================== - * - * The End. - * - *======================================================================*/ - -} // namespace store - -#endif /* !_STORE_LOCKBYTE_HXX_ */ - diff --git a/store/inc/store/memlckb.hxx b/store/inc/store/memlckb.hxx deleted file mode 100644 index 213a6ffe75f7..000000000000 --- a/store/inc/store/memlckb.hxx +++ /dev/null @@ -1,152 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: memlckb.hxx,v $ - * $Revision: 1.5 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _STORE_MEMLCKB_HXX_ -#define _STORE_MEMLCKB_HXX_ "$Revision: 1.5 $" - -#include <sal/types.h> -#include <osl/mutex.hxx> -#include <store/object.hxx> -#include <store/lockbyte.hxx> - -namespace store -{ - -class OMemoryLockBytes_Impl; - -/*======================================================================== - * - * OMemoryLockBytes interface. - * - *======================================================================*/ -class OMemoryLockBytes : - public store::OStoreObject, - public store::ILockBytes -{ -public: - /** Construction. - */ - OMemoryLockBytes (void); - - /** Read at Offset into Buffer. - @param nOffset [in] - @param pBuffer [out] - @param nBytes [in] - @param rnDone [out] - @return store_E_None upon success - */ - virtual storeError readAt ( - sal_uInt32 nOffset, - void *pBuffer, - sal_uInt32 nBytes, - sal_uInt32 &rnDone); - - /** Write at Offset from Buffer. - @param nOffset [in] - @param pBuffer [in] - @param nBytes [in] - @param rnDone [out] - @return store_E_None upon success - */ - virtual storeError writeAt ( - sal_uInt32 nOffset, - const void *pBuffer, - sal_uInt32 nBytes, - sal_uInt32 &rnDone); - - /** flush. - @return store_E_None upon success - */ - virtual storeError flush (void); - - /** setSize. - @param nSize [in] - @return store_E_None upon success - */ - virtual storeError setSize (sal_uInt32 nSize); - - /** stat. - @param rnSize [out] - @return store_E_None upon success - */ - virtual storeError stat (sal_uInt32 &rnSize); - - /** Lock range at Offset. - @param nOffset [in] - @param nBytes [in] - @return store_E_None upon success - store_E_LockingViolation - */ - virtual storeError lockRange ( - sal_uInt32 nOffset, - sal_uInt32 nBytes); - - /** Unlock range at Offset. - @param nOffset [in] - @param nBytes [in] - @return store_E_None upon success - store_E_LockingViolation - */ - virtual storeError unlockRange ( - sal_uInt32 nOffset, - sal_uInt32 nBytes); - - /** Delegate multiple inherited IReference. - */ - virtual oslInterlockedCount SAL_CALL acquire (void); - virtual oslInterlockedCount SAL_CALL release (void); - -protected: - /** Destruction. - */ - virtual ~OMemoryLockBytes (void); - -private: - /** Representation. - */ - osl::Mutex m_aMutex; - OMemoryLockBytes_Impl *m_pImpl; - - /** Not implemented. - */ - OMemoryLockBytes (const OMemoryLockBytes&); - OMemoryLockBytes& operator= (const OMemoryLockBytes&); -}; - -/*======================================================================== - * - * The End. - * - *======================================================================*/ - -} // namespace store - -#endif /* !_STORE_MEMLCKB_HXX_ */ - diff --git a/store/inc/store/object.hxx b/store/inc/store/object.hxx deleted file mode 100644 index 5e8b41bba7cc..000000000000 --- a/store/inc/store/object.hxx +++ /dev/null @@ -1,134 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: object.hxx,v $ - * $Revision: 1.6 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _STORE_OBJECT_HXX_ -#define _STORE_OBJECT_HXX_ "$Revision: 1.6 $" - -#include <sal/types.h> -#include <rtl/ref.hxx> -#include <osl/interlck.h> - -namespace store -{ - -/*======================================================================== - * - * IStoreHandle interface. - * - *======================================================================*/ -class IStoreHandle : public rtl::IReference -{ -public: - /** Replaces dynamic_cast type checking. - */ - virtual sal_Bool SAL_CALL isKindOf (sal_uInt32 nTypeId) = 0; -}; - - -/** Template helper function as dynamic_cast replacement. - */ -template<class store_handle_type> -store_handle_type * SAL_CALL query ( - IStoreHandle * pHandle, store_handle_type *); - -/*======================================================================== - * - * OStoreObject interface. - * - *======================================================================*/ -class OStoreObject : public store::IStoreHandle -{ - /** Template function specialization as dynamic_cast replacement. - */ - friend OStoreObject* - SAL_CALL query<> (IStoreHandle *pHandle, OStoreObject*); - -public: - /** Construction. - */ - OStoreObject (void); - - /** Allocation. - */ - static void* operator new (size_t n); - static void operator delete (void *p); - - /** IStoreHandle. - */ - virtual sal_Bool SAL_CALL isKindOf (sal_uInt32 nTypeId); - - /** IReference. - */ - virtual oslInterlockedCount SAL_CALL acquire (void); - virtual oslInterlockedCount SAL_CALL release (void); - -protected: - /** Destruction. - */ - virtual ~OStoreObject (void); - -private: - /** The IStoreHandle TypeId. - */ - static const sal_uInt32 m_nTypeId; - - /** Representation. - */ - oslInterlockedCount m_nRefCount; - - /** Not implemented. - */ - OStoreObject (const OStoreObject&); - OStoreObject& operator= (const OStoreObject&); -}; - -/** Template function specialization as dynamic_cast replacement. - */ -template<> inline OStoreObject* -SAL_CALL query (IStoreHandle *pHandle, OStoreObject*) -{ - if (pHandle && pHandle->isKindOf (OStoreObject::m_nTypeId)) - { - // Handle is kind of OStoreObject. - return static_cast<OStoreObject*>(pHandle); - } - return 0; -} - -/*======================================================================== - * - * The End. - * - *======================================================================*/ - -} // namespace store - -#endif /* !_STORE_OBJECT_HXX_ */ - |