49
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: BootEventProviderMessages
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef SETTINGSCHANGEEVENTSPROVIDERMESSAGES_H
|
|
19 |
#define SETTINGSCHANGEEVENTSPROVIDERMESSAGES_H
|
|
20 |
|
|
21 |
#include "commsmessage.h"
|
|
22 |
#include "logger.h"
|
|
23 |
|
|
24 |
namespace java
|
|
25 |
{
|
|
26 |
namespace captain
|
|
27 |
{
|
|
28 |
|
|
29 |
using namespace java::util;
|
|
30 |
using namespace java::comms;
|
|
31 |
|
|
32 |
const int SETTINGS_CHANGE_EVENT_MESSAGE_ID_C = 1;
|
|
33 |
|
|
34 |
const char* const SETTINGS_CHANGE_EVENT_PROVIDER = "settingslistener";
|
|
35 |
|
|
36 |
typedef enum
|
|
37 |
{
|
|
38 |
UNDEFINED_CHANGE = 0x00,
|
|
39 |
MIDP_CLASS_PATH_CHANGE = 0x01,
|
|
40 |
|
|
41 |
} SettingsChangeEventType_t;
|
|
42 |
|
|
43 |
|
|
44 |
inline void setSettingsChangeEventMessageParams(CommsMessage& aMessage,
|
|
45 |
const int& aChangeEventType)
|
|
46 |
{
|
|
47 |
aMessage.setMessageId(SETTINGS_CHANGE_EVENT_MESSAGE_ID_C);
|
|
48 |
aMessage << aChangeEventType;
|
|
49 |
}
|
|
50 |
|
|
51 |
inline void getSettingsChangeEventMessageParams(CommsMessage& aMessage,
|
|
52 |
int& aChangeEventType)
|
|
53 |
{
|
|
54 |
if (aMessage.getMessageId() == SETTINGS_CHANGE_EVENT_MESSAGE_ID_C)
|
|
55 |
{
|
|
56 |
aMessage >> aChangeEventType;
|
|
57 |
}
|
|
58 |
else
|
|
59 |
{
|
|
60 |
ELOG2(EJavaCaptain, "Received Settings Change Event with wrong MessageId!: %d should be %d",
|
|
61 |
aMessage.getMessageId(), SETTINGS_CHANGE_EVENT_MESSAGE_ID_C);
|
|
62 |
aChangeEventType = 0;
|
|
63 |
}
|
|
64 |
}
|
|
65 |
|
|
66 |
} // namespace captain
|
|
67 |
} // namespace java
|
|
68 |
|
|
69 |
#endif // SETTINGSCHANGEEVENTSPROVIDERMESSAGES_H
|