Skip to content

Commit

Permalink
Android: Updated project after changes on iOS.
Browse files Browse the repository at this point in the history
Split PeakFileGenerator into different files and added an interface.

Related to issue #406.
  • Loading branch information
ycastonguay committed Mar 15, 2013
1 parent 0f252a0 commit fed9c4c
Show file tree
Hide file tree
Showing 25 changed files with 2,384 additions and 2,104 deletions.
13 changes: 13 additions & 0 deletions MPfm/MPfm.Android/Classes/Fragments/LoopsFragment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
// along with MPfm. If not, see <http://www.gnu.org/licenses/>.

using System;
using System.Collections.Generic;
using Android.App;
using Android.OS;
using Android.Views;
using Android.Widget;
using MPfm.Android.Classes.Fragments.Base;
using MPfm.MVP.Views;
using MPfm.Player.Objects;

namespace MPfm.Android.Classes.Fragments
{
Expand All @@ -47,5 +49,16 @@ public void OnClick(View v)
{

}

#region ILoopsView implementation

public Action OnAddLoop { get; set; }
public Action<Loop> OnEditLoop { get; set; }

public void RefreshLoops(List<Loop> loops)
{
}

#endregion
}
}
13 changes: 13 additions & 0 deletions MPfm/MPfm.Android/Classes/Fragments/MarkersFragment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
// along with MPfm. If not, see <http://www.gnu.org/licenses/>.

using System;
using System.Collections.Generic;
using Android.App;
using Android.OS;
using Android.Views;
using Android.Widget;
using MPfm.Android.Classes.Fragments.Base;
using MPfm.MVP.Views;
using MPfm.Player.Objects;

namespace MPfm.Android.Classes.Fragments
{
Expand All @@ -47,5 +49,16 @@ public void OnClick(View v)
{

}

#region IMarkersView implementation

public Action OnAddMarker { get; set; }
public Action<Marker> OnEditMarker { get; set; }

public void RefreshMarkers(List<Marker> markers)
{
}

#endregion
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
using MPfm.Android.Classes.Objects;
using MPfm.MVP.Models;
using MPfm.MVP.Views;
using MPfm.Sound.AudioFiles;

namespace MPfm.Android.Classes.Fragments
{
Expand All @@ -35,10 +36,6 @@ public class MobileLibraryBrowserFragment : BaseListFragment, IMobileLibraryBrow
private EditText _editText;
private IEnumerable<LibraryBrowserEntity> _entities = new List<LibraryBrowserEntity>();

public MobileLibraryBrowserType BrowserType { get; set; }
public string Filter { get; set; }
public Action<int> OnItemClick { get; set; }

// Leave an empty constructor or the application will crash at runtime
public MobileLibraryBrowserFragment() : base(null) { }

Expand Down Expand Up @@ -73,7 +70,15 @@ public void OnClick(View v)
builder.Show();
}

public void RefreshLibraryBrowser(IEnumerable<LibraryBrowserEntity> entities)

#region IMobileLibraryBrowserView implementation

public MobileLibraryBrowserType BrowserType { get; set; }
public string Filter { get; set; }
public Action<int> OnItemClick { get; set; }
public Action<string, string> OnRequestAlbumArt { get; set; }

public void RefreshLibraryBrowser(IEnumerable<LibraryBrowserEntity> entities, MobileLibraryBrowserType browserType, string navigationBarTitle)
{
_entities = entities;
var listAdapter = (MobileLibraryBrowserListAdapter) ListAdapter;
Expand All @@ -85,9 +90,19 @@ public void RefreshLibraryBrowser(IEnumerable<LibraryBrowserEntity> entities)
Activity.RunOnUiThread(() => {
listAdapter.SetData(entities);
listAdapter.NotifyDataSetChanged();
});
});
}
}

public void RefreshCurrentlyPlayingSong(int index, AudioFile audioFile)
{
}

public void RefreshAlbumArtCell(string artistName, string albumTitle, byte[] albumArtData)
{
}

#endregion

}
}
20 changes: 20 additions & 0 deletions MPfm/MPfm.Android/Classes/Fragments/PitchShiftingFragment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
using Android.Views;
using Android.Widget;
using MPfm.Android.Classes.Fragments.Base;
using MPfm.MVP.Models;
using MPfm.MVP.Presenters;
using MPfm.MVP.Views;

namespace MPfm.Android.Classes.Fragments
Expand All @@ -47,5 +49,23 @@ public void OnClick(View v)
{

}

#region ITimeShiftingView implementation

public Action<float> OnSetTimeShifting { get; set; }
public Action<TimeShiftingMode> OnSetTimeShiftingMode { get; set; }
public Action OnResetTimeShifting { get; set; }
public Action OnDetectTempo { get; set; }

public void RefreshTimeShifting(PlayerTimeShiftingEntity entity)
{
}

public void TimeShiftingError(Exception ex)
{
}

