banshee r3228 - in trunk/banshee: . build src/Core/Banshee.Services/Banshee.Streaming src/Extensions/Banshee.Lastfm/Banshee.Lastfm src/Libraries/Lastfm src/Libraries/Lastfm/Lastfm src/Libraries/Mono.Media/Playlists.Xspf
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3228 - in trunk/banshee: . build src/Core/Banshee.Services/Banshee.Streaming src/Extensions/Banshee.Lastfm/Banshee.Lastfm src/Libraries/Lastfm src/Libraries/Lastfm/Lastfm src/Libraries/Mono.Media/Playlists.Xspf
- Date: Tue, 12 Feb 2008 00:25:51 +0000 (GMT)
Author: gburt
Date: Tue Feb 12 00:25:50 2008
New Revision: 3228
URL: http://svn.gnome.org/viewvc/banshee?rev=3228&view=rev
Log:
2008-02-11 Gabriel Burt <gabriel burt gmail com>
* build/build.environment.mk: Add System.Web to Lastfm deps.
* src/Core/Banshee.Services/Banshee.Streaming/RadioTrackInfo.cs: Fix
broken build; Xspf is now in Mono.Media.
* src/Libraries/Lastfm/Last.FM.mdp: Rename.
* src/Libraries/Lastfm/Lastfm/Account.cs: Add Updated event.
* src/Extensions/Banshee.Lastfm/Banshee.Lastfm/Connection.cs:
* src/Libraries/Lastfm/Makefile.am:
* src/Libraries/Lastfm/Lastfm/Connection.cs: Move Connection class out of
extension, pull out Banshee dependencies.
* src/Libraries/Mono.Media/Playlists.Xspf/LinkEntry.cs:
* src/Libraries/Mono.Media/Playlists.Xspf/MetaEntry.cs:
* src/Libraries/Mono.Media/Playlists.Xspf/Playlist.cs:
* src/Libraries/Mono.Media/Playlists.Xspf/Track.cs:
* src/Libraries/Mono.Media/Playlists.Xspf/W3CDateTime.cs:
* src/Libraries/Mono.Media/Playlists.Xspf/XmlUtil.cs:
* src/Libraries/Mono.Media/Playlists.Xspf/XspfBaseObject.cs: Fix headers
and namespaces.
Added:
trunk/banshee/src/Libraries/Lastfm/Lastfm.mdp (props changed)
- copied unchanged from r3226, /trunk/banshee/src/Libraries/Lastfm/Last.FM.mdp
trunk/banshee/src/Libraries/Lastfm/Lastfm/Connection.cs
- copied, changed from r3226, /trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm/Connection.cs
Removed:
trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm/Connection.cs
trunk/banshee/src/Libraries/Lastfm/Last.FM.mdp
Modified:
trunk/banshee/ChangeLog
trunk/banshee/build/build.environment.mk
trunk/banshee/src/Core/Banshee.Services/Banshee.Streaming/RadioTrackInfo.cs
trunk/banshee/src/Libraries/Lastfm/Lastfm/Account.cs
trunk/banshee/src/Libraries/Lastfm/Makefile.am
trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/LinkEntry.cs
trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/MetaEntry.cs
trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/Playlist.cs
trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/Track.cs
trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/W3CDateTime.cs
trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/XmlUtil.cs
trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/XspfBaseObject.cs
Modified: trunk/banshee/build/build.environment.mk
==============================================================================
--- trunk/banshee/build/build.environment.mk (original)
+++ trunk/banshee/build/build.environment.mk Tue Feb 12 00:25:50 2008
@@ -8,6 +8,7 @@
# External libraries to link against, generated from configure
LINK_SYSTEM = -r:System
+LINK_SYSTEM_WEB = -r:System.Web
LINK_SQLITE = -r:System.Data -r:Mono.Data.Sqlite
LINK_CAIRO = -r:Mono.Cairo
LINK_MONO_POSIX = -r:Mono.Posix
@@ -49,11 +50,11 @@
#LINK_GNOME_KEYRING = -r:$(DIR_GNOME_KEYRING)/Gnome.Keyring.dll
#LINK_GNOME_KEYRING_DEPS = $(REF_GNOME_KEYRING) $(LINK_GNOME_KEYRING)
#
-REF_LASTFM = $(LINK_SYSTEM)
+REF_LASTFM = $(LINK_SYSTEM) $(LINK_SYSTEM_WEB) $(LINK_MONO_MEDIA) $(LINK_MONO_POSIX)
LINK_LASTFM = -r:$(DIR_BIN)/Lastfm.dll
LINK_LASTFM_DEPS = $(REF_LASTFM) $(LINK_LASTFM)
-REF_LASTFM_GUI = $(LINK_MONO_POSIX) $(LINK_GLIB) $(LINK_GTK) $(LINK_LASTFM_DEPS)
+REF_LASTFM_GUI = $(LINK_GLIB) $(LINK_GTK) $(LINK_LASTFM_DEPS)
LINK_LASTFM_GUI = -r:$(DIR_BIN)/Lastfm.Gui.dll
LINK_LASTFM_GUI_DEPS = $(REF_LASTFM_GUI) $(LINK_LASTFM_GUI)
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Streaming/RadioTrackInfo.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Streaming/RadioTrackInfo.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Streaming/RadioTrackInfo.cs Tue Feb 12 00:25:50 2008
@@ -30,11 +30,12 @@
using System.Threading;
using System.Collections.Generic;
+using Playlists.Xspf;
+
using Banshee.Base;
using Banshee.Collection;
using Banshee.ServiceStack;
using Banshee.Playlists.Formats;
-using Banshee.Playlists.Formats.Xspf;
namespace Banshee.Streaming
{
Modified: trunk/banshee/src/Libraries/Lastfm/Lastfm/Account.cs
==============================================================================
--- trunk/banshee/src/Libraries/Lastfm/Lastfm/Account.cs (original)
+++ trunk/banshee/src/Libraries/Lastfm/Lastfm/Account.cs Tue Feb 12 00:25:50 2008
@@ -36,6 +36,8 @@
{
public abstract class Account
{
+ public event EventHandler Updated;
+
private string username;
public string Username {
get { return username; }
@@ -48,7 +50,7 @@
set { password = value; }
}
- public string Md5Password {
+ public string CryptedPassword {
get { return password == null ? null : Md5Encode (password); }
set { password = value; }
}
@@ -81,10 +83,22 @@
shash.Append (hash[i].ToString ("x2"));
}
+
return shash.ToString ();
}
- public abstract void Save ();
+ public virtual void Save ()
+ {
+ OnUpdated ();
+ }
+
+ protected void OnUpdated ()
+ {
+ EventHandler handler = Updated;
+ if (handler != null) {
+ handler (this, EventArgs.Empty);
+ }
+ }
}
}
Copied: trunk/banshee/src/Libraries/Lastfm/Lastfm/Connection.cs (from r3226, /trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm/Connection.cs)
==============================================================================
--- /trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm/Connection.cs (original)
+++ trunk/banshee/src/Libraries/Lastfm/Lastfm/Connection.cs Tue Feb 12 00:25:50 2008
@@ -1,30 +1,30 @@
-/***************************************************************************
- * Connection.cs
- *
- * Copyright (C) 2007 Novell, Inc.
- * Written by Gabriel Burt <gabriel burt gmail com>
- ****************************************************************************/
-
-/* THIS FILE IS LICENSED UNDER THE MIT LICENSE AS OUTLINED IMMEDIATELY BELOW:
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
+//
+// Connection.cs
+//
+// Authors:
+// Gabriel Burt <gburt novell com>
+//
+// Copyright (C) 2007-2008 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
using System;
using System.Collections;
@@ -38,11 +38,9 @@
using Mono.Unix;
-using Banshee.Base;
-using Banshee.Playlists.Formats.Xspf;
-using Last.FM;
+using Playlists.Xspf;
-namespace Banshee.Lastfm
+namespace Lastfm
{
public class ConnectionStateChangedArgs : EventArgs
{
@@ -83,29 +81,26 @@
public event StateChangedHandler StateChanged;
private ConnectionState state;
+ private string user_agent;
private string session;
- private string username;
- private string md5_password;
private string base_url;
private string base_path;
- private string station;
private string info_message;
- private bool subscriber;
private bool connect_requested = false;
+ private bool network_connected = false;
- private static Connection instance;
private static Regex station_error_regex = new Regex ("error=(\\d+)", RegexOptions.Compiled);
- // Properties
+ private Account account;
+ public Account Account {
+ get { return account; }
+ }
+ private bool subscriber;
public bool Subscriber {
get { return subscriber; }
}
- public string Username {
- get { return username; }
- }
-
public ConnectionState State {
get { return state; }
@@ -114,7 +109,7 @@
return;
state = value;
- LogCore.Instance.PushDebug (String.Format ("Last.fm State Changed to {0}", state), null, false);
+ //LogCore.Instance.PushDebug (String.Format ("Last.fm State Changed to {0}", state), null, false);
StateChangedHandler handler = StateChanged;
if (handler != null) {
handler (this, new ConnectionStateChangedArgs (state));
@@ -126,37 +121,25 @@
get { return state == ConnectionState.Connected; }
}
+ private string station;
public string Station {
get { return station; }
}
- public static Connection Instance {
- get {
- if (instance == null)
- instance = new Connection ();
- return instance;
- }
- }
-
- // Public Methods
-
- private Connection ()
+ public Connection (Account account, string user_agent)
{
+ this.account = account;
+ this.user_agent = user_agent;
+
Initialize ();
- username = Last.FM.Account.Username;
- md5_password = Last.FM.Account.Md5Password;
State = ConnectionState.Disconnected;
- Banshee.Base.NetworkDetect.Instance.StateChanged += HandleNetworkStateChanged;
- Last.FM.Account.LoginRequestFinished += HandleKeyringEvent;
- Last.FM.Account.LoginCommitFinished += HandleKeyringEvent;
+
+ account.Updated += HandleAccountUpdated;
}
public void Dispose ()
{
- Banshee.Base.NetworkDetect.Instance.StateChanged -= HandleNetworkStateChanged;
- Last.FM.Account.LoginRequestFinished -= HandleKeyringEvent;
- Last.FM.Account.LoginCommitFinished -= HandleKeyringEvent;
- instance = null;
+ account.Updated -= HandleAccountUpdated;
}
public void Connect ()
@@ -165,13 +148,12 @@
if (State == ConnectionState.Connecting || State == ConnectionState.Connected)
return;
- if (username == null || md5_password == null) {
+ if (account.Username == null || account.CryptedPassword == null) {
State = ConnectionState.NoAccount;
- Last.FM.Account.RequestLogin ();
return;
}
- if (!Globals.Network.Connected) {
+ if (!network_connected) {
State = ConnectionState.NoNetwork;
return;
}
@@ -181,14 +163,14 @@
Handshake ();
}
- public bool Love (TrackInfo track) { return PostTrackRequest ("loveTrack", track); }
- public bool UnLove (TrackInfo track) { return PostTrackRequest ("unLoveTrack", track); }
- public bool Ban (TrackInfo track) { return PostTrackRequest ("banTrack", track); }
- public bool UnBan (TrackInfo track) { return PostTrackRequest ("unBanTrack", track); }
+ public bool Love (string artist, string title) { return PostTrackRequest ("loveTrack", artist, title); }
+ public bool UnLove (string artist, string title) { return PostTrackRequest ("unLoveTrack", artist, title); }
+ public bool Ban (string artist, string title) { return PostTrackRequest ("banTrack", artist, title); }
+ public bool UnBan (string artist, string title) { return PostTrackRequest ("unBanTrack", artist, title); }
public StationError ChangeStationTo (string station)
{
- lock (instance) {
+ lock (this) {
if (Station == station)
return StationError.None;
@@ -218,7 +200,7 @@
public Playlist LoadPlaylistFor (string station)
{
- lock (instance) {
+ lock (this) {
if (station != Station)
return null;
@@ -227,11 +209,11 @@
Stream stream = null;
Console.WriteLine ("StationSource Loading: {0}", url);
try {
- stream = Connection.Instance.GetXspfStream (new SafeUri (url));
+ stream = GetXspfStream (url);
pl.Load (stream);
- LogCore.Instance.PushDebug (String.Format ("Adding {0} Tracks to Last.fm Station {1}", pl.TrackCount, station), null);
+ //LogCore.Instance.PushDebug (String.Format ("Adding {0} Tracks to Last.fm Station {1}", pl.TrackCount, station), null);
} catch (System.Net.WebException e) {
- LogCore.Instance.PushWarning ("Error Loading Last.fm Station", e.Message, false);
+ //LogCore.Instance.PushWarning ("Error Loading Last.fm Station", e.Message, false);
return null;
} catch (Exception e) {
string body = "Unable to get body";
@@ -240,10 +222,10 @@
body = strm.ReadToEnd ();
}
} catch {}
- LogCore.Instance.PushWarning (
+ /*LogCore.Instance.PushWarning (
"Error loading station",
String.Format ("Exception:\n{0}\n\nResponse Body:\n{1}", e.ToString (), body), false
- );
+ );*/
return null;
}
@@ -259,24 +241,16 @@
base_url = base_path = session = station = info_message = null;
}
- private void HandleKeyringEvent (AccountEventArgs args)
+ private void HandleAccountUpdated (object o, EventArgs args)
{
- if (args.Success) {
- if (Account.Username != username || Account.Md5Password != md5_password) {
- username = Last.FM.Account.Username;
- md5_password = Last.FM.Account.Md5Password;
-
- State = ConnectionState.Disconnected;
- Connect ();
- }
- } else {
- LogCore.Instance.PushWarning ("Failed to Get Last.fm Account From Keyring", "", false);
- }
+ State = ConnectionState.Disconnected;
+ Connect ();
}
- private void HandleNetworkStateChanged (object sender, NetworkStateChangedArgs args)
+ public void UpdateNetworkState (bool connected)
{
- if (args.Connected) {
+ network_connected = connected;
+ if (connected) {
if (State == ConnectionState.NoNetwork) {
Connect ();
}
@@ -290,36 +264,36 @@
private void Handshake ()
{
- ThreadAssist.Spawn (delegate {
+ //ThreadAssist.Spawn (delegate {
try {
Stream stream = Get (String.Format (
"http://ws.audioscrobbler.com/radio/handshake.php?version={0}&platform={1}&username={2}&passwordmd5={3}&language={4}&session=324234",
"1.1.1",
"linux", // FIXME
- username, md5_password,
+ account.Username, account.CryptedPassword,
"en" // FIXME
));
// Set us as connecting, assuming the connection attempt wasn't changed out from under us
if (ParseHandshake (new StreamReader (stream).ReadToEnd ()) && session != null) {
State = ConnectionState.Connected;
- LogCore.Instance.PushDebug (String.Format ("Logged into Last.fm as {0}", Username), null, false);
+ //LogCore.Instance.PushDebug (String.Format ("Logged into Last.fm as {0}", Username), null, false);
return;
}
} catch (Exception e) {
- LogCore.Instance.PushDebug ("Error in Last.fm Handshake", e.ToString (), false);
+ //LogCore.Instance.PushDebug ("Error in Last.fm Handshake", e.ToString (), false);
}
// Must not have parsed correctly
Initialize ();
if (State == ConnectionState.Connecting)
State = ConnectionState.Disconnected;
- });
+ //});
}
private bool ParseHandshake (string content)
{
- LogCore.Instance.PushDebug ("Got Last.fm Handshake Response", content, false);
+ //LogCore.Instance.PushDebug ("Got Last.fm Handshake Response", content, false);
string [] lines = content.Split (new Char[] {'\n'});
foreach (string line in lines) {
string [] opts = line.Split (new Char[] {'='});
@@ -329,11 +303,11 @@
if (opts[1].ToLower () == "failed") {
session = null;
State = ConnectionState.InvalidAccount;
- LogCore.Instance.PushWarning (
+ /*LogCore.Instance.PushWarning (
Catalog.GetString ("Failed to Login to Last.fm"),
Catalog.GetString ("Either your username or password is invalid."),
false
- );
+ );*/
return false;
}
@@ -372,12 +346,13 @@
private HttpStatusCode Post (string uri, string body)
{
- if (!Globals.Network.Connected) {
- throw new NetworkUnavailableException ();
+ if (!network_connected) {
+ //throw new NetworkUnavailableException ();
+ return HttpStatusCode.RequestTimeout;
}
HttpWebRequest request = (HttpWebRequest) WebRequest.Create (uri);
- request.UserAgent = Banshee.Web.Browser.UserAgent;
+ request.UserAgent = user_agent; //Banshee.Web.Browser.UserAgent;
request.Timeout = 10000;
request.Method = "POST";
request.KeepAlive = false;
@@ -396,27 +371,28 @@
return response.StatusCode;
}
- private Stream GetXspfStream (SafeUri uri)
+ private Stream GetXspfStream (string uri)
{
return Get (uri, "application/xspf+xml");
}
private Stream Get (string uri)
{
- return Get (new SafeUri (uri), null);
+ return Get (uri, null);
}
- private Stream Get (SafeUri uri, string accept)
+ private Stream Get (string uri, string accept)
{
- if (!Globals.Network.Connected) {
- throw new NetworkUnavailableException ();
+ if (!network_connected) {
+ //throw new NetworkUnavailableException ();
+ return null;
}
- HttpWebRequest request = (HttpWebRequest) WebRequest.Create (uri.AbsoluteUri);
+ HttpWebRequest request = (HttpWebRequest) WebRequest.Create (uri);
if (accept != null) {
request.Accept = accept;
}
- request.UserAgent = Banshee.Web.Browser.UserAgent;
+ request.UserAgent = user_agent; //Banshee.Web.Browser.UserAgent;
request.Timeout = 10000;
request.KeepAlive = false;
request.AllowAutoRedirect = true;
@@ -481,9 +457,9 @@
// XML-RPC foo
- private bool PostTrackRequest (string method, TrackInfo track)
+ private bool PostTrackRequest (string method, string artist, string title)
{
- return PostXmlRpc (LastFMXmlRpcRequest (method).AddStringParams (track.Artist, track.Title));
+ return PostXmlRpc (LastFMXmlRpcRequest (method).AddStringParams (artist, title));
}
private bool PostXmlRpc (LameXmlRpcRequest request)
@@ -502,8 +478,8 @@
private LameXmlRpcRequest LastFMXmlRpcRequest (string method)
{
string time = UnixTime ();
- string auth_hash = Last.FM.Account.Md5Encode (md5_password + time);
- return new LameXmlRpcRequest (method).AddStringParams (username, time, auth_hash);
+ string auth_hash = Account.Md5Encode (account.CryptedPassword + time);
+ return new LameXmlRpcRequest (method).AddStringParams (account.Username, time, auth_hash);
}
protected class LameXmlRpcRequest
Modified: trunk/banshee/src/Libraries/Lastfm/Makefile.am
==============================================================================
--- trunk/banshee/src/Libraries/Lastfm/Makefile.am (original)
+++ trunk/banshee/src/Libraries/Lastfm/Makefile.am Tue Feb 12 00:25:50 2008
@@ -4,7 +4,8 @@
SOURCES = \
Lastfm/Account.cs \
- Lastfm/Browser.cs
+ Lastfm/Browser.cs \
+ Lastfm/Connection.cs
include $(top_srcdir)/build/build.mk
Modified: trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/LinkEntry.cs
==============================================================================
--- trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/LinkEntry.cs (original)
+++ trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/LinkEntry.cs Tue Feb 12 00:25:50 2008
@@ -1,34 +1,34 @@
-/***************************************************************************
- * LinkEntry.cs
- *
- * Copyright (C) 2006 Novell, Inc.
- * Written by Aaron Bockover <aaron abock org>
- ****************************************************************************/
-
-/* THIS FILE IS LICENSED UNDER THE MIT LICENSE AS OUTLINED IMMEDIATELY BELOW:
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
+//
+// LinkEntry.cs
+//
+// Authors:
+// Aaron Bockover <abockover novell com>
+//
+// Copyright (C) 2006 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
using System;
-namespace Banshee.Playlists.Formats.Xspf
+namespace Playlists.Xspf
{
public struct LinkEntry
{
Modified: trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/MetaEntry.cs
==============================================================================
--- trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/MetaEntry.cs (original)
+++ trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/MetaEntry.cs Tue Feb 12 00:25:50 2008
@@ -1,34 +1,34 @@
-/***************************************************************************
- * MetaEntry.cs
- *
- * Copyright (C) 2006 Novell, Inc.
- * Written by Aaron Bockover <aaron abock org>
- ****************************************************************************/
+//
+// MetaEntry.cs
+//
+// Authors:
+// Aaron Bockover <abockover novell com>
+//
+// Copyright (C) 2006 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
-/* THIS FILE IS LICENSED UNDER THE MIT LICENSE AS OUTLINED IMMEDIATELY BELOW:
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
using System;
-namespace Banshee.Playlists.Formats.Xspf
+namespace Playlists.Xspf
{
public struct MetaEntry
{
Modified: trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/Playlist.cs
==============================================================================
--- trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/Playlist.cs (original)
+++ trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/Playlist.cs Tue Feb 12 00:25:50 2008
@@ -1,30 +1,30 @@
-/***************************************************************************
- * Playlist.cs
- *
- * Copyright (C) 2006 Novell, Inc.
- * Written by Aaron Bockover <aaron abock org>
- ****************************************************************************/
-
-/* THIS FILE IS LICENSED UNDER THE MIT LICENSE AS OUTLINED IMMEDIATELY BELOW:
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
+//
+// Playlist.cs
+//
+// Authors:
+// Aaron Bockover <abockover novell com>
+//
+// Copyright (C) 2006 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
using System;
using System.IO;
@@ -32,7 +32,7 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
-namespace Banshee.Playlists.Formats.Xspf
+namespace Playlists.Xspf
{
public class Playlist : XspfBaseObject
{
Modified: trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/Track.cs
==============================================================================
--- trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/Track.cs (original)
+++ trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/Track.cs Tue Feb 12 00:25:50 2008
@@ -1,37 +1,37 @@
-/***************************************************************************
- * Track.cs
- *
- * Copyright (C) 2006 Novell, Inc.
- * Written by Aaron Bockover <aaron abock org>
- ****************************************************************************/
-
-/* THIS FILE IS LICENSED UNDER THE MIT LICENSE AS OUTLINED IMMEDIATELY BELOW:
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
+//
+// Track.cs
+//
+// Authors:
+// Aaron Bockover <abockover novell com>
+//
+// Copyright (C) 2006 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
using System;
using System.Xml;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-namespace Banshee.Playlists.Formats.Xspf
+namespace Playlists.Xspf
{
public class Track : XspfBaseObject
{
Modified: trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/W3CDateTime.cs
==============================================================================
--- trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/W3CDateTime.cs (original)
+++ trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/W3CDateTime.cs Tue Feb 12 00:25:50 2008
@@ -1,7 +1,35 @@
+//
+// W3CDateTime.cs
+//
+// Authors:
+// Aaron Bockover <abockover novell com>
+//
+// Copyright (C) 2006 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
using System;
using System.Text.RegularExpressions;
-namespace Banshee.Playlists.Formats.Xspf
+namespace Playlists.Xspf
{
public struct W3CDateTime: IComparable
{
Modified: trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/XmlUtil.cs
==============================================================================
--- trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/XmlUtil.cs (original)
+++ trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/XmlUtil.cs Tue Feb 12 00:25:50 2008
@@ -1,36 +1,36 @@
-/***************************************************************************
- * XmlUtil.cs
- *
- * Copyright (C) 2006 Novell, Inc.
- * Written by Aaron Bockover <aaron abock org>
- ****************************************************************************/
-
-/* THIS FILE IS LICENSED UNDER THE MIT LICENSE AS OUTLINED IMMEDIATELY BELOW:
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
+//
+// XmlUtil.cs
+//
+// Authors:
+// Aaron Bockover <abockover novell com>
+//
+// Copyright (C) 2006 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
using System;
using System.Xml;
using System.Collections.Generic;
-namespace Banshee.Playlists.Formats.Xspf
+namespace Playlists.Xspf
{
internal static class XmlUtil
{
Modified: trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/XspfBaseObject.cs
==============================================================================
--- trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/XspfBaseObject.cs (original)
+++ trunk/banshee/src/Libraries/Mono.Media/Playlists.Xspf/XspfBaseObject.cs Tue Feb 12 00:25:50 2008
@@ -1,37 +1,37 @@
-/***************************************************************************
- * XspfBaseObject.cs
- *
- * Copyright (C) 2006 Novell, Inc.
- * Written by Aaron Bockover <aaron abock org>
- ****************************************************************************/
-
-/* THIS FILE IS LICENSED UNDER THE MIT LICENSE AS OUTLINED IMMEDIATELY BELOW:
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
+//
+// XspfBaseObject.cs
+//
+// Authors:
+// Aaron Bockover <abockover novell com>
+//
+// Copyright (C) 2006 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
using System;
using System.Xml;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-namespace Banshee.Playlists.Formats.Xspf
+namespace Playlists.Xspf
{
public abstract class XspfBaseObject
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]