1 /******************************************************************************* 2 / 3 / File: FileInterface.h 4 / 5 / Description: A BFileInterface is something which can read and/or write files for the 6 / use of other Media Kit participants. 7 / 8 / Copyright 1997-98, Be Incorporated, All Rights Reserved 9 / 10 *******************************************************************************/ 11 12 #if !defined(_FILE_INTERFACE_H) 13 #define _FILE_INTERFACE_H 14 15 #include <MediaDefs.h> 16 #include <MediaNode.h> 17 18 19 class BFileInterface : 20 public virtual BMediaNode 21 { 22 protected: 23 24 virtual ~BFileInterface(); /* force vtable */ 25 26 public: 27 28 /* look, no hands! */ 29 30 protected: 31 32 BFileInterface(); 33 virtual status_t HandleMessage( 34 int32 message, 35 const void * data, 36 size_t size); 37 38 virtual status_t GetNextFileFormat( 39 int32 * cookie, 40 media_file_format * out_format) = 0; 41 virtual void DisposeFileFormatCookie( 42 int32 cookie) = 0; 43 44 virtual status_t GetDuration( 45 bigtime_t * out_time) = 0; 46 virtual status_t SniffRef( 47 const entry_ref & file, 48 char * out_mime_type, /* 256 bytes */ 49 float * out_quality) = 0; 50 virtual status_t SetRef( 51 const entry_ref & file, 52 bool create, 53 bigtime_t * out_time) = 0; 54 virtual status_t GetRef( 55 entry_ref * out_ref, 56 char * out_mime_type) = 0; 57 58 private: 59 60 friend class BMediaNode; 61 62 BFileInterface( /* private unimplemented */ 63 const BFileInterface & clone); 64 BFileInterface & operator=( 65 const BFileInterface & clone); 66 67 /* Mmmh, stuffing! */ 68 virtual status_t _Reserved_FileInterface_0(void *); 69 virtual status_t _Reserved_FileInterface_1(void *); 70 virtual status_t _Reserved_FileInterface_2(void *); 71 virtual status_t _Reserved_FileInterface_3(void *); 72 virtual status_t _Reserved_FileInterface_4(void *); 73 virtual status_t _Reserved_FileInterface_5(void *); 74 virtual status_t _Reserved_FileInterface_6(void *); 75 virtual status_t _Reserved_FileInterface_7(void *); 76 virtual status_t _Reserved_FileInterface_8(void *); 77 virtual status_t _Reserved_FileInterface_9(void *); 78 virtual status_t _Reserved_FileInterface_10(void *); 79 virtual status_t _Reserved_FileInterface_11(void *); 80 virtual status_t _Reserved_FileInterface_12(void *); 81 virtual status_t _Reserved_FileInterface_13(void *); 82 virtual status_t _Reserved_FileInterface_14(void *); 83 virtual status_t _Reserved_FileInterface_15(void *); 84 85 uint32 _reserved_file_interface_[16]; 86 87 }; 88 89 90 #endif /* _FILE_INTERFACE_H */ 91 92