cryptomgmtlibs/securitycommonutils/source/scsserver/panic.cpp
changeset 8 35751d3474b7
equal deleted inserted replaced
2:675a964f4eb5 8:35751d3474b7
       
     1 /*
       
     2 * Copyright (c) 2007-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 the License "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 * Functionality to panick the client when it sends invalid input,
       
    16 * or the server when it detects an invalid state.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 /**
       
    22  @file
       
    23 */
       
    24 
       
    25 
       
    26 #include <scs/scsserver.h>
       
    27 #include "scsserverconstants.h"
       
    28 
       
    29 void PanicClient(const RMessagePtr2& aMessage, ScsImpl::TScsClientPanic aReason)
       
    30 /**
       
    31 	Panic the client which sent the supplied message with
       
    32 	category KScsClientPanicCat and the supplied reason.
       
    33 
       
    34 	@param	aMessage		Client message.
       
    35 	@param	aReason			Why the client will be panicked.
       
    36 	@see KScsClientPanicCat
       
    37  */
       
    38 	{
       
    39 	aMessage.Panic(ScsImpl::KScsClientPanicCat, aReason);
       
    40 	}
       
    41 
       
    42 #ifdef _DEBUG
       
    43 void PanicServer(TServerPanic aReason)
       
    44 /**
       
    45 	Panic the current thread in the server process with category
       
    46 	KServerPanicCat and the supplied reason.
       
    47 
       
    48 	This function is only defined for debug builds.
       
    49 
       
    50 	@param	aReason			Panic reason.
       
    51 	@see KServerPanicCat
       
    52  */
       
    53 	{
       
    54 	User::Panic(KServerPanicCat, aReason);
       
    55 	}
       
    56 #endif	// #ifdef _DEBUG
       
    57