// --------------------------------------------------------------------------------------------------------------------
//
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
//
//
// The Notification Service (Growl Connector)
//
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Services
{
using HandBrake.ApplicationServices.Services.Encode.EventArgs;
using HandBrake.ApplicationServices.Services.Encode.Interfaces;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrakeWPF.Services.Interfaces;
///
/// The Notification Service (Growl Connector)
///
public class NotificationService : INotificationService
{
///
/// The user setting service.
///
private readonly IUserSettingService userSettingService;
///
/// Initializes a new instance of the class.
///
///
/// The encode Service.
///
///
/// The queue Processor.
///
///
/// The user Setting Service.
///
public NotificationService(IEncodeServiceWrapper encodeService, IQueueProcessor queueProcessor, IUserSettingService userSettingService)
{
this.userSettingService = userSettingService;
// encodeService.EncodeCompleted += this.EncodeServiceEncodeCompleted;
// queueProcessor.QueueCompleted += this.QueueProcessorQueueCompleted;
}
///
/// The queue processor_ queue completed.
///
///
/// The sender.
///
///
/// The EventArgs.
///
private void QueueProcessorQueueCompleted(object sender, System.EventArgs e)
{
if (userSettingService.GetUserSetting(UserSettingConstants.GrowlQueue))
{
// GrowlCommunicator.Notify("Queue Completed", "Put down that cocktail...\nyour Handbrake queue is done.");
}
}
///
/// The encode service_ encode completed.
///
///
/// The sender.
///
///
/// The EncodeCompletedEventArgs.
///
private void EncodeServiceEncodeCompleted(object sender, EncodeCompletedEventArgs e)
{
if (userSettingService.GetUserSetting(UserSettingConstants.GrowlEncode))
{
// GrowlCommunicator.Notify("Encode Completed", "Put down that cocktail...\nyour Handbrake encode is done.");
}
}
}
}