Emeric Vigier | 05e894e | 2012-08-20 13:53:02 -0400 | [diff] [blame] | 1 | package com.savoirfairelinux.sflphone.client; |
| 2 | |
| 3 | import android.content.pm.PackageInfo; |
| 4 | import android.content.pm.PackageManager; |
| 5 | import android.content.pm.PackageManager.NameNotFoundException; |
| 6 | import android.util.Log; |
| 7 | |
| 8 | public class ManagerImpl { |
| 9 | |
| 10 | private static final String TAG = "ManagerImpl"; |
| 11 | private static String sipLogLevel; |
| 12 | |
| 13 | public static boolean outgoingCallJ(String account_id) { |
| 14 | Log.i(TAG, "account_id:" + account_id); |
| 15 | return true; |
| 16 | } |
| 17 | |
| 18 | /* native implementation */ |
| 19 | static { |
| 20 | System.setProperty("SIPLOGLEVEL", "4"); |
| 21 | sipLogLevel = System.getProperty("SIPLOGLEVEL"); |
| 22 | Log.i(TAG, "SIPLOGLEVEL: " + sipLogLevel); |
| 23 | |
| 24 | // FIXME |
Emeric Vigier | f154bbb | 2012-08-22 11:43:54 -0400 | [diff] [blame^] | 25 | System.loadLibrary("gnustl_shared"); |
Emeric Vigier | 05e894e | 2012-08-20 13:53:02 -0400 | [diff] [blame] | 26 | System.loadLibrary("expat"); |
| 27 | System.loadLibrary("yaml"); |
| 28 | System.loadLibrary("ccgnu2"); |
| 29 | System.loadLibrary("crypto"); |
| 30 | System.loadLibrary("ssl"); |
| 31 | System.loadLibrary("ccrtp1"); |
| 32 | System.loadLibrary("dbus"); |
| 33 | System.loadLibrary("dbus-c++-1"); |
| 34 | System.loadLibrary("samplerate"); |
| 35 | System.loadLibrary("codec_ulaw"); |
| 36 | System.loadLibrary("codec_alaw"); |
| 37 | System.loadLibrary("speexresampler"); |
| 38 | System.loadLibrary("sflphone"); |
| 39 | } |
| 40 | |
| 41 | public String getSipLogLevel() { |
| 42 | return sipLogLevel; |
| 43 | } |
| 44 | |
| 45 | //public static native JNI_OnLoad(JavaVM* vm, void* reserved); |
| 46 | |
| 47 | public static native void setSipLogLevel(String level); |
| 48 | |
| 49 | public static native String getJniString(); |
| 50 | |
| 51 | public static native boolean outgoingCallN(String account_id); |
| 52 | |
| 53 | public static native void initN(String config_file); |
| 54 | } |