defaultapplicationsettings/server/src/das_server.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 19 Aug 2010 09:55:50 +0300
branchRCL_3
changeset 12 3fec62e6e7fc
parent 0 254040eb3b7d
permissions -rw-r--r--
Revision: 201029 Kit: 201033
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0""
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
*
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
*
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
* Contributors:
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
*
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
* Description:  Implementation of the server class
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    15
*
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
*/
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    20
#include <eikstart.h>  //for RDebug
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    21
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    22
#include "das_server.h"
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    23
#include "das_service.h"
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    24
#include "das_app.h"
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    25
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
const TUid KDefaultAppServiceUid = { 0x10281B9D };
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    28
// ======== MEMBER FUNCTIONS ========
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
// ---------------------------------------------------------------------------
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    31
// Symbian 2-phased constructor
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    32
// ---------------------------------------------------------------------------
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    33
//
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    34
CDefaultAppServer* CDefaultAppServer::NewL(CDefaultAppApplication* aApp)
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    35
    {
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    36
    CDefaultAppServer* self = new (ELeave) CDefaultAppServer(aApp);
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    37
    return self;
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    38
    }
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    39
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    40
// ---------------------------------------------------------------------------
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    41
// Default constructor
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    42
// ---------------------------------------------------------------------------
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    43
//
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    44
CDefaultAppServer::CDefaultAppServer(CDefaultAppApplication* aApp) : iApp(aApp)
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    45
    {
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    46
    }
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    47
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    48
// ---------------------------------------------------------------------------
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    49
// From class CAknAppServer.
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    50
// Creates a service for the specified service Uid
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    51
// ---------------------------------------------------------------------------
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    52
//
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    53
CApaAppServiceBase* CDefaultAppServer::CreateServiceL(TUid aServiceType) const
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    54
    {
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    55
    RDebug::Print(_L("CDefaultAppServer::CreateServiceL"));
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    56
    if (aServiceType == KDefaultAppServiceUid)
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    57
        return CDefaultAppService::NewL(this);
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    58
    else
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    59
        return CAknAppServer::CreateServiceL(aServiceType);
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    60
    }
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    61
        
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    62
254040eb3b7d Revision: 200947
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    63
//  End of File