stif/StifTFwIf/src/UIStore.cpp
branchRCL_3
changeset 18 3406c99bc375
parent 14 a9c038d69df8
equal deleted inserted replaced
16:8f8df8006c40 18:3406c99bc375
  1029 
  1029 
  1030 -------------------------------------------------------------------------------
  1030 -------------------------------------------------------------------------------
  1031 */ 
  1031 */ 
  1032 EXPORT_C TInt CUIStore::RemoveTestSet( const TDesC& aSetName )
  1032 EXPORT_C TInt CUIStore::RemoveTestSet( const TDesC& aSetName )
  1033     {
  1033     {
  1034     
  1034     TInt err = UnloadTestSet( aSetName );
       
  1035     if ( err != KErrNone )
       
  1036         {
       
  1037         return err;
       
  1038         }
       
  1039     
       
  1040     TFileName setfile;
       
  1041     setfile.Append(KUIStoreDefaultDir);
       
  1042     setfile.Append(aSetName);
       
  1043     RFs fs;
       
  1044     err = fs.Connect();
       
  1045     if( err != KErrNone )
       
  1046         {
       
  1047         fs.Close();
       
  1048         return err;
       
  1049         }
       
  1050     err = fs.Delete( setfile );
       
  1051     if ( err != KErrNone )
       
  1052         {
       
  1053         fs.Close();
       
  1054         return err;    
       
  1055         }
       
  1056     
       
  1057     return KErrNone;   
       
  1058     }
       
  1059 
       
  1060 /*
       
  1061 -------------------------------------------------------------------------------
       
  1062 
       
  1063     Class: CUIStore
       
  1064 
       
  1065     Method: UnloadTestSet
       
  1066 
       
  1067     Description: Unloads active test set.
       
  1068 
       
  1069     Parameters: TDesC& aSetName: in: test set name (Max length is KMaxName)
       
  1070     
       
  1071     Return Values: Symbian OS error code
       
  1072 
       
  1073     Errors/Exceptions: None
       
  1074 
       
  1075     Status: Draft
       
  1076 
       
  1077 -------------------------------------------------------------------------------
       
  1078 */ 
       
  1079 EXPORT_C TInt CUIStore::UnloadTestSet( const TDesC& aSetName )
       
  1080     {    
  1035     TPtrC setName;
  1081     TPtrC setName;
  1036     TFileName tmp;
  1082     TFileName tmp;
  1037     TInt ret = ParseTestSetName( aSetName, setName, tmp );
  1083     TInt ret = ParseTestSetName( aSetName, setName, tmp );
  1038     if( ret != KErrNone )
  1084     if( ret != KErrNone )
  1039         {
  1085         {
  1068             stset->NullOriginalTestSet();
  1114             stset->NullOriginalTestSet();
  1069             }
  1115             }
  1070         }
  1116         }
  1071     
  1117     
  1072     delete setInfo;
  1118     delete setInfo;
  1073     TFileName setfile;
  1119     
  1074     setfile.Append(KUIStoreDefaultDir);
  1120     return KErrNone;    
  1075     setfile.Append(aSetName);
       
  1076     RFs fs;
       
  1077     TInt err=fs.Connect();
       
  1078     if(err!=KErrNone)
       
  1079     {
       
  1080     fs.Close();
       
  1081     return err;
       
  1082     }
       
  1083     err=fs.Delete(setfile);
       
  1084     if(err!=KErrNone)
       
  1085     {
       
  1086     fs.Close();
       
  1087     return err;    
       
  1088     }
       
  1089     
       
  1090     return KErrNone;
       
  1091     
       
  1092     }
  1121     }
  1093 
  1122 
  1094 /*
  1123 /*
  1095 -------------------------------------------------------------------------------
  1124 -------------------------------------------------------------------------------
  1096 
  1125