2021-03-08 23:59:02 +00:00
|
|
|
//
|
|
|
|
// Media.h
|
|
|
|
// Ample
|
|
|
|
//
|
|
|
|
// Created by Kelvin Sherlock on 3/7/2021.
|
|
|
|
// Copyright © 2021 Kelvin Sherlock. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef Media_h
|
|
|
|
#define Media_h
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Media {
|
|
|
|
unsigned cass;
|
|
|
|
unsigned cdrom;
|
|
|
|
unsigned hard;
|
|
|
|
unsigned floppy_5_25;
|
|
|
|
unsigned floppy_3_5;
|
|
|
|
unsigned pseudo_disk;
|
2021-06-13 16:29:23 +00:00
|
|
|
unsigned bitbanger;
|
2021-07-11 03:33:20 +00:00
|
|
|
unsigned midiin;
|
|
|
|
unsigned midiout;
|
|
|
|
unsigned picture;
|
2022-02-24 01:56:21 +00:00
|
|
|
uint64_t floppy_mask;
|
2021-03-08 23:59:02 +00:00
|
|
|
} Media;
|
|
|
|
|
2021-07-09 02:09:33 +00:00
|
|
|
|
|
|
|
typedef enum {
|
2021-07-10 05:15:34 +00:00
|
|
|
MediaTypeError = -1,
|
2021-07-09 02:09:33 +00:00
|
|
|
MediaTypeUnknown = 0,
|
|
|
|
MediaType_5_25,
|
|
|
|
MediaType_3_5,
|
|
|
|
MediaType_HardDisk,
|
2021-07-10 05:15:34 +00:00
|
|
|
MediaType_CDROM,
|
2021-07-09 02:09:33 +00:00
|
|
|
MediaType_Cassette,
|
|
|
|
MediaType_Picture,
|
|
|
|
MediaType_MIDI,
|
|
|
|
} MediaType;
|
|
|
|
|
2021-03-08 23:59:02 +00:00
|
|
|
struct Media MediaFromDictionary(NSDictionary *);
|
|
|
|
|
|
|
|
void MediaAdd(Media *dest, const Media *src);
|
|
|
|
|
|
|
|
BOOL MediaEqual(const Media *lhs, const Media *rhs);
|
|
|
|
|
|
|
|
extern const Media EmptyMedia;
|
|
|
|
|
2021-07-10 05:15:34 +00:00
|
|
|
MediaType ClassifyMediaFile(id file);
|
2021-07-09 02:09:33 +00:00
|
|
|
|
2021-03-08 23:59:02 +00:00
|
|
|
#endif /* Media_h */
|