Skip to content

Commit 409af70

Browse files
committed
Add new file missed in prev commit
1 parent 14654e5 commit 409af70

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

src/dpi/src/dpiCommon.cpp

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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+
* dpiCommon.cpp - Common class implementation
20+
*
21+
* DESCRIPTION
22+
* This file implements the Common class which has implementation which
23+
* are independant of any OCI objects.
24+
*
25+
*****************************************************************************/
26+
27+
#ifndef ORATYPES
28+
# include <oratypes.h>
29+
#endif
30+
31+
#ifndef OCI_ORACLE
32+
# include <oci.h>
33+
#endif
34+
35+
#ifndef DPICOMMON_ORACLE
36+
# include <dpiCommon.h>
37+
#endif
38+
39+
#ifndef DPIEXCEPTIONIMPL_ORACLE
40+
# include <dpiExceptionImpl.h>
41+
#endif
42+
43+
44+
/*****************************************************************************/
45+
/*
46+
DESCRIPTION
47+
To obtain Oracle Client Library (OCI) version
48+
49+
PARAMETERS
50+
majorv
51+
minorv
52+
patchv
53+
portv
54+
portUpdv
55+
56+
RETURNS
57+
-NONE-
58+
59+
NOTES:
60+
The values will map as Oracle Version like 12.1.0.2.0 - five component
61+
version of Oracle Client Library
62+
*/
63+
void Common::clientVersion ( int *majorv, int *minorv, int *patchv,
64+
int *portv, int *portUpdv )
65+
{
66+
if ( !majorv || !minorv || !patchv || !portv || !portUpdv )
67+
throw ExceptionImpl ( DpiErrNullValue );
68+
69+
OCIClientVersion ( majorv, minorv, patchv, portv, portUpdv );
70+
}

0 commit comments

Comments
 (0)