cbsref/telephonyrefplugins/atltsy/handler/src/cltsyphonebookhandler.cpp
author hgs
Tue, 22 Jun 2010 11:02:32 +0100
changeset 44 8b72faa1200f
permissions -rw-r--r--
201024_02
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     1
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     2
// All rights reserved.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     3
// This component and the accompanying materials are made available
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     5
// which accompanies this distribution, and is available
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     7
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     8
// Initial Contributors:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    10
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    11
// Contributors:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    12
//
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    13
// Description:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    14
// CLtsyPhonebookHandler
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    15
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    16
#include <ctsy/ltsy/cctsydispatchercallback.h>
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    17
#include <mmtsy_ipcdefs.h>
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    18
#include <mpbutil.h>
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    19
#include <etelmm.h>
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    20
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    21
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    22
#include "cltsyphonebookhandler.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    23
#include <ctsy/ltsy/ltsylogger.h>
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    24
#include "ltsymacros.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    25
#include "globalphonemanager.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    26
#include "atsmsstoreinfo.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    27
#include "atsmsstorewrite.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    28
#include "atsmsstoreread.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    29
#include "atsmsstoredelete.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    30
#include "atsmsstorereadall.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    31
#include "atphbkgetphonestoreinfo.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    32
#include "atphbkstoreinitialise.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    33
#include "atphbkstorewrite.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    34
#include "atphbkstoreread.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    35
#include "atphbkstorecache.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    36
#include "atphbkstoredelete.h"
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    37
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    38
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    39
CLtsyPhonebookHandler::CLtsyPhonebookHandler(
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    40
	CCtsyDispatcherCallback& aCtsyDispatcherCallback,CGlobalPhonemanager* aGloblePhone)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    41
    :iCtsyDispatcherCallback(aCtsyDispatcherCallback),iGloblePhone(aGloblePhone)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    42
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    43
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    44
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    45
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    46
CLtsyPhonebookHandler::~CLtsyPhonebookHandler()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    47
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    48
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    49
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    50
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    51
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    52
CLtsyPhonebookHandler* CLtsyPhonebookHandler::NewLC(
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    53
	CCtsyDispatcherCallback& aCtsyDispatcherCallback,CGlobalPhonemanager* aGloblePhone)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    54
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    55
	TSYLOGENTRYEXIT;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    56
	CLtsyPhonebookHandler* self = new (ELeave) CLtsyPhonebookHandler(aCtsyDispatcherCallback,aGloblePhone);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    57
	CleanupStack::PushL(self);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    58
	self->ConstructL();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    59
	return self;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    60
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    61
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    62
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    63
CLtsyPhonebookHandler* CLtsyPhonebookHandler::NewL(CCtsyDispatcherCallback& aCtsyDispatcherCallback,CGlobalPhonemanager* aGloblePhone)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    64
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    65
	TSYLOGENTRYEXIT;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    66
	CLtsyPhonebookHandler* self=
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    67
			CLtsyPhonebookHandler::NewLC(aCtsyDispatcherCallback,aGloblePhone);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    68
	CleanupStack::Pop(self);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    69
	return self;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    70
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    71
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    72
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    73
void CLtsyPhonebookHandler::ConstructL()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    74
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    75
 * Second phase constructor.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    76
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    77
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    78
	TSYLOGENTRYEXIT;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    79
	} // CLtsyPhonebookHandler::ConstructL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    80
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    81
TBool CLtsyPhonebookHandler::IsInterfaceSupported(TLtsyDispatchInterfaceApiId aDispatchApiId)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    82
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    83
 * Returns whether a Dispatch Interface APi is supported or not.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    84
 * 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    85
 * @param aDispatchApiId Id of Dispatch interface being queried.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    86
 * @return indication whether interface is supported or not.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    87
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    88
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    89
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    90
	switch(aDispatchApiId)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    91
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    92
		case KLtsyDispatchPhonebookStoreReadEntryApiId: 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    93
			return ETrue;	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    94
		case KLtsyDispatchPhonebookStoreDeleteEntryApiId: 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    95
		 	return ETrue;	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    96
		case KLtsyDispatchPhonebookStoreCacheApiId: 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    97
			return ETrue;	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    98
		case KLtsyDispatchPhonebookStoreCacheCancelApiId: 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
    99
			return ETrue;		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   100
