Changeset 66af5fd9ea0c7f4c22406b24cc728af3b6b2ced1

Show
Ignore:
Timestamp:
10/26/07 19:14:26 (10 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1193418866 +0000
git-parent:

[a1251a8d8907d3e05eb7190734453e4ea05f8b07]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1193418866 +0000
Message:

Some more doc

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • bindings/cil/src/exception.cs

    ra2aa6ae r66af5fd  
    3232    public class VLCException : Exception 
    3333    { 
     34        /** 
     35         * Creates a managed VLC exception. 
     36         */ 
    3437        public VLCException () 
    3538        { 
    3639        } 
    3740 
     41        /** 
     42         * Creates a managed VLC exception. 
     43         * @param message exception error message 
     44         */ 
    3845        public VLCException (string message) 
    3946            : base (message) 
     
    4148        } 
    4249 
     50        /** 
     51         * Creates a managed VLC exception wrapping another exception. 
     52         * @param message exception error message 
     53         * @param inner inner wrapped exception 
     54         */ 
    4355        public VLCException (string message, Exception inner) 
    4456           : base (message, inner) 
     
    7385        } 
    7486 
     87        /** 
     88         * Throws a managed exception if LibVLC has returned a native 
     89         * unmanaged exception. Clears the native exception. 
     90         */ 
    7591        public void Raise () 
    7692        { 
     
    87103        } 
    88104 
     105        /** IDisposable implementation. */ 
    89106        public void Dispose () 
    90107        { 
  • bindings/cil/src/libvlc.cs

    ra2aa6ae r66af5fd  
    1 /* 
    2  * libvlc.cs - libvlc-control CIL bindings 
     1/** 
     2 * @file libvlc.cs 
     3 * @brief libvlc-control CIL bindings 
    34 * 
    45 * $Id$ 
     
    2829namespace VideoLAN.LibVLC 
    2930{ 
     31    /** 
     32     * The VLC class is used to create LibVLC Instance objects. 
     33     * The VLC class has only one static method and cannot be instanciated. 
     34     * 
     35     * @code 
     36     * string[] argv = new string[]{ "-vvv", "-I", "dummy" }; 
     37     * 
     38     * Instance vlc = VLC.CreateInstance (argv); 
     39     * @endcode 
     40     */ 
    3041    public sealed class VLC 
    3142    { 
     43        /** 
     44         * Loads native LibVLC and creates a LibVLC instance. 
     45         * 
     46         * @param args VLC command line parameters for the LibVLC Instance. 
     47         * 
     48         * @return a new LibVLC Instance 
     49         */ 
    3250        public static Instance CreateInstance (string[] args) 
    3351        { 
     
    4563    }; 
    4664 
    47     /** Safe handle for unmanaged LibVLC instance pointer */ 
     65    /** 
     66     * Safe handle for unmanaged LibVLC instance pointer. 
     67     */ 
    4868    public sealed class InstanceHandle : NonNullHandle 
    4969    { 
     
    5373 
    5474        [DllImport ("libvlc-control.dll", EntryPoint="libvlc_new")] 
    55         public static extern 
     75        internal static extern 
    5676        InstanceHandle Create (int argc, U8String[] argv, NativeException ex); 
    5777 
     
    5979        static extern void Destroy (IntPtr ptr, NativeException ex); 
    6080 
     81        /** 
     82         * System.Runtime.InteropServices.SafeHandle::ReleaseHandle. 
     83         */ 
    6184        protected override bool ReleaseHandle () 
    6285        { 
     
    6790 
    6891    /** 
    69      * Managed class for LibVLC instance (including playlist) 
     92     * LibVLC Instance provides basic media player features from VLC, 
     93     * such as play/pause/stop and flat playlist management. 
    7094     */ 
    7195    public class Instance : BaseObject<InstanceHandle> 
     
    78102        } 
    79103 
     104        /** 
     105         * Creates a MediaDescriptor. 
     106         * @param mrl Media Resource Locator (file path or URL) 
     107         * @return create MediaDescriptor object. 
     108         */ 
    80109        public MediaDescriptor CreateDescriptor (string mrl) 
    81110        { 
     
    90119        static extern void PlaylistLoop (InstanceHandle self, bool b, 
    91120                                         NativeException ex); 
    92         /** Sets the playlist loop flag */ 
     121        /** Sets the playlist loop flag. */ 
    93122        public bool Loop 
    94123        { 
     
    103132        static extern void PlaylistPlay (InstanceHandle self, int id, int optc, 
    104133                                         U8String[] optv, NativeException ex); 
    105         /** Plays the next playlist item */ 
     134        /** Plays the next playlist item (if not already playing). */ 
    106135        public void Play () 
    107136        { 
     
    113142        static extern void PlaylistPause (InstanceHandle self, 
    114143                                          NativeException ex); 
    115         /** Toggles pause */ 
     144        /** Toggles pause (starts playing if stopped, pauses if playing). */ 
    116145        public void TogglePause () 
    117146        { 
     
    124153        static extern int PlaylistIsPlaying (InstanceHandle self, 
    125154                                             NativeException ex); 
    126         /** Whether the playlist is running, or in pause/stop */ 
     155        /** Whether the playlist is running, or paused/stopped. */ 
    127156        public bool IsPlaying 
    128157        { 
     
    138167        static extern void PlaylistStop (InstanceHandle self, 
    139168                                         NativeException ex); 
    140         /** Stops playing */ 
     169        /** Stops playing. */ 
    141170        public void Stop () 
    142171        { 
     
    148177        static extern void PlaylistNext (InstanceHandle self, 
    149178                                         NativeException ex); 
    150         /** Goes to next playlist item (and start playing it) */ 
     179        /** Switches to next playlist item, and starts playing it. */ 
    151180        public void Next () 
    152181        { 
     
    158187        static extern void PlaylistPrev (InstanceHandle self, 
    159188                                         NativeException ex); 
    160         /** Goes to previous playlist item (and start playing it) */ 
     189        /** Switches to previous playlist item, and starts playing it. */ 
    161190        public void Prev () 
    162191        { 
     
    168197        static extern void PlaylistClear (InstanceHandle self, 
    169198                                          NativeException ex); 
    170         /** Clears the whole playlist */ 
     199        /** Clears the whole playlist. */ 
    171200        public void Clear () 
    172201        { 
     
    184213                                       U8String name, int optc, 
    185214                                       U8String[] optv, NativeException e); 
    186         /** Appends an item to the playlist with options */ 
     215        /** 
     216         * Appends an item to the playlist, with options. 
     217         * @param mrl Media Resource Locator (file name or URL) 
     218         * @param name playlist item user-visible name 
     219         * @param opts item options (see LibVLC documentation for details) 
     220         * @return created playlist item. 
     221         */ 
    187222        public PlaylistItem Add (string mrl, string name, string[] opts) 
    188223        { 
     
    200235            return item; 
    201236        } 
     237        /** 
     238         * Appends an item with options. 
     239         * @param mrl Media Resource Locator (file name or URL) 
     240         * @param opts item options (see LibVLC documentation for details) 
     241         * @return created playlist item. 
     242         */ 
    202243        public PlaylistItem Add (string mrl, string[] opts) 
    203244        { 
    204245            return Add (mrl, null, opts); 
    205246        } 
     247        /** 
     248         * Appends an item to the playlist. 
     249         * @param mrl Media Resource Locator (file name or URL) 
     250         * @param name playlist item user-visible name 
     251         * @return created playlist item. 
     252         */ 
    206253        public PlaylistItem Add (string mrl, string name) 
    207254        { 
    208255            return Add (mrl, name, new string[0]); 
    209256        } 
     257        /** 
     258         * Appends an item to the playlist. 
     259         * @param mrl Media Resource Locator (file name or URL) 
     260         * @return created playlist item. 
     261         */ 
    210262        public PlaylistItem Add (string mrl) 
    211263        { 
     
    217269        static extern int PlaylistDelete (InstanceHandle self, int id, 
    218270                                          NativeException e); 
     271        /** 
     272         * Removes an item from the playlist. 
     273         * @param item playlist item (as obtained from Add()) 
     274         */ 
    219275        public void Delete (PlaylistItem item) 
    220276        { 
     
    228284    }; 
    229285 
     286    /** 
     287     * A playlist item. 
     288     */ 
    230289    public class PlaylistItem 
    231290    { 
     
    279338    }; 
    280339 
     340    /** 
     341     * Media descriptor. Not implemented yet. 
     342     */ 
    281343    public class MediaDescriptor : BaseObject<DescriptorHandle> 
    282344    { 
  • bindings/cil/src/marshal.cs

    ra2aa6ae r66af5fd  
    1 /* 
    2  * libvlc.cs - libvlc-control CIL bindings 
     1/** 
     2 * @file marshal.cs 
     3 * @brief LibVLC marshalling utilities 
    34 * 
    45 * $Id$ 
     
    2930    /** 
    3031     * Abstract safe handle class for non-NULL pointers 
    31      * (Microsoft.* namespace has a similar class, but lets stick to System.*) 
     32     * (Microsoft.* namespace has a similar class, 
     33     *  but lets stick to System.*). 
    3234     */ 
    3335    public abstract class NonNullHandle : SafeHandle 
     
    4749    }; 
    4850 
     51    /** 
     52     * Generic class for managed wrapper around a native safe handle. 
     53     */ 
    4954    public class BaseObject<HandleT> : IDisposable where HandleT : SafeHandle 
    5055    {