1 /*************************************************************************
3 * OpenOffice.org - a multi-platform office productivity suite
5 * $RCSfile: stordir.hxx,v $
9 * last change: $Author: mhu $ $Date: 2008/10/17 16:30:17 $
11 * The Contents of this file are made available subject to
12 * the terms of GNU Lesser General Public License Version 2.1.
15 * GNU Lesser General Public License Version 2.1
16 * =============================================
17 * Copyright 2005 by Sun Microsystems, Inc.
18 * 901 San Antonio Road, Palo Alto, CA 94303, USA
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License version 2.1, as published by the Free Software Foundation.
24 * This library is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 * Lesser General Public License for more details.
29 * You should have received a copy of the GNU Lesser General Public
30 * License along with this library; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
34 ************************************************************************/
36 #ifndef _STORE_STORDIR_HXX_
37 #define _STORE_STORDIR_HXX_ "$Revision: 1.1.2.2 $"
40 #include <sal/types.h>
43 #ifndef _RTL_TEXTCVT_H_
44 #include <rtl/textcvt.h>
46 #ifndef _RTL_STRING_H_
47 #include <rtl/string.h>
50 #include <rtl/ref.hxx>
53 #ifndef _STORE_OBJECT_HXX_
56 #ifndef _STORE_STORBASE_HXX_
57 #include "storbase.hxx"
59 #ifndef _STORE_STORPAGE_HXX_
60 #include "storpage.hxx"
66 struct OStoreDirectoryPageData
;
68 /*========================================================================
70 * OStoreDirectory_Impl interface.
72 *======================================================================*/
73 class OStoreDirectory_Impl
: public store::OStoreObject
78 OStoreDirectory_Impl (void);
80 /** create (two-phase construction).
81 * @param pManager [in]
84 * @param eAccessMode [in]
85 * @return store_E_None upon success.
88 OStorePageManager
*pManager
,
91 storeAccessMode eAccessMode
);
94 * @param rFindData [out]
95 * @return store_E_None upon success,
96 * store_E_NoMoreFiles upon end of iteration.
99 storeFindData
&rFindData
);
103 virtual sal_Bool SAL_CALL
isKindOf (sal_uInt32 nTypeId
);
108 virtual ~OStoreDirectory_Impl (void);
111 /** IStoreHandle TypeId.
113 static const sal_uInt32 m_nTypeId
;
115 /** IStoreHandle query() template function specialization.
117 friend OStoreDirectory_Impl
*
118 SAL_CALL query
<> (IStoreHandle
*pHandle
, OStoreDirectory_Impl
*);
122 typedef OStoreDirectoryPageData inode
;
123 typedef PageHolderObject
< inode
> inode_holder_type
;
125 rtl::Reference
<OStorePageManager
> m_xManager
;
127 OStorePageDescriptor m_aDescr
;
129 rtl_TextToUnicodeConverter m_hTextCvt
;
133 OStoreDirectory_Impl (const OStoreDirectory_Impl
&);
134 OStoreDirectory_Impl
& operator= (const OStoreDirectory_Impl
&);
137 template<> inline OStoreDirectory_Impl
*
138 SAL_CALL
query (IStoreHandle
*pHandle
, OStoreDirectory_Impl
*)
140 if (pHandle
&& pHandle
->isKindOf (OStoreDirectory_Impl::m_nTypeId
))
142 // Handle is kind of OStoreDirectory_Impl.
143 return static_cast<OStoreDirectory_Impl
*>(pHandle
);
148 /*========================================================================
152 *======================================================================*/
156 #endif /* !_STORE_STORDIR_HXX_ */