//		case KLtsyDispatchPhonebookStoreGetPhonebookInfoApiId: 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   101
//			return ETrue;	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   102
		case KLtsyDispatchPhonebookStoreInitialiseApiId: 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   103
			return ETrue;			
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   104
		case KLtsyDispatchPhonebookStoreDeleteAllApiId: 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   105
			return ETrue;	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   106
		case KLtsyDispatchPhonebookStoreWriteEntryApiId: 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   107
			return ETrue;	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   108
		case KLtsyDispatchPhonebookGetPhoneStoreInfoApiId: 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   109
			return ETrue;		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   110
		case KLtsyDispatchPhonebookSmsStoreReadAllApiId: 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   111
			return ETrue;	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   112
		case KLtsyDispatchPhonebookSmsStoreDeleteEntryApiId: 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   113
			return ETrue;	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   114
		case KLtsyDispatchPhonebookSmsStoreDeleteAllApiId: 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   115
			return ETrue;	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   116
		case KLtsyDispatchPhonebookSmsStoreGetInfoApiId: 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   117
			return ETrue;	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   118
		case KLtsyDispatchPhonebookSmsStoreReadEntryApiId: 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   119
			return ETrue;		
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   120
		case KLtsyDispatchPhonebookSmsStoreWriteEntryApiId: 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   121
			return ETrue;	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   122
		default:
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   123
			return EFalse;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   124
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   125
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   126
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   127
void CLtsyPhonebookHandler::IsCallbackIndicatorSupported(TLtsyDispatchIndIdGroup /*aIdGroup*/, TUint32& /*aIndIdBitMask*/)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   128
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   129
 * Returns the set of callback indicators that are supported.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   130
 * 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   131
