| Revision 27,
885 bytes
checked in by duggan, 18 months ago
(diff) |
|
Added test client. When server is running, client makes dummy request for context. Server returns dummy contextid.
|
| Line | |
|---|
| 1 | /* |
|---|
| 2 | * Copyright 2011 Dewey Taylor <james.dewey.taylor@gmail.com> |
|---|
| 3 | * All rights reserved. Distributed under the terms of the MIT license. |
|---|
| 4 | */ |
|---|
| 5 | |
|---|
| 6 | #ifndef _APP_H_ |
|---|
| 7 | #define _APP_H_ |
|---|
| 8 | |
|---|
| 9 | using namespace std; |
|---|
| 10 | |
|---|
| 11 | #include <SupportDefs.h> |
|---|
| 12 | #include <Application.h> |
|---|
| 13 | #include <String.h> |
|---|
| 14 | #include <OS.h> |
|---|
| 15 | #include <scheduler.h> |
|---|
| 16 | |
|---|
| 17 | #include <iostream> |
|---|
| 18 | #include <fstream> |
|---|
| 19 | #include <stdlib.h> |
|---|
| 20 | |
|---|
| 21 | #include "Head.h" |
|---|
| 22 | #include "Console.h" |
|---|
| 23 | |
|---|
| 24 | #define MAX_SLOTS 8 |
|---|
| 25 | |
|---|
| 26 | #define D_CREATE_CONTEXT 'dcct' |
|---|
| 27 | #define D_REPLY 'drep' |
|---|
| 28 | |
|---|
| 29 | class App : public BApplication { |
|---|
| 30 | public: |
|---|
| 31 | App(); |
|---|
| 32 | ~App(); |
|---|
| 33 | status_t Status(); |
|---|
| 34 | virtual void ReadyToRun(); |
|---|
| 35 | virtual void MessageReceived(BMessage*); |
|---|
| 36 | virtual bool QuitRequested(); |
|---|
| 37 | |
|---|
| 38 | private: |
|---|
| 39 | status_t LoadTopology(BString); |
|---|
| 40 | DeviceData Devices[MAX_SLOTS]; |
|---|
| 41 | status_t status; |
|---|
| 42 | uint32 SlotsUsed; |
|---|
| 43 | uint32 HeadCount; |
|---|
| 44 | Head** HeadList; |
|---|
| 45 | thread_id ConsoleID; |
|---|
| 46 | uint32 ContextNum; |
|---|
| 47 | }; |
|---|
| 48 | |
|---|
| 49 | #endif // _APP_H_ |
|---|
Note: See
TracBrowser
for help on using the repository browser.