commit 8a210886f5e60772cc002955d367f4aa682d1259
Author: Alan McGovern <alan.mcgov...@gmail.com>
Date:   Sun Jun 13 14:34:08 2010 +0100

    Make all the structs internal to the binding
    
    End users should only be using the wrapper classes. As part of that make
    GPodBase non-generic as it no longer needs to know what actual type it's
    wrapping.
    
    Signed-off-by: Nathaniel McCallum <nathan...@natemccallum.com>

 bindings/mono/libgpod-sharp/Artwork.cs     |    4 ++--
 bindings/mono/libgpod-sharp/Chapter.cs     |    4 ++--
 bindings/mono/libgpod-sharp/ChapterData.cs |    4 ++--
 bindings/mono/libgpod-sharp/Device.cs      |    4 ++--
 bindings/mono/libgpod-sharp/GPodBase.cs    |    2 +-
 bindings/mono/libgpod-sharp/ITDB.cs        |    4 ++--
 bindings/mono/libgpod-sharp/IpodInfo.cs    |    4 ++--
 bindings/mono/libgpod-sharp/PhotoAlbum.cs  |    4 ++--
 bindings/mono/libgpod-sharp/PhotoDB.cs     |    4 ++--
 bindings/mono/libgpod-sharp/Playlist.cs    |    4 ++--
 bindings/mono/libgpod-sharp/Thumbnail.cs   |    4 ++--
 bindings/mono/libgpod-sharp/Track.cs       |    4 ++--
 12 files changed, 23 insertions(+), 23 deletions(-)
