commonuisupport/uikon/test/teiksrv/tnotdial/tnotify2v2.cpp
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 // Copyright (c) 2005-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 /**
       
    17  @file
       
    18  @internalComponent - Internal Symbian test code 
       
    19 */
       
    20 
       
    21 #include <techview/eikdialg.h>
       
    22 #include <bautils.h>
       
    23 #include "tnotify2v2.h"
       
    24 #include "tnotdial.h"
       
    25 
       
    26 #include <uikon.hrh>
       
    27 #include <tnotdial.rsg>
       
    28 
       
    29 
       
    30 const TUid KScreenOutputChannel ={0x00000666};
       
    31 const TUid KLEDOutputChannel ={0x00000111};
       
    32 
       
    33 _LIT(KResFileNamePath,"\\system\\test\\tnotdial\\");
       
    34 _LIT(KResFileName1,"tnotdial.rsc");
       
    35 
       
    36 _LIT8(KStartSmsDialogResponse,"Response: started SMS dialog");
       
    37 _LIT8(KStartSmsLEDResponse,"Response: started SMS LED");
       
    38 _LIT8(KStartEmailDialogResponse,"Response: started email dialog");
       
    39 _LIT8(KStartEmailLEDResponse,"Response: started email LED");
       
    40 _LIT8(KUpdateSmsDialogResponse, "Response: updated SMS dialog");
       
    41 _LIT8(KUpdateSmsLEDResponse, "Response: updated SMS LED");
       
    42 _LIT8(KUpdateEmailDialogResponse, "Response: updated email dialog");
       
    43 _LIT8(KUpdateEmailLEDResponse, "Response: updated email LED");
       
    44 _LIT8(KUpdateSmsDialogResponseAsync, "Response: updated SMS dialog");
       
    45 _LIT8(KUpdateSmsLEDResponseAsync, "Response: updated SMS LED");
       
    46 _LIT8(KUpdateEmailDialogResponseAsync, "Response: updated email dialog");
       
    47 _LIT8(KUpdateEmailLEDResponseAsync, "Response: updated email LED");
       
    48 
       
    49 EXPORT_C   CArrayPtr<MEikSrvNotifierBase2>* NotifierArray()
       
    50 //
       
    51 // Lib main entry point
       
    52 //
       
    53 	{
       
    54 //	RDebug::Print(_L("\nExported entry point\n"));
       
    55 	CArrayPtrFlat<MEikSrvNotifierBase2>* subjects=new (ELeave)CArrayPtrFlat<MEikSrvNotifierBase2>(4);
       
    56 	CleanupStack::PushL(subjects);
       
    57 	subjects->AppendL(CMySmsNotifierSubject::NewLC()); 
       
    58 	subjects->AppendL(CMyLEDSmsNotifierSubject::NewLC());
       
    59 	subjects->AppendL(CMyEmailNotifierSubject::NewLC()); 
       
    60 	subjects->AppendL(CMyLEDEmailNotifierSubject::NewLC());
       
    61 	CleanupStack::Pop(5, subjects);
       
    62 	return subjects;
       
    63 	}
       
    64 
       
    65 EXPORT_C   CArrayPtr<MEikSrvNotifierBase2>* NotifierArray1()
       
    66 //
       
    67 // Lib main entry point
       
    68 //
       
    69 	{
       
    70 //	RDebug::Print(_L("\nExported entry point\n"));
       
    71 	CArrayPtrFlat<MEikSrvNotifierBase2>* subjects=new (ELeave)CArrayPtrFlat<MEikSrvNotifierBase2>(2);
       
    72 	CleanupStack::PushL(subjects);
       
    73 	subjects->AppendL(CMySmsNotifierSubject::NewLC()); 
       
    74 	subjects->AppendL(CMyLEDSmsNotifierSubject::NewLC());
       
    75 	CleanupStack::Pop(3, subjects);
       
    76 	return subjects;
       
    77 	}
       
    78 EXPORT_C   CArrayPtr<MEikSrvNotifierBase2>* NotifierArray2()
       
    79 //
       
    80 // Lib main entry point
       
    81 //
       
    82 	{
       
    83 //	RDebug::Print(_L("\nExported entry point\n"));
       
    84 	CArrayPtrFlat<MEikSrvNotifierBase2>* subjects=new (ELeave)CArrayPtrFlat<MEikSrvNotifierBase2>(2);
       
    85 	CleanupStack::PushL(subjects);
       
    86 	subjects->AppendL(CMyEmailNotifierSubject::NewLC()); 
       
    87 	subjects->AppendL(CMyLEDEmailNotifierSubject::NewLC());
       
    88 	CleanupStack::Pop(3, subjects);
       
    89 	return subjects;
       
    90 	}
       
    91 
       
    92 GLDEF_C TInt E32Dll(
       
    93 					)
       
    94 //
       
    95 // DLL entry point
       
    96 //
       
    97 	{
       
    98 //	INFO_PRINTF1(_L("\nPlugin E32 Dll entry point\n"));
       
    99     return(KErrNone);
       
   100    	}
       
   101 
       
   102 
       
   103 void CMySmsNotifierSubject::Release()
       
   104 	{
       
   105 	delete this;
       
   106 	}
       
   107 
       
   108 CMySmsNotifierSubject::TNotifierInfo CMySmsNotifierSubject::RegisterL()
       
   109 	{
       
   110 	iInfo.iUid=KMyNewSmsNotifierUid;
       
   111 	iInfo.iChannel=KScreenOutputChannel;
       
   112 	iInfo.iPriority=ENotifierPriorityHigh;
       
   113 	return iInfo;
       
   114 	}
       
   115 
       
   116 CMySmsNotifierSubject::TNotifierInfo CMySmsNotifierSubject::Info() const
       
   117 	{
       
   118 	return iInfo;
       
   119 	}
       
   120 
       
   121 TPtrC8 CMySmsNotifierSubject::StartL(const TDesC8& /*aBuffer*/)
       
   122 	{
       
   123 	RDebug::Print(_L("Plugin: SMS notifier started\n"));
       
   124 	if (!IsVisible())
       
   125 		{
       
   126 		RouseSleepingDialog();
       
   127 		}
       
   128 	return KNullDesC8();
       
   129 	}
       
   130 
       
   131 void CMySmsNotifierSubject::StartL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
       
   132 	{
       
   133 	RDebug::Print(_L("Plugin: SMS notifier started (asynch.)\n"));
       
   134 	TRAPD(err,aMessage.WriteL(aReplySlot,KStartSmsDialogResponse));
       
   135 	__ASSERT_ALWAYS(!err,User::Panic(_L("WriteL(aReplySlot,KStartSmsDialogResponse)"),err));
       
   136 	StartL(aBuffer);
       
   137 	//aMessage.Complete(EEikNotExtRequestCompleted);
       
   138 	}
       
   139 
       
   140 void CMySmsNotifierSubject::Cancel()
       
   141 	{
       
   142 	RDebug::Print(_L("Plugin: SMS notifier canceled\n"));
       
   143 	ExitSleepingDialog();
       
   144 	}
       
   145 
       
   146 TPtrC8 CMySmsNotifierSubject::UpdateL(const TDesC8& aBuffer)
       
   147 	{
       
   148 	RDebug::Print(_L("Plugin: SMS notifier updated\n"));
       
   149 	TBuf<100> buffer;
       
   150 	buffer.Copy(aBuffer);
       
   151 	CEikonEnv::Static()->InfoMsgWithAlignment(EHLeftVBottom,buffer);
       
   152 	return KUpdateSmsDialogResponse();
       
   153 	}
       
   154 
       
   155 void CMySmsNotifierSubject::UpdateL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
       
   156 	{
       
   157 	RDebug::Print(_L("Plugin: SMS notifier updated (asynch. call) \n"));
       
   158 	UpdateL(aBuffer);
       
   159 	TRAPD(err,aMessage.WriteL(aReplySlot,KUpdateSmsDialogResponseAsync));
       
   160 	__ASSERT_ALWAYS(!err,User::Panic(_L("WriteL(aReplySlot,KUpdateSmsDialogResponseAsync)"),err));
       
   161 	aMessage.Complete(EEikNotExtRequestCompleted);
       
   162 	}
       
   163 
       
   164 CMySmsNotifierSubject* CMySmsNotifierSubject::NewLC()
       
   165 	{
       
   166 	CMySmsNotifierSubject* self=new (ELeave) CMySmsNotifierSubject();
       
   167 	CleanupStack::PushL(self);
       
   168 	self->ConstructL();
       
   169 	return self;
       
   170 	}
       
   171 
       
   172 CMySmsNotifierSubject::CMySmsNotifierSubject()
       
   173 	{
       
   174 	}
       
   175 
       
   176 CMySmsNotifierSubject::~CMySmsNotifierSubject()
       
   177 	{
       
   178 	}
       
   179 
       
   180 void CMySmsNotifierSubject::ConstructL()
       
   181 	{
       
   182 	//Get the system filesession	
       
   183 	RFs& fs = CEikonEnv::Static()->FsSession(); 
       
   184 	//Get the file finder 
       
   185 	TFindFile* findFile=new(ELeave) TFindFile(fs);
       
   186     CleanupStack::PushL(findFile);
       
   187 	//File name parser
       
   188 	TParse* fileNameParser=new(ELeave) TParse;
       
   189     CleanupStack::PushL(fileNameParser);
       
   190 
       
   191 	//search for all rsc files in *\system\libs\plugins\*.rsc
       
   192 	CDir* directory=NULL;
       
   193 	User::LeaveIfError(findFile->FindWildByDir(KResFileName1, KResFileNamePath, directory));
       
   194 	CleanupStack::PushL(directory);
       
   195 
       
   196 	const TEntry& entry=(*directory)[directory->Count()-1];
       
   197 	fileNameParser->Set(entry.iName,&findFile->File(),NULL);
       
   198 	TFileName resourceFileName(fileNameParser->FullName());
       
   199 
       
   200 	BaflUtils::NearestLanguageFile(iCoeEnv->FsSession(),resourceFileName);
       
   201 	RDebug::Print(_L("Resource file name [%S]"),&resourceFileName);
       
   202 	TInt offset=iEikonEnv->AddResourceFileL(resourceFileName);
       
   203 	CleanupStack::PopAndDestroy(3);
       
   204 
       
   205 	TRAPD(err,ConstructSleepingAlertDialogL(R_SMS_ALERT));
       
   206 	iEikonEnv->DeleteResourceFile(offset);
       
   207 	User::LeaveIfError(err);
       
   208 	}
       
   209 
       
   210 void CMySmsNotifierSubject::PreLayoutDynInitL()
       
   211 	{ // must not fail
       
   212 	}
       
   213 
       
   214 TBool CMySmsNotifierSubject::OkToExitL(TInt /*aButtonId*/)
       
   215 	{
       
   216 	iManager->CancelNotifier(iInfo.iUid);
       
   217 	return ETrue;
       
   218 	}
       
   219 
       
   220 void CMyEmailNotifierSubject::Release()
       
   221 	{
       
   222 	delete this;
       
   223 	}
       
   224 
       
   225 CMyEmailNotifierSubject::TNotifierInfo CMyEmailNotifierSubject::RegisterL()
       
   226 	{
       
   227 	iInfo.iUid=KMyNewEmailNotifierUid;
       
   228 	iInfo.iChannel=KScreenOutputChannel;
       
   229 	iInfo.iPriority=ENotifierPriorityVLow;
       
   230 	return iInfo;
       
   231 	}
       
   232 
       
   233 CMyEmailNotifierSubject::TNotifierInfo CMyEmailNotifierSubject::Info() const
       
   234 	{
       
   235 	return iInfo;
       
   236 	}
       
   237 
       
   238 TPtrC8 CMyEmailNotifierSubject::StartL(const TDesC8& /*aBuffer*/)
       
   239 	{
       
   240 	RDebug::Print(_L("Plugin: email notifier started\n"));
       
   241 	if (!IsVisible())
       
   242 		{
       
   243 		RouseSleepingDialog();
       
   244 		}
       
   245 	return KNullDesC8();
       
   246 	}
       
   247 
       
   248 void CMyEmailNotifierSubject::StartL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
       
   249 	{
       
   250 //	__DEBUGGER();
       
   251 	RDebug::Print(_L("Plugin: email notifier started (asynch.)\n"));
       
   252 	TRAPD(err,aMessage.WriteL(aReplySlot,KStartEmailDialogResponse));
       
   253 	__ASSERT_ALWAYS(!err,User::Panic(_L("WriteL(aReplySlot,KStartEmailDialogResponse)"),err));
       
   254 	StartL(aBuffer);
       
   255 	}
       
   256 
       
   257 void CMyEmailNotifierSubject::Cancel()
       
   258 	{
       
   259 	RDebug::Print(_L("Plugin: email notifier canceled\n"));
       
   260 	ExitSleepingDialog();
       
   261 	}
       
   262 
       
   263 TPtrC8 CMyEmailNotifierSubject::UpdateL(const TDesC8& aBuffer)
       
   264 	{
       
   265 	RDebug::Print(_L("Plugin: email notifier updated\n"));
       
   266 	TBuf<100> buffer;
       
   267 	buffer.Copy(aBuffer);
       
   268 	CEikonEnv::Static()->InfoMsgWithAlignment(EHLeftVBottom,buffer);
       
   269 	return KUpdateEmailDialogResponse();
       
   270 	}
       
   271 
       
   272 void CMyEmailNotifierSubject::UpdateL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
       
   273 	{
       
   274 	RDebug::Print(_L("Plugin: Email notifier updated (asynch. call) \n"));
       
   275 	UpdateL(aBuffer);
       
   276 	TRAPD(err,aMessage.WriteL(aReplySlot,KUpdateEmailDialogResponseAsync));
       
   277 	__ASSERT_ALWAYS(!err,User::Panic(_L("WriteL(aReplySlot,KUpdateEmailDialogResponseAsync)"),err));
       
   278 	aMessage.Complete(EEikNotExtRequestCompleted);
       
   279 	}
       
   280 
       
   281 CMyEmailNotifierSubject* CMyEmailNotifierSubject::NewLC()
       
   282 	{
       
   283 	CMyEmailNotifierSubject* self=new (ELeave) CMyEmailNotifierSubject();
       
   284 	CleanupStack::PushL(self);
       
   285 	self->ConstructL();
       
   286 	return self;
       
   287 	}
       
   288 
       
   289 CMyEmailNotifierSubject::CMyEmailNotifierSubject()
       
   290 	{
       
   291 	}
       
   292 
       
   293 void CMyEmailNotifierSubject::ConstructL()
       
   294 	{
       
   295 	//Get the system filesession	
       
   296 	RFs& fs = CEikonEnv::Static()->FsSession(); 
       
   297 	//Get the file finder 
       
   298 	TFindFile* findFile=new(ELeave) TFindFile(fs);
       
   299     CleanupStack::PushL(findFile);
       
   300 	//File name parser
       
   301 	TParse* fileNameParser=new(ELeave) TParse;
       
   302     CleanupStack::PushL(fileNameParser);
       
   303 
       
   304 	//search for all rsc files in *\system\libs\plugins\*.rsc
       
   305 	CDir* directory=NULL;
       
   306 	User::LeaveIfError(findFile->FindWildByDir(KResFileName1, KResFileNamePath, directory));
       
   307 	CleanupStack::PushL(directory);
       
   308 
       
   309 	const TEntry& entry=(*directory)[directory->Count()-1];
       
   310 	fileNameParser->Set(entry.iName,&findFile->File(),NULL);
       
   311 	TFileName resourceFileName(fileNameParser->FullName());
       
   312 
       
   313 	BaflUtils::NearestLanguageFile(iCoeEnv->FsSession(),resourceFileName);
       
   314 	RDebug::Print(_L("Resource file name [%S]"),&resourceFileName);
       
   315 	TInt offset=iEikonEnv->AddResourceFileL(resourceFileName);
       
   316 	CleanupStack::PopAndDestroy(3);
       
   317 
       
   318 	TRAPD(err,ConstructSleepingAlertDialogL(R_EMAIL_ALERT));
       
   319 	iEikonEnv->DeleteResourceFile(offset);
       
   320 	User::LeaveIfError(err);
       
   321 	}
       
   322 
       
   323 CMyEmailNotifierSubject::~CMyEmailNotifierSubject()
       
   324 	{
       
   325 	}
       
   326 
       
   327 void CMyEmailNotifierSubject::PreLayoutDynInitL()
       
   328 	{ // must not fail
       
   329 	}
       
   330 
       
   331 TBool CMyEmailNotifierSubject::OkToExitL(TInt /*aButtonId*/)
       
   332 	{
       
   333 	iManager->CancelNotifier(iInfo.iUid);
       
   334 	return ETrue;
       
   335 	}
       
   336 
       
   337 void CMyLEDEmailNotifierSubject::Release()
       
   338 	{
       
   339 	delete this;
       
   340 	}
       
   341 
       
   342 CMyLEDEmailNotifierSubject::TNotifierInfo CMyLEDEmailNotifierSubject::RegisterL()
       
   343 	{
       
   344 	iInfo.iUid=KMyNewEmailNotifierUid;
       
   345 	iInfo.iChannel=KLEDOutputChannel;
       
   346 	iInfo.iPriority=ENotifierPriorityVLow;
       
   347 	return iInfo;
       
   348 	}
       
   349 
       
   350 CMyLEDEmailNotifierSubject::TNotifierInfo CMyLEDEmailNotifierSubject::Info() const
       
   351 	{
       
   352 	return iInfo;
       
   353 	}
       
   354 
       
   355 TPtrC8 CMyLEDEmailNotifierSubject::StartL(const TDesC8& aBuffer)
       
   356 	{
       
   357 	RDebug::Print(_L("Plugin: LED email notifier started\n"));
       
   358 	TBuf<100> buffer;
       
   359 	buffer.Copy(aBuffer);
       
   360 	iBusyMsgWin->StartDisplay(buffer,EHLeftVCenter);
       
   361 	return KNullDesC8();
       
   362 	}
       
   363 
       
   364 void CMyLEDEmailNotifierSubject::StartL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
       
   365 	{
       
   366 	RDebug::Print(_L("Plugin: LED email notifier started (asynch.)\n"));
       
   367 	TRAPD(err,aMessage.WriteL(aReplySlot,KStartEmailLEDResponse));
       
   368 	__ASSERT_ALWAYS(!err,User::Panic(_L("WriteL(aReplySlot,KStartEmailLEDResponse)"),err));
       
   369 	StartL(aBuffer);
       
   370 	
       
   371 //	aMessage.Complete(EEikNotExtRequestCompleted);
       
   372 	}
       
   373 
       
   374 void CMyLEDEmailNotifierSubject::Cancel()
       
   375 	{
       
   376 	RDebug::Print(_L("Plugin: LED email notifier canceled\n"));
       
   377 	iBusyMsgWin->CancelDisplay();
       
   378 	}
       
   379 
       
   380 TPtrC8 CMyLEDEmailNotifierSubject::UpdateL(const TDesC8& aBuffer)
       
   381 	{
       
   382 	RDebug::Print(_L("Plugin: LED email notifier updated\n"));
       
   383 	TBuf<100> buffer;
       
   384 	buffer.Copy(aBuffer);
       
   385 	CEikonEnv::Static()->InfoMsgWithAlignment(EHLeftVBottom,buffer);
       
   386 	return KUpdateEmailLEDResponse();
       
   387 	}
       
   388 
       
   389 void CMyLEDEmailNotifierSubject::UpdateL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
       
   390 	{
       
   391 	RDebug::Print(_L("Plugin: LED Email notifier updated (asynch. call) \n"));
       
   392 	UpdateL(aBuffer);
       
   393 	TRAPD(err,aMessage.WriteL(aReplySlot,KUpdateEmailLEDResponseAsync));
       
   394 	__ASSERT_ALWAYS(err,User::Panic(_L("WriteL(aReplySlot,KUpdateEmailLEDResponseAsync)"),err));
       
   395 	}
       
   396 
       
   397 CMyLEDEmailNotifierSubject* CMyLEDEmailNotifierSubject::NewLC()
       
   398 	{
       
   399 	CMyLEDEmailNotifierSubject* self=new (ELeave) CMyLEDEmailNotifierSubject();
       
   400 	CleanupStack::PushL(self);
       
   401 	self->ConstructL();
       
   402 	return self;
       
   403 	}
       
   404 
       
   405 CMyLEDEmailNotifierSubject::CMyLEDEmailNotifierSubject()
       
   406 	{
       
   407 	}
       
   408 
       
   409 void CMyLEDEmailNotifierSubject::ConstructL()
       
   410 	{
       
   411 	iBusyMsgWin=new(ELeave) CEikBusyMsgWin(*iEikonEnv);
       
   412 	iBusyMsgWin->ConstructL(iEikonEnv->RootWin());
       
   413 	}
       
   414 
       
   415 CMyLEDEmailNotifierSubject::~CMyLEDEmailNotifierSubject()
       
   416 	{
       
   417 	delete iBusyMsgWin;
       
   418 	}
       
   419 
       
   420 void CMyLEDSmsNotifierSubject::Release()
       
   421 	{
       
   422 	delete this;
       
   423 	}
       
   424 
       
   425 CMyLEDSmsNotifierSubject::TNotifierInfo CMyLEDSmsNotifierSubject::RegisterL()
       
   426 	{
       
   427 	iInfo.iUid=KMyNewSmsNotifierUid;
       
   428 	iInfo.iChannel=KLEDOutputChannel;
       
   429 	iInfo.iPriority=ENotifierPriorityHigh;
       
   430 	return iInfo;
       
   431 	}
       
   432 
       
   433 CMyLEDSmsNotifierSubject::TNotifierInfo CMyLEDSmsNotifierSubject::Info() const
       
   434 	{
       
   435 	return iInfo;
       
   436 	}
       
   437 
       
   438 TPtrC8 CMyLEDSmsNotifierSubject::StartL(const TDesC8& aBuffer)
       
   439 	{
       
   440 	RDebug::Print(_L("Plugin: LED SMS notifier started\n"));
       
   441 	TBuf<100> buffer;
       
   442 	buffer.Copy(aBuffer);
       
   443 	iBusyMsgWin->StartDisplay(buffer,EHLeftVCenter);
       
   444 	return KNullDesC8();
       
   445 	}
       
   446 
       
   447 void CMyLEDSmsNotifierSubject::StartL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
       
   448 	{
       
   449 	RDebug::Print(_L("Plugin: LED SMS notifier started (asynch.)\n"));
       
   450 	TRAPD(err,aMessage.WriteL(aReplySlot,KStartSmsLEDResponse));
       
   451 	__ASSERT_ALWAYS(!err,User::Panic(_L("WriteL(aReplySlot,KUpdateEmailDialogResponseAsync)"),err));
       
   452 	StartL(aBuffer);
       
   453 //	aMessage.Complete(EEikNotExtRequestCompleted);
       
   454 	}
       
   455 
       
   456 void CMyLEDSmsNotifierSubject::Cancel()
       
   457 	{
       
   458 	RDebug::Print(_L("Plugin: LED SMS notifier canceled\n"));
       
   459 	iBusyMsgWin->CancelDisplay();
       
   460 	}
       
   461 
       
   462 TPtrC8 CMyLEDSmsNotifierSubject::UpdateL(const TDesC8& aBuffer)
       
   463 	{
       
   464 	RDebug::Print(_L("Plugin: LED SMS notifier updated\n"));
       
   465 	TBuf<100> buffer;
       
   466 	buffer.Copy(aBuffer);
       
   467 	CEikonEnv::Static()->InfoMsgWithAlignment(EHLeftVBottom,buffer);
       
   468 	return KUpdateSmsLEDResponse();
       
   469 	}
       
   470 
       
   471 void CMyLEDSmsNotifierSubject::UpdateL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage)
       
   472 	{
       
   473 	RDebug::Print(_L("Plugin: LED SMS notifier updated (asynch. call) \n"));
       
   474 	UpdateL(aBuffer);
       
   475 	TRAPD(err,aMessage.WriteL(aReplySlot,KUpdateSmsLEDResponseAsync));
       
   476 	__ASSERT_ALWAYS(!err,User::Panic(_L("WriteL(aReplySlot,KUpdateSmsLEDResponseAsync"),err));
       
   477 	}
       
   478 
       
   479 CMyLEDSmsNotifierSubject* CMyLEDSmsNotifierSubject::NewLC()
       
   480 	{
       
   481 	CMyLEDSmsNotifierSubject* self=new (ELeave) CMyLEDSmsNotifierSubject();
       
   482 	CleanupStack::PushL(self);
       
   483 	self->ConstructL();
       
   484 	return self;
       
   485 	}
       
   486 
       
   487 CMyLEDSmsNotifierSubject::CMyLEDSmsNotifierSubject()
       
   488 	{
       
   489 	}
       
   490 
       
   491 void CMyLEDSmsNotifierSubject::ConstructL()
       
   492 	{
       
   493 	iBusyMsgWin=new(ELeave) CEikBusyMsgWin(*iEikonEnv);
       
   494 	iBusyMsgWin->ConstructL(iEikonEnv->RootWin());
       
   495 	}
       
   496 
       
   497 CMyLEDSmsNotifierSubject::~CMyLEDSmsNotifierSubject()
       
   498 	{
       
   499 	delete iBusyMsgWin;
       
   500 	}
       
   501 
       
   502 //Adding ECOM SUPPORT
       
   503 #include <ecom/implementationproxy.h>
       
   504 const TImplementationProxy ImplementationTable[] =
       
   505 	{
       
   506 	IMPLEMENTATION_PROXY_ENTRY(0x10022238,NotifierArray1),
       
   507 	IMPLEMENTATION_PROXY_ENTRY(0x10022237,NotifierArray2)
       
   508 	};
       
   509 
       
   510 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
       
   511 	{
       
   512 	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy) ;
       
   513 	return ImplementationTable;
       
   514 	}