connectivity/com.nokia.tcf/native/TCFNative/TCFProtOST/TCFProtOST.cpp
author cawthron
Fri, 15 Jan 2010 11:19:08 -0600
branchRCL_2_4
changeset 768 774b5f74e4ed
parent 60 9d2210c8eed2
permissions -rw-r--r--
add release notes about WINSCW compiler 3.2.5 build 487
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
60
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
     1
/*
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
     3
* All rights reserved.
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
     4
* This component and the accompanying materials are made available
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
     6
* which accompanies this distribution, and is available
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
     8
*
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
     9
* Initial Contributors:
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    11
*
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    12
* Contributors:
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    13
*
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    14
* Description: 
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    15
*
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    16
*/
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    17
// TCFProtOST.cpp : Defines the entry point for the DLL application.
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    18
//
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    19
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    20
#include "stdafx.h"
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    21
#include "TCFProtOST.h"
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    22
#include "OSTProtocol.h"
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    23
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    24
static const char* pProtocol="ost";
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    25
static COSTProtocol* pProtocolClass=NULL;
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    26
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    27
BOOL APIENTRY DllMain( HANDLE hModule, 
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    28
                       DWORD  ul_reason_for_call, 
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    29
                       LPVOID lpReserved
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    30
					 )
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    31
{
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    32
    switch (ul_reason_for_call)
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    33
	{
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    34
		case DLL_PROCESS_ATTACH:
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    35
		case DLL_THREAD_ATTACH:
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    36
		case DLL_THREAD_DETACH:
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    37
		case DLL_PROCESS_DETACH:
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    38
			break;
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    39
    }
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    40
    return TRUE;
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    41
}
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    42
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    43
TCFPROTOST_API const char* RegisterProtocol()
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    44
{
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    45
	return pProtocol;
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    46
}
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    47
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    48
TCFPROTOST_API CBaseProtocol* CreateProtocol()
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    49
{
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    50
	pProtocolClass = new COSTProtocol();
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    51
	return pProtocolClass;
9d2210c8eed2 Commit changes for 2.1.0
chpeckha
parents:
diff changeset
    52
}