---
diff --git a/bindings/mono/libgpod-sharp/Artwork.cs 
b/bindings/mono/libgpod-sharp/Artwork.cs
index f1644d1..d9eeccd 100644
--- a/bindings/mono/libgpod-sharp/Artwork.cs
+++ b/bindings/mono/libgpod-sharp/Artwork.cs
@@ -25,7 +25,7 @@ namespace GPod {
        
        namespace native {
                [StructLayout (LayoutKind.Sequential)]
-               public struct Itdb_Artwork {
+               internal struct Itdb_Artwork {
                    public IntPtr thumbnail;
                    public uint   id;
                    public ulong  dbid;
@@ -63,7 +63,7 @@ namespace GPod {
                }
        }
 
-       public unsafe class Artwork : GPodBase<Itdb_Artwork> {
+       public unsafe class Artwork : GPodBase {
                public Thumbnail        Thumbnail               { get { return 
new Thumbnail(((Itdb_Artwork *) Native)->thumbnail); }
                                                                                
          set { ((Itdb_Artwork *) Native)->thumbnail = 
HandleRef.ToIntPtr(value.Handle); } }
                public uint                     Rating                  { get { 
return ((Itdb_Artwork *) Native)->rating / 20; }
diff --git a/bindings/mono/libgpod-sharp/Chapter.cs 
b/bindings/mono/libgpod-sharp/Chapter.cs
index ed99431..a170bb4 100644
--- a/bindings/mono/libgpod-sharp/Chapter.cs
+++ b/bindings/mono/libgpod-sharp/Chapter.cs
@@ -23,7 +23,7 @@ namespace GPod {
        
        namespace native {
                [StructLayout (LayoutKind.Sequential)]
-               public struct Itdb_Chapter {
+               internal struct Itdb_Chapter {
                    public uint   startpos;
                    public IntPtr chaptertitle;
                    // Ignore the rest
@@ -39,7 +39,7 @@ namespace GPod {
                }
        }
 
-       public unsafe class Chapter : GPodBase<Itdb_Chapter> {
+       public unsafe class Chapter : GPodBase {
                public Chapter(IntPtr handle, bool borrowed) : base(handle, 
borrowed) {}
                public Chapter(IntPtr handle) : base(handle) {}
                public Chapter() : this(Itdb_Chapter.itdb_chapter_new(), false) 
{}
diff --git a/bindings/mono/libgpod-sharp/ChapterData.cs 
b/bindings/mono/libgpod-sharp/ChapterData.cs
index 51efcfd..3bff39b 100644
--- a/bindings/mono/libgpod-sharp/ChapterData.cs
+++ b/bindings/mono/libgpod-sharp/ChapterData.cs
@@ -24,7 +24,7 @@ namespace GPod {
        using native;
        
        namespace native {
-               public struct Itdb_ChapterData {
+               internal struct Itdb_ChapterData {
                        public IntPtr chapters;
                    // Ignore the rest
                                
@@ -61,7 +61,7 @@ namespace GPod {
                }
        }
        
-       public unsafe class ChapterData : GPodBase<Itdb_ChapterData> {  
+       public unsafe class ChapterData : GPodBase {
                public ChapterData(IntPtr handle, bool borrowed) : base(handle, 
borrowed) {}
                public ChapterData(IntPtr handle) : base(handle) {}
                public ChapterData() : 
this(Itdb_ChapterData.itdb_chapterdata_new(), false) {}
diff --git a/bindings/mono/libgpod-sharp/Device.cs 
b/bindings/mono/libgpod-sharp/Device.cs
index e415e67..0e04f16 100644
--- a/bindings/mono/libgpod-sharp/Device.cs
+++ b/bindings/mono/libgpod-sharp/Device.cs
@@ -23,7 +23,7 @@ namespace GPod {
        using native;
        
        namespace native {
-               public struct Itdb_Device {
+               internal struct Itdb_Device {
                        public IntPtr mountpoint;
                        // Ignore the rest
        
@@ -84,7 +84,7 @@ namespace GPod {
                }
        }*/
        
-       public unsafe class Device : GPodBase<Itdb_Device> {
+       public unsafe class Device : GPodBase {
                public bool             SupportsArtwork                 { get { 
return Itdb_Device.itdb_device_supports_artwork(Handle); } }
                public bool             SupportsChapterImage    { get { return 
Itdb_Device.itdb_device_supports_chapter_image(Handle); } }
                public bool             SupportsPhoto                   { get { 
return Itdb_Device.itdb_device_supports_photo(Handle); } }
diff --git a/bindings/mono/libgpod-sharp/GPodBase.cs 
b/bindings/mono/libgpod-sharp/GPodBase.cs
index a854eae..7c27ce1 100644
--- a/bindings/mono/libgpod-sharp/GPodBase.cs
+++ b/bindings/mono/libgpod-sharp/GPodBase.cs
@@ -26,7 +26,7 @@ namespace GPod {
                void SetBorrowed(bool borrowed);
        }
 
-       public abstract class GPodBase<T> : IGPodBase, IDisposable {
+       public abstract class GPodBase : IGPodBase, IDisposable {
                
                protected static string PtrToStringUTF8 (IntPtr ptr)
                {
diff --git a/bindings/mono/libgpod-sharp/ITDB.cs 
b/bindings/mono/libgpod-sharp/ITDB.cs
index 04426f9..69cfe96 100644
--- a/bindings/mono/libgpod-sharp/ITDB.cs
+++ b/bindings/mono/libgpod-sharp/ITDB.cs
@@ -24,7 +24,7 @@ namespace GPod {
        using native;
        
        namespace native {
-               public struct Itdb_iTunesDB {
+               internal struct Itdb_iTunesDB {
                        public IntPtr tracks;
                public IntPtr playlists;
                public IntPtr filename;
@@ -99,7 +99,7 @@ namespace GPod {
                protected override void DoUnlink(int index) { 
Itdb_iTunesDB.itdb_playlist_unlink(this[index].Handle); }
        }
 
-       public unsafe class ITDB : GPodBase<Itdb_iTunesDB> {
+       public unsafe class ITDB : GPodBase {
                public static bool InitIpod(string mountpoint, string 
model_number, string ipod_name) {
                        IntPtr gerror;
                        bool res = Itdb_iTunesDB.itdb_init_ipod(mountpoint, 
model_number, ipod_name, out gerror);
diff --git a/bindings/mono/libgpod-sharp/IpodInfo.cs 
b/bindings/mono/libgpod-sharp/IpodInfo.cs
index d048f61..ef2c8e4 100644
--- a/bindings/mono/libgpod-sharp/IpodInfo.cs
+++ b/bindings/mono/libgpod-sharp/IpodInfo.cs
@@ -22,7 +22,7 @@ namespace GPod {
        using native;
        
        namespace native {
-               public struct Itdb_IpodInfo {
+               internal struct Itdb_IpodInfo {
                        public IntPtr         model_number;
                        public double         capacity;
                        public IpodModel      ipod_model;
@@ -115,7 +115,7 @@ namespace GPod {
            IphoneBlack,
        }
 
-       public unsafe class IpodInfo : GPodBase<Itdb_IpodInfo> {                
+       public unsafe class IpodInfo : GPodBase {
                public static IpodInfo[] GetTable() {
                        IntPtr table = 
Itdb_IpodInfo.itdb_info_get_ipod_info_table();
                        
diff --git a/bindings/mono/libgpod-sharp/PhotoAlbum.cs 
b/bindings/mono/libgpod-sharp/PhotoAlbum.cs
index 61c82f1..7db5aeb 100644
--- a/bindings/mono/libgpod-sharp/PhotoAlbum.cs
+++ b/bindings/mono/libgpod-sharp/PhotoAlbum.cs
@@ -24,7 +24,7 @@ namespace GPod {
        using native;
        
        namespace native {
-               public struct Itdb_PhotoAlbum {
+               internal struct Itdb_PhotoAlbum {
                        public IntPtr photodb;
                        public IntPtr name;
                        public IntPtr members;
@@ -67,7 +67,7 @@ namespace GPod {
                protected override void DoUnlink(int index) { 
Itdb_PhotoDB.itdb_photodb_photoalbum_unlink(this[index].Handle); }
        }
        
-       public unsafe class PhotoAlbum : GPodBase<Itdb_PhotoAlbum> {
+       public unsafe class PhotoAlbum : GPodBase {
                public PhotoAlbum(IntPtr handle, bool borrowed) : base(handle, 
borrowed) {}
                public PhotoAlbum(IntPtr handle)                                
: base(handle) {}
                public PhotoAlbum(string albumname)                             
: base(Itdb_PhotoAlbum.itdb_photodb_photoalbum_new(albumname), false) {}
diff --git a/bindings/mono/libgpod-sharp/PhotoDB.cs 
b/bindings/mono/libgpod-sharp/PhotoDB.cs
index 67780b6..99b3cac 100644
--- a/bindings/mono/libgpod-sharp/PhotoDB.cs
+++ b/bindings/mono/libgpod-sharp/PhotoDB.cs
@@ -24,7 +24,7 @@ namespace GPod {
        using native;
        
        namespace native {
-               public struct Itdb_PhotoDB {
+               internal struct Itdb_PhotoDB {
                        public IntPtr photos;
                        public IntPtr photoalbums;
                        public IntPtr device;
@@ -83,7 +83,7 @@ namespace GPod {
                protected override void DoUnlink(int index) { 
Itdb_PhotoDB.itdb_photodb_photoalbum_unlink(this[index].Handle); }
        }
        
-       public unsafe class PhotoDB : GPodBase<Itdb_PhotoDB> {
+       public unsafe class PhotoDB : GPodBase {
                public static PhotoDB Create(string mountpoint) {
                        return new 
PhotoDB(Itdb_PhotoDB.itdb_photodb_create(mountpoint), false);
                }
diff --git a/bindings/mono/libgpod-sharp/Playlist.cs 
b/bindings/mono/libgpod-sharp/Playlist.cs
index b0d1889..42bc23f 100644
--- a/bindings/mono/libgpod-sharp/Playlist.cs
+++ b/bindings/mono/libgpod-sharp/Playlist.cs
@@ -24,7 +24,7 @@ namespace GPod {
        using native;
        
        namespace native {
-               public struct Itdb_Playlist {
+               internal struct Itdb_Playlist {
                    public IntPtr itdb;
                    public IntPtr name;
                    public byte   type;
@@ -96,7 +96,7 @@ namespace GPod {
                protected override void DoUnlink(int index) { 
Itdb_Playlist.itdb_playlist_remove_track(this.handle, this[index].Handle); }
        }
        
-       public unsafe class Playlist : GPodBase<Itdb_Playlist> {
+       public unsafe class Playlist : GPodBase {
                public ITDB ITDB {
                        get { return new ITDB(((Itdb_Playlist *) Native)->itdb, 
true); }
                }
diff --git a/bindings/mono/libgpod-sharp/Thumbnail.cs 
b/bindings/mono/libgpod-sharp/Thumbnail.cs
index c8aa852..26b6d79 100644
--- a/bindings/mono/libgpod-sharp/Thumbnail.cs
+++ b/bindings/mono/libgpod-sharp/Thumbnail.cs
@@ -24,7 +24,7 @@ namespace GPod {
        using native;
        
        namespace native {
-               public struct Itdb_Thumb {
+               internal struct Itdb_Thumb {
                        // Ignore all fields (they are opaque)
                
                        [DllImport ("gpod")]
@@ -41,7 +41,7 @@ namespace GPod {
                }
        }
        
-       public class Thumbnail : GPodBase<Itdb_Thumb> {
+       public class Thumbnail : GPodBase {
                public Thumbnail(IntPtr handle, bool borrowed) : base(handle, 
borrowed) {}
                public Thumbnail(IntPtr handle) : base(handle) {}
                public Thumbnail(Thumbnail other) : 
this(Itdb_Thumb.itdb_thumb_duplicate(other.Handle), false) {}
diff --git a/bindings/mono/libgpod-sharp/Track.cs 
b/bindings/mono/libgpod-sharp/Track.cs
index e707f95..c64b508 100644
--- a/bindings/mono/libgpod-sharp/Track.cs
+++ b/bindings/mono/libgpod-sharp/Track.cs
@@ -25,7 +25,7 @@ namespace GPod {
        
        namespace native {
                [StructLayout (LayoutKind.Sequential)]
-               public struct Itdb_Track {
+               internal struct Itdb_Track {
                        public IntPtr           itdb;
                        public IntPtr           title;
                        public IntPtr           ipod_path;
@@ -169,7 +169,7 @@ namespace GPod {
                MusicTVShow = 0x0060,
        }
        
-       public unsafe class Track : GPodBase<Itdb_Track> {
+       public unsafe class Track : GPodBase {
                public bool HasThumbnails {
                        get { return Itdb_Track.itdb_track_has_thumbnails 
(Handle); }
                }

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gtkpod-cvs2 mailing list
gtkpod-cvs2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to