diff -r e5618cc85d74 -r 6c158198356e javamanager/javacaptain/extensionplugins/preinstallerstarter/inc/preinstallerstartermessages.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/javamanager/javacaptain/extensionplugins/preinstallerstarter/inc/preinstallerstartermessages.h Thu Aug 19 09:48:13 2010 +0300 @@ -0,0 +1,62 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: PreinstallerStarterMessages +* +*/ + +#ifndef PREINSTALLERSTARTERMESSAGES_H +#define PREINSTALLERSTARTERMESSAGES_H + +#include "logger.h" +#include "commsmessage.h" + +namespace java +{ +namespace captain +{ + +using namespace java::util; +using namespace java::comms; + +// This event is sent when preinstaller process has exited +const int PREINSTALLER_EVENT_MESSAGE_ID_EXITED_C = 30; + +const char PREINSTALLER_EVENT_PROVIDER[] = "preinstaller"; + + +inline void setPreinstallerExitedMessageParams(CommsMessage& aMessage, const int& aExitStatus) +{ + aMessage.setMessageId(PREINSTALLER_EVENT_MESSAGE_ID_EXITED_C); + aMessage << aExitStatus; +} + +inline void getPreinstallerExitedMessageParams(CommsMessage& aMessage, int& aExitStatus) +{ + if (aMessage.getMessageId() == PREINSTALLER_EVENT_MESSAGE_ID_EXITED_C) + { + aMessage >> aExitStatus; + } + else + { + ELOG2(EJavaCaptain, "wrong MessageId!: %d should be %d", + aMessage.getMessageId(), PREINSTALLER_EVENT_MESSAGE_ID_EXITED_C); + aExitStatus = 0; + } +} + + +} // namespace captain +} // namespace java + +#endif // PREINSTALLERSTARTERMESSAGES_H