VLCMediaList.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /*****************************************************************************
  2. * VLCMediaList.h: VLC.framework VLCMediaList header
  3. *****************************************************************************
  4. * Copyright (C) 2007 Pierre d'Herbemont
  5. * Copyright (C) 2007 the VideoLAN team
  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
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 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 General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  23. *****************************************************************************/
  24. #import "VLCMedia.h"
  25. /* Notification Messages */
  26. extern NSString * VLCMediaListItemAdded;
  27. extern NSString * VLCMediaListItemDeleted;
  28. @class VLCMedia;
  29. @class VLCMediaList;
  30. @class VLCMediaListAspect;
  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:(int)index;
  39. /**
  40. * TODO: Documentation - [VLCMediaListDelegate mediaList:mediaRemovedAtIndex:]
  41. */
  42. - (void)mediaList:(VLCMediaList *)aMediaList mediaRemovedAtIndex:(int)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. VLCMediaListAspect * flatAspect; //< TODO: Documentation VLCMediaList.flatAspect
  54. VLCMediaListAspect * hierarchicalAspect; //< TODO: Documentation VLCMediaList.hierarchicalAspect
  55. VLCMediaListAspect * hierarchicalNodeAspect; //< TODO: Documentation VLCMediaList.hierarchicalNodeAspect
  56. }
  57. /* Operations */
  58. /**
  59. * TODO: Documentation - [VLCMediaList lock]
  60. */
  61. - (void)lock;
  62. /**
  63. * TODO: Documentation - [VLCMediaList unlock]
  64. */
  65. - (void)unlock;
  66. /**
  67. * TODO: Documentation - [VLCMediaList addMedia:]
  68. */
  69. - (int)addMedia:(VLCMedia *)media;
  70. /**
  71. * TODO: Documentation - [VLCMediaList insertMedia:atIndex:]
  72. */
  73. - (void)insertMedia:(VLCMedia *)media atIndex:(int)index;
  74. /**
  75. * TODO: Documentation - [VLCMediaList removeMediaAtIndex:]
  76. */
  77. - (void)removeMediaAtIndex:(int)index;
  78. /**
  79. * TODO: Documentation - [VLCMediaList mediaAtIndex:]
  80. */
  81. - (VLCMedia *)mediaAtIndex:(int)index;
  82. /**
  83. * TODO: Documentation - [VLCMediaList indexOfMedia:]
  84. */
  85. - (int)indexOfMedia:(VLCMedia *)media;
  86. /* Properties */
  87. /**
  88. * TODO: Documentation VLCMediaList.count
  89. */
  90. @property (readonly) int count;
  91. /**
  92. * TODO: Documentation VLCMediaList.delegate
  93. */
  94. @property (assign) id delegate;
  95. /**
  96. * TODO: Documentation VLCMediaList.isReadOnly
  97. */
  98. @property (readonly) BOOL isReadOnly;
  99. /* Media list aspect */
  100. /**
  101. * TODO: Documentation VLCMediaList.hierarchicalAspect
  102. */
  103. @property (readonly) VLCMediaListAspect * hierarchicalAspect;
  104. /**
  105. * TODO: Documentation VLCMediaList.hierarchicalNodeAspect
  106. */
  107. @property (readonly) VLCMediaListAspect * hierarchicalNodeAspect;
  108. /**
  109. * TODO: Documentation VLCMediaList.flatAspect
  110. */
  111. @property (readonly) VLCMediaListAspect * flatAspect;
  112. @end