1 /*
2  Copyright (c) 2010, 2021, Oracle and/or its affiliates.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License, version 2.0,
6  as published by the Free Software Foundation.
7 
8  This program is also distributed with certain software (including
9  but not limited to OpenSSL) that is licensed under separate terms,
10  as designated in a particular file or component or in included license
11  documentation.  The authors of MySQL hereby grant you an additional
12  permission to link the program and your derivative works with the
13  separately licensed software that they have included with MySQL.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  GNU General Public License, version 2.0, for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program; if not, write to the Free Software
22  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
23 */
24 /*
25  * CI.java
26  */
27 
28 package myjapi;
29 
30 import com.mysql.jtie.Wrapper;
31 import com.mysql.jtie.ArrayWrapper;
32 
33 public class CI {
34     static public interface C0C
35     {
id()36         long id();
check(long id)37         void check(long id);
print()38         void print();
deliver_C0Cp()39         C0C deliver_C0Cp();
deliver_C0Cr()40         C0C deliver_C0Cr();
take_C0Cp(C0C cp)41         void take_C0Cp(C0C cp);
take_C0Cr(C0C cp)42         void take_C0Cr(C0C cp);
43     }
44 
45     static public class C0 extends Wrapper implements C0C
46     {
C0()47         protected C0() {
48             //System.out.println("<-> myjapi.C0()");
49         }
50 
cc()51         static public native C0C cc();
c()52         static public native C0 c();
53 
create()54         static public native C0 create();
delete(C0 c0)55         static public native void delete(C0 c0);
56 
pass(C0Array c0a)57         static public native C0Array pass(C0Array c0a);
pass(C0CArray c0a)58         static public native C0CArray pass(C0CArray c0a);
hash(C0CArray c0a, int n)59         static public native long hash(C0CArray c0a, int n);
60 
id()61         public final native long id();
check(long id)62         public final native void check(long id);
print()63         public final native void print();
deliver_C0Cp()64         public final native C0C deliver_C0Cp();
deliver_C0Cr()65         public final native C0C deliver_C0Cr();
take_C0Cp(C0C cp)66         public final native void take_C0Cp(C0C cp);
take_C0Cr(C0C cp)67         public final native void take_C0Cr(C0C cp);
deliver_C0p()68         public final native C0 deliver_C0p();
deliver_C0r()69         public final native C0 deliver_C0r();
take_C0p(C0 cp)70         public final native void take_C0p(C0 cp);
take_C0r(C0 cp)71         public final native void take_C0r(C0 cp);
72     }
73 
74     static public interface C1C extends C0C
75     {
deliver_C1Cp()76         C1C deliver_C1Cp();
deliver_C1Cr()77         C1C deliver_C1Cr();
take_C1Cp(C1C cp)78         void take_C1Cp(C1C cp);
take_C1Cr(C1C cp)79         void take_C1Cr(C1C cp);
80     }
81 
82     static public class C1 extends C0 implements C1C
83     {
C1()84         protected C1() {
85             //System.out.println("<-> myjapi.C1()");
86         }
87 
cc()88         static public native C1C cc();
c()89         static public native C1 c();
90 
create()91         static public native C1 create();
delete(C1 c1)92         static public native void delete(C1 c1);
93 
pass(C1Array c1a)94         static public native C1Array pass(C1Array c1a);
pass(C1CArray c1a)95         static public native C1CArray pass(C1CArray c1a);
hash(C1CArray c1a, int n)96         static public native long hash(C1CArray c1a, int n);
97 
deliver_C1Cp()98         public final native C1C deliver_C1Cp();
deliver_C1Cr()99         public final native C1C deliver_C1Cr();
take_C1Cp(C1C cp)100         public final native void take_C1Cp(C1C cp);
take_C1Cr(C1C cp)101         public final native void take_C1Cr(C1C cp);
deliver_C1p()102         public final native C1 deliver_C1p();
deliver_C1r()103         public final native C1 deliver_C1r();
take_C1p(C1 cp)104         public final native void take_C1p(C1 cp);
take_C1r(C1 cp)105         public final native void take_C1r(C1 cp);
106     }
107 
108     static public interface C0CArray
109         extends ArrayWrapper< C0C >
110     {
111         // redundant to declare:
112         //C0C at(int i);
113     }
114 
115     static public final class C0Array
116         extends Wrapper implements C0CArray
117         // Java: method cannot be inherited with different arguments/results
118         //implements C0CArray, ArrayWrapper< C0 >
119     {
create(int length)120         static public native C0Array create(int length);
delete(C0Array e)121         static public native void delete(C0Array e);
at(int i)122         public native C0 at(int i);
123     }
124 
125     static public interface C1CArray
126         extends ArrayWrapper< C1C >
127         // C++: does not support covariant object arrays (only pointers)
128         //extends C0CArray
129     {
130         // if extended C0CArray, would have to declare; otherwise, redundant:
131         //C1C at(int i);
132     }
133 
134     static public final class C1Array
135         extends Wrapper implements C1CArray
136         // C++: does not support covariant object arrays (only pointers)
137         //extends C0Array
138         // Java: method cannot be inherited with different arguments/results
139         //implements C1CArray, ArrayWrapper< C1 >
140     {
create(int length)141         static public native C1Array create(int length);
delete(C1Array e)142         static public native void delete(C1Array e);
at(int i)143         public native C1 at(int i);
144     }
145 }
146