Example #1
0
    /// <summary>
    /// grabs the epg.
    /// </summary>
    /// <returns></returns>
    public bool Start(BaseEpgGrabber grabber)
    {
      Log.Epg("EpgGrabbing: Start");
      try
      {
        if (_cardHandler.DataBaseCard.Enabled == false)
        {
          return false;
        }

        try
        {
          RemoteControl.HostName = _cardHandler.DataBaseCard.ReferencedServer().HostName;
          if (!RemoteControl.Instance.CardPresent(_cardHandler.DataBaseCard.IdCard))
          {
            return false;
          }
        }
        catch (Exception)
        {
          Log.Error("EpgGrabbing: unable to connect to controller at: {0}",
                    _cardHandler.DataBaseCard.ReferencedServer().HostName);
          return false;
        }

        if (_cardHandler.IsLocal == false)
        {
          //RemoteControl.HostName = _cardHandler.DataBaseCard.ReferencedServer().HostName;
          //RemoteControl.Instance.GrabEpg();
          return false;
        }
        if (grabber == null)
        {
          return false;
        }
        _cardHandler.Card.GrabEpg(grabber);
        return true;
      }
      catch (Exception ex)
      {
        Log.Write(ex);
        return false;
      }
    }
 /// <summary>
 /// Grabs the epg.
 /// </summary>
 /// <param name="callback">The callback which gets called when epg is received or canceled.</param>
 public void GrabEpg(BaseEpgGrabber callback)
 {
   _cards[_currentCardIndex].GrabEpg(callback);
 }
 /// <summary>
 /// Start grabbing the epg
 /// </summary>
 public void GrabEpg(BaseEpgGrabber callback)
 {
   if (!CheckThreadId())
     return;
   _epgGrabberCallback = callback;
   Log.Log.Write("dvb:grab epg...");
   if (_interfaceEpgGrabber == null)
     return;
   _interfaceEpgGrabber.SetCallBack(callback);
   _interfaceEpgGrabber.GrabEPG();
   _interfaceEpgGrabber.GrabMHW();
   _epgGrabbing = true;
 }
Example #4
0
 /// <summary>
 /// Grabs the epg.
 /// </summary>
 /// <param name="callback">The callback which gets called when epg is received or canceled.</param>
 public void GrabEpg(BaseEpgGrabber callback) {}
 /// <summary>
 /// Grabs the epg.
 /// </summary>
 /// <param name="callback">The callback which gets called when epg is received or canceled.</param>
 public void GrabEpg(BaseEpgGrabber callback)
 {
   _group.GrabEpg(callback);
 }
 /// <summary>
 /// grabs the epg.
 /// </summary>
 /// <param name="grabber">EPG grabber</param>
 /// <param name="cardId">id of the card.</param>
 /// <returns></returns>
 public bool GrabEpg(BaseEpgGrabber grabber, int cardId)
 {
   Log.Info("Controller: GrabEpg on card ID == {0}", cardId);
   if (ValidateTvControllerParams(cardId))
   {
     Log.Error("Controller: GrabEpg - invalid cardId");
     return false;
   }
   return _cards[cardId].Epg.Start(grabber);
 }