VLCMediaList.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 * VLCMediaListItemAdded;
  28. extern NSString * 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. /* Operations */
  55. /**
  56. * TODO: Documentation - [VLCMediaList lock]
  57. */
  58. - (void)lock;
  59. /**
  60. * TODO: Documentation - [VLCMediaList unlock]
  61. */
  62. - (void)unlock;
  63. /**
  64. * TODO: Documentation - [VLCMediaList addMedia:]
  65. */
  66. - (NSInteger)addMedia:(VLCMedia *)media;
  67. /**
  68. * TODO: Documentation - [VLCMediaList insertMedia:atIndex:]
  69. */
  70. - (void)insertMedia:(VLCMedia *)media atIndex:(NSInteger)index;
  71. /**
  72. * TODO: Documentation - [VLCMediaList removeMediaAtIndex:]
  73. */
  74. - (void)removeMediaAtIndex:(NSInteger)index;
  75. /**
  76. * TODO: Documentation - [VLCMediaList mediaAtIndex:]
  77. */
  78. - (VLCMedia *)mediaAtIndex:(NSInteger)index;
  79. /**
  80. * TODO: Documentation - [VLCMediaList indexOfMedia:]
  81. */
  82. - (NSInteger)indexOfMedia:(VLCMedia *)media;
  83. /* Properties */
  84. /**
  85. * TODO: Documentation VLCMediaList.count
  86. */
  87. @property (readonly) NSInteger count;
  88. /**
  89. * TODO: Documentation VLCMediaList.delegate
  90. */
  91. @property (assign) id delegate;
  92. /**
  93. * TODO: Documentation VLCMediaList.isReadOnly
  94. */
  95. @property (readonly) BOOL isReadOnly;
  96. @end