Commit 1fb4f986 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

MacOSX/Framework/VLCMedia: Documentation, code cleanup and and use Objective-C...

MacOSX/Framework/VLCMedia: Documentation, code cleanup and and use Objective-C 2.0 @property. (Patch by Enrique Osuna).
parent a14a5bea
...@@ -30,32 +30,30 @@ ...@@ -30,32 +30,30 @@
/** /**
* Standard dictionary keys for retreiving meta data. * Standard dictionary keys for retreiving meta data.
*/ */
extern NSString *VLCMetaInformationTitle; /* NSString */ extern NSString * VLCMetaInformationTitle; /* NSString */
extern NSString *VLCMetaInformationArtist; /* NSString */ extern NSString * VLCMetaInformationArtist; /* NSString */
extern NSString *VLCMetaInformationTitle; /* NSString */ extern NSString * VLCMetaInformationGenre; /* NSString */
extern NSString *VLCMetaInformationArtist; /* NSString */ extern NSString * VLCMetaInformationCopyright; /* NSString */
extern NSString *VLCMetaInformationGenre; /* NSString */ extern NSString * VLCMetaInformationAlbum; /* NSString */
extern NSString *VLCMetaInformationCopyright; /* NSString */ extern NSString * VLCMetaInformationTrackNumber; /* NSString */
extern NSString *VLCMetaInformationAlbum; /* NSString */ extern NSString * VLCMetaInformationDescription; /* NSString */
extern NSString *VLCMetaInformationTrackNumber; /* NSString */ extern NSString * VLCMetaInformationRating; /* NSString */
extern NSString *VLCMetaInformationDescription; /* NSString */ extern NSString * VLCMetaInformationDate; /* NSString */
extern NSString *VLCMetaInformationRating; /* NSString */ extern NSString * VLCMetaInformationSetting; /* NSString */
extern NSString *VLCMetaInformationDate; /* NSString */ extern NSString * VLCMetaInformationURL; /* NSString */
extern NSString *VLCMetaInformationSetting; /* NSString */ extern NSString * VLCMetaInformationLanguage; /* NSString */
extern NSString *VLCMetaInformationURL; /* NSString */ extern NSString * VLCMetaInformationNowPlaying; /* NSString */
extern NSString *VLCMetaInformationLanguage; /* NSString */ extern NSString * VLCMetaInformationPublisher; /* NSString */
extern NSString *VLCMetaInformationNowPlaying; /* NSString */ extern NSString * VLCMetaInformationEncodedBy; /* NSString */
extern NSString *VLCMetaInformationPublisher; /* NSString */ extern NSString * VLCMetaInformationArtworkURL; /* NSString */
extern NSString *VLCMetaInformationEncodedBy; /* NSString */ extern NSString * VLCMetaInformationArtwork; /* NSImage */
extern NSString *VLCMetaInformationArtworkURL; /* NSString */ extern NSString * VLCMetaInformationTrackID; /* NSString */
extern NSString *VLCMetaInformationArtwork; /* NSImage */
extern NSString *VLCMetaInformationTrackID; /* NSString */
/* Notification Messages */ /* Notification Messages */
/** /**
* Available notification messages. * Available notification messages.
*/ */
extern NSString *VLCMediaMetaChanged; //< Notification message for when the media's meta data has changed extern NSString * VLCMediaMetaChanged; //< Notification message for when the media's meta data has changed
// Forward declarations, supresses compiler error messages // Forward declarations, supresses compiler error messages
@class VLCMediaList; @class VLCMediaList;
...@@ -63,10 +61,10 @@ extern NSString *VLCMediaMetaChanged; //< Notification message for when t ...@@ -63,10 +61,10 @@ extern NSString *VLCMediaMetaChanged; //< Notification message for when t
typedef enum VLCMediaState typedef enum VLCMediaState
{ {
VLCMediaStateNothingSpecial, //< Nothing VLCMediaStateNothingSpecial, //< Nothing
VLCMediaStateBuffering, //< Stream is buffering VLCMediaStateBuffering, //< Stream is buffering
VLCMediaStatePlaying, //< Stream is playing VLCMediaStatePlaying, //< Stream is playing
VLCMediaStateError, //< Can't be played because an error occured VLCMediaStateError, //< Can't be played because an error occured
} VLCMediaState; } VLCMediaState;
/** /**
...@@ -121,28 +119,52 @@ typedef enum VLCMediaState ...@@ -121,28 +119,52 @@ typedef enum VLCMediaState
/* Object Factories */ /* Object Factories */
/** /**
* Manufactures a new VLCMedia object using the URL specified. Will return nil if * Manufactures a new VLCMedia object using the URL specified.
* the specified URL references a directory that does not comply with DVD file
* structure.
* \param anURL URL to media to be accessed. * \param anURL URL to media to be accessed.
* \return A new VLCMedia object, only if there were no errors. This object * \return A new VLCMedia object, only if there were no errors. This object
* will be automatically released. * will be automatically released.
* \see initWithMediaURL * \see initWithMediaURL
*/ */
+ (id)mediaWithURL:(NSURL *)anURL; + (id)mediaWithURL:(NSURL *)anURL;
/**
* Manufactures a new VLCMedia object using the path specified.
* \param aPath Path to the media to be accessed.
* \return A new VLCMedia object, only if there were no errors. This object
* will be automatically released.
* \see initWithPath
*/
+ (id)mediaWithPath:(NSString *)aPath; + (id)mediaWithPath:(NSString *)aPath;
+ (id)mediaAsNodeWithName:(NSString *)aName;
/**
* TODO
* \param aName TODO
* \return a new VLCMedia object, only if there were no errors. This object
* will be automatically released.
* \see initAsNodeWithName
*/
+ (id)mediaAsNodeWithName:(NSString *)aName;
/* Initializers */ /* Initializers */
/** /**
* Initializes a new VLCMedia object to use the specified URL. Will return nil if * Initializes a new VLCMedia object to use the specified URL.
* the specified URL references a directory that does not comply with DVD file * \param aPath Path to media to be accessed.
* structure. * \return A new VLCMedia object, only if there were no errors.
* \param aPath URL to media to be accessed. */
- (id)initWithURL:(NSURL *)anURL;
/**
* Initializes a new VLCMedia object to use the specified path.
* \param aPath Path to media to be accessed.
* \return A new VLCMedia object, only if there were no errors. * \return A new VLCMedia object, only if there were no errors.
*/ */
- (id)initWithPath:(NSString *)aPath; - (id)initWithPath:(NSString *)aPath;
/**
* TODO
* \param aName TODO
* \return A new VLCMedia object, only if there were no errors.
*/
- (id)initAsNodeWithName:(NSString *)aName; - (id)initAsNodeWithName:(NSString *)aName;
/** /**
...@@ -158,22 +180,16 @@ typedef enum VLCMediaState ...@@ -158,22 +180,16 @@ typedef enum VLCMediaState
/* Properties */ /* Properties */
/** /**
* Sets the receiver's delegate. * Receiver's delegate.
* \param delegate The delegate for the receiver.
*/ */
- (void)setDelegate:(id)delegate; @property (assign) id delegate;
/** /**
* Returns the receiver's delegate * A VLCTime object describing the length of the media resource, only if it is
* \return The receiver's delegate * available. Use lengthWaitUntilDate: to wait for a specified length of time.
* \see lengthWaitUntilDate
*/ */
- (id)delegate; @property (readonly) VLCTime * length;
/**
* Returns a VLCTime object describing the length of the media resource.
* \return The length of the media resource.
*/
- (VLCTime *)length;
/** /**
* Returns a VLCTime object describing the length of the media resource, * Returns a VLCTime object describing the length of the media resource,
...@@ -185,29 +201,28 @@ typedef enum VLCMediaState ...@@ -185,29 +201,28 @@ typedef enum VLCMediaState
*/ */
- (VLCTime *)lengthWaitUntilDate:(NSDate *)aDate; - (VLCTime *)lengthWaitUntilDate:(NSDate *)aDate;
- (BOOL)isPreparsed; /**
* Determines if the media has already been preparsed.
*/
@property (readonly) BOOL isPreparsed;
/** /**
* Returns the URL for the receiver's media resource. * The URL for the receiver's media resource.
* \return The URL for the receiver's media resource.
*/ */
- (NSString *)url; @property (readonly) NSString * url;
/** /**
* Returns the receiver's sub list. * The receiver's sub list.
* \return The receiver's sub list.
*/ */
- (VLCMediaList *)subitems; @property (readonly) VLCMediaList * subitems;
/** /**
* Returns the receiver's meta data as a NSDictionary object. * The receiver's meta data as a NSDictionary object.
* \return The receiver's meta data as a NSDictionary object.
*/ */
- (NSDictionary *)metaDictionary; @property (readonly) NSDictionary * metaDictionary;
/** /**
* Returns the receiver's state. * The receiver's state, such as Playing, Error, NothingSpecial, Buffering.
* \return The receiver's state, such as Playing, Error, NothingSpecial, Buffering.
*/ */
- (VLCMediaState)state; @property (readonly) VLCMediaState state;
@end @end
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment