installationservices/swcomponentregistry/test/tscraccessor/inc/tscraccessor_client.h
branchRCL_3
changeset 26 8b7f4e561641
parent 25 7333d7932ef7
child 27 e8965914fac7
equal deleted inserted replaced
25:7333d7932ef7 26:8b7f4e561641
     1 /*
       
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 * SCR Accessor - client interface
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 /**
       
    21  @file 
       
    22  @test
       
    23  @internalComponent
       
    24 */
       
    25 
       
    26 #ifndef TSCRACCESSOR_CLIENT_H
       
    27 #define TSCRACCESSOR_CLIENT_H
       
    28 
       
    29 #include <e32std.h>
       
    30 #include <usif/scr/scr.h>
       
    31 
       
    32 
       
    33 class RScrAccessor : public RSessionBase
       
    34 	{
       
    35 public:
       
    36 	enum TAccessorOperationType
       
    37 		{
       
    38 		EAddNonLocalizedSoftwareType,
       
    39 		EAddLocalizedSoftwareType,
       
    40 		EAddSofwtareTypeWithoutMimeTypes,
       
    41 		EAddLocalizedSoftwareTypeWithDifferentPluginUid,
       
    42 		EAddLocalizedSoftwareTypeWithExtraName,
       
    43 		EAddLocalizedSoftwareTypeWithMissingName,
       
    44 		EAddLocalizedSoftwareTypeWithExtraMime,
       
    45 		EAddLocalizedSoftwareTypeWithMissingMime,
       
    46 		EAddMultipleSidWithLauncherExecutable
       
    47 		};
       
    48 	
       
    49 	enum TAccessorOperationResult
       
    50 		{
       
    51 		EOpSucessful,
       
    52 		EOpFailSwTypeNotFound,
       
    53 		EOpFailUnexpectedPluginUid,
       
    54 		EOpFailUnexpectedMimeTypeNum,
       
    55 		EOpFailReturnedUnexpectedMimeType,
       
    56 		EOpFailSwTypeStillExists
       
    57 		};
       
    58 public: 
       
    59 	TInt Connect();
       
    60 
       
    61 	/**
       
    62 	 	Adds a new software type name to the SCR database. 
       
    63 	 	The properties of the software type are chosen by the server.
       
    64 		
       
    65 		@param aOpType The type of the software type adding operation. For example, add a software type with localized names.
       
    66 		@param aOpResult Specific information about the result of the operation.
       
    67 		@param aSpentTimeInMillisecond The time spent to perform this operation.
       
    68 	 */
       
    69 	void AddSoftwareTypeL(TAccessorOperationType aOpType, TAccessorOperationResult& aOpResult, TInt& aSpentTimeInMillisecond);
       
    70 	
       
    71 	/**
       
    72 		Deletes a sofware type name entry and all its mime types from the registry.
       
    73 		The server decides which software type will be deleted.
       
    74 		
       
    75 		@param aOpResult Specific information about the result of the operation.				
       
    76 		@param aSpentTimeInMillisecond The time spent to perform this operation.
       
    77 	 */
       
    78 	void DeleteSoftwareTypeL(TAccessorOperationResult& aOpResult, TInt& aSpentTimeInMillisecond);
       
    79 	
       
    80 	/**
       
    81 		Deletes a given file from the system.
       
    82 		This function is intended to mainly delete TCB files.
       
    83 		
       
    84 		@param aFilePath The full path of the file being deleted.
       
    85 		@return KErrNone if successful, otherwise one of the other system-wide error codes.
       
    86 	 */
       
    87 	TInt DeleteFile(const TDesC& aFilePath);
       
    88 	
       
    89 	/**
       
    90 		Copies a given file into a destination file.
       
    91 		This function is intended to mainly copy TCB files.
       
    92 			
       
    93 		@param aSourceFilePath Path indicating the file to be copied.
       
    94 		@param aDestinationFilePath Path indicating the directory into which the file is to be copied.
       
    95 		@return KErrNone if successful, otherwise one of the other system-wide error codes.
       
    96 	 */
       
    97 	TInt CopyFile(const TDesC& aSourceFilePath, const TDesC& aDestinationFilePath);
       
    98 	};
       
    99 
       
   100 #endif	// TSCRACCESSOR_CLIENT_H