1.1 --- a/epoc32/include/irheader.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,136 +0,0 @@
1.4 -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 -// All rights reserved.
1.6 -// This component and the accompanying materials are made available
1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 -// which accompanies this distribution, and is available
1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 -//
1.11 -// Initial Contributors:
1.12 -// Nokia Corporation - initial contribution.
1.13 -//
1.14 -// Contributors:
1.15 -//
1.16 -// Description:
1.17 -// $Workfile: irHeader.h $
1.18 -// $Author: Stevep $
1.19 -// $Revision: 4 $
1.20 -// $Date: 9/11/01 15:29 $
1.21 -//
1.22 -//
1.23 -
1.24 -
1.25 -#if !defined (__IRHEADER_H__)
1.26 -#define __IRHEADER_H__
1.27 -
1.28 -
1.29 -#include <e32std.h>
1.30 -#include <obexheader.h> //CObexMtmHeader
1.31 -#include <obex.h> //TObexIrProtocolInfo
1.32 -
1.33 -class CMsvStore;
1.34 -class RMsvReadStream;
1.35 -class RMsvWriteStream;
1.36 -
1.37 -
1.38 -// Stream version -- increment by one each time the externalized data format changes
1.39 -// for a significant release.
1.40 -const TInt32 KIrMessageStreamVersion = 1;///<Stream version
1.41 -const TUid KUidStreamIrHeaders = {0x1000AABD}; ///< Stream UID for the CIrHeaders object
1.42 -_LIT(KIrTransport, "IrTinyTP");
1.43 -_LIT8(KIrObexClassName, "OBEX");
1.44 -_LIT8(KIrXferClassName, "OBEX:IrXfer");
1.45 -_LIT8(KIrObexAttributeName, "IrDA:TinyTP:LsapSel");
1.46 -
1.47 -class CIrHeader : public CObexMtmHeader
1.48 -/**
1.49 -Base class for OBEX object headers. Allows them to be stored and restored to and from the
1.50 -CMsvStore.
1.51 -
1.52 -@internalTechnology
1.53 -@released
1.54 -*/
1.55 - {
1.56 -public:
1.57 -
1.58 - /**
1.59 - * Destructor. Empty
1.60 - */
1.61 -
1.62 - IMPORT_C ~CIrHeader();
1.63 -
1.64 - /**
1.65 - * Second-phase constructor. Calls BaseConstructL to initialise the base members
1.66 - */
1.67 -
1.68 - IMPORT_C void ConstructL();
1.69 -
1.70 - /**
1.71 - * Canonical NewL factory function
1.72 - */
1.73 -
1.74 - IMPORT_C static CIrHeader* NewL();
1.75 -
1.76 - //Setters/Getters
1.77 -
1.78 - /**
1.79 - * Get the IR protocol info of the recipient
1.80 - *
1.81 - * @return The protocol info of the recipient (NB: only one recipient is currently supported)
1.82 - */
1.83 -
1.84 - IMPORT_C virtual const TObexIrProtocolInfo& IrProtocolInfo() const;
1.85 -
1.86 - /**
1.87 - * Get the IR address of the recipient
1.88 - *
1.89 - * @return The address of the recipient (NB: only one recipient is currently supported)
1.90 - */
1.91 -
1.92 - IMPORT_C virtual TPtrC8 Addr() const;
1.93 -
1.94 - /**
1.95 - * Set the IR address of the recipient
1.96 - *
1.97 - * @param aAddr the address of the recipient (NB: only one recipient is currently supported)
1.98 - * @leave KErrXXX system-wide leave codes if assignment fails
1.99 - */
1.100 -
1.101 - IMPORT_C virtual void SetAddrL(const TDesC8& aAddr);
1.102 -
1.103 - //Called by Store/Restore--must be implelented in the base class, and must call
1.104 - //BaseExternalizeL/BaseInternaliseL first
1.105 -
1.106 - /**
1.107 - * Internaliser. Reads data in from aReadStream. Calls BaseInternalizeL() to read in the base
1.108 - * data first.
1.109 - *
1.110 - * @param aReadStream Stream to read data in from
1.111 - * @leave KErrXXX Standard EPOC stream leave codes
1.112 - */
1.113 -
1.114 - IMPORT_C virtual void InternalizeL(RMsvReadStream& aReadStream);
1.115 -
1.116 - /**
1.117 - * Externaliser. Writes data out to aWriteStream. Calls BaseExternalizeL() to write out
1.118 - * the base data first.
1.119 - *
1.120 - * @param aWriteStream Stream to write data to
1.121 - * @leave KErrXXX Standard SymbianOS stream leave codes
1.122 - */
1.123 -
1.124 - IMPORT_C virtual void ExternalizeL(RMsvWriteStream& aWriteStream) const;
1.125 -
1.126 -private:
1.127 -
1.128 - /**
1.129 - * Default constructor, initialises the base class and sets the value of iIrProtocolInfo.iTransport
1.130 - * as appropriate for IR
1.131 - */
1.132 -
1.133 - CIrHeader();
1.134 -
1.135 -private:
1.136 - TObexIrProtocolInfo iIrProtocolInfo; ///< Protocol info to initialise the CObexClient. Non-const because the CObexClient's NewL() takes a non-const reference
1.137 - };
1.138 -
1.139 -#endif //!defined (__IRHEADER_H__)