diff --git a/MPfm/MPfm.GTK/Classes/LinuxSyncDeviceSpecifications.cs b/MPfm/MPfm.GTK/Classes/LinuxSyncDeviceSpecifications.cs
new file mode 100644
index 00000000..54f6fe28
--- /dev/null
+++ b/MPfm/MPfm.GTK/Classes/LinuxSyncDeviceSpecifications.cs
@@ -0,0 +1,64 @@
+// Copyright © 2011-2013 Yanick Castonguay
+//
+// This file is part of MPfm.
+//
+// MPfm is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// MPfm is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with MPfm. If not, see .
+
+using System;
+using MPfm.Library;
+using MPfm.Library.Objects;
+using MPfm.Library.Services;
+
+namespace MPfm.GTK.Classes
+{
+ ///
+ /// Device specifications for Linux. Used for identifying sync devices.
+ ///
+ public class LinuxSyncDeviceSpecifications : ISyncDeviceSpecifications
+ {
+ public event NetworkStateChanged OnNetworkStateChanged;
+
+ public SyncDeviceType GetDeviceType()
+ {
+ return SyncDeviceType.Linux;
+ }
+
+ string _deviceName = string.Empty;
+ public string GetDeviceName()
+ {
+ return _deviceName;
+ }
+
+ public long GetFreeSpace()
+ {
+ return 0;
+ }
+
+ public string GetIPAddress()
+ {
+ return SyncListenerService.GetLocalIPAddress().ToString();
+ }
+
+ public string GetMusicFolderPath()
+ {
+ return Environment.GetFolderPath(Environment.SpecialFolder.MyMusic);
+ }
+
+ public void ReportNetworkStateChange(NetworkState networkState)
+ {
+ if (OnNetworkStateChanged != null)
+ OnNetworkStateChanged(networkState);
+ }
+ }
+}
diff --git a/MPfm/MPfm.GTK/Classes/Main.cs b/MPfm/MPfm.GTK/Classes/Main.cs
index b80fa69c..ac30cb83 100644
--- a/MPfm/MPfm.GTK/Classes/Main.cs
+++ b/MPfm/MPfm.GTK/Classes/Main.cs
@@ -25,8 +25,9 @@
using MPfm.MVP.Bootstrap;
using MPfm.GTK.Navigation;
using MPfm.GTK.Windows;
+using MPfm.Library;
-namespace MPfm.GTK
+namespace MPfm.GTK.Classes
{
public class MainClass
{
@@ -37,6 +38,7 @@ public static void Main (string[] args)
// Add view implementations to IoC
Application.Init();
Bootstrapper.GetContainer().Register().AsSingleton();
+ Bootstrapper.GetContainer().Register().AsSingleton();
Bootstrapper.GetContainer().Register().AsMultiInstance();
Bootstrapper.GetContainer().Register().AsMultiInstance();
Bootstrapper.GetContainer().Register().AsMultiInstance();
diff --git a/MPfm/MPfm.GTK/Classes/Navigation/GtkNavigationManager.cs b/MPfm/MPfm.GTK/Classes/Navigation/GtkNavigationManager.cs
index 8bda8df2..31812384 100644
--- a/MPfm/MPfm.GTK/Classes/Navigation/GtkNavigationManager.cs
+++ b/MPfm/MPfm.GTK/Classes/Navigation/GtkNavigationManager.cs
@@ -46,9 +46,9 @@ public override IMainView CreateMainView()
return view;
}
- public override IPreferencesView CreatePreferencesView()
+ public override IDesktopPreferencesView CreatePreferencesView()
{
- IPreferencesView view = null;
+ IDesktopPreferencesView view = null;
Gtk.Application.Invoke(delegate {
view = base.CreatePreferencesView();
});
diff --git a/MPfm/MPfm.GTK/MPfm.GTK.csproj b/MPfm/MPfm.GTK/MPfm.GTK.csproj
index b1d8de9a..f5894493 100644
--- a/MPfm/MPfm.GTK/MPfm.GTK.csproj
+++ b/MPfm/MPfm.GTK/MPfm.GTK.csproj
@@ -100,6 +100,7 @@
+
diff --git a/MPfm/MPfm.GTK/Windows/MainWindow.cs b/MPfm/MPfm.GTK/Windows/MainWindow.cs
index a9ec303d..50fca2eb 100644
--- a/MPfm/MPfm.GTK/Windows/MainWindow.cs
+++ b/MPfm/MPfm.GTK/Windows/MainWindow.cs
@@ -32,6 +32,7 @@
using MPfm.Library.UpdateLibrary;
using MPfm.GTK.Helpers;
using MPfm.MVP.Messages;
+using MPfm.Player.Objects;
namespace MPfm.GTK.Windows
{
@@ -902,6 +903,14 @@ public void RefreshPlayerTimeShifting(PlayerTimeShiftingEntity entity)
// hscaleTimeShifting.Value = (float)entity.TimeShifting;
});
}
+
+ public void RefreshMarkers (IEnumerable markers)
+ {
+ }
+
+ public void RefreshLoops (IEnumerable loops)
+ {
+ }
public void PlayerError(Exception ex)
{
@@ -1016,6 +1025,5 @@ public void RefreshSongBrowser(IEnumerable audioFiles)
}
#endregion
-
}
}
diff --git a/MPfm/MPfm.GTK/Windows/PlaylistWindow.cs b/MPfm/MPfm.GTK/Windows/PlaylistWindow.cs
index 01d0f6a1..133304ac 100644
--- a/MPfm/MPfm.GTK/Windows/PlaylistWindow.cs
+++ b/MPfm/MPfm.GTK/Windows/PlaylistWindow.cs
@@ -76,8 +76,31 @@ protected void OnActionSavePlaylistActivated (object sender, System.EventArgs e)
protected void OnActionSavePlaylistAsActivated (object sender, System.EventArgs e)
{
- }
+ }
+
+ #region IPlaylistView implementation
+
+ public Action OnChangePlaylistItemOrder { get; set; }
+ public Action OnSelectPlaylistItem { get; set; }
+ public Action OnRemovePlaylistItem { get; set; }
+ public Action OnNewPlaylist { get; set; }
+ public Action OnLoadPlaylist { get; set; }
+ public Action OnSavePlaylist { get; set; }
+ public Action OnShufflePlaylist { get; set; }
+
+ public void PlaylistError (Exception ex)
+ {
+ }
+
+ public void RefreshPlaylist (MPfm.Sound.Playlists.Playlist playlist)
+ {
+ }
+
+ public void RefreshCurrentlyPlayingSong (int index, MPfm.Sound.AudioFiles.AudioFile audioFile)
+ {
+ }
+
+ #endregion
}
}
-
diff --git a/MPfm/MPfm.GTK/Windows/PreferencesWindow.cs b/MPfm/MPfm.GTK/Windows/PreferencesWindow.cs
index 2b5eef65..68998cef 100644
--- a/MPfm/MPfm.GTK/Windows/PreferencesWindow.cs
+++ b/MPfm/MPfm.GTK/Windows/PreferencesWindow.cs
@@ -18,6 +18,7 @@
using System;
using MPfm.MVP;
using MPfm.MVP.Views;
+using System.Collections.Generic;
namespace MPfm.GTK.Windows
{
@@ -53,6 +54,16 @@ protected void OnDeleteEvent(object o, Gtk.DeleteEventArgs args)
//this.HideAll();
Console.WriteLine("PreferencesWindow - OnDeleteEvent");
}
+
+ #region IPreferencesView implementation
+
+ public Action OnSelectItem { get; set; }
+
+ public void RefreshItems (List items)
+ {
+ }
+
+ #endregion
+
}
}
-
diff --git a/MPfm/MPfm.GTK/Windows/SplashWindow.cs b/MPfm/MPfm.GTK/Windows/SplashWindow.cs
index c4d56246..43a35c18 100644
--- a/MPfm/MPfm.GTK/Windows/SplashWindow.cs
+++ b/MPfm/MPfm.GTK/Windows/SplashWindow.cs
@@ -69,7 +69,7 @@ public void RefreshStatus(string message)
});
}
- public void InitDone()
+ public void InitDone(bool isAppFirstStart)
{
Gtk.Application.Invoke(delegate{
this.Destroy();
diff --git a/MPfm/MPfm.GTK/Windows/SyncWindow.cs b/MPfm/MPfm.GTK/Windows/SyncWindow.cs
index f03c7dad..f09ece53 100644
--- a/MPfm/MPfm.GTK/Windows/SyncWindow.cs
+++ b/MPfm/MPfm.GTK/Windows/SyncWindow.cs
@@ -20,6 +20,7 @@
using System.Collections.Generic;
using MPfm.MVP.Models;
using MPfm.GTK.Windows;
+using MPfm.Library.Objects;
namespace MPfm.GTK
{
@@ -50,22 +51,40 @@ protected void OnDeleteEvent(object o, Gtk.DeleteEventArgs args)
protected void OnSyncRefreshDeviceList(object sender, EventArgs e)
{
- OnRefreshDevices();
- }
+ OnStartDiscovery();
+ }
#region ISyncView implementation
- public System.Action OnRefreshDevices { get; set; }
+ public Action OnConnectDevice { get; set; }
+ public Action OnConnectDeviceManually { get; set; }
+ public Action OnStartDiscovery { get; set; }
+ public Action OnCancelDiscovery { get; set; }
- public void RefreshDevices(IEnumerable devices)
+ public void SyncError (Exception ex)
{
}
- public void SyncDevice(SyncDeviceEntity device)
+ public void RefreshIPAddress (string address)
{
}
- #endregion
+ public void RefreshDiscoveryProgress (float percentageDone, string status)
+ {
+ }
+
+ public void RefreshDevices (IEnumerable devices)
+ {
+ }
+ public void RefreshDevicesEnded ()
+ {
+ }
+
+ public void SyncDevice (SyncDevice device)
+ {
+ }
+
+ #endregion
}
}
diff --git a/MPfm/MPfm.GTK/Windows/UpdateLibraryWindow.cs b/MPfm/MPfm.GTK/Windows/UpdateLibraryWindow.cs
index f87b8c01..1c090348 100644
--- a/MPfm/MPfm.GTK/Windows/UpdateLibraryWindow.cs
+++ b/MPfm/MPfm.GTK/Windows/UpdateLibraryWindow.cs
@@ -29,6 +29,7 @@
using MPfm.MVP.Services;
using MPfm.MVP.Bootstrap;
using MPfm.Library.Services;
+using MPfm.Library.Objects;
namespace MPfm.GTK.Windows
{
@@ -58,7 +59,7 @@ public partial class UpdateLibraryWindow : BaseWindow, IUpdateLibraryView
var audioFileCacheService = Bootstrapper.GetContainer().Resolve();
var libraryService = Bootstrapper.GetContainer().Resolve();
var updateLibraryService = Bootstrapper.GetContainer().Resolve();
- presenter = new UpdateLibraryPresenter(audioFileCacheService, libraryService, updateLibraryService);
+ presenter = new UpdateLibraryPresenter(audioFileCacheService, updateLibraryService);
presenter.BindView(this);
presenter.UpdateLibrary(mode, filePaths, folderPath);