public bool Uninit() { if (mgr == null) { ADebug.LogError("[DataIFS] mgr is null"); return(false); } else { bool ret = mgr.Uninit(); mgr = null; return(ret); } }
public bool Init(DataIFSInitInfo initinfo) { ADebug.Log(string.Format("[ApolloUpdate] initupdatemgr ifspath:{0},ifsname:{1},ifsFileSize:{2}" , initinfo.ifspath, initinfo.ifsname, initinfo.ifsFileSize)); mFactory = new IIPSMobile.IIPSMobileData(); mInitinfo.ifsname = initinfo.ifsname; mInitinfo.ifspath = initinfo.ifspath; mInitinfo.ifsFileSize = initinfo.ifsFileSize; mInitinfo.isHasPwd = initinfo.isHasPwd; mInitinfo.password = initinfo.password; if (mFactory == null) { ADebug.LogError("[DataIFS] new mFactory fail"); return(false); } string config = getIFSConfig(); mgr = mFactory.CreateDataMgr(config); if (mgr == null) { ADebug.LogError("[DataIFS] new data mgr fail,Please check init param format!"); return(false); } mReader = mgr.GetDataReader(); if (mReader == null) { ADebug.LogError("[DataIFS] GetDataReader fail"); return(false); } mFinder = mgr.GetDataQuery(); if (mFinder == null) { ADebug.LogError("[DataIFS] GetDataQuery fail"); return(false); } return(true); }