|
1 | 1 | /* automatically generated by rust-bindgen 0.69.4 */
|
2 | 2 |
|
3 | 3 | pub const DPI_MAJOR_VERSION: u32 = 5;
|
4 |
| -pub const DPI_MINOR_VERSION: u32 = 3; |
| 4 | +pub const DPI_MINOR_VERSION: u32 = 4; |
5 | 5 | pub const DPI_PATCH_LEVEL: u32 = 0;
|
6 | 6 | pub const DPI_DEFAULT_FETCH_ARRAY_SIZE: u32 = 100;
|
7 | 7 | pub const DPI_DEFAULT_PREFETCH_ROWS: u32 = 2;
|
@@ -155,6 +155,10 @@ pub const DPI_SODA_FLAGS_INDEX_DROP_FORCE: u32 = 4;
|
155 | 155 | pub const DPI_MODE_STARTUP_DEFAULT: u32 = 0;
|
156 | 156 | pub const DPI_MODE_STARTUP_FORCE: u32 = 1;
|
157 | 157 | pub const DPI_MODE_STARTUP_RESTRICT: u32 = 2;
|
| 158 | +pub const DPI_SERVER_TYPE_UNKNOWN: u32 = 0; |
| 159 | +pub const DPI_SERVER_TYPE_DEDICATED: u32 = 1; |
| 160 | +pub const DPI_SERVER_TYPE_SHARED: u32 = 2; |
| 161 | +pub const DPI_SERVER_TYPE_POOLED: u32 = 4; |
158 | 162 | pub const DPI_STMT_TYPE_UNKNOWN: u32 = 0;
|
159 | 163 | pub const DPI_STMT_TYPE_SELECT: u32 = 1;
|
160 | 164 | pub const DPI_STMT_TYPE_UPDATE: u32 = 2;
|
@@ -215,6 +219,7 @@ pub type dpiPoolGetMode = u8;
|
215 | 219 | pub type dpiPurity = u32;
|
216 | 220 | pub type dpiShutdownMode = u32;
|
217 | 221 | pub type dpiStartupMode = u32;
|
| 222 | +pub type dpiServerType = u8; |
218 | 223 | pub type dpiStatementType = u16;
|
219 | 224 | pub type dpiSubscrGroupingClass = u8;
|
220 | 225 | pub type dpiSubscrGroupingType = u8;
|
@@ -1689,6 +1694,155 @@ impl Default for dpiConnCreateParams {
|
1689 | 1694 | }
|
1690 | 1695 | #[repr(C)]
|
1691 | 1696 | #[derive(Debug, Copy, Clone)]
|
| 1697 | +pub struct dpiConnInfo { |
| 1698 | + pub dbDomain: *const ::std::os::raw::c_char, |
| 1699 | + pub dbDomainLength: u32, |
| 1700 | + pub dbName: *const ::std::os::raw::c_char, |
| 1701 | + pub dbNameLength: u32, |
| 1702 | + pub instanceName: *const ::std::os::raw::c_char, |
| 1703 | + pub instanceNameLength: u32, |
| 1704 | + pub serviceName: *const ::std::os::raw::c_char, |
| 1705 | + pub serviceNameLength: u32, |
| 1706 | + pub maxIdentifierLength: u32, |
| 1707 | + pub maxOpenCursors: u32, |
| 1708 | + pub serverType: u8, |
| 1709 | +} |
| 1710 | +#[test] |
| 1711 | +fn bindgen_test_layout_dpiConnInfo() { |
| 1712 | + const UNINIT: ::std::mem::MaybeUninit<dpiConnInfo> = ::std::mem::MaybeUninit::uninit(); |
| 1713 | + let ptr = UNINIT.as_ptr(); |
| 1714 | + assert_eq!( |
| 1715 | + ::std::mem::size_of::<dpiConnInfo>(), |
| 1716 | + 72usize, |
| 1717 | + concat!("Size of: ", stringify!(dpiConnInfo)) |
| 1718 | + ); |
| 1719 | + assert_eq!( |
| 1720 | + ::std::mem::align_of::<dpiConnInfo>(), |
| 1721 | + 8usize, |
| 1722 | + concat!("Alignment of ", stringify!(dpiConnInfo)) |
| 1723 | + ); |
| 1724 | + assert_eq!( |
| 1725 | + unsafe { ::std::ptr::addr_of!((*ptr).dbDomain) as usize - ptr as usize }, |
| 1726 | + 0usize, |
| 1727 | + concat!( |
| 1728 | + "Offset of field: ", |
| 1729 | + stringify!(dpiConnInfo), |
| 1730 | + "::", |
| 1731 | + stringify!(dbDomain) |
| 1732 | + ) |
| 1733 | + ); |
| 1734 | + assert_eq!( |
| 1735 | + unsafe { ::std::ptr::addr_of!((*ptr).dbDomainLength) as usize - ptr as usize }, |
| 1736 | + 8usize, |
| 1737 | + concat!( |
| 1738 | + "Offset of field: ", |
| 1739 | + stringify!(dpiConnInfo), |
| 1740 | + "::", |
| 1741 | + stringify!(dbDomainLength) |
| 1742 | + ) |
| 1743 | + ); |
| 1744 | + assert_eq!( |
| 1745 | + unsafe { ::std::ptr::addr_of!((*ptr).dbName) as usize - ptr as usize }, |
| 1746 | + 16usize, |
| 1747 | + concat!( |
| 1748 | + "Offset of field: ", |
| 1749 | + stringify!(dpiConnInfo), |
| 1750 | + "::", |
| 1751 | + stringify!(dbName) |
| 1752 | + ) |
| 1753 | + ); |
| 1754 | + assert_eq!( |
| 1755 | + unsafe { ::std::ptr::addr_of!((*ptr).dbNameLength) as usize - ptr as usize }, |
| 1756 | + 24usize, |
| 1757 | + concat!( |
| 1758 | + "Offset of field: ", |
| 1759 | + stringify!(dpiConnInfo), |
| 1760 | + "::", |
| 1761 | + stringify!(dbNameLength) |
| 1762 | + ) |
| 1763 | + ); |
| 1764 | + assert_eq!( |
| 1765 | + unsafe { ::std::ptr::addr_of!((*ptr).instanceName) as usize - ptr as usize }, |
| 1766 | + 32usize, |
| 1767 | + concat!( |
| 1768 | + "Offset of field: ", |
| 1769 | + stringify!(dpiConnInfo), |
| 1770 | + "::", |
| 1771 | + stringify!(instanceName) |
| 1772 | + ) |
| 1773 | + ); |
| 1774 | + assert_eq!( |
| 1775 | + unsafe { ::std::ptr::addr_of!((*ptr).instanceNameLength) as usize - ptr as usize }, |
| 1776 | + 40usize, |
| 1777 | + concat!( |
| 1778 | + "Offset of field: ", |
| 1779 | + stringify!(dpiConnInfo), |
| 1780 | + "::", |
| 1781 | + stringify!(instanceNameLength) |
| 1782 | + ) |
| 1783 | + ); |
| 1784 | + assert_eq!( |
| 1785 | + unsafe { ::std::ptr::addr_of!((*ptr).serviceName) as usize - ptr as usize }, |
| 1786 | + 48usize, |
| 1787 | + concat!( |
| 1788 | + "Offset of field: ", |
| 1789 | + stringify!(dpiConnInfo), |
| 1790 | + "::", |
| 1791 | + stringify!(serviceName) |
| 1792 | + ) |
| 1793 | + ); |
| 1794 | + assert_eq!( |
| 1795 | + unsafe { ::std::ptr::addr_of!((*ptr).serviceNameLength) as usize - ptr as usize }, |
| 1796 | + 56usize, |
| 1797 | + concat!( |
| 1798 | + "Offset of field: ", |
| 1799 | + stringify!(dpiConnInfo), |
| 1800 | + "::", |
| 1801 | + stringify!(serviceNameLength) |
| 1802 | + ) |
| 1803 | + ); |
| 1804 | + assert_eq!( |
| 1805 | + unsafe { ::std::ptr::addr_of!((*ptr).maxIdentifierLength) as usize - ptr as usize }, |
| 1806 | + 60usize, |
| 1807 | + concat!( |
| 1808 | + "Offset of field: ", |
| 1809 | + stringify!(dpiConnInfo), |
| 1810 | + "::", |
| 1811 | + stringify!(maxIdentifierLength) |
| 1812 | + ) |
| 1813 | + ); |
| 1814 | + assert_eq!( |
| 1815 | + unsafe { ::std::ptr::addr_of!((*ptr).maxOpenCursors) as usize - ptr as usize }, |
| 1816 | + 64usize, |
| 1817 | + concat!( |
| 1818 | + "Offset of field: ", |
| 1819 | + stringify!(dpiConnInfo), |
| 1820 | + "::", |
| 1821 | + stringify!(maxOpenCursors) |
| 1822 | + ) |
| 1823 | + ); |
| 1824 | + assert_eq!( |
| 1825 | + unsafe { ::std::ptr::addr_of!((*ptr).serverType) as usize - ptr as usize }, |
| 1826 | + 68usize, |
| 1827 | + concat!( |
| 1828 | + "Offset of field: ", |
| 1829 | + stringify!(dpiConnInfo), |
| 1830 | + "::", |
| 1831 | + stringify!(serverType) |
| 1832 | + ) |
| 1833 | + ); |
| 1834 | +} |
| 1835 | +impl Default for dpiConnInfo { |
| 1836 | + fn default() -> Self { |
| 1837 | + let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); |
| 1838 | + unsafe { |
| 1839 | + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); |
| 1840 | + s.assume_init() |
| 1841 | + } |
| 1842 | + } |
| 1843 | +} |
| 1844 | +#[repr(C)] |
| 1845 | +#[derive(Debug, Copy, Clone)] |
1692 | 1846 | pub struct dpiContextCreateParams {
|
1693 | 1847 | pub defaultDriverName: *const ::std::os::raw::c_char,
|
1694 | 1848 | pub defaultEncoding: *const ::std::os::raw::c_char,
|
@@ -4612,6 +4766,9 @@ extern "C" {
|
4612 | 4766 | handle: *mut *mut ::std::os::raw::c_void,
|
4613 | 4767 | ) -> ::std::os::raw::c_int;
|
4614 | 4768 | }
|
| 4769 | +extern "C" { |
| 4770 | + pub fn dpiConn_getInfo(conn: *mut dpiConn, info: *mut dpiConnInfo) -> ::std::os::raw::c_int; |
| 4771 | +} |
4615 | 4772 | extern "C" {
|
4616 | 4773 | pub fn dpiConn_getInstanceName(
|
4617 | 4774 | conn: *mut dpiConn,
|
|
0 commit comments