2016-05-26 01:28:50 +00:00
|
|
|
#ifndef __AMUSE_AUDIOUNIT_AUDIOGROUPFILEPRESENTER_HPP__
|
|
|
|
#define __AMUSE_AUDIOUNIT_AUDIOGROUPFILEPRESENTER_HPP__
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
2016-06-03 02:53:52 +00:00
|
|
|
#import <AppKit/AppKit.h>
|
2016-05-26 01:28:50 +00:00
|
|
|
#include <map>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
@class AudioGroupFilePresenter;
|
|
|
|
|
|
|
|
struct AudioGroupDataCollection
|
|
|
|
{
|
2016-06-03 02:53:52 +00:00
|
|
|
NSURL* m_proj;
|
|
|
|
NSURL* m_pool;
|
|
|
|
NSURL* m_sdir;
|
|
|
|
NSURL* m_samp;
|
|
|
|
|
|
|
|
std::unique_ptr<uint8_t[]> m_projData;
|
|
|
|
std::unique_ptr<uint8_t[]> m_poolData;
|
|
|
|
std::unique_ptr<uint8_t[]> m_sdirData;
|
|
|
|
std::unique_ptr<uint8_t[]> m_sampData;
|
2016-05-26 01:28:50 +00:00
|
|
|
|
|
|
|
void moveURL(NSURL* oldUrl, NSURL* newUrl);
|
|
|
|
|
2016-06-03 02:53:52 +00:00
|
|
|
bool loadProj(AudioGroupFilePresenter* presenter);
|
|
|
|
bool loadPool(AudioGroupFilePresenter* presenter);
|
|
|
|
bool loadSdir(AudioGroupFilePresenter* presenter);
|
|
|
|
bool loadSamp(AudioGroupFilePresenter* presenter);
|
2016-05-26 01:28:50 +00:00
|
|
|
|
2016-06-03 02:53:52 +00:00
|
|
|
AudioGroupDataCollection(NSURL* proj, NSURL* pool, NSURL* sdir, NSURL* samp)
|
|
|
|
: m_proj(proj), m_pool(pool), m_sdir(sdir), m_samp(samp) {}
|
|
|
|
bool isDataComplete () const {return m_projData && m_poolData && m_sdirData && m_sampData;}
|
2016-05-26 01:28:50 +00:00
|
|
|
};
|
|
|
|
|
2016-06-03 02:53:52 +00:00
|
|
|
@interface AudioGroupFilePresenter : NSObject <NSFilePresenter, NSOutlineViewDataSource>
|
2016-05-26 01:28:50 +00:00
|
|
|
{
|
|
|
|
NSURL* m_groupURL;
|
|
|
|
NSOperationQueue* m_dataQueue;
|
|
|
|
std::map<std::string, AudioGroupDataCollection> m_audioGroupCollections;
|
2016-06-03 02:53:52 +00:00
|
|
|
|
|
|
|
std::map<std::string, AudioGroupDataCollection>::const_iterator m_audioGroupOutlineIt;
|
|
|
|
size_t m_audioGroupOutlineIdx;
|
2016-05-26 01:28:50 +00:00
|
|
|
}
|
|
|
|
|
2016-06-03 02:53:52 +00:00
|
|
|
- (void)update;
|
|
|
|
|
2016-05-26 01:28:50 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif // __AMUSE_AUDIOUNIT_AUDIOGROUPFILEPRESENTER_HPP__
|