diff --git a/symbian/inc/symgmmgr.h b/symbian/inc/symgmmgr.h index 849750e44..97a91abaa 100755 --- a/symbian/inc/symgmmgr.h +++ b/symbian/inc/symgmmgr.h @@ -61,6 +61,8 @@ class CXWGamesMgr : public CBase TBool DeleteSelected( TInt aIndex ); TBool Exists( TGameName* aName ); + TBool IsLegalName( const TGameName* aName ); + void Rename( const TDesC16* aCurName, const TDesC16* aNewName ); private: diff --git a/symbian/src/symgmmgr.cpp b/symbian/src/symgmmgr.cpp index 8e2d59dda..9dcb24a64 100755 --- a/symbian/src/symgmmgr.cpp +++ b/symbian/src/symgmmgr.cpp @@ -119,6 +119,13 @@ CXWGamesMgr::Exists( TGameName* aName ) return err == KErrNone; } +TBool +CXWGamesMgr::IsLegalName( const TGameName* aName ) +{ + RFs fs = iCoeEnv->FsSession(); + return fs.IsValidName( *aName ); +} /* IsLegalName */ + void CXWGamesMgr::GameNameToPath( TFileName* aPath, const TDesC16* aName ) { @@ -219,3 +226,20 @@ CXWGamesMgr::DeleteFileFor( TPtrC16* aName ) } return success; } + +void +CXWGamesMgr::Rename( const TDesC16* aCurName, const TDesC16* aNewName ) +{ + TFileName newName; + GameNameToPath( &newName, aNewName ); + + TFileName anOldName; + GameNameToPath( &anOldName, aCurName ); + + RFs fs = iCoeEnv->FsSession(); + TInt err = fs.Rename( anOldName, newName ); + XP_ASSERT( err == KErrNone ); + User::LeaveIfError( err ); + + BuildListL(); +} /* Rename */