installationservices/swcomponentregistry/inc/screntries_internal.h
changeset 60 245df5276b97
parent 24 84a16765cd86
equal deleted inserted replaced
53:ae54820ef82c 60:245df5276b97
     1 /*
     1 /*
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    92 			void InternalizeL(RReadStream& aStream);
    92 			void InternalizeL(RReadStream& aStream);
    93 			
    93 			
    94 		private:
    94 		private:
    95 			HBufC* iName;	   ///< The localized software type name.
    95 			HBufC* iName;	   ///< The localized software type name.
    96 			};
    96 			};
    97 	
       
    98 	NONSHARABLE_CLASS (CScrLogEntry) : public CBase
       
    99 	/**
       
   100 		Class that represents a software component log record generated by the SCR.
       
   101 	 */ 
       
   102 		{
       
   103 		friend class CScrRequestImpl;
       
   104 	public:
       
   105 		/**
       
   106 			Creates a log entry object.
       
   107 			@param aComponentName The name of the component.
       
   108 			@param aUniqueSwTypeName The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava.
       
   109 			@param aGlobalId The global Id of the component.
       
   110 			@param aVersion The version of the component.
       
   111 			@param aCompOpType The type of the component operation. @see Usif::TScrComponentOperationType
       
   112 			@return A pointer to the newly allocated log entry object, if creation is successful.
       
   113 			@internalComponent
       
   114 		 */
       
   115 		IMPORT_C static CScrLogEntry* NewL(const TDesC& aComponentName, const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId, const TDesC& aVersion, const TScrComponentOperationType aCompOpType);
       
   116 		
       
   117 		/**
       
   118 			Creates a log entry object.
       
   119 			@param aComponentName The name of the component.
       
   120 			@param aUniqueSwTypeName The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava.
       
   121 			@param aGlobalId The global Id of the component.
       
   122 			@param aVersion The version of the component.
       
   123 			@param aCompOpType The type of the component operation. @see Usif::TScrComponentOperationType
       
   124 			@return A pointer to the newly allocated log entry object, if creation is successful.
       
   125 					The pointer is also put onto the cleanup stack.
       
   126 			@internalComponent		
       
   127 		 */
       
   128 		IMPORT_C static CScrLogEntry* NewLC(const TDesC& aComponentName, const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId, const TDesC& aVersion, const TScrComponentOperationType aCompOpType);
       
   129 
    97 
   130 	 	/**
       
   131 	 		Creates a log entry object from a stream.
       
   132 	 		@param aStream The stream to read the log entry object from.
       
   133 	 		@return A pointer to the newly allocated log entry object, if creation is successful.
       
   134 	 				The pointer is also put onto the cleanup stack.
       
   135 	 		@internalComponent
       
   136 	 	*/
       
   137 		IMPORT_C static CScrLogEntry* NewLC(RReadStream& aStream);
       
   138 		
       
   139 		~CScrLogEntry();
       
   140 		
       
   141 	 	/**
       
   142 		 	Write the object to a stream 
       
   143 		 
       
   144 		 	@param aStream The stream to write to
       
   145 		 	@internalComponent
       
   146 		 */
       
   147 		IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
       
   148 		 
       
   149 		/**
       
   150 		 	Read the object from a stream
       
   151 		 
       
   152 		 	@param aStream The stream to read from.
       
   153 		 	@internalComponent
       
   154 		 */
       
   155 		IMPORT_C void InternalizeL(RReadStream& aStream) ;
       
   156 	    
       
   157 	    /**
       
   158 			@return The name of the component for which the log was generated.
       
   159 		 */
       
   160 		IMPORT_C const TDesC& ComponentName() const; 
       
   161 		
       
   162 		/**
       
   163 			@return The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava.
       
   164 		 */
       
   165 		IMPORT_C const TDesC& SoftwareTypeName() const;
       
   166 		
       
   167 		/**
       
   168 			The UID.
       
   169 		 	@return The global ID of the component.
       
   170 		 */
       
   171 		IMPORT_C const TDesC& GlobalId() const; 
       
   172 				
       
   173 		/**
       
   174 			@return The version of the component.
       
   175 		 */
       
   176 		IMPORT_C const TDesC& ComponentVersion() const; 
       
   177 	    
       
   178 		/**
       
   179 			@return The time when the operation occured.
       
   180 		 */
       
   181 		IMPORT_C const TTime OperationTime() const; 
       
   182 			    
       
   183 	    /**
       
   184 		    @return The type of the component operation for the log record.
       
   185 		 */
       
   186 		IMPORT_C TScrComponentOperationType OperationType() const;
       
   187 		
       
   188 		/**
       
   189 			@return The component id of the log record.
       
   190 			@internalComponent
       
   191 		 */
       
   192 		IMPORT_C TComponentId ComponentId() const;
       
   193 	
       
   194 	private:
       
   195 		CScrLogEntry();
       
   196 		void ConstructL(const TDesC& aComponentName, const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId, const TDesC& aVersion, const TScrComponentOperationType aCompOpType);
       
   197 		
       
   198 	private:	
       
   199 	    HBufC* iComponentName ;
       
   200 	    HBufC* iSwTypeName;
       
   201 		HBufC* iVersion;
       
   202 		TScrComponentOperationType iOpType ; 
       
   203 		TTime  iRecordTime ;   
       
   204 		HBufC* iGlobalId;
       
   205 		TComponentId iComponentId; 
       
   206 		};
       
   207 	
       
   208 	} // End of namespace Usif
    98 	} // End of namespace Usif
   209 
    99 
   210 #endif // SCRENTRIES_H
   100 #endif // SCRENTRIES_H