From 5d3d19651165b982c813975c1f556cdcc3121bfe Mon Sep 17 00:00:00 2001 From: Alexandre Lision <alexandre.lision@savoirfairelinux.com> Date: Fri, 11 Apr 2014 15:53:46 -0400 Subject: [PATCH] Use IntegerMap swig type --- .../sflphone/service/CallManagerCallBack.java | 2 +- src/org/sflphone/service/IntegerMap.java | 74 +++++++++++++++++++ 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 src/org/sflphone/service/IntegerMap.java diff --git a/src/org/sflphone/service/CallManagerCallBack.java b/src/org/sflphone/service/CallManagerCallBack.java index 07b18f471..df5dc3805 100644 --- a/src/org/sflphone/service/CallManagerCallBack.java +++ b/src/org/sflphone/service/CallManagerCallBack.java @@ -343,7 +343,7 @@ public class CallManagerCallBack extends Callback { } @Override - public void on_rtcp_report_received(String callID, SWIGTYPE_p_std__mapT_std__string_int_t stats) { + public void on_rtcp_report_received(String callID, IntegerMap stats) { Log.i(TAG, "on_rtcp_report_received"); Intent intent = new Intent(RTCP_REPORT_RECEIVED); mService.sendBroadcast(intent); diff --git a/src/org/sflphone/service/IntegerMap.java b/src/org/sflphone/service/IntegerMap.java new file mode 100644 index 000000000..ad3fb6e2e --- /dev/null +++ b/src/org/sflphone/service/IntegerMap.java @@ -0,0 +1,74 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 2.0.11 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +package org.sflphone.service; + +public class IntegerMap { + private long swigCPtr; + protected boolean swigCMemOwn; + + protected IntegerMap(long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + } + + protected static long getCPtr(IntegerMap obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + + protected void finalize() { + delete(); + } + + public synchronized void delete() { + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + SFLPhoneserviceJNI.delete_IntegerMap(swigCPtr); + } + swigCPtr = 0; + } + } + + public IntegerMap() { + this(SFLPhoneserviceJNI.new_IntegerMap__SWIG_0(), true); + } + + public IntegerMap(IntegerMap arg0) { + this(SFLPhoneserviceJNI.new_IntegerMap__SWIG_1(IntegerMap.getCPtr(arg0), arg0), true); + } + + public long size() { + return SFLPhoneserviceJNI.IntegerMap_size(swigCPtr, this); + } + + public boolean empty() { + return SFLPhoneserviceJNI.IntegerMap_empty(swigCPtr, this); + } + + public void clear() { + SFLPhoneserviceJNI.IntegerMap_clear(swigCPtr, this); + } + + public int get(String key) { + return SFLPhoneserviceJNI.IntegerMap_get(swigCPtr, this, key); + } + + public void set(String key, int x) { + SFLPhoneserviceJNI.IntegerMap_set(swigCPtr, this, key, x); + } + + public void del(String key) { + SFLPhoneserviceJNI.IntegerMap_del(swigCPtr, this, key); + } + + public boolean has_key(String key) { + return SFLPhoneserviceJNI.IntegerMap_has_key(swigCPtr, this, key); + } + +} -- GitLab