javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/browserconnection.h
branchRCL_3
changeset 14 04becd199f91
equal deleted inserted replaced
13:f5050f1da672 14:04becd199f91
       
     1 /*******************************************************************************
       
     2  * Copyright (c) 2007, 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved. This program and the accompanying materials
       
     4  * are made available under the terms of the Eclipse Public License v1.0
       
     5  * which accompanies this distribution, and is available at
       
     6  * http://www.eclipse.org/legal/epl-v10.html
       
     7  *
       
     8  * Contributors:
       
     9  *     Nokia Corporation - S60 implementation
       
    10  *******************************************************************************/
       
    11 
       
    12 
       
    13 #ifndef BROWSERCONNECTION_H
       
    14 #define BROWSERCONNECTION_H
       
    15 
       
    16 
       
    17 
       
    18 
       
    19 class RSocketServ;
       
    20 class RConnection;
       
    21 
       
    22 
       
    23 /**
       
    24  * MBrowserConnection
       
    25  * This class provides a interface for the eSWT Browser towards a concrete
       
    26  * implementation of a eSWT browser connection manager.
       
    27  * @lib eswt
       
    28  */
       
    29 NONSHARABLE_CLASS(MBrowserConnection)
       
    30 {
       
    31 public:
       
    32     /**
       
    33      * Sets RequestedAP
       
    34      * @param aRequestedAP the requested AP id
       
    35      */
       
    36     virtual void SetRequestedAP(TUint32 aRequestedAPId) = 0;
       
    37 
       
    38     /**
       
    39      * A query function to find out whether there is a connection which
       
    40      * was matches with the "current" connection parameters
       
    41      * @return ETrue if the condition above is satisfied EFalse otherwise.
       
    42      */
       
    43     virtual TBool Connected() = 0;
       
    44 
       
    45     /**
       
    46      * Returns the currently (or the last used) AP id
       
    47      * @return the currently (or the last used) AP id
       
    48      */
       
    49     virtual TUint32 CurrentAPId() const = 0;
       
    50 
       
    51     /**
       
    52      * Call this the get the current bearer to be used
       
    53      * @return the bearer type associated with the current AP
       
    54      */
       
    55     virtual TInt CurrentBearerType() const = 0;
       
    56 
       
    57     /**
       
    58      * Closes the connection and sets the manager to offline mode
       
    59      */
       
    60     virtual void Disconnect() = 0;
       
    61 
       
    62     /**
       
    63      * Starts the connection process
       
    64      * @return a error code
       
    65      */
       
    66     virtual TInt StartConnectionL() = 0;
       
    67 
       
    68     /**
       
    69      * Returns the RConnection object used to create connection.
       
    70      * @return RConnection object
       
    71      */
       
    72     virtual RConnection& Connection() = 0;
       
    73 
       
    74     /**
       
    75      * Return name of the connection created.
       
    76      * Ownership of name is handed over.
       
    77      * @return name of the connection
       
    78      */
       
    79     virtual TName* ConnectionNameL() = 0;
       
    80 
       
    81     /**
       
    82      * Return socket server
       
    83      * @return socket server
       
    84      */
       
    85     virtual RSocketServ& SocketServer() = 0;
       
    86 };
       
    87 
       
    88 #endif // BROWSERCONNECTION_H