sdkcreationmw/sdkruntimes/wsock/inc/WinsockProtocolFamily.h
changeset 0 b26acd06ea60
child 1 ac50fd48361b
equal deleted inserted replaced
-1:000000000000 0:b26acd06ea60
       
     1 /*
       
     2 * Copyright (c) 2004-2005 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 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _WSOCK_PROTOCOL_FAMILY_H_
       
    20 #define _WSOCK_PROTOCOL_FAMILY_H_
       
    21 
       
    22 #include <in_sock.h>
       
    23 #include <es_prot.h>
       
    24 
       
    25 struct TServerProtocolDesc;
       
    26 struct TWinProtocolDesc: public TServerProtocolDesc
       
    27 {
       
    28 	TUint iWinSockType;     // SOCK_STREAM, SOCK_DGRAM, SOCK_RAW
       
    29 	TUint iWinProtocol;     // IPPROTO_TCP, IPPROTO_UDP, IPPROTO_ICMP
       
    30 };
       
    31 
       
    32 class CWinsockProtocolFamily : public CProtocolFamilyBase
       
    33 {
       
    34 private:
       
    35     TUint iAddrFamily;
       
    36 
       
    37 public:
       
    38     CWinsockProtocolFamily(TUint aAddrFamily = KAfInet);
       
    39     virtual ~CWinsockProtocolFamily();
       
    40 
       
    41     // Access to the list of protocols
       
    42     static TInt ProtocolCount();
       
    43     static void ProtocolNames(TDes& aNetworks);
       
    44     static const TServerProtocolDesc* ProtocolDesc(TInt aIndex);
       
    45 
       
    46     // CProtocolFamilyBase
       
    47     virtual TInt Install();
       
    48     virtual TUint ProtocolList(TServerProtocolDesc *& aProtocolList);
       
    49     virtual CProtocolBase* NewProtocolL(TUint aSockType, TUint aProtocol);
       
    50 };
       
    51 
       
    52 #endif // _WSOCK_PROTOCOL_FAMILY_H_