blob: 374214e44ae43331fdbe6bae63796280e05fac7d [file] [log] [blame]
Emeric Vigier05e894e2012-08-20 13:53:02 -04001package com.savoirfairelinux.sflphone.client;
2
Emeric Vigier62ca14d2012-08-24 11:05:09 -04003import android.os.Handler;
4import android.os.Bundle;
5import android.os.Message;
Emeric Vigier05e894e2012-08-20 13:53:02 -04006import android.util.Log;
7
8public class ManagerImpl {
9
10 private static final String TAG = "ManagerImpl";
Emeric Vigier7465d922012-08-28 18:14:17 -040011 private static int sipLogLevel = 6;
12 static Handler h;
Emeric Vigier7a255aa2012-08-29 09:49:18 -040013 static String appPath;
Emeric Vigier62ca14d2012-08-24 11:05:09 -040014
15 public ManagerImpl () {}
16
17 public ManagerImpl(Handler h) {
18 this.h = h;
19 }
20
21 public static void callBack(String s) {
22 Bundle b = new Bundle();
23 Log.i(TAG, "callBack: " + s);
24 b.putString("callback_string", s);
25 Message m = Message.obtain();
26 m.setData(b);
27 m.setTarget(h);
28 m.sendToTarget();
29 }
Emeric Vigier05e894e2012-08-20 13:53:02 -040030
Emeric Vigier7a255aa2012-08-29 09:49:18 -040031 public static String getAppPath() {
32 return appPath;
33 }
34
35 public static void setAppPath(String path) {
36 appPath = path;
37 }
38
Emeric Vigier7465d922012-08-28 18:14:17 -040039 public static int getSipLogLevel() {
Emeric Vigier05e894e2012-08-20 13:53:02 -040040 return sipLogLevel;
41 }
42
Emeric Vigier62ca14d2012-08-24 11:05:09 -040043 public static native void callVoid();
44 public static native Data getNewData(int i, String s);
45 public static native String getDataString(Data d);
Emeric Vigier62ca14d2012-08-24 11:05:09 -040046
Emeric Vigier05e894e2012-08-20 13:53:02 -040047 public static native void setSipLogLevel(String level);
Emeric Vigier05e894e2012-08-20 13:53:02 -040048 public static native String getJniString();
Emeric Vigier05e894e2012-08-20 13:53:02 -040049 public static native void initN(String config_file);
50}