equal
deleted
inserted
replaced
45 |
45 |
46 //MACROS |
46 //MACROS |
47 _LIT8( KRefreshFromNetworkDenied, "1" ); |
47 _LIT8( KRefreshFromNetworkDenied, "1" ); |
48 _LIT(KIAUpdateResourceFile, "iaupdate.rsc"); |
48 _LIT(KIAUpdateResourceFile, "iaupdate.rsc"); |
49 _LIT(KIAUpdateLauncherExe, "iaupdatelauncher.exe" ); |
49 _LIT(KIAUpdateLauncherExe, "iaupdatelauncher.exe" ); |
50 _LIT(KImageFile, "qgn_note_swupdate_notification.svg"); |
50 //_LIT(KImageFile, "qgn_note_swupdate_notification.svg"); |
51 |
51 |
52 //CONSTANTS |
52 //CONSTANTS |
53 const TUint KIADUpdateLauncherUid( 0x2001FE2F ); |
53 const TUint KIADUpdateLauncherUid( 0x2001FE2F ); |
54 |
54 |
55 // ---------------------------------------------------------- |
55 // ---------------------------------------------------------- |
1481 HBufC* sk2 = ReadResourceLC( SK2 ); |
1481 HBufC* sk2 = ReadResourceLC( SK2 ); |
1482 |
1482 |
1483 |
1483 |
1484 iMode = ModeL(); |
1484 iMode = ModeL(); |
1485 |
1485 |
|
1486 /* |
|
1487 // Commented out, so no icon is shown in the soft notification. |
|
1488 // Other functions, used by the code below, are also commented out. |
1486 if ( iMode == ENormalMode ) |
1489 if ( iMode == ENormalMode ) |
1487 { |
1490 { |
1488 TFileName path; |
1491 TFileName path; |
1489 TInt err = GetPrivatePathL( path ); |
1492 TInt err = GetPrivatePathL( path ); |
1490 |
1493 |
1493 HBufC8* image = LoadFileLC( path ); |
1496 HBufC8* image = LoadFileLC( path ); |
1494 iSoftNotification->SetImageL( *image ); |
1497 iSoftNotification->SetImageL( *image ); |
1495 CleanupStack::PopAndDestroy( image ); |
1498 CleanupStack::PopAndDestroy( image ); |
1496 } |
1499 } |
1497 } |
1500 } |
|
1501 */ |
1498 |
1502 |
1499 |
1503 |
1500 iSoftNotification->SetTextL( *text, *text ); |
1504 iSoftNotification->SetTextL( *text, *text ); |
1501 iSoftNotification->SetSoftkeyLabelsL( *sk1, *sk2 ); |
1505 iSoftNotification->SetSoftkeyLabelsL( *sk1, *sk2 ); |
1502 |
1506 |
1507 |
1511 |
1508 |
1512 |
1509 // ---------------------------------------------------------- |
1513 // ---------------------------------------------------------- |
1510 // CIAUpdateBGTimer::GetPrivatePathL() |
1514 // CIAUpdateBGTimer::GetPrivatePathL() |
1511 // ---------------------------------------------------------- |
1515 // ---------------------------------------------------------- |
1512 TInt CIAUpdateBGTimer::GetPrivatePathL( TFileName& aPath ) |
1516 TInt CIAUpdateBGTimer::GetPrivatePathL( TFileName& /*aPath*/ ) |
1513 { |
1517 { |
|
1518 /* |
1514 RFs fsSession; |
1519 RFs fsSession; |
1515 User::LeaveIfError( fsSession.Connect() ); |
1520 User::LeaveIfError( fsSession.Connect() ); |
1516 CleanupClosePushL( fsSession ); |
1521 CleanupClosePushL( fsSession ); |
1517 |
1522 |
1518 // This will set the correct drive and private path |
1523 // This will set the correct drive and private path |
1529 err = fsSession.SessionPath( aPath ); |
1534 err = fsSession.SessionPath( aPath ); |
1530 aPath.Append( KImageFile ); |
1535 aPath.Append( KImageFile ); |
1531 |
1536 |
1532 CleanupStack::PopAndDestroy( &fsSession ); |
1537 CleanupStack::PopAndDestroy( &fsSession ); |
1533 return err; |
1538 return err; |
|
1539 */ |
|
1540 return 0; |
1534 } |
1541 } |
1535 |
1542 |
1536 // ---------------------------------------------------------- |
1543 // ---------------------------------------------------------- |
1537 // CIAUpdateBGTimer::LoadFileLC() |
1544 // CIAUpdateBGTimer::LoadFileLC() |
1538 // ---------------------------------------------------------- |
1545 // ---------------------------------------------------------- |
1539 HBufC8* CIAUpdateBGTimer::LoadFileLC(const TDesC& aFile) |
1546 HBufC8* CIAUpdateBGTimer::LoadFileLC(const TDesC& /*aFile*/) |
1540 { |
1547 { |
|
1548 /* |
1541 RFs fs; |
1549 RFs fs; |
1542 User::LeaveIfError( fs.Connect() ); |
1550 User::LeaveIfError( fs.Connect() ); |
1543 CleanupClosePushL( fs ); |
1551 CleanupClosePushL( fs ); |
1544 RFile file; |
1552 RFile file; |
1545 User::LeaveIfError(file.Open(fs, aFile, EFileRead)); |
1553 User::LeaveIfError(file.Open(fs, aFile, EFileRead)); |
1551 file.Read(imageptr); |
1559 file.Read(imageptr); |
1552 CleanupStack::PopAndDestroy( &file ); |
1560 CleanupStack::PopAndDestroy( &file ); |
1553 CleanupStack::PopAndDestroy( &fs ); |
1561 CleanupStack::PopAndDestroy( &fs ); |
1554 CleanupDeletePushL(imagebuf); |
1562 CleanupDeletePushL(imagebuf); |
1555 return imagebuf; |
1563 return imagebuf; |
|
1564 */ |
|
1565 return NULL; |
1556 } |
1566 } |
1557 |
1567 |
1558 |
1568 |
1559 // ---------------------------------------------------------- |
1569 // ---------------------------------------------------------- |
1560 // CIAUpdateBGTimer::SetPrivateDriveL() |
1570 // CIAUpdateBGTimer::SetPrivateDriveL() |
1561 // ---------------------------------------------------------- |
1571 // ---------------------------------------------------------- |
1562 void CIAUpdateBGTimer::SetPrivateDriveL( |
1572 void CIAUpdateBGTimer::SetPrivateDriveL( |
1563 RFs& aFs, |
1573 RFs& /*aFs*/, |
1564 const TDesC& aFileName ) const |
1574 const TDesC& /*aFileName*/ ) const |
1565 { |
1575 { |
|
1576 /* |
1566 // First try to find the file from the private directory |
1577 // First try to find the file from the private directory |
1567 // of the drive where the process exists. |
1578 // of the drive where the process exists. |
1568 RProcess process; |
1579 RProcess process; |
1569 |
1580 |
1570 // Set the session private path according to |
1581 // Set the session private path according to |
1609 } |
1620 } |
1610 User::LeaveIfError( findErrorCode ); |
1621 User::LeaveIfError( findErrorCode ); |
1611 |
1622 |
1612 // Update the session path for the correct file. |
1623 // Update the session path for the correct file. |
1613 SetSessionPrivatePathL( aFs, finder.File() ); |
1624 SetSessionPrivatePathL( aFs, finder.File() ); |
|
1625 */ |
1614 } |
1626 } |
1615 |
1627 |
1616 |
1628 |
1617 // ---------------------------------------------------------- |
1629 // ---------------------------------------------------------- |
1618 // CIAUpdateBGTimer::SetSessionPrivatePathL() |
1630 // CIAUpdateBGTimer::SetSessionPrivatePathL() |
1619 // ---------------------------------------------------------- |
1631 // ---------------------------------------------------------- |
1620 TInt CIAUpdateBGTimer::SetSessionPrivatePathL( |
1632 TInt CIAUpdateBGTimer::SetSessionPrivatePathL( |
1621 RFs& aFs, |
1633 RFs& /*aFs*/, |
1622 const TDesC& aPath ) const |
1634 const TDesC& /*aPath*/ ) const |
1623 { |
1635 { |
|
1636 /* |
1624 // Use the parser to get the drive information from the path. |
1637 // Use the parser to get the drive information from the path. |
1625 TParsePtrC parser( aPath ); |
1638 TParsePtrC parser( aPath ); |
1626 |
1639 |
1627 if ( !parser.DrivePresent() ) |
1640 if ( !parser.DrivePresent() ) |
1628 { |
1641 { |
1639 |
1652 |
1640 // Set the file drive to be file session private path drive. |
1653 // Set the file drive to be file session private path drive. |
1641 User::LeaveIfError( aFs.SetSessionToPrivate( driveNum ) ); |
1654 User::LeaveIfError( aFs.SetSessionToPrivate( driveNum ) ); |
1642 |
1655 |
1643 return driveNum; |
1656 return driveNum; |
|
1657 */ |
|
1658 return 0; |
1644 } |
1659 } |
1645 |
1660 |
1646 // ---------------------------------------------------------- |
1661 // ---------------------------------------------------------- |
1647 // CIAUpdateBGTimer::ReadResourceLC() |
1662 // CIAUpdateBGTimer::ReadResourceLC() |
1648 // ---------------------------------------------------------- |
1663 // ---------------------------------------------------------- |