* @param aIdGroup ID of group that is being queried e.g. aIdGroup=EIndIdGroup1.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   132
* @param aIndIdBitMask [out] argument that should return a bitmask indicating which indicator callbacks are supported.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   133
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   134
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   135
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   136
	//Create bitmask with bitset for each indicator ID that is supported. E.g.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   137
	}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   138
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   139
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   140
TInt CLtsyPhonebookHandler::HandleStoreReadEntryReqL(DispatcherPhonebook::TPhonebook aPhonebook, TInt aIndex, TInt aNumberOfSlots)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   141
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   142
 * This request is completed by invoking
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   143
 * CCtsyDispatcherCallback::CallbackPhonebookStoreReadEntryComp()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   144
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   145
 * @param aPhonebook The phonebook to read entries from.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   146
 * @param aIndex Specifies the index to start reading from, must be >= 1.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   147
 * @param aNumSlots Specifies the number of slots to read, must be >= 1 and <= total number of slots.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   148
 * 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   149
 * @return KErrNone on success, KErrNotSupported if this request is not supported,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   150
 * or another error code to indicate the failure otherwise.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   151
 * 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   152
 * @see RMobilePhoneBookStore::Read()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   153
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   154
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   155
	TSYLOGENTRYEXIT;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   156
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   157
	if((aPhonebook != DispatcherPhonebook::EIccAdn)&&
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   158
			(aPhonebook != DispatcherPhonebook::EIccAdn))
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   159
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   160
		return TSYLOGSETEXITERR(KErrNotSupported);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   161
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   162
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   163
	TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   164
	if( KErrNone == ret )
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   165
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   166
		CAtPhbkStoreRead* atPhbkStoreRead = CAtPhbkStoreRead::NewL(*iGloblePhone,iCtsyDispatcherCallback);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   167
		//Setting Port active
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   168
		iGloblePhone->iEventSignalActive = ETrue;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   169
		iGloblePhone->SetActiveRequest(atPhbkStoreRead);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   170
		atPhbkStoreRead->SetPhonebookType(aPhonebook);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   171
		atPhbkStoreRead->SetReadParam(aIndex,aNumberOfSlots);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   172
		atPhbkStoreRead->StartRequest();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   173
	    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   174
	return TSYLOGSETEXITERR(ret);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   175
	} // CLtsyPhonebookHandler::HandleStoreReadEntryReqL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   176
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   177
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   178
TInt CLtsyPhonebookHandler::HandleStoreDeleteEntryReqL(DispatcherPhonebook::TPhonebook aPhonebook, TInt aIndex)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   179
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   180
 * This request is completed by invoking
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   181
 * CCtsyDispatcherCallback::CallbackPhonebookStoreDeleteEntryComp()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   182
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   183
 * @param aPhonebook The phonebook to delete an entry from.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   184
 * @param aIndex The entry index in the phonebook to delete.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   185
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   186
 * @return KErrNone on success, KErrNotSupported if this request is not supported,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   187
 * or another error code to indicate the failure otherwise.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   188
 * 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   189
 * @see RMobilePhoneBookStore::Delete() 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   190
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   191
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   192
	TSYLOGENTRYEXIT;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   193
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   194
	if((aPhonebook != DispatcherPhonebook::EIccAdn)&&
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   195
			(aPhonebook != DispatcherPhonebook::EIccAdn))
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   196
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   197
		return TSYLOGSETEXITERR(KErrNotSupported);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   198
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   199
	TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   200
	if( KErrNone == ret )
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   201
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   202
		CAtPhbkStoreDelete* atPhbkStoreDelete = CAtPhbkStoreDelete::NewL(*iGloblePhone,iCtsyDispatcherCallback);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   203
		//Setting Port active
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   204
		iGloblePhone->iEventSignalActive = ETrue;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   205
		iGloblePhone->SetActiveRequest(atPhbkStoreDelete);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   206
		atPhbkStoreDelete->SetPhonebookType(aPhonebook);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   207
		atPhbkStoreDelete->SetDeleteIndex(aIndex);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   208
		atPhbkStoreDelete->StartRequest();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   209
	    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   210
	return TSYLOGSETEXITERR(ret);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   211
	} // CLtsyPhonebookHandler::HandleStoreDeleteEntryReqL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   212
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   213
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   214
TInt CLtsyPhonebookHandler::HandleStoreCacheReqL(DispatcherPhonebook::TPhonebook aPhonebook)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   215
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   216
 * This request is completed by invoking
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   217
 * CCtsyDispatcherCallback::CallbackPhonebookStoreCacheComp()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   218
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   219
 * @param aPhonebook The phonebook to cache.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   220
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   221
 * @return KErrNone on success, KErrNotSupported if this request is not supported,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   222
 * or another error code to indicate the failure otherwise.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   223
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   224
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   225
	TSYLOGENTRYEXIT;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   226
	if((aPhonebook != DispatcherPhonebook::EIccAdn)&&
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   227
			(aPhonebook != DispatcherPhonebook::EIccAdn))
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   228
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   229
		return TSYLOGSETEXITERR(KErrNotSupported);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   230
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   231
	TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   232
	if( KErrNone == ret )
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   233
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   234
		CAtPhbkStoreCache* atPhbkStoreCache = CAtPhbkStoreCache::NewL(*iGloblePhone,iCtsyDispatcherCallback);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   235
		//Setting Port active
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   236
		iGloblePhone->iEventSignalActive = ETrue;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   237
		iGloblePhone->SetActiveRequest(atPhbkStoreCache);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   238
		atPhbkStoreCache->SetPhonebookType(aPhonebook);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   239
		atPhbkStoreCache->StartRequest();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   240
	    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   241
	return TSYLOGSETEXITERR(ret);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   242
	} // CLtsyPhonebookHandler::HandleStoreCacheReqL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   243
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   244
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   245
TInt CLtsyPhonebookHandler::HandleStoreGetPhonebookInfoReqL(DispatcherPhonebook::TPhonebook /*aPhonebook*/)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   246
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   247
 * This request is completed by invoking
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   248
 * CCtsyDispatcherCallback::CallbackPhonebookStoreGetPhonebookInfoComp()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   249
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   250
 * @param aPhonebook The phonebook to retrieve the information from.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   251
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   252
 * @return KErrNone on success, KErrNotSupported if this request is not supported,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   253
 * or another error code to indicate the failure otherwise.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   254
 * 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   255
 * @see RMobilePhoneBookStore::GetInfo() 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   256
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   257
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   258
	TSYLOGENTRYEXIT;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   259
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   260
	TInt ret = KErrNotSupported;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   261
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   262
	// TODO: Add implementation here.......
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   263
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   264
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   265
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   266
	return TSYLOGSETEXITERR(ret);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   267
	} // CLtsyPhonebookHandler::HandleStoreGetPhonebookInfoReqL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   268
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   269
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   270
TInt CLtsyPhonebookHandler::HandleStoreInitialiseReqL()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   271
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   272
 * This request is completed by invoking
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   273
 * CCtsyDispatcherCallback::CallbackPhonebookStoreInitialiseComp()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   274
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   275
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   276
 * @return KErrNone on success, KErrNotSupported if this request is not supported,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   277
 * or another error code to indicate the failure otherwise.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   278
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   279
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   280
	TSYLOGENTRYEXIT;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   281
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   282
    TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   283
	if( KErrNone == ret )
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   284
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   285
		CAtPhbkStoreInitialise* atPhbkStoreInitialise = CAtPhbkStoreInitialise::NewL(*iGloblePhone,iCtsyDispatcherCallback);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   286
		//Setting Port active
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   287
		iGloblePhone->iEventSignalActive = ETrue;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   288
		iGloblePhone->SetActiveRequest(atPhbkStoreInitialise);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   289
		atPhbkStoreInitialise->StartRequest();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   290
	    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   291
	return TSYLOGSETEXITERR(ret);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   292
	} // CLtsyPhonebookHandler::HandleStoreInitialiseReqL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   293
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   294
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   295
TInt CLtsyPhonebookHandler::HandleStoreDeleteAllReqL(DispatcherPhonebook::TPhonebook /*aPhonebook*/)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   296
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   297
 * This request is completed by invoking
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   298
 * CCtsyDispatcherCallback::CallbackPhonebookStoreDeleteAllComp()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   299
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   300
 * @param aPhonebook The phonebook to delete all entries from.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   301
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   302
 * @return KErrNone on success, KErrNotSupported if this request is not supported,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   303
 * or another error code to indicate the failure otherwise.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   304
 * 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   305
 * @see RMobilePhoneBookStore::DeleteAll() 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   306
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   307
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   308
	TSYLOGENTRYEXIT;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   309
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   310
	TInt ret = KErrNotSupported;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   311
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   312
	// TODO: Add implementation here.......
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   313
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   314
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   315
	return TSYLOGSETEXITERR(ret);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   316
	} // CLtsyPhonebookHandler::HandleStoreDeleteAllReqL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   317
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   318
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   319
TInt CLtsyPhonebookHandler::HandleSmsStoreReadAllReqL()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   320
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   321
 * This request is completed by invoking
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   322
 * CCtsyDispatcherCallback::CallbackPhonebookSmsStoreReadAllComp().
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   323
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   324
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   325
 * @return KErrNone on success, KErrNotSupported if this request is not supported,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   326
 * or another error code to indicate the failure otherwise.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   327
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   328
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   329
	TSYLOGENTRYEXIT;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   330
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   331
	TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   332
	if( KErrNone == ret )
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   333
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   334
		CAtSmsStoreReadAll* atSmsStoreReadAll = CAtSmsStoreReadAll::NewL(*iGloblePhone,iCtsyDispatcherCallback);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   335
		//Setting Port active
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   336
		iGloblePhone->iEventSignalActive = ETrue;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   337
		iGloblePhone->SetActiveRequest(atSmsStoreReadAll);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   338
		atSmsStoreReadAll->StartRequest();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   339
	    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   340
	return TSYLOGSETEXITERR(ret);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   341
	} // CLtsyPhonebookHandler::HandleSmsStoreReadAllReqL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   342
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   343
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   344
TInt CLtsyPhonebookHandler::HandleStoreWriteEntryReqL(DispatcherPhonebook::TPhonebook aPhonebook, const TDesC8& aEntry)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   345
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   346
 * This request is completed by invoking
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   347
 * CCtsyDispatcherCallback::CallbackPhonebookStoreWriteEntryComp()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   348
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   349
 * @param aPhonebook The phonebook to be written to.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   350
 * @param aEntry The entry to be written, this is coded as a TLV, this can be decoded either
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   351
 * directly via a CPhoneBookBuffer() or via the CPhoneBookEntry::InternalizeFromTlvEntry() utility.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   352
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   353
 * @return KErrNone on success, KErrNotSupported if this request is not supported,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   354
 * or another error code to indicate the failure otherwise.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   355
 * 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   356
 * @see RMobilePhoneBookStore::Write()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   357
 * @see CPhoneBookBuffer()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   358
 * @see CPhoneBookEntry::InternalizeFromTlvEntry()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   359
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   360
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   361
	TSYLOGENTRYEXIT;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   362
	if((aPhonebook != DispatcherPhonebook::EIccAdn)&&
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   363
			(aPhonebook != DispatcherPhonebook::EIccAdn))
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   364
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   365
		return TSYLOGSETEXITERR(KErrNotSupported);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   366
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   367
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   368
    TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   369
	if( KErrNone == ret )
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   370
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   371
		CAtPhbkStoreWrite* atPhbkStoreWrite = CAtPhbkStoreWrite::NewL(*iGloblePhone,iCtsyDispatcherCallback);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   372
		//Setting Port active
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   373
		iGloblePhone->iEventSignalActive = ETrue;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   374
		iGloblePhone->SetActiveRequest(atPhbkStoreWrite);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   375
		atPhbkStoreWrite->SetPhonebookType(aPhonebook);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   376
		atPhbkStoreWrite->SetPhonebookEntryL(aEntry);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   377
		atPhbkStoreWrite->StartRequest();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   378
	    }              
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   379
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   380
	return TSYLOGSETEXITERR(ret);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   381
	} // CLtsyPhonebookHandler::HandleStoreWriteEntryReqL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   382
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   383
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   384
TInt CLtsyPhonebookHandler::HandleGetPhoneStoreInfoReqL(const TDesC& aStoreName)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   385
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   386
 * This request is completed by invoking
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   387
 * CCtsyDispatcherCallback::CallbackPhonebookGetPhoneStoreInfoComp()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   388
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   389
 * @param aStoreName The store to retrieve the information from.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   390
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   391
 * @return KErrNone on success, KErrNotSupported if this request is not supported,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   392
 * or another error code to indicate the failure otherwise.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   393
 * 
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   394
 * @see RMobilePhone::GetPhoneStoreInfo()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   395
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   396
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   397
	TSYLOGENTRYEXIT;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   398
	if((aStoreName.CompareF(KETelIccFdnPhoneBook) != KErrNone)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   399
		&&(aStoreName.CompareF(KETelIccAdnPhoneBook) != KErrNone)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   400
		&&(aStoreName.CompareF(KETelIccSmsStore) != KErrNone))
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   401
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   402
		return TSYLOGSETEXITERR(KErrNotSupported);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   403
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   404
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   405
	TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   406
	if( KErrNone == ret )
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   407
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   408
		CAtPhbkGetPhoneStoreInfo* atPhbkGetPhoneStoreInfo =CAtPhbkGetPhoneStoreInfo::NewL(*iGloblePhone,iCtsyDispatcherCallback);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   409
		//Setting Port active
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   410
		iGloblePhone->iEventSignalActive = ETrue;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   411
		iGloblePhone->SetActiveRequest(atPhbkGetPhoneStoreInfo);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   412
		atPhbkGetPhoneStoreInfo->SetPhoneStoreParam(aStoreName);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   413
		atPhbkGetPhoneStoreInfo->StartRequest();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   414
	    }
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   415
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   416
	return TSYLOGSETEXITERR(ret);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   417
	} // CLtsyPhonebookHandler::HandleGetPhoneStoreInfoReqL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   418
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   419
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   420
TInt CLtsyPhonebookHandler::HandleSmsStoreDeleteEntryReqL(TInt aIndex)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   421
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   422
 * This request is completed by invoking
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   423
 * CCtsyDispatcherCallback::CallbackPhonebookSmsStoreDeleteEntryComp().
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   424
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   425
 * @param aIndex index of the entry to be deleted from the SMS store.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   426
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   427
 * @return KErrNone on success, KErrNotSupported if this request is not supported,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   428
 * or another error code to indicate the failure otherwise.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   429
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   430
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   431
	TSYLOGENTRYEXIT;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   432
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   433
	TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   434
	if( KErrNone == ret )
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   435
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   436
		CAtSmsStoreDelete* atSmsStoreDelete = CAtSmsStoreDelete::NewL(*iGloblePhone,iCtsyDispatcherCallback);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   437
		//Setting Port active
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   438
		iGloblePhone->iEventSignalActive = ETrue;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   439
		iGloblePhone->SetActiveRequest(atSmsStoreDelete);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   440
		atSmsStoreDelete->SetDelIndex(aIndex);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   441
		atSmsStoreDelete->StartRequest();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   442
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   443
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   444
	return TSYLOGSETEXITERR(ret);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   445
	} // CLtsyPhonebookHandler::HandleSmsStoreDeleteEntryReqL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   446
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   447
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   448
TInt CLtsyPhonebookHandler::HandleSmsStoreDeleteAllReqL()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   449
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   450
 * This request is completed by invoking
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   451
 * CCtsyDispatcherCallback::CallbackPhonebookSmsStoreDeleteAllComp().
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   452
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   453
 * @return KErrNone on success, KErrNotSupported if this request is not supported,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   454
 * or another error code to indicate the failure otherwise.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   455
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   456
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   457
	TSYLOGENTRYEXIT;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   458
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   459
	TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   460
	if( KErrNone == ret )
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   461
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   462
		CAtSmsStoreDeleteAll* atSmsStoreDeleteAll = CAtSmsStoreDeleteAll::NewL(*iGloblePhone,iCtsyDispatcherCallback);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   463
		//Setting Port active
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   464
		iGloblePhone->iEventSignalActive = ETrue;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   465
		iGloblePhone->SetActiveRequest(atSmsStoreDeleteAll);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   466
		atSmsStoreDeleteAll->StartRequest();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   467
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   468
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   469
	return TSYLOGSETEXITERR(ret);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   470
	} // CLtsyPhonebookHandler::HandleSmsStoreDeleteAllReqL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   471
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   472
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   473
TInt CLtsyPhonebookHandler::HandleSmsStoreGetInfoReqL()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   474
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   475
 * This request is completed by invoking
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   476
 * CCtsyDispatcherCallback::CallbackPhonebookSmsStoreGetInfoComp().
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   477
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   478
 * @return KErrNone on success, KErrNotSupported if this request is not supported,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   479
 * or another error code to indicate the failure otherwise.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   480
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   481
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   482
	TSYLOGENTRYEXIT;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   483
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   484
	TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   485
	if( KErrNone == ret )
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   486
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   487
		CAtSmsStoreInfo* atSmsStoreInfo = CAtSmsStoreInfo::NewL(*iGloblePhone,iCtsyDispatcherCallback);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   488
		//Setting Port active
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   489
		iGloblePhone->iEventSignalActive = ETrue;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   490
		iGloblePhone->SetActiveRequest(atSmsStoreInfo);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   491
		atSmsStoreInfo->StartRequest();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   492
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   493
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   494
	return TSYLOGSETEXITERR(ret);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   495
	} // CLtsyPhonebookHandler::HandleSmsStoreGetInfoReqL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   496
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   497
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   498
TInt CLtsyPhonebookHandler::HandleSmsStoreReadEntryReqL(TInt aIndex)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   499
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   500
 * This request is completed by invoking
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   501
 * CCtsyDispatcherCallback::CallbackPhonebookSmsStoreReadEntryComp().
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   502
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   503
 * @param aIndex index of the entry to be read.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   504
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   505
 * @return KErrNone on success, KErrNotSupported if this request is not supported,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   506
 * or another error code to indicate the failure otherwise.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   507
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   508
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   509
	TSYLOGENTRYEXIT;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   510
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   511
	TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   512
	if( KErrNone == ret )
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   513
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   514
		CAtSmsStoreRead* atSmsStoreRead = CAtSmsStoreRead::NewL(*iGloblePhone,iCtsyDispatcherCallback);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   515
		//Setting Port active
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   516
		iGloblePhone->iEventSignalActive = ETrue;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   517
		iGloblePhone->SetActiveRequest(atSmsStoreRead);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   518
		atSmsStoreRead->SetMsgIndex(aIndex);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   519
		atSmsStoreRead->StartRequest();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   520
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   521
	return TSYLOGSETEXITERR(ret);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   522
	} // CLtsyPhonebookHandler::HandleSmsStoreReadEntryReqL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   523
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   524
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   525
TInt CLtsyPhonebookHandler::HandleSmsStoreWriteEntryReqL(const RMobileSmsStore::TMobileGsmSmsEntryV1& aMobileGsmEntry)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   526
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   527
 * This request is completed by invoking
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   528
 * CCtsyDispatcherCallback::CallbackPhonebookSmsStoreWriteEntryComp().
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   529
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   530
 * @param aMobileGsmEntry Defines contents of a fixed-size GSM SMS entry to be stored.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   531
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   532
 * @return KErrNone on success, KErrNotSupported if this request is not supported,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   533
 * or another error code to indicate the failure otherwise.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   534
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   535
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   536
	TSYLOGENTRYEXIT;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   537
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   538
	TInt ret = iGloblePhone->CheckGlobalPhoneStatus();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   539
	if( KErrNone == ret )
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   540
		{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   541
		CAtSmsStoreWrite* atSmsStoreWrite = CAtSmsStoreWrite::NewL(*iGloblePhone,iCtsyDispatcherCallback);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   542
		//Setting Port active
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   543
		iGloblePhone->iEventSignalActive = ETrue;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   544
		iGloblePhone->SetActiveRequest(atSmsStoreWrite);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   545
		atSmsStoreWrite->SeGsmSmsEntry(aMobileGsmEntry);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   546
		atSmsStoreWrite->StartRequest();
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   547
		}
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   548
	return TSYLOGSETEXITERR(ret);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   549
	} // CLtsyPhonebookHandler::HandleSmsStoreWriteEntryReqL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   550
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   551
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   552
TInt CLtsyPhonebookHandler::HandleStoreCacheCancelReqL(DispatcherPhonebook::TPhonebook /*aPhonebook*/)
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   553
/**
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   554
 * This request is completed by invoking
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   555
 * CCtsyDispatcherCallback::CallbackPhonebookStoreCacheCancel()
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   556
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   557
 * @param aPhonebook The phonebook to cancel the pending cache.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   558
 *
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   559
 * @return KErrNone on success, KErrNotSupported if this request is not supported,
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   560
 * or another error code to indicate the failure otherwise.
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   561
 */
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   562
	{
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   563
	TSYLOGENTRYEXIT;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   564
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   565
	TInt ret = KErrNotSupported;
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   566
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   567
	
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   568
	return TSYLOGSETEXITERR(ret);
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   569
	} // CLtsyPhonebookHandler::HandleStoreCacheCancelReqL
8b72faa1200f 201024_02
hgs
parents:
diff changeset
   570