networkcontrol/pfqoslib/inc/pfqos_stream.h
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 
       
    18 /**
       
    19  @internalComponent
       
    20 */
       
    21 #ifndef __PFQOS_STREAM_H__
       
    22 #define __PFQOS_STREAM_H__
       
    23 
       
    24 #include <in_sock.h>
       
    25 
       
    26 #include <comms-infras/eintsock.h>
       
    27 
       
    28 #include <networking/pfqos.h>
       
    29 #include "qosparameters.h"
       
    30 
       
    31 
       
    32 // Build a byte stream message to be sent to PF_QOS socket.
       
    33 class CPfqosStream : public CBase
       
    34 {
       
    35 public:
       
    36 	static IMPORT_C CPfqosStream* NewL(TUint aBufSize);
       
    37 	IMPORT_C ~CPfqosStream();
       
    38     
       
    39 	IMPORT_C void Init(TUint8 aMsgType, TUint32 aSeq=0);
       
    40 	IMPORT_C void AddSelector(TUint8 aProtocol, const TUidType& aUid, TUint32 aPolicyType, TUint32 aIapId, TUint32 aPriority, const TDesC& aName);
       
    41 	IMPORT_C void AddChannel(TUint32 aChannelId);
       
    42 	IMPORT_C void AddConfigFile(const TDesC& aName);
       
    43 	IMPORT_C void AddQoSParameters(const TQoSParameters& aParameters);
       
    44 	IMPORT_C void AddModulespec(TUint32 aProtocolId, TUint32 aFlags, const TDesC& aModuleName, const TDesC& aFileName, const TDesC8& aConfigData);
       
    45 	IMPORT_C void AddExtensionPolicy(TDesC8 &aData);
       
    46 	IMPORT_C void AddExtensionHeader(TUint16 aExtension);
       
    47 	IMPORT_C void AddSrcAddress(const TInetAddr &anAddr, const TInetAddr &aMask, TUint16 aPortMax);
       
    48 	IMPORT_C void AddDstAddress(const TInetAddr &anAddr, const TInetAddr &aMask, TUint16 aPortMax);    
       
    49 	IMPORT_C TInt Send(RSocket &aSocket);    
       
    50 	IMPORT_C void Send(RSocket &aSocket, TRequestStatus& aStatus);
       
    51 
       
    52 	IMPORT_C TInt Send(RInternalSocket &aSocket);    
       
    53 	IMPORT_C void Send(RInternalSocket &aSocket, TRequestStatus& aStatus);
       
    54     
       
    55 protected:
       
    56 
       
    57 	IMPORT_C CPfqosStream();
       
    58 	IMPORT_C void ConstructL(TUint aBufSize);
       
    59 	IMPORT_C void AddAddress(const TInetAddr &anAddr, const TInetAddr &aMask, TUint8 aType, TUint16 aPortMax);
       
    60     
       
    61 protected:
       
    62 	TUint16 iLength;
       
    63 	TPtr8 iSendBuf;
       
    64 	HBufC8* iBuf;
       
    65 };
       
    66 
       
    67 #endif