realtimenetprots/sipfw/SIP/ConnectionMgr/inc/CSocketOpt.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Name        : CSocketOpt.h
       
    16 * Part of     : ConnectionMgr
       
    17 * See class definition below.
       
    18 * Version     : SIP/4.0
       
    19 *
       
    20 */
       
    21 
       
    22 
       
    23 
       
    24 #ifndef __CSOCKETOPT_H__
       
    25 
       
    26 /**
       
    27 * @internalComponent
       
    28 */
       
    29 #define __CSOCKETOPT_H__
       
    30   
       
    31 // INCLUDES
       
    32 #include <e32base.h>
       
    33 #include <es_sock.h>
       
    34   
       
    35 class CSocketOpt : public CBase
       
    36     {
       
    37 public: // Constructor and destructor
       
    38     
       
    39     static CSocketOpt* NewLC( TUint aOptionName,
       
    40                               TUint aOptionLevel,
       
    41                               TInt aOption );
       
    42     
       
    43     static CSocketOpt* NewLC( TUint aOptionName,
       
    44                               TUint aOptionLevel,
       
    45                               const TDesC8& aOption );    
       
    46     ~CSocketOpt();
       
    47     
       
    48 private: // Private contruction
       
    49 
       
    50     void ConstructL( const TDesC8& aOption = KNullDesC8 );
       
    51     
       
    52     CSocketOpt( TUint aOptionName,
       
    53                 TUint aOptionLevel,
       
    54                 TInt aOption = 0 );
       
    55     
       
    56 public: // Public methods
       
    57       
       
    58     TUint OptionName() const;
       
    59     
       
    60     /**
       
    61     * Sets socket options 
       
    62     */
       
    63     CSocketOpt* SetOptL( RSocket& aSocket );
       
    64 
       
    65     
       
    66 private: // Data
       
    67     
       
    68     TUint iOptionName;
       
    69     
       
    70     TUint iOptionLevel;
       
    71     
       
    72     TInt iOption;
       
    73     
       
    74     HBufC8* iOptionBuf;
       
    75     
       
    76 private: // For unit testing
       
    77 #ifdef CPPUNIT_TEST
       
    78     friend class COwnerSettingsListTest;
       
    79 #endif
       
    80     };
       
    81     
       
    82 #endif // __CSOCKETOPT_H__