1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_STORE_SOURCE_STORDIR_HXX
21 #define INCLUDED_STORE_SOURCE_STORDIR_HXX
23 #include <sal/types.h>
25 #include <rtl/textcvt.h>
26 #include <rtl/string.h>
27 #include <rtl/ref.hxx>
30 #include "storbase.hxx"
31 #include "storpage.hxx"
36 struct OStoreDirectoryPageData
;
38 /*========================================================================
40 * OStoreDirectory_Impl interface.
42 *======================================================================*/
43 class OStoreDirectory_Impl
: public store::OStoreObject
48 OStoreDirectory_Impl();
50 /** create (two-phase construction).
51 * @param pManager [in]
54 * @param eAccessMode [in]
55 * @return store_E_None upon success.
58 OStorePageManager
*pManager
,
61 storeAccessMode eAccessMode
);
64 * @param rFindData [out]
65 * @return store_E_None upon success,
66 * store_E_NoMoreFiles upon end of iteration.
69 storeFindData
&rFindData
);
73 virtual bool isKindOf (sal_uInt32 nTypeId
) SAL_OVERRIDE
;
78 virtual ~OStoreDirectory_Impl();
81 /** IStoreHandle TypeId.
83 static const sal_uInt32 m_nTypeId
;
85 /** IStoreHandle query() template function specialization.
87 friend OStoreDirectory_Impl
*
88 SAL_CALL query
<> (IStoreHandle
*pHandle
, OStoreDirectory_Impl
*);
92 typedef OStoreDirectoryPageData inode
;
93 typedef PageHolderObject
< inode
> inode_holder_type
;
95 rtl::Reference
<OStorePageManager
> m_xManager
;
97 OStorePageDescriptor m_aDescr
;
99 rtl_TextToUnicodeConverter m_hTextCvt
;
101 OStoreDirectory_Impl (const OStoreDirectory_Impl
&) SAL_DELETED_FUNCTION
;
102 OStoreDirectory_Impl
& operator= (const OStoreDirectory_Impl
&) SAL_DELETED_FUNCTION
;
105 template<> inline OStoreDirectory_Impl
*
106 SAL_CALL
query (IStoreHandle
*pHandle
, SAL_UNUSED_PARAMETER OStoreDirectory_Impl
*)
108 if (pHandle
&& pHandle
->isKindOf (OStoreDirectory_Impl::m_nTypeId
))
110 // Handle is kind of OStoreDirectory_Impl.
111 return static_cast<OStoreDirectory_Impl
*>(pHandle
);
116 /*========================================================================
120 *======================================================================*/
124 #endif // INCLUDED_STORE_SOURCE_STORDIR_HXX
126 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */