/// <summary> /// Create a new instance and start EPG parsing on PID <i>0x12</i>. /// </summary> /// <param name="profile">Related hardware device.</param> /// <param name="portal">The currently show station.</param> public ServiceParser(Profile profile, SourceIdentifier portal) { // Remember Profile = profile; Portal = portal; // Register HardwareManager.OpenHardware(Profile).AddProgramGuideConsumer(TableFound); }
/// <summary> /// Ermittelt die Geräteabstraktion zu einer Quellinformation. /// </summary> /// <param name="selection">Die betroffene Quellinformation.</param> /// <returns>Die zugehörige Geräteabstraktion.</returns> /// <exception cref="ArgumentNullException">Es wurde keine Quellinformation angegeben.</exception> public static Hardware GetHardware(this SourceSelection selection) { // Validate if (null == selection) { throw new ArgumentNullException("selection"); } // Forward using (HardwareManager.Open()) return(HardwareManager.OpenHardware(selection.ProfileName)); }
/// <summary> /// Aktiviert eine Quellinformation. /// </summary> /// <param name="selection">Die gewünschte Quellinformation.</param> /// <exception cref="ArgumentNullException">Es wurden keine Informationen zur /// Quelle angegeben.</exception> public static void SelectGroup(this SourceSelection selection) { // Validate if (null == selection) { throw new ArgumentNullException("selection"); } // Forward using (HardwareManager.Open()) selection.SelectGroup(selection.GetHardware()); }
/// <summary> /// Stellt den Datenempfang ein. /// </summary> public void Disable() { // Unregister HardwareManager.OpenHardware(Profile).RemoveProgramGuideConsumer(TableFound); }