hercules v9 symbian os application development
源代码在线查看: client-server.h
// client-server.h
#ifndef CLIENTSERVER_H__
#define CLIENTSERVER_H__
#include
#include
_LIT(KServerName,"HerculesServer");// The server's identity within the client-server framework
_LIT(KServerBinaryName,"server"); // The name of the server binary (dll or exe)
#ifdef __WINS__
const TInt KMinServerHeapSize=0x1000;
const TInt KMaxServerHeapSize=0x1000000;
#endif
// Test values - used for checking that IPC handling is correct.
// Normal production code would *not* include these
_LIT8(KNemeanLionDes, "NemeanLion");
const TInt KNemeanLionVal = 1;
const TInt KHydraHeadCount = 9;
const TInt KNoHeads = 0;
const TInt KInitialCount = 0;
const TInt KCapturedCount = 6;
_LIT8(KHercules, "Hercules");
_LIT8(KHeracles, "Heracles");
const TInt KHerculesDataVal = 7;
const TInt KBirdCount = 3;
// End of test values
enum THerculeanLabours
{
ESlayNemeanLion,
ESlayHydra,
ECaptureCeryneianHind,
ESlayErymanthianBoar,
ECleanAugeanStables,
ECancelCleanAugeanStables,
ESlayStymphalianBirds,
ECancelSlayStymphalianBirds,
ECaptureCretanBull,
ECaptureMaresOfDiomedes,
EObtainGirdleOfHippolyta,
ECaptureOxenOfGeryon,
ETakeGoldenApplesOfHesperides,
ECaptureCerberus
};
struct THydraData
{
TVersion iHydraVersion;
TInt iHeadCount;
};
class TServerStart
{
public:
TServerStart() {};
TServerStart(TRequestStatus& aStatus);
TPtrC AsCommand() const;
TInt GetCommand();
void SignalL();
private:
TThreadId iId;
TRequestStatus* iStatus;
};
inline TServerStart::TServerStart(TRequestStatus& aStatus)
:iId(RThread().Id()),iStatus(&aStatus)
{aStatus=KRequestPending;}
// Descriptorizes 抰his