12faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes/*
22faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * Copyright (C) 2011 The Android Open Source Project
32faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes *
42faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * Licensed under the Apache License, Version 2.0 (the "License");
52faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * you may not use this file except in compliance with the License.
62faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * You may obtain a copy of the License at
72faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes *
82faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes *      http://www.apache.org/licenses/LICENSE-2.0
92faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes *
102faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * Unless required by applicable law or agreed to in writing, software
112faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * distributed under the License is distributed on an "AS IS" BASIS,
122faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
132faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * See the License for the specific language governing permissions and
142faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * limitations under the License.
152faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes */
169f30b38d74990286ce27c3a45368f73dbe3638f0Brian Carlstrom
17b264f081424642b06b0bbe7102781895d41faa9dElliott Hughesclass MyClassNatives {
18a2501990dd0f68baf38ce19251949d7bb3ecfe5aElliott Hughes    native void throwException();
199f30b38d74990286ce27c3a45368f73dbe3638f0Brian Carlstrom    native void foo();
2031384c59bb4b387f29f2b6d4d3db886c29b81170Shih-wei Liao    native int bar(int count);
211cefdbdff559aff5a3ee5c0878ba3b505109e0f9Ian Rogers    static native int sbar(int count);
229f30b38d74990286ce27c3a45368f73dbe3638f0Brian Carlstrom    native int fooI(int x);
239f30b38d74990286ce27c3a45368f73dbe3638f0Brian Carlstrom    native int fooII(int x, int y);
249b269d281d16798b0c24027c32ec6507f71b2787Ian Rogers    native long fooJJ(long x, long y);
259b269d281d16798b0c24027c32ec6507f71b2787Ian Rogers    native Object fooO(Object x);
269f30b38d74990286ce27c3a45368f73dbe3638f0Brian Carlstrom    native double fooDD(double x, double y);
273e778f7ee62fe75912379531022a09230c25f5f8Elliott Hughes    synchronized native long fooJJ_synchronized(long x, long y);
289f30b38d74990286ce27c3a45368f73dbe3638f0Brian Carlstrom    native Object fooIOO(int x, Object y, Object z);
299f30b38d74990286ce27c3a45368f73dbe3638f0Brian Carlstrom    static native Object fooSIOO(int x, Object y, Object z);
3082da44b625a1af03c0b768c71f1cef29831127c3Shih-wei Liao    static native int fooSII(int x, int y);
317a99c11d220ec68c208b507570e3a78c2c18a7a1Ian Rogers    static native double fooSDD(double x, double y);
329f30b38d74990286ce27c3a45368f73dbe3638f0Brian Carlstrom    static synchronized native Object fooSSIOO(int x, Object y, Object z);
33b9231c81fad1c9d85ea7e6db9120f872e3417380Ian Rogers    static native void arraycopy(Object src, int src_pos, Object dst, int dst_pos, int length);
3467375acd9fec74cc2054554fe1ed0a7d213e1e47Ian Rogers    native boolean compareAndSwapInt(Object obj, long offset, int expected, int newval);
35c77928475995d01e1d6d2b2d6672510d01a5fce4Ian Rogers    static native int getText(long val1, Object obj1, long val2, Object obj2);
36fc7120c0293b96218d55abee29882f101acbc79bBrian Carlstrom    synchronized native Object []getSinkPropertiesNative(String path);
37b264f081424642b06b0bbe7102781895d41faa9dElliott Hughes
38b264f081424642b06b0bbe7102781895d41faa9dElliott Hughes    native Class instanceMethodThatShouldReturnClass();
39b264f081424642b06b0bbe7102781895d41faa9dElliott Hughes    static native Class staticMethodThatShouldReturnClass();
40b264f081424642b06b0bbe7102781895d41faa9dElliott Hughes
41b264f081424642b06b0bbe7102781895d41faa9dElliott Hughes    native void instanceMethodThatShouldTakeClass(int i, Class c);
42b264f081424642b06b0bbe7102781895d41faa9dElliott Hughes    static native void staticMethodThatShouldTakeClass(int i, Class c);
437a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe
447a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe    native float checkFloats(float f1, float f2);
457a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe    native void forceStackParameters(int i1, int i2, int i3, int i4, int i5, int i6, int i8, int i9,
467a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe                                     float f1, float f2, float f3, float f4, float f5, float f6,
477a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe                                     float f7, float f8, float f9);
487a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe    native void checkParameterAlign(int i1, long l1);
497a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe    native void maxParamNumber(Object o0, Object o1, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7,
507a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o8, Object o9, Object o10, Object o11, Object o12, Object o13, Object o14, Object o15,
517a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o16, Object o17, Object o18, Object o19, Object o20, Object o21, Object o22, Object o23,
527a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o24, Object o25, Object o26, Object o27, Object o28, Object o29, Object o30, Object o31,
537a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o32, Object o33, Object o34, Object o35, Object o36, Object o37, Object o38, Object o39,
547a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o40, Object o41, Object o42, Object o43, Object o44, Object o45, Object o46, Object o47,
557a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o48, Object o49, Object o50, Object o51, Object o52, Object o53, Object o54, Object o55,
567a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o56, Object o57, Object o58, Object o59, Object o60, Object o61, Object o62, Object o63,
577a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o64, Object o65, Object o66, Object o67, Object o68, Object o69, Object o70, Object o71,
587a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o72, Object o73, Object o74, Object o75, Object o76, Object o77, Object o78, Object o79,
597a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o80, Object o81, Object o82, Object o83, Object o84, Object o85, Object o86, Object o87,
607a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o88, Object o89, Object o90, Object o91, Object o92, Object o93, Object o94, Object o95,
617a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o96, Object o97, Object o98, Object o99, Object o100, Object o101, Object o102, Object o103,
627a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o104, Object o105, Object o106, Object o107, Object o108, Object o109, Object o110, Object o111,
637a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o112, Object o113, Object o114, Object o115, Object o116, Object o117, Object o118, Object o119,
647a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o120, Object o121, Object o122, Object o123, Object o124, Object o125, Object o126, Object o127,
657a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o128, Object o129, Object o130, Object o131, Object o132, Object o133, Object o134, Object o135,
667a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o136, Object o137, Object o138, Object o139, Object o140, Object o141, Object o142, Object o143,
677a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o144, Object o145, Object o146, Object o147, Object o148, Object o149, Object o150, Object o151,
687a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o152, Object o153, Object o154, Object o155, Object o156, Object o157, Object o158, Object o159,
697a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o160, Object o161, Object o162, Object o163, Object o164, Object o165, Object o166, Object o167,
707a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o168, Object o169, Object o170, Object o171, Object o172, Object o173, Object o174, Object o175,
717a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o176, Object o177, Object o178, Object o179, Object o180, Object o181, Object o182, Object o183,
727a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o184, Object o185, Object o186, Object o187, Object o188, Object o189, Object o190, Object o191,
737a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o192, Object o193, Object o194, Object o195, Object o196, Object o197, Object o198, Object o199,
747a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o200, Object o201, Object o202, Object o203, Object o204, Object o205, Object o206, Object o207,
757a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o208, Object o209, Object o210, Object o211, Object o212, Object o213, Object o214, Object o215,
767a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o216, Object o217, Object o218, Object o219, Object o220, Object o221, Object o222, Object o223,
777a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o224, Object o225, Object o226, Object o227, Object o228, Object o229, Object o230, Object o231,
787a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o232, Object o233, Object o234, Object o235, Object o236, Object o237, Object o238, Object o239,
797a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o240, Object o241, Object o242, Object o243, Object o244, Object o245, Object o246, Object o247,
807a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe        Object o248, Object o249, Object o250, Object o251, Object o252, Object o253);
817a0e504e60441012c78fc2f3ab8d4da131185c50Andreas Gampe
82ad61517890168ff6ed19063cc8032a9c033d135bAndreas Gampe    native void withoutImplementation();
8348ee356484225ef0d7cfa197b1699524b866c802Andreas Gampe    native Object withoutImplementationRefReturn();
8454accbca0b549b1b1ad3ef09655dad438bc1e104Nicolas Geoffray
851dd61ba3081a52c3e2efdc78d64f5c134eea7895Vladimir Kostyukov    native static void stackArgsIntsFirst(int i1, int i2, int i3, int i4, int i5, int i6, int i7,
861dd61ba3081a52c3e2efdc78d64f5c134eea7895Vladimir Kostyukov        int i8, int i9, int i10, float f1, float f2, float f3, float f4, float f5, float f6,
871dd61ba3081a52c3e2efdc78d64f5c134eea7895Vladimir Kostyukov        float f7, float f8, float f9, float f10);
8854accbca0b549b1b1ad3ef09655dad438bc1e104Nicolas Geoffray
891dd61ba3081a52c3e2efdc78d64f5c134eea7895Vladimir Kostyukov    native static void stackArgsFloatsFirst(float f1, float f2, float f3, float f4, float f5,
901dd61ba3081a52c3e2efdc78d64f5c134eea7895Vladimir Kostyukov        float f6, float f7, float f8, float f9, float f10, int i1, int i2, int i3, int i4, int i5,
911dd61ba3081a52c3e2efdc78d64f5c134eea7895Vladimir Kostyukov        int i6, int i7, int i8, int i9, int i10);
9254accbca0b549b1b1ad3ef09655dad438bc1e104Nicolas Geoffray
931dd61ba3081a52c3e2efdc78d64f5c134eea7895Vladimir Kostyukov    native static void stackArgsMixed(int i1, float f1, int i2, float f2, int i3, float f3, int i4,
941dd61ba3081a52c3e2efdc78d64f5c134eea7895Vladimir Kostyukov        float f4, int i5, float f5, int i6, float f6, int i7, float f7, int i8, float f8, int i9,
951dd61ba3081a52c3e2efdc78d64f5c134eea7895Vladimir Kostyukov        float f9, int i10, float f10);
9654accbca0b549b1b1ad3ef09655dad438bc1e104Nicolas Geoffray
97f652d605753f1387e7797461b47116c5dcdf928dLazar Trsic    native static void stackArgsSignExtendedMips64(int i1, int i2, int i3, int i4, int i5, int i6,
98f652d605753f1387e7797461b47116c5dcdf928dLazar Trsic        int i7, int i8);
99f652d605753f1387e7797461b47116c5dcdf928dLazar Trsic
10054accbca0b549b1b1ad3ef09655dad438bc1e104Nicolas Geoffray    static native double logD(double d);
10154accbca0b549b1b1ad3ef09655dad438bc1e104Nicolas Geoffray    static native float logF(float f);
10254accbca0b549b1b1ad3ef09655dad438bc1e104Nicolas Geoffray    static native boolean returnTrue();
10354accbca0b549b1b1ad3ef09655dad438bc1e104Nicolas Geoffray    static native boolean returnFalse();
10454accbca0b549b1b1ad3ef09655dad438bc1e104Nicolas Geoffray    static native int returnInt();
1053e778f7ee62fe75912379531022a09230c25f5f8Elliott Hughes}
106