2009-08-28 17:18:17 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2009, Haiku, Inc. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _MEDIA_FILES_H
|
2002-07-09 16:24:59 +04:00
|
|
|
#define _MEDIA_FILES_H
|
|
|
|
|
2009-08-28 17:18:17 +04:00
|
|
|
|
2002-07-09 16:24:59 +04:00
|
|
|
#include <MediaDefs.h>
|
|
|
|
#include <List.h>
|
2009-08-28 17:18:17 +04:00
|
|
|
#include <String.h>
|
2002-07-09 16:24:59 +04:00
|
|
|
|
|
|
|
struct entry_ref;
|
|
|
|
|
|
|
|
|
|
|
|
class BMediaFiles {
|
|
|
|
public:
|
|
|
|
|
2009-08-28 17:18:17 +04:00
|
|
|
BMediaFiles();
|
|
|
|
virtual ~BMediaFiles();
|
|
|
|
|
|
|
|
virtual status_t RewindTypes();
|
|
|
|
virtual status_t GetNextType(BString* _type);
|
|
|
|
|
|
|
|
virtual status_t RewindRefs(const char* type);
|
|
|
|
virtual status_t GetNextRef(BString* _type,
|
|
|
|
entry_ref* _ref = NULL);
|
|
|
|
|
|
|
|
virtual status_t GetRefFor(const char* type, const char* item,
|
|
|
|
entry_ref* _ref);
|
|
|
|
virtual status_t SetRefFor(const char* type, const char* item,
|
|
|
|
const entry_ref& ref);
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2009-08-28 17:18:17 +04:00
|
|
|
status_t GetAudioGainFor(const char* type,
|
|
|
|
const char* item, float* _gain);
|
|
|
|
status_t SetAudioGainFor(const char* type,
|
|
|
|
const char* item, float gain);
|
|
|
|
|
|
|
|
// TODO: Rename this to "ClearRefFor" when breaking BC.
|
|
|
|
virtual status_t RemoveRefFor(const char* type,
|
|
|
|
const char* item, const entry_ref& ref);
|
|
|
|
|
|
|
|
virtual status_t RemoveItem(const char* type, const char* item);
|
|
|
|
|
2009-12-08 17:22:56 +03:00
|
|
|
static const char B_SOUNDS[];
|
|
|
|
|
2009-08-28 17:18:17 +04:00
|
|
|
// TODO: Needs Perform() for FBC reasons!
|
2002-07-09 16:24:59 +04:00
|
|
|
|
|
|
|
private:
|
2009-08-28 17:18:17 +04:00
|
|
|
// FBC padding
|
|
|
|
|
|
|
|
status_t _Reserved_MediaFiles_0(void*, ...);
|
|
|
|
virtual status_t _Reserved_MediaFiles_1(void*, ...);
|
|
|
|
virtual status_t _Reserved_MediaFiles_2(void*, ...);
|
|
|
|
virtual status_t _Reserved_MediaFiles_3(void*, ...);
|
|
|
|
virtual status_t _Reserved_MediaFiles_4(void*, ...);
|
|
|
|
virtual status_t _Reserved_MediaFiles_5(void*, ...);
|
|
|
|
virtual status_t _Reserved_MediaFiles_6(void*, ...);
|
|
|
|
virtual status_t _Reserved_MediaFiles_7(void*, ...);
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2009-12-08 17:22:56 +03:00
|
|
|
void _ClearTypes();
|
|
|
|
void _ClearItems();
|
|
|
|
|
2009-08-28 17:18:17 +04:00
|
|
|
private:
|
|
|
|
BList fTypes;
|
|
|
|
int fTypeIndex;
|
|
|
|
BString fCurrentType;
|
|
|
|
BList fItems;
|
|
|
|
int fItemIndex;
|
2002-07-09 16:24:59 +04:00
|
|
|
};
|
|
|
|
|
2009-08-28 17:18:17 +04:00
|
|
|
#endif // _MEDIA_FILES_H
|
2002-07-09 16:24:59 +04:00
|
|
|
|