cbsref/telephonyrefplugins/atltsy/handler/src/cltsyphonebookonhandler.cpp
branchRCL_3
changeset 65 630d2f34d719
equal deleted inserted replaced
61:17af172ffa5f 65:630d2f34d719
       
     1 // Copyright (c) 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 // CLtsyPhonebookOnHandler
       
    15 
       
    16 #include <ctsy/ltsy/cctsydispatchercallback.h>
       
    17 #include <mmtsy_ipcdefs.h>
       
    18 
       
    19 
       
    20 
       
    21 #include "cltsyphonebookonhandler.h"
       
    22 #include <ctsy/ltsy/ltsylogger.h>
       
    23 #include "ltsymacros.h"
       
    24 
       
    25 
       
    26 
       
    27 CLtsyPhonebookOnHandler::CLtsyPhonebookOnHandler(
       
    28 	CCtsyDispatcherCallback& aCtsyDispatcherCallback)
       
    29 	: iCtsyDispatcherCallback(aCtsyDispatcherCallback)
       
    30 	{
       
    31 	}
       
    32 
       
    33 	
       
    34 CLtsyPhonebookOnHandler::~CLtsyPhonebookOnHandler()
       
    35 	{
       
    36 	}
       
    37 
       
    38 
       
    39 CLtsyPhonebookOnHandler* CLtsyPhonebookOnHandler::NewLC(
       
    40 	CCtsyDispatcherCallback& aCtsyDispatcherCallback)
       
    41 	{
       
    42 	TSYLOGENTRYEXIT;
       
    43 	CLtsyPhonebookOnHandler* self = new (ELeave) CLtsyPhonebookOnHandler(aCtsyDispatcherCallback);
       
    44 	CleanupStack::PushL(self);
       
    45 	self->ConstructL();
       
    46 	return self;
       
    47 	}
       
    48 
       
    49 
       
    50 CLtsyPhonebookOnHandler* CLtsyPhonebookOnHandler::NewL(CCtsyDispatcherCallback& aCtsyDispatcherCallback)
       
    51 	{
       
    52 	TSYLOGENTRYEXIT;
       
    53 	CLtsyPhonebookOnHandler* self=
       
    54 			CLtsyPhonebookOnHandler::NewLC(aCtsyDispatcherCallback);
       
    55 	CleanupStack::Pop(self);
       
    56 	return self;
       
    57 	}
       
    58 
       
    59 
       
    60 void CLtsyPhonebookOnHandler::ConstructL()
       
    61 /**
       
    62  * Second phase constructor.
       
    63  */
       
    64 	{
       
    65 	TSYLOGENTRYEXIT;
       
    66 	
       
    67 	
       
    68 	} // CLtsyPhonebookOnHandler::ConstructL
       
    69 
       
    70 TBool CLtsyPhonebookOnHandler::IsInterfaceSupported(TLtsyDispatchInterfaceApiId aDispatchApiId)
       
    71 /**
       
    72  * Returns whether a Dispatch Interface APi is supported or not.
       
    73  * 
       
    74  * @param aDispatchApiId Id of Dispatch interface being queried
       
    75  * @return indication whether interface is supported or not
       
    76  */
       
    77 	{
       
    78 
       
    79 	
       
    80 	switch(aDispatchApiId)
       
    81 		{
       
    82 		// Insert ApiIds when support is provided in LTSY e.g.
       
    83 		// case MLtsyDispatchPhoneBootNotifySimStatusReady::KLtsyDispatchPhoneBootNotifySimStatusReadyApiId: return ETrue;
       
    84 		
       
    85 		default:
       
    86 			return EFalse;
       
    87 		}
       
    88 	}
       
    89 
       
    90 void CLtsyPhonebookOnHandler::IsCallbackIndicatorSupported(TLtsyDispatchIndIdGroup /*aIdGroup*/, TUint32& /*aIndIdBitMask*/)
       
    91 /**
       
    92  * Returns the set of callback indicators that are supported.
       
    93  * 
       
    94 * @param aIdGroup ID of group that is being queried e.g. aIdGroup=EIndIdGroup1
       
    95 * @param aIndIdBitMask [out] argument that should return a bitmask indicating which indicator callbacks are supported.
       
    96  */
       
    97 	{
       
    98 
       
    99 	//Create bitmask with bitset for each indicator ID that is supported. E.g.
       
   100 	/*
       
   101 	if(aIdGroup == EIndIdGroup1)
       
   102 		aIndIdBitMask = KLtsyDispatchPhoneNotifyNetworkModeChangeIndId | 
       
   103 						KLtsyDispatchPhoneNotifyEgprsInfoChangeIndId | 
       
   104 						KLtsyDispatchPhoneNotifySignalStrengthChangeIndId;
       
   105 	else
       
   106 		aIndIdBitMask = 0; //no indicators from other groups supported
       
   107 	*/
       
   108 	}
       
   109 
       
   110 
       
   111 TInt CLtsyPhonebookOnHandler::HandleStoreReadReqL(TInt /*aIndex*/)
       
   112 /**
       
   113  * This request is completed by invoking
       
   114  * CCtsyDispatcherCallback::CallbackPhonebookOnStoreReadComp
       
   115  *
       
   116  * @param aIndex index of the entry.
       
   117  *
       
   118  * @return KErrNone on success, KErrNotSupported if this request is not supported,
       
   119  * or another error code to indicate the failure otherwise.
       
   120  */
       
   121 	{
       
   122 	TSYLOGENTRYEXIT;
       
   123 
       
   124 	TInt ret = KErrNotSupported;
       
   125 
       
   126 
       
   127 	return TSYLOGSETEXITERR(ret);
       
   128 	} // CLtsyPhonebookOnHandler::HandleStoreReadReqL
       
   129 
       
   130 
       
   131 TInt CLtsyPhonebookOnHandler::HandleStoreDeleteAllReqL()
       
   132 /**
       
   133  * This request is completed by invoking
       
   134  * CCtsyDispatcherCallback::CallbackPhonebookOnStoreDeleteAllComp
       
   135  *
       
   136  * @return KErrNone on success, KErrNotSupported if this request is not supported,
       
   137  * or another error code to indicate the failure otherwise.
       
   138  */
       
   139 	{
       
   140 	TSYLOGENTRYEXIT;
       
   141 
       
   142 	TInt ret = KErrNotSupported;
       
   143 
       
   144 
       
   145 	return TSYLOGSETEXITERR(ret);
       
   146 	} // CLtsyPhonebookOnHandler::HandleStoreDeleteAllReqL
       
   147 
       
   148 
       
   149 TInt CLtsyPhonebookOnHandler::HandleStoreReadEntryReqL(TInt /*aIndex*/)
       
   150 /**
       
   151  * This request is completed by invoking
       
   152  * CCtsyDispatcherCallback::CallbackPhonebookOnStoreReadEntryComp
       
   153  *
       
   154  * @param aIndex index of the ON entry.
       
   155  *
       
   156  * @return KErrNone on success, KErrNotSupported if this request is not supported,
       
   157  * or another error code to indicate the failure otherwise.
       
   158  */
       
   159 	{
       
   160 	TSYLOGENTRYEXIT;
       
   161 
       
   162 	TInt ret = KErrNotSupported;
       
   163 
       
   164 
       
   165 
       
   166 	return TSYLOGSETEXITERR(ret);
       
   167 	} // CLtsyPhonebookOnHandler::HandleStoreReadEntryReqL
       
   168 
       
   169 
       
   170 TInt CLtsyPhonebookOnHandler::HandleStoreGetInfoReqL()
       
   171 /**
       
   172  * This request is completed by invoking
       
   173  * CCtsyDispatcherCallback::CallbackPhonebookOnStoreGetInfoComp
       
   174  *
       
   175  * @return KErrNone on success, KErrNotSupported if this request is not supported,
       
   176  * or another error code to indicate the failure otherwise.
       
   177  */
       
   178 	{
       
   179 	TSYLOGENTRYEXIT;
       
   180 
       
   181 	TInt ret = KErrNotSupported;
       
   182 
       
   183 
       
   184 	return TSYLOGSETEXITERR(ret);
       
   185 	} // CLtsyPhonebookOnHandler::HandleStoreGetInfoReqL
       
   186 
       
   187 
       
   188 TInt CLtsyPhonebookOnHandler::HandleStoreGetReadStoreSizeReqL()
       
   189 /**
       
   190  * This request is completed by invoking
       
   191  * CCtsyDispatcherCallback::CallbackPhonebookOnStoreGetReadStoreSizeComp
       
   192  *
       
   193  * @return KErrNone on success, KErrNotSupported if this request is not supported,
       
   194  * or another error code to indicate the failure otherwise.
       
   195  */
       
   196 	{
       
   197 	TSYLOGENTRYEXIT;
       
   198 
       
   199 	TInt ret = KErrNotSupported;
       
   200 
       
   201 
       
   202 	return TSYLOGSETEXITERR(ret);
       
   203 	} // CLtsyPhonebookOnHandler::HandleStoreGetReadStoreSizeReqL
       
   204 
       
   205 
       
   206 TInt CLtsyPhonebookOnHandler::HandleStoreDeleteEntryReqL(TInt /*aIndex*/)
       
   207 /**
       
   208  * This request is completed by invoking
       
   209  * CCtsyDispatcherCallback::CallbackPhonebookOnStoreDeleteEntryComp
       
   210  *
       
   211  * @param aIndex index of the ON entry.
       
   212  *
       
   213  * @return KErrNone on success, KErrNotSupported if this request is not supported,
       
   214  * or another error code to indicate the failure otherwise.
       
   215  */
       
   216 	{
       
   217 	TSYLOGENTRYEXIT;
       
   218 
       
   219 	TInt ret = KErrNotSupported;
       
   220 
       
   221 
       
   222 	return TSYLOGSETEXITERR(ret);
       
   223 	} // CLtsyPhonebookOnHandler::HandleStoreDeleteEntryReqL
       
   224 
       
   225 
       
   226 TInt CLtsyPhonebookOnHandler::HandleStoreWriteEntryReqL(const RMobileONStore::TMobileONEntryV1& /*aMobileOnEntry*/)
       
   227 /**
       
   228  * This request is completed by invoking
       
   229  * CCtsyDispatcherCallback::CallbackPhonebookOnStoreWriteEntryComp
       
   230  *
       
   231  * @param aMobileOnEntry defines contents of a fixed-size ON entry to be stored.  
       
   232  *
       
   233  * @return KErrNone on success, KErrNotSupported if this request is not supported,
       
   234  * or another error code to indicate the failure otherwise.
       
   235  */
       
   236 	{
       
   237 	TSYLOGENTRYEXIT;
       
   238 
       
   239 	TInt ret = KErrNotSupported;
       
   240 
       
   241 
       
   242 
       
   243 	return TSYLOGSETEXITERR(ret);
       
   244 	} // CLtsyPhonebookOnHandler::HandleStoreWriteEntryReqL
       
   245 
       
   246 
       
   247 TInt CLtsyPhonebookOnHandler::HandleStoreWriteReqL(const RMobileONStore::TMobileONEntryV1& /*aMobileOnEntry*/)
       
   248 /**
       
   249  * This request is completed by invoking
       
   250  * CCtsyDispatcherCallback::CallbackPhonebookOnStoreWriteComp
       
   251  *
       
   252  * @param aMobileOnEntry defines contents of a fixed-size ON entry to be stored.  
       
   253  *
       
   254  * @return KErrNone on success, KErrNotSupported if this request is not supported,
       
   255  * or another error code to indicate the failure otherwise.
       
   256  */
       
   257 	{
       
   258 	TSYLOGENTRYEXIT;
       
   259 
       
   260 	TInt ret = KErrNotSupported;
       
   261 
       
   262 
       
   263 
       
   264 	return TSYLOGSETEXITERR(ret);
       
   265 	} // CLtsyPhonebookOnHandler::HandleStoreWriteReqL
       
   266 
       
   267 
       
   268 TInt CLtsyPhonebookOnHandler::HandleStoreGetStoreSizeReqL()
       
   269 /**
       
   270  * This request is completed by invoking
       
   271  * CCtsyDispatcherCallback::CallbackPhonebookOnStoreGetStoreSizeComp
       
   272  *
       
   273  * @return KErrNone on success, KErrNotSupported if this request is not supported,
       
   274  * or another error code to indicate the failure otherwise.
       
   275  */
       
   276 	{
       
   277 	TSYLOGENTRYEXIT;
       
   278 
       
   279 	TInt ret = KErrNotSupported;
       
   280 
       
   281 
       
   282 	return TSYLOGSETEXITERR(ret);
       
   283 	} // CLtsyPhonebookOnHandler::HandleStoreGetStoreSizeReqL
       
   284 
       
   285 
       
   286 
       
   287 
       
   288