equal
deleted
inserted
replaced
66 // Symbian OS default constructor |
66 // Symbian OS default constructor |
67 // --------------------------------------------------------------------------- |
67 // --------------------------------------------------------------------------- |
68 void CLockAppCenRepObserver::ConstructL( ) |
68 void CLockAppCenRepObserver::ConstructL( ) |
69 { |
69 { |
70 // init cenrep connection |
70 // init cenrep connection |
71 RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); |
71 INFO_4( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); |
72 iRepository = CRepository::NewL( iCenRepUid ); |
72 iRepository = CRepository::NewL( iCenRepUid ); |
73 iNotifyHandler = CCenRepNotifyHandler::NewL( *this, *iRepository, |
73 iNotifyHandler = CCenRepNotifyHandler::NewL( *this, *iRepository, |
74 CCenRepNotifyHandler::EIntKey, iKeyId ); |
74 CCenRepNotifyHandler::EIntKey, iKeyId ); |
75 iNotifyHandler->StartListeningL( ); |
75 iNotifyHandler->StartListeningL( ); |
76 } |
76 } |
86 // --------------------------------------------------------------------------- |
86 // --------------------------------------------------------------------------- |
87 // Gets value of the key from CenRep. |
87 // Gets value of the key from CenRep. |
88 // --------------------------------------------------------------------------- |
88 // --------------------------------------------------------------------------- |
89 TInt CLockAppCenRepObserver::GetKeyValue(TUint32 aKey, TInt& aValue ) |
89 TInt CLockAppCenRepObserver::GetKeyValue(TUint32 aKey, TInt& aValue ) |
90 { |
90 { |
91 RDebug::Printf( "%s %s (%u) aKey=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, aKey ); |
91 INFO_4( "%s %s (%u) aKey=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, aKey ); |
92 |
92 |
93 return iRepository->Get( aKey, aValue ); |
93 return iRepository->Get( aKey, aValue ); |
94 } |
94 } |
95 |
95 |
96 // --------------------------------------------------------------------------- |
96 // --------------------------------------------------------------------------- |
112 // --------------------------------------------------------------------------- |
112 // --------------------------------------------------------------------------- |
113 // Handles changes. Called by CenRep. |
113 // Handles changes. Called by CenRep. |
114 // --------------------------------------------------------------------------- |
114 // --------------------------------------------------------------------------- |
115 void CLockAppCenRepObserver::HandleNotifyInt(TUint32 aKeyId, TInt aValue ) |
115 void CLockAppCenRepObserver::HandleNotifyInt(TUint32 aKeyId, TInt aValue ) |
116 { |
116 { |
117 RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); |
117 INFO_4( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); |
118 if ( aKeyId == iKeyId ) |
118 if ( aKeyId == iKeyId ) |
119 { |
119 { |
120 if ( iObserver ) |
120 if ( iObserver ) |
121 { |
121 { |
122 iObserver->HandleCenRepNotify( iCenRepUid, iKeyId, aValue ); |
122 iObserver->HandleCenRepNotify( iCenRepUid, iKeyId, aValue ); |