update dev300-m58
[ooovba.git] / store / source / stordir.hxx
blobacfbf36af8d693f115796bc7cdc1398fa2227d75
1 /*************************************************************************
3 * OpenOffice.org - a multi-platform office productivity suite
5 * $RCSfile: stordir.hxx,v $
7 * $Revision: 1.1.2.2 $
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,
32 * MA 02111-1307 USA
34 ************************************************************************/
36 #ifndef _STORE_STORDIR_HXX_
37 #define _STORE_STORDIR_HXX_ "$Revision: 1.1.2.2 $"
39 #ifndef _SAL_TYPES_H_
40 #include <sal/types.h>
41 #endif
43 #ifndef _RTL_TEXTCVT_H_
44 #include <rtl/textcvt.h>
45 #endif
46 #ifndef _RTL_STRING_H_
47 #include <rtl/string.h>
48 #endif
49 #ifndef _RTL_REF_HXX_
50 #include <rtl/ref.hxx>
51 #endif
53 #ifndef _STORE_OBJECT_HXX_
54 #include "object.hxx"
55 #endif
56 #ifndef _STORE_STORBASE_HXX_
57 #include "storbase.hxx"
58 #endif
59 #ifndef _STORE_STORPAGE_HXX_
60 #include "storpage.hxx"
61 #endif
63 namespace store
66 struct OStoreDirectoryPageData;
68 /*========================================================================
70 * OStoreDirectory_Impl interface.
72 *======================================================================*/
73 class OStoreDirectory_Impl : public store::OStoreObject
75 public:
76 /** Construction.
78 OStoreDirectory_Impl (void);
80 /** create (two-phase construction).
81 * @param pManager [in]
82 * @param pPath [in]
83 * @param pName [in]
84 * @param eAccessMode [in]
85 * @return store_E_None upon success.
87 storeError create (
88 OStorePageManager *pManager,
89 rtl_String *pPath,
90 rtl_String *pName,
91 storeAccessMode eAccessMode);
93 /** iterate.
94 * @param rFindData [out]
95 * @return store_E_None upon success,
96 * store_E_NoMoreFiles upon end of iteration.
98 storeError iterate (
99 storeFindData &rFindData);
101 /** IStoreHandle.
103 virtual sal_Bool SAL_CALL isKindOf (sal_uInt32 nTypeId);
105 protected:
106 /** Destruction.
108 virtual ~OStoreDirectory_Impl (void);
110 private:
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*);
120 /** Representation.
122 typedef OStoreDirectoryPageData inode;
123 typedef PageHolderObject< inode > inode_holder_type;
125 rtl::Reference<OStorePageManager> m_xManager;
127 OStorePageDescriptor m_aDescr;
128 sal_uInt32 m_nPath;
129 rtl_TextToUnicodeConverter m_hTextCvt;
131 /** Not implemented.
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);
145 return 0;
148 /*========================================================================
150 * The End.
152 *======================================================================*/
154 } // namespace store
156 #endif /* !_STORE_STORDIR_HXX_ */