22 #include <StifParser.h> |
22 #include <StifParser.h> |
23 #include <Stiftestinterface.h> |
23 #include <Stiftestinterface.h> |
24 #include <cpixcontentinfocommon.h> |
24 #include <cpixcontentinfocommon.h> |
25 #include <sqldb.h> |
25 #include <sqldb.h> |
26 #include "CBlacklistMgr.h" |
26 #include "CBlacklistMgr.h" |
27 #include "contentinfomgr.h" |
27 //#include "contentinfomgr.h" |
28 #include "ccontentinfo.h" |
28 //#include "ccontentinfo.h" |
29 |
29 |
30 // EXTERNAL DATA STRUCTURES |
30 // EXTERNAL DATA STRUCTURES |
31 //extern ?external_data; |
31 //extern ?external_data; |
32 |
32 |
33 // EXTERNAL FUNCTION PROTOTYPES |
33 // EXTERNAL FUNCTION PROTOTYPES |
271 // CCPixMWTester::TestDeleteContentInfoDBL |
271 // CCPixMWTester::TestDeleteContentInfoDBL |
272 // ----------------------------------------------------------------------------- |
272 // ----------------------------------------------------------------------------- |
273 // |
273 // |
274 TInt CCPixMWTester::TestDeleteContentInfoDBL( CStifItemParser& /*aItem*/) |
274 TInt CCPixMWTester::TestDeleteContentInfoDBL( CStifItemParser& /*aItem*/) |
275 { |
275 { |
276 RFs fssession; |
276 /*RFs fssession; |
277 CContentInfoMgr* contentInfoMgr = NULL; |
277 CContentInfoMgr* contentInfoMgr = NULL; |
278 User::LeaveIfError( fssession.Connect() ); |
278 User::LeaveIfError( fssession.Connect() ); |
279 TFileName privatePath; |
279 TFileName privatePath; |
280 TFileName datafile; |
280 TFileName datafile; |
281 fssession.CreatePrivatePath(EDriveC); |
281 fssession.CreatePrivatePath(EDriveC); |
286 //delete the database file |
286 //delete the database file |
287 fssession.Delete( datafile ); |
287 fssession.Delete( datafile ); |
288 TRAPD ( err , contentInfoMgr = CContentInfoMgr::NewL() ); |
288 TRAPD ( err , contentInfoMgr = CContentInfoMgr::NewL() ); |
289 delete contentInfoMgr; |
289 delete contentInfoMgr; |
290 doLog( iLog, err, KNoErrorString ); |
290 doLog( iLog, err, KNoErrorString ); |
291 return err; |
291 return err;*/ |
|
292 return KErrNone; |
292 } |
293 } |
293 // ----------------------------------------------------------------------------- |
294 // ----------------------------------------------------------------------------- |
294 // CCPixMWTester::TestAddContentL |
295 // CCPixMWTester::TestAddContentL |
295 // ----------------------------------------------------------------------------- |
296 // ----------------------------------------------------------------------------- |
296 // |
297 // |
297 TInt CCPixMWTester::TestAddContentL( CStifItemParser& aItem) |
298 TInt CCPixMWTester::TestAddContentL( CStifItemParser& aItem) |
298 { |
299 { |
299 RFs fssession; |
300 /*RFs fssession; |
300 TPtrC content; |
301 TPtrC content; |
301 TInt err = KErrNone; |
302 TInt err = KErrNone; |
302 aItem.GetNextString( content ); |
303 aItem.GetNextString( content ); |
303 CContentInfoMgr* contentInfoMgr = CContentInfoMgr::NewL(); |
304 CContentInfoMgr* contentInfoMgr = CContentInfoMgr::NewL(); |
304 CContentInfo* contentinfo = CContentInfo::NewL(); |
305 CContentInfo* contentinfo = CContentInfo::NewL(); |
313 //Find if the content exists |
314 //Find if the content exists |
314 TBool found = contentInfoMgr->FindL( content ); |
315 TBool found = contentInfoMgr->FindL( content ); |
315 delete contentInfoMgr; |
316 delete contentInfoMgr; |
316 if ( !found ) err = KErrNotFound; |
317 if ( !found ) err = KErrNotFound; |
317 doLog( iLog, err, KNoErrorString ); |
318 doLog( iLog, err, KNoErrorString ); |
318 return err; |
319 return err;*/ |
|
320 return KErrNone; |
319 } |
321 } |
320 // ----------------------------------------------------------------------------- |
322 // ----------------------------------------------------------------------------- |
321 // CCPixMWTester::TestRemoveContentL |
323 // CCPixMWTester::TestRemoveContentL |
322 // ----------------------------------------------------------------------------- |
324 // ----------------------------------------------------------------------------- |
323 // |
325 // |
324 TInt CCPixMWTester::TestRemoveContentL( CStifItemParser& aItem) |
326 TInt CCPixMWTester::TestRemoveContentL( CStifItemParser& aItem) |
325 { |
327 { |
326 RFs fssession; |
328 /*RFs fssession; |
327 TPtrC content; |
329 TPtrC content; |
328 TInt err = KErrNotFound; |
330 TInt err = KErrNotFound; |
329 aItem.GetNextString( content ); |
331 aItem.GetNextString( content ); |
330 CContentInfoMgr* contentInfoMgr = CContentInfoMgr::NewL(); |
332 CContentInfoMgr* contentInfoMgr = CContentInfoMgr::NewL(); |
331 contentInfoMgr->ResetL(); |
333 contentInfoMgr->ResetL(); |
345 found = contentInfoMgr->FindL( content ); |
347 found = contentInfoMgr->FindL( content ); |
346 if ( !found ) err = KErrNone; |
348 if ( !found ) err = KErrNone; |
347 } |
349 } |
348 delete contentInfoMgr; |
350 delete contentInfoMgr; |
349 doLog( iLog, err, KNoErrorString ); |
351 doLog( iLog, err, KNoErrorString ); |
350 return err; |
352 return err;*/ |
|
353 return KErrNone; |
351 } |
354 } |
352 // ----------------------------------------------------------------------------- |
355 // ----------------------------------------------------------------------------- |
353 // CCPixMWTester::TestResetContentL |
356 // CCPixMWTester::TestResetContentL |
354 // ----------------------------------------------------------------------------- |
357 // ----------------------------------------------------------------------------- |
355 // |
358 // |
356 TInt CCPixMWTester::TestResetContentL( CStifItemParser& aItem) |
359 TInt CCPixMWTester::TestResetContentL( CStifItemParser& aItem) |
357 { |
360 { |
358 RFs fssession; |
361 /*RFs fssession; |
359 TPtrC content; |
362 TPtrC content; |
360 TInt err = KErrNotFound; |
363 TInt err = KErrNotFound; |
361 aItem.GetNextString( content ); |
364 aItem.GetNextString( content ); |
362 CContentInfoMgr* contentInfoMgr = CContentInfoMgr::NewL(); |
365 CContentInfoMgr* contentInfoMgr = CContentInfoMgr::NewL(); |
363 CContentInfo* contentinfo = CContentInfo::NewL(); |
366 CContentInfo* contentinfo = CContentInfo::NewL(); |
376 count = contentInfoMgr->GetContentCountL( ); |
379 count = contentInfoMgr->GetContentCountL( ); |
377 if ( !count ) err = KErrNone; |
380 if ( !count ) err = KErrNone; |
378 } |
381 } |
379 delete contentInfoMgr; |
382 delete contentInfoMgr; |
380 doLog( iLog, err, KNoErrorString ); |
383 doLog( iLog, err, KNoErrorString ); |
381 return err; |
384 return err;*/ |
|
385 return KErrNone; |
382 } |
386 } |
383 // ----------------------------------------------------------------------------- |
387 // ----------------------------------------------------------------------------- |
384 // CCPixMWTester::TestUpdateBLStatusL |
388 // CCPixMWTester::TestUpdateBLStatusL |
385 // ----------------------------------------------------------------------------- |
389 // ----------------------------------------------------------------------------- |
386 // |
390 // |
387 TInt CCPixMWTester::TestUpdateBLStatusL( CStifItemParser& aItem) |
391 TInt CCPixMWTester::TestUpdateBLStatusL( CStifItemParser& aItem) |
388 { |
392 { |
389 RFs fssession; |
393 /*RFs fssession; |
390 TPtrC content; |
394 TPtrC content; |
391 TInt err = KErrNotFound; |
395 TInt err = KErrNotFound; |
392 aItem.GetNextString( content ); |
396 aItem.GetNextString( content ); |
393 CContentInfoMgr* contentInfoMgr = CContentInfoMgr::NewL(); |
397 CContentInfoMgr* contentInfoMgr = CContentInfoMgr::NewL(); |
394 contentInfoMgr->ResetL(); |
398 contentInfoMgr->ResetL(); |
404 TInt blstatus =0,instatus = 0; |
408 TInt blstatus =0,instatus = 0; |
405 getcontentstatus ( content , blstatus , instatus); |
409 getcontentstatus ( content , blstatus , instatus); |
406 if ( blstatus ) err = KErrNone; |
410 if ( blstatus ) err = KErrNone; |
407 delete contentInfoMgr; |
411 delete contentInfoMgr; |
408 doLog( iLog, err, KNoErrorString ); |
412 doLog( iLog, err, KNoErrorString ); |
409 return err; |
413 return err;*/ |
|
414 return KErrNone; |
410 } |
415 } |
411 |
416 |
412 // ----------------------------------------------------------------------------- |
417 // ----------------------------------------------------------------------------- |
413 // CCPixMWTester::TestUpdateINStatusL |
418 // CCPixMWTester::TestUpdateINStatusL |
414 // ----------------------------------------------------------------------------- |
419 // ----------------------------------------------------------------------------- |
415 // |
420 // |
416 TInt CCPixMWTester::TestUpdateINStatusL( CStifItemParser& aItem) |
421 TInt CCPixMWTester::TestUpdateINStatusL( CStifItemParser& aItem) |
417 { |
422 { |
418 RFs fssession; |
423 /*RFs fssession; |
419 TPtrC content; |
424 TPtrC content; |
420 TInt err = KErrNotFound; |
425 TInt err = KErrNotFound; |
421 aItem.GetNextString( content ); |
426 aItem.GetNextString( content ); |
422 CContentInfoMgr* contentInfoMgr = CContentInfoMgr::NewL(); |
427 CContentInfoMgr* contentInfoMgr = CContentInfoMgr::NewL(); |
423 contentInfoMgr->ResetL(); |
428 contentInfoMgr->ResetL(); |
433 TInt blstatus = 0,instatus = 1; |
438 TInt blstatus = 0,instatus = 1; |
434 getcontentstatus ( content , blstatus , instatus); |
439 getcontentstatus ( content , blstatus , instatus); |
435 if ( !blstatus ) err = KErrNone; |
440 if ( !blstatus ) err = KErrNone; |
436 delete contentInfoMgr; |
441 delete contentInfoMgr; |
437 doLog( iLog, err, KNoErrorString ); |
442 doLog( iLog, err, KNoErrorString ); |
438 return err; |
443 return err;*/ |
|
444 return KErrNone; |
439 } |
445 } |
440 |
446 |
441 // ----------------------------------------------------------------------------- |
447 // ----------------------------------------------------------------------------- |
442 // CCPixMWTester::TestAddUnloadlistL |
448 // CCPixMWTester::TestAddUnloadlistL |
443 // ----------------------------------------------------------------------------- |
449 // ----------------------------------------------------------------------------- |