VLCMediaList.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*****************************************************************************
  2. * VLCMediaList.h: VLCKit.framework VLCMediaList 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. #import "VLCMedia.h"
  26. /* Notification Messages */
  27. extern NSString *const VLCMediaListItemAdded;
  28. extern NSString *const VLCMediaListItemDeleted;
  29. @class VLCMedia;
  30. @class VLCMediaList;
  31. /**
  32. * TODO: Documentation VLCMediaListDelegate
  33. */
  34. @protocol VLCMediaListDelegate
  35. /**
  36. * TODO: Documentation - [VLCMediaListDelegate mediaList:mediaAdded:atIndex:]
  37. */
  38. - (void)mediaList:(VLCMediaList *)aMediaList mediaAdded:(VLCMedia *)media atIndex:(NSInteger)index;
  39. /**
  40. * TODO: Documentation - [VLCMediaListDelegate mediaList:mediaRemovedAtIndex:]
  41. */
  42. - (void)mediaList:(VLCMediaList *)aMediaList mediaRemovedAtIndex:(NSInteger)index;
  43. @end
  44. /**
  45. * TODO: Documentation VLCMediaList
  46. */
  47. @interface VLCMediaList : NSObject
  48. {
  49. void * p_mlist; //< Internal instance of media list
  50. id <VLCMediaListDelegate,NSObject> delegate; //< Delegate object
  51. /* We need that private copy because of Cocoa Bindings, that need to be working on first thread */
  52. NSMutableArray * cachedMedia; //< Private copy of media objects.
  53. }
  54. - (id)initWithArray:(NSArray *)array;
  55. /* Operations */
  56. /**
  57. * TODO: Documentation - [VLCMediaList lock]
  58. */
  59. - (void)lock;
  60. /**
  61. * TODO: Documentation - [VLCMediaList unlock]
  62. */
  63. - (void)unlock;
  64. /**
  65. * TODO: Documentation - [VLCMediaList addMedia:]
  66. */
  67. - (NSInteger)addMedia:(VLCMedia *)media;
  68. /**
  69. * TODO: Documentation - [VLCMediaList insertMedia:atIndex:]
  70. */
  71. - (void)insertMedia:(VLCMedia *)media atIndex:(NSInteger)index;
  72. /**
  73. * TODO: Documentation - [VLCMediaList removeMediaAtIndex:]
  74. */
  75. - (void)removeMediaAtIndex:(NSInteger)index;
  76. /**
  77. * TODO: Documentation - [VLCMediaList mediaAtIndex:]
  78. */
  79. - (VLCMedia *)mediaAtIndex:(NSInteger)index;
  80. /**
  81. * TODO: Documentation - [VLCMediaList indexOfMedia:]
  82. */
  83. - (NSInteger)indexOfMedia:(VLCMedia *)media;
  84. /* Properties */
  85. /**
  86. * TODO: Documentation VLCMediaList.count
  87. */
  88. @property (readonly) NSInteger count;
  89. /**
  90. * TODO: Documentation VLCMediaList.delegate
  91. */
  92. @property (assign) id delegate;
  93. /**
  94. * TODO: Documentation VLCMediaList.isReadOnly
  95. */
  96. @property (readonly) BOOL isReadOnly;
  97. @end