mmserv/sts/stsserver/src/stsserver.h
branchRCL_3
changeset 19 095bea5f582e
equal deleted inserted replaced
18:a36789189b53 19:095bea5f582e
       
     1 /*
       
     2  * Copyright (c) 2010 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 "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  * This file defines the interface into the STS server.
       
    16  */
       
    17 #ifndef STSSERVER_H_
       
    18 #define STSSERVER_H_
       
    19 
       
    20 #include <e32base.h>
       
    21 #include <systemtoneservice.h>
       
    22 
       
    23 class CSts;
       
    24 class CStsServerSession;
       
    25 
       
    26 class CStsServer : private CPolicyServer
       
    27     {
       
    28 public:
       
    29 
       
    30     // Runs the server on the current thread, and blocks until the server exits.
       
    31     IMPORT_C static void RunServerL();
       
    32 
       
    33     void AddSession(CStsServerSession* aSession);
       
    34 
       
    35     void DropSession(CStsServerSession* aSession);
       
    36 
       
    37 private:
       
    38 
       
    39     static CStsServer* NewLC();
       
    40 
       
    41     CStsServer();
       
    42     void ConstructL();
       
    43     virtual ~CStsServer();
       
    44 
       
    45     CPolicyServer::TCustomResult SecurityCheckAlarm(
       
    46             CSystemToneService::TAlarmType aAlarm, const RMessage2& aMsg,
       
    47             TSecurityInfo& aMissing);
       
    48 
       
    49     CPolicyServer::TCustomResult SecurityCheckTone(
       
    50             CSystemToneService::TToneType aTone, const RMessage2& aMsg,
       
    51             TSecurityInfo& aMissing);
       
    52 
       
    53     // inherited from CPolicyServer    
       
    54     virtual CPolicyServer::TCustomResult CustomSecurityCheckL(
       
    55             const RMessage2& aMsg, TInt& aAction, TSecurityInfo& aMissing);
       
    56     CSession2* NewSessionL(const TVersion& aVersion,
       
    57             const RMessage2& aMessage) const;
       
    58 
       
    59     RPointerArray<CStsServerSession> iSessions;
       
    60     CSts* iSts;
       
    61 
       
    62     };
       
    63 
       
    64 #endif //STSSERVER_H_