Files
haiku-beta6/src/apps/debuganalyzer/MainModelLoader.h
T
Ingo Weinhold 3dc9bfd17e Beginnings of a graphical tool for analyzing the output of scheduling_recorder.
Doesn't do anything yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30255 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-19 00:31:03 +00:00

48 lines
943 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(
const system_profiler_event_header* header,
size_t size);
private:
BLocker fLock;
MainModel* fModel;
BDebugEventInputStream* fInput;
BMessenger fTarget;
thread_id fLoaderThread;
bool fLoading;
bool fAborted;
};
#endif // MAIN_MODEL_LOADER_H