idlefw/tsrc/devicestatusplugin/mt_devstaplg/contentobserver.cpp
branchRCL_3
changeset 31 8baec10861af
parent 28 053c6c7c14f3
equal deleted inserted replaced
30:a5a39a295112 31:8baec10861af
    94 	{
    94 	{
    95 	iCache.ResetAndDestroy();
    95 	iCache.ResetAndDestroy();
    96 	}
    96 	}
    97 
    97 
    98 
    98 
    99 TInt CContentObserver::StartTransaction(TInt aTxId)
    99 TInt CContentObserver::StartTransaction(TInt /*aTxId*/)
   100 	{
   100 	{
   101 	return 0;
   101 	return 0;
   102 	}
   102 	}
   103 
   103 
   104 
   104 
   105 TInt CContentObserver::Commit(TInt aTxId)
   105 TInt CContentObserver::Commit(TInt /*aTxId*/)
   106 	{
   106 	{
   107 	return 0;
   107 	return 0;
   108 	}
   108 	}
   109 
   109 
   110 
   110 
   111 TInt CContentObserver::CancelTransaction(TInt aTxId)
   111 TInt CContentObserver::CancelTransaction(TInt /*aTxId*/)
   112 	{
   112 	{
   113 	return 0;
   113 	return 0;
   114 	}
   114 	}
   115 	
   115 	
   116 
   116 
   118     {
   118     {
   119     return EFalse;
   119     return EFalse;
   120     }
   120     }
   121 
   121 
   122 
   122 
   123 TInt CContentObserver::Publish(CHsContentPublisher& aPlugin, TInt aContent, TInt aResource, TInt aIndex )
   123 TInt CContentObserver::Publish(CHsContentPublisher& /*aPlugin*/, TInt aContent, TInt aResource, TInt aIndex )
   124 	{
   124 	{
   125 	RDebug::Print( _L("Publish(%d, %d, %d)"), aContent, aResource, aIndex );
   125 	RDebug::Print( _L("Publish(%d, %d, %d)"), aContent, aResource, aIndex );
   126 	CContentCache* cache = new( ELeave )CContentCache;
   126 	CContentCache* cache = new( ELeave )CContentCache;
   127 	CleanupStack::PushL( cache );
   127 	CleanupStack::PushL( cache );
   128 	cache->iId = aContent;
   128 	cache->iId = aContent;
   131 	User::LeaveIfError( iCache.Append( cache ) );
   131 	User::LeaveIfError( iCache.Append( cache ) );
   132 	CleanupStack::Pop( cache );
   132 	CleanupStack::Pop( cache );
   133 	return 0;
   133 	return 0;
   134 	}
   134 	}
   135 
   135 
   136 TInt CContentObserver::Publish(CHsContentPublisher& aPlugin, TInt aContent, const TDesC16& aText, TInt aIndex )
   136 TInt CContentObserver::Publish(CHsContentPublisher& /*aPlugin*/, TInt aContent, const TDesC16& aText, TInt aIndex )
   137 	{
   137 	{
   138 	RDebug::Print( _L("Publish(%d, \"%S\", %d)"), aContent, &aText, aIndex );
   138 	RDebug::Print( _L("Publish(%d, \"%S\", %d)"), aContent, &aText, aIndex );
   139 	CContentCache* cache = new( ELeave )CContentCache;
   139 	CContentCache* cache = new( ELeave )CContentCache;
   140 	CleanupStack::PushL( cache );
   140 	CleanupStack::PushL( cache );
   141 	cache->iId = aContent;
   141 	cache->iId = aContent;
   145 	CleanupStack::Pop( cache );
   145 	CleanupStack::Pop( cache );
   146 	return 0;
   146 	return 0;
   147 	}
   147 	}
   148 
   148 
   149 
   149 
   150 TInt CContentObserver::Publish(CHsContentPublisher& aPlugin, TInt aContent, const TDesC8& aBuf, TInt aIndex )
   150 TInt CContentObserver::Publish(CHsContentPublisher& /*aPlugin*/, TInt aContent, const TDesC8& aBuf, TInt aIndex )
   151 	{
   151 	{
   152 	RDebug::Print( _L("Publish(%d, Buf.Len=%d, %d)"), aContent, aBuf.Length(), aIndex );
   152 	RDebug::Print( _L("Publish(%d, Buf.Len=%d, %d)"), aContent, aBuf.Length(), aIndex );
   153 	CContentCache* cache = new( ELeave )CContentCache;
   153 	CContentCache* cache = new( ELeave )CContentCache;
   154 	CleanupStack::PushL( cache );
   154 	CleanupStack::PushL( cache );
   155 	cache->iId = aContent;
   155 	cache->iId = aContent;
   159 	CleanupStack::Pop( cache );
   159 	CleanupStack::Pop( cache );
   160 	return 0;
   160 	return 0;
   161 	}
   161 	}
   162 
   162 
   163 
   163 
   164 TInt CContentObserver::Publish(CHsContentPublisher& aPlugin, TInt aContent, RFile& aFile, TInt aIndex )
   164 TInt CContentObserver::Publish(CHsContentPublisher& /*aPlugin*/, TInt aContent, RFile& /*aFile*/, TInt aIndex )
   165 	{
   165 	{
   166 	CContentCache* cache = new( ELeave )CContentCache;
   166 	CContentCache* cache = new( ELeave )CContentCache;
   167 	CleanupStack::PushL( cache );
   167 	CleanupStack::PushL( cache );
   168 	cache->iId = aContent;
   168 	cache->iId = aContent;
   169 	cache->iIndex = aIndex;
   169 	cache->iIndex = aIndex;
   170 	User::LeaveIfError( iCache.Append( cache ) );
   170 	User::LeaveIfError( iCache.Append( cache ) );
   171 	CleanupStack::Pop( cache );
   171 	CleanupStack::Pop( cache );
   172 	return 0;
   172 	return 0;
   173 	}
   173 	}
   174 
   174 
   175 
   175 
   176 TInt CContentObserver::Clean(CHsContentPublisher& aPlugin, TInt aContent, TInt aIndex)
   176 TInt CContentObserver::Clean(CHsContentPublisher& /*aPlugin*/, TInt aContent, TInt aIndex)
   177 	{
   177 	{
   178 	RDebug::Print( _L("Clean(%d, %d)"), aContent, aIndex );
   178 	RDebug::Print( _L("Clean(%d, %d)"), aContent, aIndex );
   179 	CContentCache* cache = new( ELeave )CContentCache;
   179 	CContentCache* cache = new( ELeave )CContentCache;
   180 	CleanupStack::PushL( cache );
   180 	CleanupStack::PushL( cache );
   181 	cache->iId = aContent;
   181 	cache->iId = aContent;
   185 	CleanupStack::Pop( cache );
   185 	CleanupStack::Pop( cache );
   186 	return 0;
   186 	return 0;
   187 	}
   187 	}
   188 
   188 
   189 
   189 
   190 TAny* CContentObserver::Extension(TUid aUid)
   190 TAny* CContentObserver::Extension(TUid /*aUid*/)
   191 	{
   191 	{
   192 	return NULL;
   192 	return NULL;
   193 	}
   193 	}
   194 
   194 
   195 TBool CContentObserver::RequiresSubscription( const THsPublisherInfo& aPublisherInfo ) const
   195 TBool CContentObserver::RequiresSubscription( const THsPublisherInfo& /*aPublisherInfo*/ ) const
   196     {
   196     {
   197     return EFalse;
   197     return EFalse;
   198     }
   198     }
   199     
   199     
   200 // ---------------------------------------------------------------------------
   200 // ---------------------------------------------------------------------------