telephonyprotocols/psdagt/TS_PsdAgt/PsdDialogServer.cpp
changeset 0 3553901f7fa8
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15  
       
    16 #include "PsdDialogServer.h"
       
    17 
       
    18 CDialogServer::CDialogServer() : CActive(EPriorityStandard)
       
    19 	{
       
    20 	CActiveScheduler::Add(this);
       
    21 	}
       
    22 
       
    23 CDialogServer::~CDialogServer()
       
    24 	{
       
    25 	}
       
    26 
       
    27 TBool CDialogServer::Open()
       
    28 	{
       
    29 	TInt err = iDlgSvr.Connect();
       
    30 	if (err != KErrNone)
       
    31 		return EFalse;
       
    32 	
       
    33 	return ETrue;
       
    34 	}
       
    35 
       
    36 void CDialogServer::Close()
       
    37 	{
       
    38 	Cancel();
       
    39 	iDlgSvr.Close();
       
    40 	}
       
    41 
       
    42 void CDialogServer::RequestDialogAppearanceNotification(MObserver* aObserver)
       
    43 	{
       
    44 	iObserver = aObserver;
       
    45 	iDlgSvr.RequestDialogAppearanceNotification(iStatus);
       
    46 	SetActive();
       
    47 	}
       
    48 
       
    49 void CDialogServer::SetReconnectResponse(TBool aResponse)
       
    50 	{
       
    51 	iDlgSvr.SetReconnectDialogResponse(aResponse);
       
    52 	}
       
    53 
       
    54 void CDialogServer::SetQoSWarnResponse(TBool aResponse)
       
    55 	{
       
    56 	iDlgSvr.SetQoSWarnDialogResponse(aResponse);
       
    57 	}
       
    58 
       
    59 void CDialogServer::RunL()
       
    60 	{
       
    61 	iObserver->DialogHasAppeared();
       
    62 	}
       
    63 
       
    64 void CDialogServer::DoCancel()
       
    65 	{
       
    66 	iDlgSvr.CancelDialogAppearanceNotification();
       
    67 	}