Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TvServerEventArgs"/> class.
 /// </summary>
 /// <param name="eventType">Type of the _event.</param>
 /// <param name="card">The card.</param>
 /// <param name="user">The user.</param>
 /// <param name="channel">The channel.</param>
 public TvServerEventArgs(TvServerEventType eventType, VirtualCard card, User user, IChannel channel)
 {
     _eventType = eventType;
     _card      = card;
     _user      = user;
     _channel   = channel;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TvServerEventArgs"/> class.
 /// </summary>
 /// <param name="eventType">Type of the event.</param>
 /// <param name="schedulesList">a IList of schedules</param>
 /// <param name="conflictsList">a IList of conflicts</param>
 /// <param name="argsUpdated">bool flag</param>
 public TvServerEventArgs(TvServerEventType eventType, IList <Schedule> schedulesList, IList <Conflict> conflictsList,
                          object argsUpdated)
 {
     _eventType        = eventType;
     _schedules        = schedulesList;
     _conflicts        = conflictsList;
     _argsUpdatedState = argsUpdated;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TvServerEventArgs"/> class.
 /// </summary>
 /// <param name="eventType">Type of the event.</param>
 /// <param name="card">The card.</param>
 /// <param name="user">The user.</param>
 /// <param name="conflict">The conflict.</param>
 public TvServerEventArgs(TvServerEventType eventType, VirtualCard card, User user, Conflict conflict)
 {
     _eventType = eventType;
     _card      = card;
     _user      = user;
     _channel   = channel;
     _conflict  = conflict;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TvServerEventArgs"/> class.
 /// </summary>
 /// <param name="eventType">Type of the event.</param>
 /// <param name="card">The card.</param>
 /// <param name="user">The user.</param>
 /// <param name="schedule">The schedule.</param>
 /// <param name="recording">The recording.</param>
 public TvServerEventArgs(TvServerEventType eventType, VirtualCard card, User user, Schedule schedule,
                          Recording recording)
 {
     _eventType = eventType;
     _card      = card;
     _user      = user;
     _channel   = channel;
     _schedule  = schedule;
     _recording = recording;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TvServerEventArgs"/> class.
 /// </summary>
 /// <param name="eventType">Type of the event.</param>
 /// <param name="epgChannel">The epg channel</param>
 public TvServerEventArgs(TvServerEventType eventType, EpgChannel epgChannel)
 {
     _eventType  = eventType;
     _epgChannel = epgChannel;
 }
Exemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TvServerEventArgs"/> class.
 /// </summary>
 /// <param name="eventType">Type of the _event.</param>
 /// <param name="card">The card.</param>
 /// <param name="user">The user.</param>
 public TvServerEventArgs(TvServerEventType eventType, VirtualCard card, User user)
 {
     _eventType = eventType;
     _card      = card;
     _user      = user;
 }
Exemplo n.º 7
0
        private void CheckForRecordings(object oState)
        {
            lock (_recordingSync)
            {
                TvServerEventType eventType = TvServerEventType.RecordingStarted;
                if (_allCards != null)
                {
                    foreach (Card card in _allCards)
                    {
                        if (card == null)
                        {
                            continue;
                        }
                        if (RemoteControl.Instance.CardPresent(card.IdCard) == false)
                        {
                            if (_currentlyRecording.ContainsKey(card))
                            {
                                _currentlyRecording.Remove(card);
                            }
                            continue;
                        }

                        bool cardRecording = false;
                        var  users         = RemoteControl.Instance.GetUsersForCard(card.IdCard);
                        if (users == null)
                        {
                            continue;
                        }
                        for (int i = 0; i < users.Count(); i++)
                        {
                            if (RemoteControl.Instance.IsRecording(ref users[i]) == true)
                            {
                                cardRecording = true;
                                if (_currentlyRecording.ContainsKey(card) == false)
                                {
                                    _currentlyRecording.Add(card, RemoteControl.Instance.RecordingFileName(ref users[i]));
                                    eventType = TvServerEventType.RecordingStarted;
                                    if (File.Exists(_currentlyRecording[card]))
                                    {
                                        ServiceRegistration.Get <ILogger>().Info("SlimTvProxy: {0}: {1}", eventType, _currentlyRecording[card]);
                                        ImportRecording(_currentlyRecording[card]);
                                    }
                                    break;
                                }
                            }
                        }

                        if (cardRecording == false)
                        {
                            if (_currentlyRecording.ContainsKey(card) == true)
                            {
                                eventType = TvServerEventType.RecordingEnded;
                                ServiceRegistration.Get <ILogger>().Info("SlimTvProxy: {0}: {1}", eventType, _currentlyRecording[card]);
                                ImportRecording(_currentlyRecording[card]);
                                _currentlyRecording.Remove(card);
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TvServerEventArgs"/> class.
 /// </summary>
 /// <param name="eventType">Type of the _event.</param>
 public TvServerEventArgs(TvServerEventType eventType)
 {
     _eventType = eventType;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TvServerEventArgs"/> class.
 /// </summary>
 /// <param name="eventType">Type of the event.</param>
 /// <param name="schedulesList">a IList of schedules</param>
 /// <param name="conflictsList">a IList of conflicts</param>
 /// <param name="argsUpdated">bool flag</param>
 public TvServerEventArgs(TvServerEventType eventType, IList<Schedule> schedulesList, IList<Conflict> conflictsList,
                          object argsUpdated)
 {
   _eventType = eventType;
   _schedules = schedulesList;
   _conflicts = conflictsList;
   _argsUpdatedState = argsUpdated;
 }
Exemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TvServerEventArgs"/> class.
 /// </summary>
 /// <param name="eventType">Type of the event.</param>
 /// <param name="epgChannel">The epg channel</param>
 public TvServerEventArgs(TvServerEventType eventType, EpgChannel epgChannel)
 {
   _eventType = eventType;
   _epgChannel = epgChannel;
 }
Exemplo n.º 11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TvServerEventArgs"/> class.
 /// </summary>
 /// <param name="eventType">Type of the event.</param>
 /// <param name="card">The card.</param>
 /// <param name="user">The user.</param>
 /// <param name="conflict">The conflict.</param>
 public TvServerEventArgs(TvServerEventType eventType, VirtualCard card, User user, Conflict conflict)
 {
   _eventType = eventType;
   _card = card;
   _user = user;
   _channel = channel;
   _conflict = conflict;
 }
Exemplo n.º 12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TvServerEventArgs"/> class.
 /// </summary>
 /// <param name="eventType">Type of the event.</param>
 /// <param name="card">The card.</param>
 /// <param name="user">The user.</param>
 /// <param name="schedule">The schedule.</param>
 /// <param name="recording">The recording.</param>
 public TvServerEventArgs(TvServerEventType eventType, VirtualCard card, User user, Schedule schedule,
                          Recording recording)
 {
   _eventType = eventType;
   _card = card;
   _user = user;
   _channel = channel;
   _schedule = schedule;
   _recording = recording;
 }
Exemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TvServerEventArgs"/> class.
 /// </summary>
 /// <param name="eventType">Type of the _event.</param>
 /// <param name="card">The card.</param>
 /// <param name="user">The user.</param>
 /// <param name="channel">The channel.</param>
 public TvServerEventArgs(TvServerEventType eventType, VirtualCard card, User user, IChannel channel)
 {
   _eventType = eventType;
   _card = card;
   _user = user;
   _channel = channel;
 }
Exemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TvServerEventArgs"/> class.
 /// </summary>
 /// <param name="eventType">Type of the _event.</param>
 /// <param name="card">The card.</param>
 /// <param name="user">The user.</param>
 public TvServerEventArgs(TvServerEventType eventType, VirtualCard card, User user)
 {
   _eventType = eventType;
   _card = card;
   _user = user;
 }
Exemplo n.º 15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TvServerEventArgs"/> class.
 /// </summary>
 /// <param name="eventType">Type of the _event.</param>
 public TvServerEventArgs(TvServerEventType eventType)
 {
   _eventType = eventType;
 }