Files
haiku-beta6/src/apps/debuganalyzer/MainModelLoader.h
T
Ingo Weinhold 36e787103f Made BDebugEventInputStream::ReadNextEvent() nicer to use.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-19 11:17:24 +00:00

47 lines
935 B
C++

/*
* Copyright 2009, Ingo Weinhold, [email protected].
* Distributed under the terms of the MIT License.
*/
#ifndef MAIN_MODEL_LOADER_H
#define MAIN_MODEL_LOADER_H
#include <Locker.h>
#include <Messenger.h>
class BDataIO;
class BDebugEventInputStream;
class MainModel;
struct system_profiler_event_header;
class MainModelLoader {
public:
MainModelLoader();
~MainModelLoader();
status_t StartLoading(BDataIO& input,
const BMessenger& target);
void Abort();
MainModel* DetachModel();
private:
static status_t _LoaderEntry(void* data);
status_t _Loader();
status_t _ProcessEvent(uint32 event, uint32 cpu,
const void* buffer, size_t size);
private:
BLocker fLock;
MainModel* fModel;
BDebugEventInputStream* fInput;
BMessenger fTarget;
thread_id fLoaderThread;
bool fLoading;
bool fAborted;
};
#endif // MAIN_MODEL_LOADER_H