equal
deleted
inserted
replaced
35 |
35 |
36 #include "debug.h" |
36 #include "debug.h" |
37 |
37 |
38 // Constants |
38 // Constants |
39 _LIT8( KLockingStatusLocked, "locked" ); |
39 _LIT8( KLockingStatusLocked, "locked" ); |
40 _LIT8( KLockingStatusPermanent, "permanent" ); |
|
41 |
40 |
42 // ============================ LOCAL FUNCTIONS ================================ |
41 // ============================ LOCAL FUNCTIONS ================================ |
43 |
42 |
44 // ============================ MEMBER FUNCTIONS =============================== |
43 // ============================ MEMBER FUNCTIONS =============================== |
45 // ----------------------------------------------------------------------------- |
44 // ----------------------------------------------------------------------------- |
496 // ----------------------------------------------------------------------------- |
495 // ----------------------------------------------------------------------------- |
497 // |
496 // |
498 void CXnPluginData::Flush() |
497 void CXnPluginData::Flush() |
499 { |
498 { |
500 // Don't touch to iOwner, because this plugin might be reused later |
499 // Don't touch to iOwner, because this plugin might be reused later |
501 |
500 |
502 delete iDirtyRegion; |
|
503 iDirtyRegion = NULL; |
|
504 |
|
505 // clear all flags, except editable and removable |
|
506 TBool removable = iFlags.IsSet( EIsRemovable ); |
|
507 TBool editable = iFlags.IsSet( EIsEditable ); |
|
508 |
|
509 iFlags.ClearAll(); |
501 iFlags.ClearAll(); |
510 |
502 |
511 if( removable ) |
503 // This is default |
512 { |
504 iFlags.Set( EIsRemovable ); |
513 iFlags.Set( EIsRemovable ); |
505 |
514 } |
|
515 if( editable ) |
|
516 { |
|
517 iFlags.Set( EIsEditable ); |
|
518 } |
|
519 |
|
520 iNode = NULL; |
506 iNode = NULL; |
521 |
507 |
522 delete iConfigurationId; |
508 delete iConfigurationId; |
523 iConfigurationId = NULL; |
509 iConfigurationId = NULL; |
524 |
510 |
563 { |
549 { |
564 return ( iFlags.IsSet( EIsEmpty ) ? ETrue : EFalse ); |
550 return ( iFlags.IsSet( EIsEmpty ) ? ETrue : EFalse ); |
565 } |
551 } |
566 |
552 |
567 // ----------------------------------------------------------------------------- |
553 // ----------------------------------------------------------------------------- |
568 // CXnPluginData::SetEmptyL() |
554 // CXnPluginData::SetEmpty() |
569 // |
555 // |
570 // ----------------------------------------------------------------------------- |
556 // ----------------------------------------------------------------------------- |
571 // |
557 // |
572 void CXnPluginData::SetEmptyL( const TDesC8& aPluginId ) |
558 void CXnPluginData::SetEmptyL( const TDesC8& aPluginId ) |
573 { |
559 { |
636 // |
622 // |
637 // ----------------------------------------------------------------------------- |
623 // ----------------------------------------------------------------------------- |
638 // |
624 // |
639 void CXnPluginData::SetLockingStatus( const TDesC8& aStatus ) |
625 void CXnPluginData::SetLockingStatus( const TDesC8& aStatus ) |
640 { |
626 { |
641 if( aStatus.CompareF( KLockingStatusPermanent ) == 0 ) |
627 if ( aStatus.CompareF( KLockingStatusLocked ) == 0 ) |
642 { |
628 { |
643 iFlags.Clear( EIsRemovable ); |
629 iFlags.Clear( EIsRemovable ); |
644 iFlags.Clear( EIsEditable ); |
|
645 } |
|
646 else if( aStatus.CompareF( KLockingStatusLocked ) == 0 ) |
|
647 { |
|
648 iFlags.Clear( EIsRemovable ); |
|
649 iFlags.Set( EIsEditable ); |
|
650 } |
630 } |
651 else |
631 else |
652 { |
632 { |
653 iFlags.Set( EIsRemovable ); |
633 iFlags.Set( EIsRemovable ); |
654 iFlags.Set( EIsEditable ); |
634 } |
655 } |
635 } |
656 } |
636 |
657 |
|
658 // ----------------------------------------------------------------------------- |
|
659 // ----------------------------------------------------------------------------- |
|
660 // |
|
661 TXnDirtyRegion* CXnPluginData::CreateDirtyRegionL( CXnNode& aRootNode, |
|
662 CCoeControl& aControl ) |
|
663 { |
|
664 delete iDirtyRegion; |
|
665 iDirtyRegion = NULL; |
|
666 iDirtyRegion = new (ELeave) TXnDirtyRegion; |
|
667 iDirtyRegion->iRegion.Clear(); |
|
668 iDirtyRegion->iControl = &aControl; |
|
669 iDirtyRegion->iRootNode = &aRootNode; |
|
670 iDirtyRegion->iDirtyList.Reset(); |
|
671 iDirtyRegion->iLayoutControl = 0; |
|
672 return iDirtyRegion; |
|
673 } |
|
674 |
|
675 // End of file |
637 // End of file |