private void CmdEcmInfo(BinaryReader rdr) { int adapter = rdr.ReadByte(); EcmInfo info = EcmInfo.GetFromBinaryReader(rdr); LogProvider.Add(DebugLevel.EcmInfo, cLogSection, info); ChannelSession c = _ChanSessions[adapter - _AdapterOffset]; if (c != null) { c.SetEcmInfo(info); } else { LogProvider.Add(DebugLevel.Warning, cLogSection, Message.DvbapiEcmInfoFailed, adapter); } }
private void Stop(bool fromApi) { _CurrentPmt = null; CurrentPid = -1; CurrentNId = -1; CurrentTsId = -1; DvbApiDemuxIndex = -1; LastEcmInfo = null; if (!fromApi) { ChannelUpdated?.Invoke(this, false); } else { _IcEp.SendCommand(InterComCommand.Stop); } }
public void SetEcmInfo(EcmInfo info) { LastEcmInfo = info; }
/// <summary> /// Loggt ECM-Info /// </summary> /// <param name="level"></param> /// <param name="section"></param> /// <param name="info"></param> public static void Add(DebugLevel level, string section, EcmInfo info) { Add(level, section, Message.SingleParam, info); }
private static EcmResult FileDoc(EcmInfo info) { EcmResult ret = new EcmResult(); // Create a Create verb, populate it to create a new RCR CEWSI.CreateAction createVerb = new CEWSI.CreateAction(); createVerb.autoUniqueContainmentName = true; createVerb.autoUniqueContainmentNameSpecified = true; createVerb.classId = "DynamicReferentialContainmentRelationship"; CEWSI.ChangeRequestType objChange = new CEWSI.ChangeRequestType(); objChange.Action = new CEWSI.ActionType[1]; objChange.Action[0] = (CEWSI.ActionType)createVerb; objChange.TargetSpecification = new CEWSI.ObjectReference(); objChange.TargetSpecification.classId = "ObjectStore"; objChange.TargetSpecification.objectId = info.ObjectStore; objChange.id = "1"; // Create the properties of the new RCR CEWSI.ObjectReference objHeadRef = new CEWSI.ObjectReference(); objHeadRef.classId = info.DocClass; objHeadRef.objectId = info.DocId; objHeadRef.objectStore = info.ObjectStore; CEWSI.SingletonObject propHead = new CEWSI.SingletonObject(); propHead.propertyId = "Head"; propHead.Value = (CEWSI.ObjectEntryType)objHeadRef; CEWSI.ObjectReference objTailRef = new CEWSI.ObjectReference(); objTailRef.classId = "Folder"; objTailRef.objectId = info.FolderPath; objTailRef.objectStore = info.ObjectStore; CEWSI.SingletonObject propTail = new CEWSI.SingletonObject(); propTail.propertyId = "Tail"; propTail.Value = (CEWSI.ObjectEntryType)objTailRef; CEWSI.SingletonString propContainmentName = new CEWSI.SingletonString(); propContainmentName.propertyId = "ContainmentName"; propContainmentName.Value = info.DocTitle; CEWSI.ModifiablePropertyType[] objProps = new CEWSI.ModifiablePropertyType[3]; objProps[0] = propTail; objProps[1] = propHead; objProps[2] = propContainmentName; objChange.ActionProperties = objProps; // Fill in the security headers... CEWSI.FNCEWS40PortTypeClient objBinding = WSIUtil.ConfigureBinding(info.User, info.Domain, info.Password, info.Url); // Send off the request CEWSI.ChangeResponseType[] objResponseArray = null; CEWSI.ExecuteChangesRequest objRequest = new CEWSI.ExecuteChangesRequest(); objRequest.refresh = false; objRequest.refreshSpecified = true; objRequest.ChangeRequest = new CEWSI.ChangeRequestType[1]; objRequest.ChangeRequest[0] = objChange; try { objResponseArray = objBinding.ExecuteChanges(WSIUtil.GetLocalization(), objRequest); } catch (System.Net.WebException ex) { //Console.WriteLine("An exception occurred while filing a document: [" + ex.Message + "]"); //Console.ReadLine(); ret.ErrorCode = -1; ret.ErrorMsg = ex.ToString(); return(ret); } //catch (Exception allEx) //{ // //Console.WriteLine("An exception occurred: [" + allEx.Message + "]"); // //Console.ReadLine(); // return false; //} //Console.WriteLine("Successfully filed a document!"); //Console.ReadLine(); ret.ErrorCode = 1; ret.ErrorMsg = "Successfully filed a document!"; return(ret); }