sl@0: /* sl@0: * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * Functionality to panick the client when it sends invalid input, sl@0: * or the server when it detects an invalid state. sl@0: * sl@0: */ sl@0: sl@0: sl@0: /** sl@0: @file sl@0: */ sl@0: sl@0: sl@0: #include sl@0: #include "scsserverconstants.h" sl@0: sl@0: void PanicClient(const RMessagePtr2& aMessage, ScsImpl::TScsClientPanic aReason) sl@0: /** sl@0: Panic the client which sent the supplied message with sl@0: category KScsClientPanicCat and the supplied reason. sl@0: sl@0: @param aMessage Client message. sl@0: @param aReason Why the client will be panicked. sl@0: @see KScsClientPanicCat sl@0: */ sl@0: { sl@0: aMessage.Panic(ScsImpl::KScsClientPanicCat, aReason); sl@0: } sl@0: sl@0: #ifdef _DEBUG sl@0: void PanicServer(TServerPanic aReason) sl@0: /** sl@0: Panic the current thread in the server process with category sl@0: KServerPanicCat and the supplied reason. sl@0: sl@0: This function is only defined for debug builds. sl@0: sl@0: @param aReason Panic reason. sl@0: @see KServerPanicCat sl@0: */ sl@0: { sl@0: User::Panic(KServerPanicCat, aReason); sl@0: } sl@0: #endif // #ifdef _DEBUG sl@0: