Commit 52edcaf6 authored by Gleb Pinigin's avatar Gleb Pinigin Committed by Felix Paul Kühne

Use const specifier for constant strings

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 87c1a6f6
......@@ -28,7 +28,7 @@
/**
* Standard notification messages that are emitted by VLCAudio object.
*/
extern NSString * VLCMediaPlayerVolumeChanged;
extern NSString *const VLCMediaPlayerVolumeChanged;
@class VLCMediaPlayer;
......
......@@ -32,30 +32,30 @@
/**
* Standard dictionary keys for retreiving meta data.
*/
extern NSString * VLCMetaInformationTitle; /* NSString */
extern NSString * VLCMetaInformationArtist; /* NSString */
extern NSString * VLCMetaInformationGenre; /* NSString */
extern NSString * VLCMetaInformationCopyright; /* NSString */
extern NSString * VLCMetaInformationAlbum; /* NSString */
extern NSString * VLCMetaInformationTrackNumber; /* NSString */
extern NSString * VLCMetaInformationDescription; /* NSString */
extern NSString * VLCMetaInformationRating; /* NSString */
extern NSString * VLCMetaInformationDate; /* NSString */
extern NSString * VLCMetaInformationSetting; /* NSString */
extern NSString * VLCMetaInformationURL; /* NSString */
extern NSString * VLCMetaInformationLanguage; /* NSString */
extern NSString * VLCMetaInformationNowPlaying; /* NSString */
extern NSString * VLCMetaInformationPublisher; /* NSString */
extern NSString * VLCMetaInformationEncodedBy; /* NSString */
extern NSString * VLCMetaInformationArtworkURL; /* NSString */
extern NSString * VLCMetaInformationArtwork; /* NSImage */
extern NSString * VLCMetaInformationTrackID; /* NSString */
extern NSString *const VLCMetaInformationTitle; /* NSString */
extern NSString *const VLCMetaInformationArtist; /* NSString */
extern NSString *const VLCMetaInformationGenre; /* NSString */
extern NSString *const VLCMetaInformationCopyright; /* NSString */
extern NSString *const VLCMetaInformationAlbum; /* NSString */
extern NSString *const VLCMetaInformationTrackNumber; /* NSString */
extern NSString *const VLCMetaInformationDescription; /* NSString */
extern NSString *const VLCMetaInformationRating; /* NSString */
extern NSString *const VLCMetaInformationDate; /* NSString */
extern NSString *const VLCMetaInformationSetting; /* NSString */
extern NSString *const VLCMetaInformationURL; /* NSString */
extern NSString *const VLCMetaInformationLanguage; /* NSString */
extern NSString *const VLCMetaInformationNowPlaying; /* NSString */
extern NSString *const VLCMetaInformationPublisher; /* NSString */
extern NSString *const VLCMetaInformationEncodedBy; /* NSString */
extern NSString *const VLCMetaInformationArtworkURL; /* NSString */
extern NSString *const VLCMetaInformationArtwork; /* NSImage */
extern NSString *const VLCMetaInformationTrackID; /* NSString */
/* Notification Messages */
/**
* Available notification messages.
*/
extern NSString * VLCMediaMetaChanged; //< Notification message for when the media's meta data has changed
extern NSString *const VLCMediaMetaChanged; //< Notification message for when the media's meta data has changed
// Forward declarations, supresses compiler error messages
@class VLCMediaList;
......@@ -270,12 +270,12 @@ typedef NSInteger VLCMediaState;
/**
* \returns a NSNumber
*/
extern NSString *VLCMediaTracksInformationCodec;
extern NSString *const VLCMediaTracksInformationCodec;
/**
* \returns a NSNumber
*/
extern NSString *VLCMediaTracksInformationId;
extern NSString *const VLCMediaTracksInformationId;
/**
* \returns a NSString
* \see VLCMediaTracksInformationTypeAudio
......@@ -283,79 +283,79 @@ extern NSString *VLCMediaTracksInformationId;
* \see VLCMediaTracksInformationTypeText
* \see VLCMediaTracksInformationTypeUnknown
*/
extern NSString *VLCMediaTracksInformationType;
extern NSString *const VLCMediaTracksInformationType;
/**
* \returns a NSNumber
*/
extern NSString *VLCMediaTracksInformationCodecProfile;
extern NSString *const VLCMediaTracksInformationCodecProfile;
/**
* \returns a NSNumber
*/
extern NSString *VLCMediaTracksInformationCodecLevel;
extern NSString *const VLCMediaTracksInformationCodecLevel;
/**
* \returns the bitrate as NSNumber
*/
extern NSString *VLCMediaTracksInformationBitrate;
extern NSString *const VLCMediaTracksInformationBitrate;
/**
* \returns the language as NSString
*/
extern NSString *VLCMediaTracksInformationLanguage;
extern NSString *const VLCMediaTracksInformationLanguage;
/**
* \returns the description as NSString
*/
extern NSString *VLCMediaTracksInformationDescription;
extern NSString *const VLCMediaTracksInformationDescription;
/**
* \returns the audio channel number as NSNumber
*/
extern NSString *VLCMediaTracksInformationAudioChannelsNumber;
extern NSString *const VLCMediaTracksInformationAudioChannelsNumber;
/**
* \returns the audio rate as NSNumber
*/
extern NSString *VLCMediaTracksInformationAudioRate;
extern NSString *const VLCMediaTracksInformationAudioRate;
/**
* \returns the height as NSNumber
*/
extern NSString *VLCMediaTracksInformationVideoHeight;
extern NSString *const VLCMediaTracksInformationVideoHeight;
/**
* \returns the width as NSNumber
*/
extern NSString *VLCMediaTracksInformationVideoWidth;
extern NSString *const VLCMediaTracksInformationVideoWidth;
/**
* \returns the source aspect ratio as NSNumber
*/
extern NSString *VLCMediaTracksInformationSourceAspectRatio;
extern NSString *const VLCMediaTracksInformationSourceAspectRatio;
/**
* \returns the source aspect ratio denominator as NSNumber
*/
extern NSString *VLCMediaTracksInformationSourceAspectRatioDenominator;
extern NSString *const VLCMediaTracksInformationSourceAspectRatioDenominator;
/**
* \returns the frame rate as NSNumber
*/
extern NSString *VLCMediaTracksInformationFrameRate;
extern NSString *const VLCMediaTracksInformationFrameRate;
/**
* \returns the frame rate denominator as NSNumber
*/
extern NSString *VLCMediaTracksInformationFrameRateDenominator;
extern NSString *const VLCMediaTracksInformationFrameRateDenominator;
/**
* \returns the text encoding as NSString
*/
extern NSString *VLCMediaTracksInformationTextEncoding;
extern NSString *const VLCMediaTracksInformationTextEncoding;
/**
* Tracks information NSDictionary values for
* VLCMediaTracksInformationType
*/
extern NSString *VLCMediaTracksInformationTypeAudio;
extern NSString *VLCMediaTracksInformationTypeVideo;
extern NSString *VLCMediaTracksInformationTypeText;
extern NSString *VLCMediaTracksInformationTypeUnknown;
extern NSString *const VLCMediaTracksInformationTypeAudio;
extern NSString *const VLCMediaTracksInformationTypeVideo;
extern NSString *const VLCMediaTracksInformationTypeText;
extern NSString *const VLCMediaTracksInformationTypeUnknown;
/**
* Returns the tracks information.
......
......@@ -26,8 +26,8 @@
#import "VLCMedia.h"
/* Notification Messages */
extern NSString * VLCMediaListItemAdded;
extern NSString * VLCMediaListItemDeleted;
extern NSString *const VLCMediaListItemAdded;
extern NSString *const VLCMediaListItemDeleted;
@class VLCMedia;
@class VLCMediaList;
......
......@@ -38,8 +38,8 @@
#endif
/* Notification Messages */
extern NSString * VLCMediaPlayerTimeChanged;
extern NSString * VLCMediaPlayerStateChanged;
extern NSString *const VLCMediaPlayerTimeChanged;
extern NSString *const VLCMediaPlayerStateChanged;
/**
* VLCMediaPlayerState describes the state of the media player.
......
......@@ -30,7 +30,7 @@
#define VOLUME_MIN 0
/* Notification Messages */
NSString * VLCMediaPlayerVolumeChanged = @"VLCMediaPlayerVolumeChanged";
NSString *const VLCMediaPlayerVolumeChanged = @"VLCMediaPlayerVolumeChanged";
/* libvlc event callback */
// TODO: Callbacks
......
......@@ -33,27 +33,27 @@
#import <sys/sysctl.h> // for sysctlbyname
/* Meta Dictionary Keys */
NSString * VLCMetaInformationTitle = @"title";
NSString * VLCMetaInformationArtist = @"artist";
NSString * VLCMetaInformationGenre = @"genre";
NSString * VLCMetaInformationCopyright = @"copyright";
NSString * VLCMetaInformationAlbum = @"album";
NSString * VLCMetaInformationTrackNumber = @"trackNumber";
NSString * VLCMetaInformationDescription = @"description";
NSString * VLCMetaInformationRating = @"rating";
NSString * VLCMetaInformationDate = @"date";
NSString * VLCMetaInformationSetting = @"setting";
NSString * VLCMetaInformationURL = @"url";
NSString * VLCMetaInformationLanguage = @"language";
NSString * VLCMetaInformationNowPlaying = @"nowPlaying";
NSString * VLCMetaInformationPublisher = @"publisher";
NSString * VLCMetaInformationEncodedBy = @"encodedBy";
NSString * VLCMetaInformationArtworkURL = @"artworkURL";
NSString * VLCMetaInformationArtwork = @"artwork";
NSString * VLCMetaInformationTrackID = @"trackID";
NSString *const VLCMetaInformationTitle = @"title";
NSString *const VLCMetaInformationArtist = @"artist";
NSString *const VLCMetaInformationGenre = @"genre";
NSString *const VLCMetaInformationCopyright = @"copyright";
NSString *const VLCMetaInformationAlbum = @"album";
NSString *const VLCMetaInformationTrackNumber = @"trackNumber";
NSString *const VLCMetaInformationDescription = @"description";
NSString *const VLCMetaInformationRating = @"rating";
NSString *const VLCMetaInformationDate = @"date";
NSString *const VLCMetaInformationSetting = @"setting";
NSString *const VLCMetaInformationURL = @"url";
NSString *const VLCMetaInformationLanguage = @"language";
NSString *const VLCMetaInformationNowPlaying = @"nowPlaying";
NSString *const VLCMetaInformationPublisher = @"publisher";
NSString *const VLCMetaInformationEncodedBy = @"encodedBy";
NSString *const VLCMetaInformationArtworkURL = @"artworkURL";
NSString *const VLCMetaInformationArtwork = @"artwork";
NSString *const VLCMetaInformationTrackID = @"trackID";
/* Notification Messages */
NSString * VLCMediaMetaChanged = @"VLCMediaMetaChanged";
NSString *const VLCMediaMetaChanged = @"VLCMediaMetaChanged";
/******************************************************************************
* @property (readwrite)
......@@ -525,35 +525,35 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self)
return p_stats.i_demux_discontinuity;
}
NSString *VLCMediaTracksInformationCodec = @"codec"; // NSNumber
NSString *VLCMediaTracksInformationId = @"id"; // NSNumber
NSString *VLCMediaTracksInformationType = @"type"; // NSString
NSString *const VLCMediaTracksInformationCodec = @"codec"; // NSNumber
NSString *const VLCMediaTracksInformationId = @"id"; // NSNumber
NSString *const VLCMediaTracksInformationType = @"type"; // NSString
NSString *VLCMediaTracksInformationCodecProfile = @"profile"; // NSNumber
NSString *VLCMediaTracksInformationCodecLevel = @"level"; // NSNumber
NSString *const VLCMediaTracksInformationCodecProfile = @"profile"; // NSNumber
NSString *const VLCMediaTracksInformationCodecLevel = @"level"; // NSNumber
NSString *VLCMediaTracksInformationTypeAudio = @"audio";
NSString *VLCMediaTracksInformationTypeVideo = @"video";
NSString *VLCMediaTracksInformationTypeText = @"text";
NSString *VLCMediaTracksInformationTypeUnknown = @"unknown";
NSString *const VLCMediaTracksInformationTypeAudio = @"audio";
NSString *const VLCMediaTracksInformationTypeVideo = @"video";
NSString *const VLCMediaTracksInformationTypeText = @"text";
NSString *const VLCMediaTracksInformationTypeUnknown = @"unknown";
NSString *VLCMediaTracksInformationBitrate = @"bitrate"; // NSNumber
NSString *VLCMediaTracksInformationLanguage = @"language"; // NSString
NSString *VLCMediaTracksInformationDescription = @"description"; // NSString
NSString *const VLCMediaTracksInformationBitrate = @"bitrate"; // NSNumber
NSString *const VLCMediaTracksInformationLanguage = @"language"; // NSString
NSString *const VLCMediaTracksInformationDescription = @"description"; // NSString
NSString *VLCMediaTracksInformationAudioChannelsNumber = @"channelsNumber"; // NSNumber
NSString *VLCMediaTracksInformationAudioRate = @"rate"; // NSNumber
NSString *const VLCMediaTracksInformationAudioChannelsNumber = @"channelsNumber"; // NSNumber
NSString *const VLCMediaTracksInformationAudioRate = @"rate"; // NSNumber
NSString *VLCMediaTracksInformationVideoHeight = @"height"; // NSNumber
NSString *VLCMediaTracksInformationVideoWidth = @"width"; // NSNumber
NSString *const VLCMediaTracksInformationVideoHeight = @"height"; // NSNumber
NSString *const VLCMediaTracksInformationVideoWidth = @"width"; // NSNumber
NSString *VLCMediaTracksInformationSourceAspectRatio = @"sar_num"; // NSNumber
NSString *VLCMediaTracksInformationSourceAspectDenominator = @"sar_den"; // NSNumber
NSString *const VLCMediaTracksInformationSourceAspectRatio = @"sar_num"; // NSNumber
NSString *const VLCMediaTracksInformationSourceAspectDenominator = @"sar_den"; // NSNumber
NSString *VLCMediaTracksInformationFrameRate = @"frame_rate_num"; // NSNumber
NSString *VLCMediaTracksInformationFrameRateDenominator = @"frame_rate_den"; // NSNumber
NSString *const VLCMediaTracksInformationFrameRate = @"frame_rate_num"; // NSNumber
NSString *const VLCMediaTracksInformationFrameRateDenominator = @"frame_rate_den"; // NSNumber
NSString *VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString
NSString *const VLCMediaTracksInformationTextEncoding = @"encoding"; // NSString
- (NSArray *)tracksInformation
{
......
......@@ -36,8 +36,8 @@
#include <vlc/libvlc.h>
/* Notification Messages */
NSString * VLCMediaListItemAdded = @"VLCMediaListItemAdded";
NSString * VLCMediaListItemDeleted = @"VLCMediaListItemDeleted";
NSString *const VLCMediaListItemAdded = @"VLCMediaListItemAdded";
NSString *const VLCMediaListItemDeleted = @"VLCMediaListItemDeleted";
// TODO: Documentation
@interface VLCMediaList (Private)
......
......@@ -48,8 +48,8 @@
#include <vlc/vlc.h>
/* Notification Messages */
NSString * VLCMediaPlayerTimeChanged = @"VLCMediaPlayerTimeChanged";
NSString * VLCMediaPlayerStateChanged = @"VLCMediaPlayerStateChanged";
NSString *const VLCMediaPlayerTimeChanged = @"VLCMediaPlayerTimeChanged";
NSString *const VLCMediaPlayerStateChanged = @"VLCMediaPlayerStateChanged";
NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state)
{
......
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