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" ); |
40 |
41 |
41 // ============================ LOCAL FUNCTIONS ================================ |
42 // ============================ LOCAL FUNCTIONS ================================ |
42 |
43 |
43 // ============================ MEMBER FUNCTIONS =============================== |
44 // ============================ MEMBER FUNCTIONS =============================== |
44 // ----------------------------------------------------------------------------- |
45 // ----------------------------------------------------------------------------- |
495 // ----------------------------------------------------------------------------- |
496 // ----------------------------------------------------------------------------- |
496 // |
497 // |
497 void CXnPluginData::Flush() |
498 void CXnPluginData::Flush() |
498 { |
499 { |
499 // Don't touch to iOwner, because this plugin might be reused later |
500 // Don't touch to iOwner, because this plugin might be reused later |
500 |
501 |
|
502 // clear all flags, except editable and removable |
|
503 TBool removable = iFlags.IsSet( EIsRemovable ); |
|
504 TBool editable = iFlags.IsSet( EIsEditable ); |
|
505 |
501 iFlags.ClearAll(); |
506 iFlags.ClearAll(); |
502 |
507 |
503 // This is default |
508 if( removable ) |
504 iFlags.Set( EIsRemovable ); |
509 { |
505 |
510 iFlags.Set( EIsRemovable ); |
|
511 } |
|
512 if( editable ) |
|
513 { |
|
514 iFlags.Set( EIsEditable ); |
|
515 } |
|
516 |
506 iNode = NULL; |
517 iNode = NULL; |
507 |
518 |
508 delete iConfigurationId; |
519 delete iConfigurationId; |
509 iConfigurationId = NULL; |
520 iConfigurationId = NULL; |
510 |
521 |
549 { |
560 { |
550 return ( iFlags.IsSet( EIsEmpty ) ? ETrue : EFalse ); |
561 return ( iFlags.IsSet( EIsEmpty ) ? ETrue : EFalse ); |
551 } |
562 } |
552 |
563 |
553 // ----------------------------------------------------------------------------- |
564 // ----------------------------------------------------------------------------- |
554 // CXnPluginData::SetEmpty() |
565 // CXnPluginData::SetEmptyL() |
555 // |
566 // |
556 // ----------------------------------------------------------------------------- |
567 // ----------------------------------------------------------------------------- |
557 // |
568 // |
558 void CXnPluginData::SetEmptyL( const TDesC8& aPluginId ) |
569 void CXnPluginData::SetEmptyL( const TDesC8& aPluginId ) |
559 { |
570 { |
622 // |
633 // |
623 // ----------------------------------------------------------------------------- |
634 // ----------------------------------------------------------------------------- |
624 // |
635 // |
625 void CXnPluginData::SetLockingStatus( const TDesC8& aStatus ) |
636 void CXnPluginData::SetLockingStatus( const TDesC8& aStatus ) |
626 { |
637 { |
627 if ( aStatus.CompareF( KLockingStatusLocked ) == 0 ) |
638 if( aStatus.CompareF( KLockingStatusPermanent ) == 0 ) |
628 { |
639 { |
629 iFlags.Clear( EIsRemovable ); |
640 iFlags.Clear( EIsRemovable ); |
|
641 iFlags.Clear( EIsEditable ); |
|
642 } |
|
643 else if( aStatus.CompareF( KLockingStatusLocked ) == 0 ) |
|
644 { |
|
645 iFlags.Clear( EIsRemovable ); |
|
646 iFlags.Set( EIsEditable ); |
630 } |
647 } |
631 else |
648 else |
632 { |
649 { |
633 iFlags.Set( EIsRemovable ); |
650 iFlags.Set( EIsRemovable ); |
|
651 iFlags.Set( EIsEditable ); |
634 } |
652 } |
635 } |
653 } |
636 |
654 |
637 // End of file |
655 // End of file |