1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _STORE_STORDIR_HXX_
30 #define _STORE_STORDIR_HXX_
32 #include <sal/types.h>
34 #include <rtl/textcvt.h>
35 #include <rtl/string.h>
36 #include <rtl/ref.hxx>
39 #include "storbase.hxx"
40 #include "storpage.hxx"
45 struct OStoreDirectoryPageData
;
47 /*========================================================================
49 * OStoreDirectory_Impl interface.
51 *======================================================================*/
52 class OStoreDirectory_Impl
: public store::OStoreObject
57 OStoreDirectory_Impl (void);
59 /** create (two-phase construction).
60 * @param pManager [in]
63 * @param eAccessMode [in]
64 * @return store_E_None upon success.
67 OStorePageManager
*pManager
,
70 storeAccessMode eAccessMode
);
73 * @param rFindData [out]
74 * @return store_E_None upon success,
75 * store_E_NoMoreFiles upon end of iteration.
78 storeFindData
&rFindData
);
82 virtual sal_Bool SAL_CALL
isKindOf (sal_uInt32 nTypeId
);
87 virtual ~OStoreDirectory_Impl (void);
90 /** IStoreHandle TypeId.
92 static const sal_uInt32 m_nTypeId
;
94 /** IStoreHandle query() template function specialization.
96 friend OStoreDirectory_Impl
*
97 SAL_CALL query
<> (IStoreHandle
*pHandle
, OStoreDirectory_Impl
*);
101 typedef OStoreDirectoryPageData inode
;
102 typedef PageHolderObject
< inode
> inode_holder_type
;
104 rtl::Reference
<OStorePageManager
> m_xManager
;
106 OStorePageDescriptor m_aDescr
;
108 rtl_TextToUnicodeConverter m_hTextCvt
;
112 OStoreDirectory_Impl (const OStoreDirectory_Impl
&);
113 OStoreDirectory_Impl
& operator= (const OStoreDirectory_Impl
&);
116 template<> inline OStoreDirectory_Impl
*
117 SAL_CALL
query (IStoreHandle
*pHandle
, OStoreDirectory_Impl
*)
119 if (pHandle
&& pHandle
->isKindOf (OStoreDirectory_Impl::m_nTypeId
))
121 // Handle is kind of OStoreDirectory_Impl.
122 return static_cast<OStoreDirectory_Impl
*>(pHandle
);
127 /*========================================================================
131 *======================================================================*/
135 #endif /* !_STORE_STORDIR_HXX_ */
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */