VLCLibrary.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*****************************************************************************
  2. * VLCLibrary.h: VLCKit.framework VLCLibrary header
  3. *****************************************************************************
  4. * Copyright (C) 2007 Pierre d'Herbemont
  5. * Copyright (C) 2007 VLC authors and VideoLAN
  6. * $Id$
  7. *
  8. * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
  9. *
  10. * This program is free software; you can redistribute it and/or modify it
  11. * under the terms of the GNU Lesser General Public License as published by
  12. * the Free Software Foundation; either version 2.1 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Lesser General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Lesser General Public License
  21. * along with this program; if not, write to the Free Software Foundation,
  22. * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  23. *****************************************************************************/
  24. #import <Foundation/Foundation.h>
  25. /**
  26. * The VLCLibrary is the base library of VLCKit.framework. This object provides a shared instance that exposes the
  27. * internal functionalities of libvlc and libvlc-control. The VLCLibrary object is instantiated automatically when
  28. * VLCKit.framework is loaded into memory. Also, it is automatically destroyed when VLCKit.framework is unloaded
  29. * from memory.
  30. *
  31. * Currently, the framework does not support multiple instances of VLCLibrary.
  32. * Furthermore, you cannot destroy any instance of VLCLibrary; this is done automatically by the dynamic link loader.
  33. */
  34. @interface VLCLibrary : NSObject
  35. /**
  36. * Returns the library's shared instance
  37. * \return The library's shared instance
  38. */
  39. + (VLCLibrary *)sharedLibrary;
  40. /**
  41. * Returns an individual instance which can be customized with options
  42. * \param options NSArray with NSString instance containing the options
  43. * \return the individual library instance
  44. */
  45. - (instancetype)initWithOptions:(NSArray *)options;
  46. /**
  47. * Enables/disables debug logging
  48. * \note NSLog is used to log messages
  49. */
  50. @property (readwrite, nonatomic) BOOL debugLogging;
  51. /**
  52. * Gets/sets the debug logging level
  53. * \note Logging level ranges from 0 (just error messages) to 4 (everything)
  54. * \warning If an invalid level is provided, level defaults to 0
  55. */
  56. @property (readwrite, nonatomic) int debugLoggingLevel;
  57. /**
  58. * Returns the library's version
  59. * \return The library version example "0.9.0-git Grishenko"
  60. */
  61. @property (readonly, copy) NSString *version;
  62. /**
  63. * Returns the compiler used to build the libvlc binary
  64. * \return The compiler version string.
  65. */
  66. @property (readonly, copy) NSString *compiler;
  67. /**
  68. * Returns the library's changeset
  69. * \return The library version example "adfee99"
  70. */
  71. @property (readonly, copy) NSString *changeset;
  72. /**
  73. * Sets the application name and HTTP User Agent
  74. * libvlc will pass it to servers when required by protocol
  75. * \param readableName Human-readable application name, e.g. "FooBar player 1.2.3"
  76. * \param userAgent HTTP User Agent, e.g. "FooBar/1.2.3 Python/2.6.0"
  77. */
  78. - (void)setHumanReadableName:(NSString *)readableName withHTTPUserAgent:(NSString *)userAgent;
  79. /**
  80. * Sets meta-information about the application
  81. * \param identifier Java-style application identifier, e.g. "com.acme.foobar"
  82. * \param version Application version numbers, e.g. "1.2.3"
  83. * \param icon Application icon name, e.g. "foobar"
  84. */
  85. - (void)setApplicationIdentifier:(NSString *)identifier withVersion:(NSString *)version andApplicationIconName:(NSString *)icon;
  86. /**
  87. * libvlc instance wrapped by the VLCLibrary instance
  88. * \note If you want to use it, you are most likely wrong (or want to add a proper ObjC API)
  89. */
  90. @property (nonatomic, assign) void *instance;
  91. @end