eapol/eapol_framework/eapol_symbian/am/include/EapMessageQueue.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 31 Aug 2010 15:16:37 +0300
branchRCL_3
changeset 18 bad0cc58d154
permissions -rw-r--r--
Revision: 201029 Kit: 201035

/*
* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "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:  EAP and WLAN authentication protocols.
*
*/

/*
* %version:  5 %
*/

#ifndef EAPMESSAGEQUEU_H_
#define EAPMESSAGEQUEU_H_

#include "EapServerClientDef.h"
#include "abs_eap_am_tools.h"
#include "eap_am_export.h"

class EAP_EXPORT EapMessageBuffer
{
public:

	EAP_FUNC_IMPORT EapMessageBuffer(abs_eap_am_tools_c * const tools);

	EAP_FUNC_IMPORT virtual ~EapMessageBuffer();

	EAP_FUNC_IMPORT TInt CopyData(TEapRequests type, const void * const data, const TUint length);

	EAP_FUNC_IMPORT HBufC8 * GetData() const;

	EAP_FUNC_IMPORT TEapRequests GetRequestType() const;

private:

	abs_eap_am_tools_c * const iTools;

	TEapRequests iRequestType;

	HBufC8 * iData;

};

    
class EAP_EXPORT EapMessageQueue
{
public:

	EAP_FUNC_IMPORT EapMessageQueue(abs_eap_am_tools_c * const tools);

	EAP_FUNC_IMPORT virtual ~EapMessageQueue();

	EAP_FUNC_IMPORT TInt AddMessage(TEapRequests type, const void * const data, const TUint length);

	EAP_FUNC_IMPORT EapMessageBuffer * GetFirstMessage();

	EAP_FUNC_IMPORT TInt DeleteFirstMessage();

private:

	abs_eap_am_tools_c * const iTools;

	RArray<EapMessageBuffer *> iEapMessageQueue;

};
    
#endif /* EAPMESSAGEQUEU_H_ */