Version 4.0.2.1, tag libreoffice-4.0.2.1
[LibreOffice.git] / ucb / source / ucp / file / filrow.hxx
blob9c160110c4eff619023afcf776d00b2cebc3399b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef _FILROW_HXX_
20 #define _FILROW_HXX_
22 #include <ucbhelper/macros.hxx>
24 #include "osl/mutex.hxx"
25 #include <cppuhelper/weak.hxx>
26 #include <com/sun/star/sdbc/XRow.hpp>
27 #include <com/sun/star/script/XTypeConverter.hpp>
28 #include <com/sun/star/lang/XTypeProvider.hpp>
29 #include <com/sun/star/ucb/XContentProvider.hpp>
31 namespace fileaccess {
33 class shell;
35 class XRow_impl:
36 public cppu::OWeakObject,
37 public com::sun::star::lang::XTypeProvider,
38 public com::sun::star::sdbc::XRow
40 public:
41 XRow_impl( shell* pShell,const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& __m_aValueMap );
42 ~XRow_impl();
44 virtual com::sun::star::uno::Any SAL_CALL
45 queryInterface(
46 const com::sun::star::uno::Type& aType )
47 throw( com::sun::star::uno::RuntimeException);
49 virtual void SAL_CALL
50 acquire(
51 void )
52 throw();
54 virtual void SAL_CALL
55 release(
56 void )
57 throw();
59 // XTypeProvider
61 XTYPEPROVIDER_DECL()
63 virtual sal_Bool SAL_CALL
64 wasNull(
65 void )
66 throw( com::sun::star::sdbc::SQLException,
67 com::sun::star::uno::RuntimeException );
69 virtual rtl::OUString SAL_CALL
70 getString(
71 sal_Int32 columnIndex )
72 throw( com::sun::star::sdbc::SQLException,
73 com::sun::star::uno::RuntimeException);
75 virtual sal_Bool SAL_CALL
76 getBoolean(
77 sal_Int32 columnIndex )
78 throw( com::sun::star::sdbc::SQLException,
79 com::sun::star::uno::RuntimeException);
81 virtual sal_Int8 SAL_CALL
82 getByte(
83 sal_Int32 columnIndex )
84 throw( com::sun::star::sdbc::SQLException,
85 com::sun::star::uno::RuntimeException);
87 virtual sal_Int16 SAL_CALL
88 getShort(
89 sal_Int32 columnIndex )
90 throw(
91 com::sun::star::sdbc::SQLException,
92 com::sun::star::uno::RuntimeException );
94 virtual sal_Int32 SAL_CALL
95 getInt(
96 sal_Int32 columnIndex )
97 throw( com::sun::star::sdbc::SQLException,
98 com::sun::star::uno::RuntimeException );
100 virtual sal_Int64 SAL_CALL
101 getLong(
102 sal_Int32 columnIndex )
103 throw( com::sun::star::sdbc::SQLException,
104 com::sun::star::uno::RuntimeException );
106 virtual float SAL_CALL
107 getFloat(
108 sal_Int32 columnIndex )
109 throw( com::sun::star::sdbc::SQLException,
110 com::sun::star::uno::RuntimeException);
112 virtual double SAL_CALL
113 getDouble(
114 sal_Int32 columnIndex )
115 throw( com::sun::star::sdbc::SQLException,
116 com::sun::star::uno::RuntimeException);
118 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
119 getBytes(
120 sal_Int32 columnIndex )
121 throw( com::sun::star::sdbc::SQLException,
122 com::sun::star::uno::RuntimeException);
124 virtual com::sun::star::util::Date SAL_CALL
125 getDate(
126 sal_Int32 columnIndex )
127 throw( com::sun::star::sdbc::SQLException,
128 com::sun::star::uno::RuntimeException);
130 virtual com::sun::star::util::Time SAL_CALL
131 getTime(
132 sal_Int32 columnIndex )
133 throw( com::sun::star::sdbc::SQLException,
134 com::sun::star::uno::RuntimeException);
136 virtual com::sun::star::util::DateTime SAL_CALL
137 getTimestamp(
138 sal_Int32 columnIndex )
139 throw( com::sun::star::sdbc::SQLException,
140 com::sun::star::uno::RuntimeException);
142 virtual com::sun::star::uno::Reference< com::sun::star::io::XInputStream > SAL_CALL
143 getBinaryStream(
144 sal_Int32 columnIndex )
145 throw( com::sun::star::sdbc::SQLException,
146 com::sun::star::uno::RuntimeException);
148 virtual com::sun::star::uno::Reference< com::sun::star::io::XInputStream > SAL_CALL
149 getCharacterStream(
150 sal_Int32 columnIndex )
151 throw( com::sun::star::sdbc::SQLException,
152 com::sun::star::uno::RuntimeException);
154 virtual com::sun::star::uno::Any SAL_CALL
155 getObject(
156 sal_Int32 columnIndex,
157 const com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& typeMap )
158 throw( com::sun::star::sdbc::SQLException,
159 com::sun::star::uno::RuntimeException);
161 virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XRef > SAL_CALL
162 getRef(
163 sal_Int32 columnIndex )
164 throw( com::sun::star::sdbc::SQLException,
165 com::sun::star::uno::RuntimeException);
167 virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XBlob > SAL_CALL
168 getBlob(
169 sal_Int32 columnIndex )
170 throw( com::sun::star::sdbc::SQLException,
171 com::sun::star::uno::RuntimeException);
173 virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XClob > SAL_CALL
174 getClob(
175 sal_Int32 columnIndex )
176 throw( com::sun::star::sdbc::SQLException,
177 com::sun::star::uno::RuntimeException);
179 virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XArray > SAL_CALL
180 getArray(
181 sal_Int32 columnIndex )
182 throw( com::sun::star::sdbc::SQLException,
183 com::sun::star::uno::RuntimeException);
185 private:
186 osl::Mutex m_aMutex;
187 com::sun::star::uno::Sequence< com::sun::star::uno::Any > m_aValueMap;
188 sal_Bool m_nWasNull;
189 shell* m_pMyShell;
190 com::sun::star::uno::Reference< com::sun::star::ucb::XContentProvider > m_xProvider;
191 com::sun::star::uno::Reference< com::sun::star::script::XTypeConverter > m_xTypeConverter;
194 } // end namespace fileaccess
196 #endif
198 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */