sdkcreationmw/sdkruntimes/wsock/inc/WinsockProtocolFamily.h
author rajpuroh
Wed, 21 Apr 2010 09:56:53 +0530
changeset 1 ac50fd48361b
parent 0 b26acd06ea60
permissions -rw-r--r--
Second Contribution
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     1
/*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     2
* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies).
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     3
* All rights reserved.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     4
* This component and the accompanying materials are made available
1
ac50fd48361b Second Contribution
rajpuroh
parents: 0
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
0
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     6
* which accompanies this distribution, and is available
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     8
*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     9
* Initial Contributors:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    11
*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    12
* Contributors:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    13
*
1
ac50fd48361b Second Contribution
rajpuroh
parents: 0
diff changeset
    14
* Description:
0
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    15
*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    16
*/
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    17
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    18
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    19
#ifndef _WSOCK_PROTOCOL_FAMILY_H_
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    20
#define _WSOCK_PROTOCOL_FAMILY_H_
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    21
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    22
#include <in_sock.h>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    23
#include <es_prot.h>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    24
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    25
struct TServerProtocolDesc;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    26
struct TWinProtocolDesc: public TServerProtocolDesc
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    27
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    28
	TUint iWinSockType;     // SOCK_STREAM, SOCK_DGRAM, SOCK_RAW
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    29
	TUint iWinProtocol;     // IPPROTO_TCP, IPPROTO_UDP, IPPROTO_ICMP
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    30
};
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    31
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    32
class CWinsockProtocolFamily : public CProtocolFamilyBase
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    33
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    34
private:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    35
    TUint iAddrFamily;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    36
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    37
public:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    38
    CWinsockProtocolFamily(TUint aAddrFamily = KAfInet);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    39
    virtual ~CWinsockProtocolFamily();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    40
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    41
    // Access to the list of protocols
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    42
    static TInt ProtocolCount();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    43
    static void ProtocolNames(TDes& aNetworks);
1
ac50fd48361b Second Contribution
rajpuroh
parents: 0
diff changeset
    44
    static void ProtocolNamesfownetwork(TDes& aNetworks);
0
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    45
    static const TServerProtocolDesc* ProtocolDesc(TInt aIndex);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    46
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    47
    // CProtocolFamilyBase
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    48
    virtual TInt Install();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    49
    virtual TUint ProtocolList(TServerProtocolDesc *& aProtocolList);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    50
    virtual CProtocolBase* NewProtocolL(TUint aSockType, TUint aProtocol);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    51
};
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    52
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    53
#endif // _WSOCK_PROTOCOL_FAMILY_H_