소스 검색

macosx/framework: Export libvlc version.

Pierre d'Herbemont 15 년 전
부모
커밋
b9e587bf91
2개의 변경된 파일14개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      Headers/Public/VLCLibrary.h
  2. 5 0
      Sources/VLCLibrary.m

+ 9 - 0
Headers/Public/VLCLibrary.h

@@ -58,4 +58,13 @@
  * \return The library's shared audio instance.
  */
 @property (readonly) VLCAudio * audio;
+
+
+/**
+ * Returns the library's version
+ * \return The library version example "0.9.0-git Grishenko".
+ */
+
+@property (readonly) NSString * version;
+
 @end

+ 5 - 0
Sources/VLCLibrary.m

@@ -89,6 +89,11 @@ void __catch_exception( void * e, const char * function, const char * file, int
     return self;
 }
 
+- (NSString *)version 
+{
+    return [NSString stringWithUTF8String:libvlc_get_version()];
+}
+
 - (void)dealloc 
 {
     if( instance )