|
| 1 | +/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. */ |
| 2 | + |
| 3 | +/******************************************************************************* |
| 4 | + * |
| 5 | + * You may not use the identified files except in compliance with the Apache |
| 6 | + * License, Version 2.0 (the "License.") |
| 7 | + * |
| 8 | + * You may obtain a copy of the License at |
| 9 | + * http://www.apache.org/licenses/LICENSE-2.0. |
| 10 | + * |
| 11 | + * Unless required by applicable law or agreed to in writing, software |
| 12 | + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 13 | + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | + * |
| 15 | + * See the License for the specific language governing permissions and |
| 16 | + * limitations under the License. |
| 17 | + * |
| 18 | + * NAME |
| 19 | + * dpiLob.h - Lob class interface |
| 20 | + * |
| 21 | + * DESCRIPTION |
| 22 | + * This file defines the interface for the Lob class. |
| 23 | + * |
| 24 | + * NOTES |
| 25 | + * The Lob class methods are static functions providing wrappers over the |
| 26 | + * corresponding OCI calls. |
| 27 | + * |
| 28 | + ******************************************************************************/ |
| 29 | + |
| 30 | +#ifndef DPILOB_ORACLE |
| 31 | +# define DPILOB_ORACLE |
| 32 | + |
| 33 | + |
| 34 | +#ifndef DPICOMMON_ORACLE |
| 35 | +# include <dpiCommon.h> |
| 36 | +#endif |
| 37 | + |
| 38 | + |
| 39 | +namespace dpi |
| 40 | +{ |
| 41 | + |
| 42 | +/*---------------------------------------------------------------------------- |
| 43 | + PUBLIC CONSTANTS |
| 44 | + ----------------------------------------------------------------------------*/ |
| 45 | + |
| 46 | + |
| 47 | +/*---------------------------------------------------------------------------- |
| 48 | + PUBLIC TYPES |
| 49 | + ----------------------------------------------------------------------------*/ |
| 50 | + |
| 51 | + |
| 52 | +/******************************************************************************* |
| 53 | + * NAME Lob |
| 54 | + * |
| 55 | + * DESCRIPTION Interface definiton for Lob |
| 56 | + * |
| 57 | + * METHODS |
| 58 | + * read - read the Lob |
| 59 | + * |
| 60 | + ******************************************************************************/ |
| 61 | + |
| 62 | +class Lob |
| 63 | +{ |
| 64 | + public: |
| 65 | + |
| 66 | + static void read(DpiHandle *svch, DpiHandle *errh, Descriptor *lobLocator, |
| 67 | + unsigned long long &byteAmount, |
| 68 | + unsigned long long &charAmount, |
| 69 | + unsigned long long offset, |
| 70 | + void *buf); |
| 71 | + |
| 72 | + static void write(DpiHandle *svch, DpiHandle *errh, Descriptor *lobLocator, |
| 73 | + unsigned long long &byteAmount, |
| 74 | + unsigned long long &charAmount, |
| 75 | + unsigned long long offset, |
| 76 | + void *buf); |
| 77 | + |
| 78 | + static unsigned int chunkSize(DpiHandle *svch, DpiHandle *errh, |
| 79 | + Descriptor *lobLocator); |
| 80 | + |
| 81 | + static unsigned long long length(DpiHandle *svch, DpiHandle *errh, |
| 82 | + Descriptor *lobLocator); |
| 83 | +}; |
| 84 | + |
| 85 | + |
| 86 | +} // namespace dpi |
| 87 | + |
| 88 | +#endif // ifdef DPILOB_ORACLE |
0 commit comments