omadrm/drmengine/roap/inc/RoapConnection.h
author William Roberts <williamr@symbian.org>
Wed, 28 Apr 2010 22:11:01 +0100
branchRCL_3
changeset 26 c8580ce65571
parent 18 8a03a285ab14
child 29 3bdc3b853094
permissions -rw-r--r--
Remerge fixes for Bug 2121 and Bug 1993 - Bug 1993 is partially implemented in "Revision: 201015" which has removed the CMLA RnD key exports, so I've stopped creating omadrm/rndcerts/group/bld.inf - The CryptoPrep.flm fix (Bug 2121) is unchanged, as I don't like the latest changes to add the exported file to the "sbs -what" output

/*
* Copyright (c) 2002-2004 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:
*
*/


#ifndef ROAP_CONNECTION_H
#define ROAP_CONNECTION_H

// INCLUDES

#include <e32base.h>
#include <es_sock.h>
#include <commdbconnpref.h>

namespace Roap
{

// CLASS DECLARATION

class CRoapConnection : public CActive
    {
    public:     // Constructors and destructor.

        static CRoapConnection* NewL();

        ~CRoapConnection();

    public:     // new methods

        void ConnectL
            ( TUint32 aIap, TRequestStatus* aStatus );

        void Close();

        TBool IsConnected( TUint32& aIap );

        RSocketServ& SocketServ();

        RConnection& Conn();

    private:

        enum TState
            {
            EInit,
            EConnecting,
            EConnected
            };

    private:    // Constructors and destructor.

        CRoapConnection();

        void ConstructL();

    private:  // from CActive

        virtual void DoCancel();

        virtual void RunL();

        virtual TInt RunError( TInt aError );

    private:    // new methods

        void DoClose();

        void Done();

    private:    // data

        RSocketServ iSocketServ;
        RConnection iConnection;
        TState iState;
        TRequestStatus* iParentStatus;
        TCommDbConnPref iConnPref;
    };
}

#endif /* def CONNECTION_H */