/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.10 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ package nz.mega.sdk; class MegaGlobalListener { private long swigCPtr; protected boolean swigCMemOwn; protected MegaGlobalListener(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } protected static long getCPtr(MegaGlobalListener obj) { return (obj == null) ? 0 : obj.swigCPtr; } protected void finalize() { delete(); } protected synchronized void delete() { if (swigCPtr != 0) { if (swigCMemOwn) { swigCMemOwn = false; megaJNI.delete_MegaGlobalListener(swigCPtr); } swigCPtr = 0; } } protected void swigDirectorDisconnect() { swigCMemOwn = false; delete(); } public void swigReleaseOwnership() { swigCMemOwn = false; megaJNI.MegaGlobalListener_change_ownership(this, swigCPtr, false); } public void swigTakeOwnership() { swigCMemOwn = true; megaJNI.MegaGlobalListener_change_ownership(this, swigCPtr, true); } public void onUsersUpdate(MegaApi api, MegaUserList users) { if (getClass() == MegaGlobalListener.class) megaJNI.MegaGlobalListener_onUsersUpdate(swigCPtr, this, MegaApi.getCPtr(api), api, MegaUserList.getCPtr(users), users); else megaJNI.MegaGlobalListener_onUsersUpdateSwigExplicitMegaGlobalListener(swigCPtr, this, MegaApi.getCPtr(api), api, MegaUserList.getCPtr(users), users); } public void onNodesUpdate(MegaApi api, MegaNodeList nodes) { if (getClass() == MegaGlobalListener.class) megaJNI.MegaGlobalListener_onNodesUpdate(swigCPtr, this, MegaApi.getCPtr(api), api, MegaNodeList.getCPtr(nodes), nodes); else megaJNI.MegaGlobalListener_onNodesUpdateSwigExplicitMegaGlobalListener(swigCPtr, this, MegaApi.getCPtr(api), api, MegaNodeList.getCPtr(nodes), nodes); } public void onReloadNeeded(MegaApi api) { if (getClass() == MegaGlobalListener.class) megaJNI.MegaGlobalListener_onReloadNeeded(swigCPtr, this, MegaApi.getCPtr(api), api); else megaJNI.MegaGlobalListener_onReloadNeededSwigExplicitMegaGlobalListener(swigCPtr, this, MegaApi.getCPtr(api), api); } public MegaGlobalListener() { this(megaJNI.new_MegaGlobalListener(), true); megaJNI.MegaGlobalListener_director_connect(this, swigCPtr, swigCMemOwn, true); } }