#endregion

}
}
5 changes: 5 additions & 0 deletions MPfm/MPfm.Android/Classes/Fragments/PlayerFragment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
using MPfm.Android.Classes.Fragments.Base;
using MPfm.Android.Classes.Helpers;
using MPfm.Core;
using MPfm.MVP.Messages;
using MPfm.MVP.Views;
using MPfm.Player;
using MPfm.Sound.AudioFiles;
Expand Down Expand Up @@ -113,6 +114,10 @@ public void OnClick(View v)
public Action<float> OnPlayerSetTimeShifting { get; set; }
public Action<float> OnPlayerSetPosition { get; set; }

public void RefreshPlayerStatus(PlayerStatusType status)
{
}

public void RefreshPlayerPosition(MVP.Models.PlayerPositionEntity entity)
{
Activity.RunOnUiThread(() =>
Expand Down
10 changes: 10 additions & 0 deletions MPfm/MPfm.Android/Classes/Fragments/PlayerMetadataFragment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
using Android.Widget;
using MPfm.Android.Classes.Fragments.Base;
using MPfm.MVP.Views;
using MPfm.Sound.AudioFiles;

namespace MPfm.Android.Classes.Fragments
{
Expand All @@ -47,5 +48,14 @@ public void OnClick(View v)
{

}

#region IPlayerMetadataView implementation

public void RefreshAudioFile(AudioFile audioFile)
{
}

#endregion

}
}
18 changes: 9 additions & 9 deletions MPfm/MPfm.Android/Resources/Resource.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions MPfm/MPfm.Core/MPfm.Core.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
Expand All @@ -101,5 +99,6 @@
<Compile Include="OS.cs" />
<Compile Include="CacheStore.cs" />
<Compile Include="ByteArrayQueue.cs" />
<Compile Include="Normalizer.cs" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions MPfm/MPfm.Core/MPfm.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,6 @@
<Compile Include="OS.cs" />
<Compile Include="CacheStore.cs" />
<Compile Include="ByteArrayQueue.cs" />
<Compile Include="Normalizer.cs" />
</ItemGroup>
</Project>
3 changes: 0 additions & 3 deletions MPfm/MPfm.Library/MPfm.Library.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="System.Reactive">
<HintPath>Lib\System.Reactive.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite">
<HintPath>Lib\System.Data.SQLite.dll</HintPath>
</Reference>
Expand Down
8 changes: 8 additions & 0 deletions MPfm/MPfm.MVP/MPfm.MVP.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -223,5 +223,13 @@
<Compile Include="Presenters\PitchShiftingPresenter.cs" />
<Compile Include="Presenters\Interfaces\IPlayerMetadataPresenter.cs" />
<Compile Include="Presenters\PlayerMetadataPresenter.cs" />
<Compile Include="Messages\PlayerPlaylistIndexChangedMessage.cs" />
<Compile Include="Messages\PlayerCommandMessage.cs" />
<Compile Include="Views\ILoopDetailsView.cs" />
<Compile Include="Views\IMarkerDetailsView.cs" />
<Compile Include="Presenters\Interfaces\ILoopDetailsPresenter.cs" />
<Compile Include="Presenters\Interfaces\IMarkerDetailsPresenter.cs" />
<Compile Include="Presenters\LoopDetailsPresenter.cs" />
<Compile Include="Presenters\MarkerDetailsPresenter.cs" />
</ItemGroup>
</Project>
8 changes: 8 additions & 0 deletions MPfm/MPfm.MVP/MPfm.MVP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -211,5 +211,13 @@
<Compile Include="Presenters\PitchShiftingPresenter.cs" />
<Compile Include="Presenters\Interfaces\IPlayerMetadataPresenter.cs" />
<Compile Include="Presenters\PlayerMetadataPresenter.cs" />
<Compile Include="Messages\PlayerPlaylistIndexChangedMessage.cs" />
<Compile Include="Messages\PlayerCommandMessage.cs" />
<Compile Include="Views\ILoopDetailsView.cs" />
<Compile Include="Views\IMarkerDetailsView.cs" />
<Compile Include="Presenters\Interfaces\ILoopDetailsPresenter.cs" />
<Compile Include="Presenters\Interfaces\IMarkerDetailsPresenter.cs" />
<Compile Include="Presenters\LoopDetailsPresenter.cs" />
<Compile Include="Presenters\MarkerDetailsPresenter.cs" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions MPfm/MPfm.Player/MPfm.Player.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,6 @@
<Compile Include="Objects\Loop.cs" />
<Compile Include="Objects\Marker.cs" />
<Compile Include="Player.cs" />
<Compile Include="Events\AudioInterruptedData.cs" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions MPfm/MPfm.Player/MPfm.Player.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,6 @@
<Compile Include="Objects\Loop.cs" />
<Compile Include="Objects\Marker.cs" />
<Compile Include="Player.cs" />
<Compile Include="Events\AudioInterruptedData.cs" />
</ItemGroup>
</Project>
Loading

0 comments on commit fed9c4c

Please sign in to comment.