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 .
22 #include <sal/types.h>
24 #include <rtl/textcvt.h>
25 #include <rtl/string.h>
26 #include <rtl/ref.hxx>
29 #include "storbase.hxx"
34 class OStorePageManager
;
35 struct OStoreDirectoryPageData
;
37 class OStoreDirectory_Impl
: public store::OStoreObject
40 OStoreDirectory_Impl();
42 /** create (two-phase construction).
43 * @param pManager [in]
46 * @param eAccessMode [in]
47 * @return store_E_None upon success.
50 OStorePageManager
*pManager
,
51 rtl_String
const *pPath
,
52 rtl_String
const *pName
,
53 storeAccessMode eAccessMode
);
56 * @param rFindData [out]
57 * @return store_E_None upon success,
58 * store_E_NoMoreFiles upon end of iteration.
61 storeFindData
&rFindData
);
63 virtual bool isKindOf (sal_uInt32 nTypeId
) override
;
66 virtual ~OStoreDirectory_Impl() override
;
69 /** IStoreHandle TypeId.
71 static const sal_uInt32 m_nTypeId
;
73 /** IStoreHandle query() template function specialization.
75 friend OStoreDirectory_Impl
*
76 SAL_CALL query
<> (OStoreObject
*pHandle
, OStoreDirectory_Impl
*);
78 typedef OStoreDirectoryPageData inode
;
79 typedef PageHolderObject
< inode
> inode_holder_type
;
81 rtl::Reference
<OStorePageManager
> m_xManager
;
83 OStorePageDescriptor m_aDescr
;
85 rtl_TextToUnicodeConverter m_hTextCvt
;
87 OStoreDirectory_Impl (const OStoreDirectory_Impl
&) = delete;
88 OStoreDirectory_Impl
& operator= (const OStoreDirectory_Impl
&) = delete;
91 template<> inline OStoreDirectory_Impl
*
92 SAL_CALL
query (OStoreObject
*pHandle
, SAL_UNUSED_PARAMETER OStoreDirectory_Impl
*)
94 if (pHandle
&& pHandle
->isKindOf (OStoreDirectory_Impl::m_nTypeId
))
96 // Handle is kind of OStoreDirectory_Impl.
97 return static_cast<OStoreDirectory_Impl
*>(pHandle
);
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */