Просмотр исходного кода

MacOSX/Framework/VLCMediaList.m: Implement -isReadOnly.

Pierre d'Herbemont 17 лет назад
Родитель
Сommit
9951b9c2fa
2 измененных файлов с 12 добавлено и 0 удалено
  1. 2 0
      Headers/Public/VLCMediaList.h
  2. 10 0
      Sources/VLCMediaList.m

+ 2 - 0
Headers/Public/VLCMediaList.h

@@ -63,6 +63,8 @@ extern NSString * VLCMediaListItemDeleted;
 - (int)indexOfMedia:(VLCMedia *)media;
 - (int)count;
 
+- (BOOL)isReadOnly;
+
 /* Media list aspect */
 - (VLCMediaListAspect *)hierarchicalAspect;
 - (VLCMediaListAspect *)flatAspect;

+ 10 - 0
Sources/VLCMediaList.m

@@ -208,6 +208,16 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
     return result;
 }
 
+- (BOOL)isReadOnly
+{
+    libvlc_exception_t p_e;
+    libvlc_exception_init( &p_e );
+    BOOL isReadOnly = libvlc_media_list_is_readonly( p_mlist );
+    quit_on_exception( &p_e );
+    
+    return isReadOnly;
+}
+
 /* Media list aspect */
 - (VLCMediaListAspect *)hierarchicalAspect
 {