pimprotocols/pbap/server/pbapfoldertelecom.cpp
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 // Copyright (c) 2006-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 "pbapfolderclient.h"
       
    17 #include "pbapappheader.h"
       
    18 #include "pbapfoldertree.h"
       
    19 #include "pbapfoldertelecom.h"
       
    20 #include "btaccesshostlog.h"
       
    21 
       
    22 // constants
       
    23 _LIT(KFolderTelecom, "telecom");
       
    24 
       
    25 
       
    26 /*static*/CFolderTelecom* CFolderTelecom::NewL(MVirtualFolderClient& aClient)
       
    27 	{
       
    28 	LOG_STATIC_FUNC
       
    29 	return new (ELeave) CFolderTelecom(aClient);
       
    30 	}
       
    31 
       
    32 
       
    33 CFolderTelecom::CFolderTelecom(MVirtualFolderClient& aClient)
       
    34 : CFolderBase(aClient, KFolderTelecom())
       
    35 	{
       
    36 	LOG_FUNC
       
    37 	}
       
    38 
       
    39 	
       
    40 /**
       
    41 Handle get request from server.
       
    42 The file representations of the phonebooks (i.e. pb.vcf,
       
    43  ich.vcf, mch.vcf, och.vcf and cch.vcf) are stored in the telecom folder
       
    44 However for simplicity (and less code duplication) valid get requests on
       
    45 these files have been converted into get requests on their corresponding
       
    46 folder representations 
       
    47 */
       
    48 TInt CFolderTelecom::Get(const TDesC& /*aObjectName*/, CPbapAppHeader* aGetData)
       
    49 	{
       
    50 	LOG_FUNC
       
    51 
       
    52 	TInt error = KErrNotReady;
       
    53 	
       
    54 	// pull vcard not allowed from telecom folder 
       
    55 	if (aGetData->Operation() == EPullVCard)
       
    56 		{
       
    57 		error = KErrNotSupported;
       
    58 		}
       
    59 
       
    60 	// we need to take ownership of aGetData but don't require it
       
    61 	delete aGetData;
       
    62 
       
    63 	return error;
       
    64 	}
       
    65 
       
    66 
       
    67 void CFolderTelecom::CancelGet()
       
    68 	{
       
    69 	LOG_FUNC
       
    70 	// do nothing
       
    71 	}
       
    72 
       
    73 void CFolderTelecom::GetComplete()
       
    74 	{
       
    75 	LOG_FUNC
       
    76 	// do nothing
       
    77 	}