public override object Execute(object arg, IAsyncTaskProgress progress)
        {
            CallDataSource ds = null;

            try
            {
                var pi = PluginInfo as DataParsePluginInfo;

                ds = new CallDataSource(pi.SaveDbPath);

                var dbPath = pi.SourcePath[0].Local;
                var dbFile = Path.Combine(dbPath, "CallHistory.storedata");

                if (!FileHelper.IsValidDictory(dbPath) || !FileHelper.IsValid(dbFile))
                {
                    if (FileHelper.IsValidDictory(pi.SourcePath[2].Local))
                    {
                        var db1File = Path.Combine(pi.SourcePath[2].Local, "call_history.db");
                        if (!FileHelper.IsValid(db1File))
                        {
                            var paser = new IOSCallDataParseCoreV1_0(db1File);
                            paser.BuildData(ds);
                        }
                    }
                }
                else
                {
                    var paser = new IOSCallDataParseCoreV2_0(dbFile, Path.Combine(pi.SourcePath[1].Local, "AddressBook.sqlitedb"));
                    paser.BuildData(ds);
                }
            }
            catch (Exception ex)
            {
                LoggerManagerSingle.Instance.Error("提取IOS通话记录数据出错!", ex);
            }
            finally
            {
                ds?.BuildParent();
            }

            return(ds);
        }
Beispiel #2
0
        public override object Execute(object arg, IAsyncTaskProgress progress)
        {
            CallDataSource ds = null;

            try
            {
                var pi = PluginInfo as DataParsePluginInfo;

                ds = new CallDataSource(pi.SaveDbPath);

                var contactsPath = pi.SourcePath[0].Local;

                if (!FileHelper.IsValidDictory(contactsPath))
                {
                    return(ds);
                }

                var contacts2dbFile = Path.Combine(contactsPath, "contacts2.db");
                if (!FileHelper.IsValid(contacts2dbFile))
                {
                    return(ds);
                }

                var paser = new AndroidCallDataParseCoreV1_0(contacts2dbFile, null);
                paser.BuildData(ds);
            }
            catch (System.Exception ex)
            {
                Framework.Log4NetService.LoggerManagerSingle.Instance.Error("提取安卓通话记录数据出错!", ex);
            }
            finally
            {
                ds?.BuildParent();
            }

            return(ds);
        }