internal void AddEnvInfo(CIContainer aContainer) { CIInfoEnvironment info = (CIInfoEnvironment)aContainer.ChildByType(typeof(CIInfoEnvironment)); if (info != null) { iTestSet = info.TestSet; } }
internal void AddHWInfo(CIContainer aContainer) { CIInfoHW info = (CIInfoHW)aContainer.ChildByType(typeof(CIInfoHW)); if (info != null) { iProductType = info.ProductType; iProductCode = info.ProductCode.Trim(); iSerialNumber = info.SerialNumber.Trim(); iProductionMode = info.ProductionMode; } }
// Returns true if there exists symbols private bool ContainsSymbols(CIContainer aContainer) { DbgEntityConfig config = null; CIInfoSW info = (CIInfoSW)aContainer.ChildByType(typeof(CIInfoSW)); if (info != null) { config = aContainer.Engine.DebugEngine.ConfigManager.ConfigById(new DbgEntityConfigIdentifier(info.ImageCheckSum)); } return(config != null || iInputs.SymbolsGiven); }
/** Add romid, timestamp, platform, language and sw version */ internal void AddSWInfos(CIContainer aContainer) { CIInfoSW info = (CIInfoSW)aContainer.ChildByType(typeof(CIInfoSW)); if (info != null) { //RomID if (info.ImageCheckSum != 0) { iRomId = info.ImageCheckSum; } //Platform iPlatform = info.Platform; //Language iLanguage = info.Language; //Version const string KInfoSW_Version_Runtime = "Runtime Version"; const string KInfoSW_Version_Variant = "Variant Version"; const string KInfoSW_Version_S60 = "S60 Version"; foreach (CIVersionInfo version in info) { if (version.IsValid && version.Name == KInfoSW_Version_Runtime) { iSWVersion = version.Value; } if (version.IsValid && version.Name == KInfoSW_Version_Variant) { iVariantVersion = version.Value; } if (version.IsValid && version.Name == KInfoSW_Version_S60) { iS60Version = version.Value; } } //Timestamp DateTime timeStamp = info.ImageTimeStamp; String date = timeStamp.ToString("yyyyMMdd", DateTimeFormatInfo.InvariantInfo); int hour = timeStamp.Hour; int minute = timeStamp.Minute; int second = timeStamp.Second; iTimeStampText = date + hour.ToString().PadLeft(2, '0') + minute.ToString().PadLeft(2, '0') + second.ToString().PadLeft(2, '0'); } }
internal void AddTelephony(CIContainer aContainer) { CITelephony info = (CITelephony)aContainer.ChildByType(typeof(CITelephony)); if (info != null) { iPhoneNumber = info.PhoneNumber; iImei = info.IMEI; iImsi = info.IMSI; CITelephonyNetworkInfo networkInfo = info.NetworkInfo; iNetworkCountry = networkInfo.Country; iNetworkIdentity = networkInfo.Identity; iNetworkCell = networkInfo.CellId; iLocInfo = networkInfo.CGI; } }
/** Add timestamp and uptime */ internal void AddHeader(CIContainer aContainer) { CIHeader header = (CIHeader)aContainer.ChildByType(typeof(CIHeader)); if (header != null) { //Timestamp DateTime timeStamp = header.CrashTime; String date = timeStamp.ToString("yyyyMMdd", DateTimeFormatInfo.InvariantInfo); int hour = timeStamp.Hour; int minute = timeStamp.Minute; int second = timeStamp.Second; iTimeStampText = date + hour.ToString().PadLeft(2, '0') + minute.ToString().PadLeft(2, '0') + second.ToString().PadLeft(2, '0'); //UpTime iUptime = header.UpTime.TotalSeconds; // Crash source iCrashSource = header.CrashSource; } }
internal void AddReportParameters(CIContainer aContainer) { CIReportInfo report = (CIReportInfo)aContainer.ChildByType(typeof(CIReportInfo)); if (report != null) { iReportType = report.Type; if (iReportType != string.Empty) { iFileType = XmlConsts.MobileCrashFileType.ETypeCrashAPIReport; } iReportCategory = report.Category; iReportOK = report.CountSuccess; iReportFail = report.CountFail; IEnumerator <CIReportParameter> parameters = report.GetEnumerator(); if (parameters.MoveNext()) //has first parameter { iReportParamName1 = parameters.Current.Name; iReportParamValue1 = parameters.Current.Value; if (parameters.MoveNext()) //has second parameter { iReportParamName2 = parameters.Current.Name; iReportParamValue2 = parameters.Current.Value; if (parameters.MoveNext()) { iReportParamName3 = parameters.Current.Name; iReportParamValue3 = parameters.Current.Value; } } } iReportComments = report.Comments; } }
private void SetArchiveFileName(string aFileFullPath, CIContainer aContainer, CISink sink) { string fileName = Path.GetFileName(aFileFullPath); //add romid to filename if not already there CIInfoSW info = (CIInfoSW)aContainer.ChildByType(typeof(CIInfoSW)); if (info != null) { //RomID if (info.ImageCheckSum != 0) { string romid = info.ImageCheckSum.ToString("x8"); if (fileName.Length < 8 || fileName.Substring(0, 8) != romid) { fileName = romid + "_" + fileName; } } } string basename = Path.GetFileNameWithoutExtension(fileName); string extension = Path.GetExtension(aFileFullPath); string archiveNamePath = Path.Combine(iInputs.ArchivePath, fileName); //Path.GetFileName(iInputs.ArchivePath)); int counter = 1; while (File.Exists(archiveNamePath)) { archiveNamePath = Path.Combine(iInputs.ArchivePath, basename + "_" + counter.ToString() + extension); counter++; } iInputs.SinkParameters.OperationData1 = (Object)archiveNamePath; iBinFileArchivePathName = archiveNamePath; }