dependencies/swi/sisregistrylog.h
author MattD <mattd@symbian.org>
Thu, 01 Apr 2010 14:50:19 +0100
changeset 48 0d4ac38889fc
parent 31 a3e98f9c292b
permissions -rw-r--r--
Merged in kashif's, fdim's and my removal of abld.bat and .cproject files onto the fixed up version of Christian's head.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     1
/*
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     2
* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     3
* All rights reserved.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     4
* This component and the accompanying materials are made available
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     6
* which accompanies this distribution, and is available
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     8
*
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     9
* Initial Contributors:
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    11
*
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    12
* Contributors:
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    13
*
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    14
* Description: 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    15
* The access to a specific functionality depends on the client capabilities 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    16
* and may be restricted.             
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    17
*
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    18
*/
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    19
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    20
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    21
/**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    22
 @file 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    23
 @publishedPartner
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    24
 @released
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    25
*/
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    26
 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    27
#ifndef __SISREGISTRYLOGGING_H__
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    28
#define __SISREGISTRYLOGGING_H__
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    29
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    30
#include <e32base.h>
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    31
#include <f32file.h>
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    32
#include <s32strm.h>
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    33
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    34
class RReadStream;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    35
class RWriteStream;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    36
#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    37
namespace Usif
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    38
	{
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    39
	class RSoftwareComponentRegistry;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    40
	}
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    41
#endif
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    42
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    43
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    44
namespace Swi
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    45
{
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    46
class CSisRegistryObject;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    47
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    48
enum TSwiLogTypes
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    49
		 {
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    50
 		 ESwiLogInstall =0,
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    51
 		 ESwiLogUnInstall,
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    52
 		 ESwiLogUpgrade,
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    53
 		 ESwiLogRestore
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    54
		 };
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    55
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    56
namespace 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    57
{
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    58
  	const TInt KLogFileMajorVersion = 4;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    59
    const TInt KLogFileMinorVersion = 0;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    60
} 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    61
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    62
#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    63
namespace ScrHelperUtil
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    64
	{
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    65
	HBufC8* GetLogInfoLC(const Usif::RSoftwareComponentRegistry& aScrSession, TInt aMaxLogEntries);
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    66
	}
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    67
#endif
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    68
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    69
class CLogEntry : public CBase
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    70
{
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    71
#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    72
friend HBufC8* ScrHelperUtil::GetLogInfoLC(const Usif::RSoftwareComponentRegistry& aScrSession, TInt aMaxLogEntries);
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    73
#endif
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    74
public:
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    75
	static CLogEntry* NewL(const CSisRegistryObject& aObject,TSwiLogTypes InstallInfo);
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    76
 	static CLogEntry* NewLC(const CSisRegistryObject& aObject,TSwiLogTypes InstallInfo);
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    77
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    78
	/**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    79
	 * Constructs a entry from a given existing stream. 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    80
	 */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    81
	static CLogEntry* NewL(RReadStream& aStream);
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    82
	static CLogEntry* NewLC(RReadStream& aStream);
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    83
	
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    84
	/**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    85
	 * Default Constructor 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    86
	 */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    87
 	CLogEntry(){};
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    88
 	
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    89
 	/**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    90
	 * Write the object to a stream 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    91
	 *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    92
	 * @param aStream The stream to write to
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    93
	 */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    94
	void ExternalizeL(RWriteStream& aStream) const;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    95
	 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    96
	/**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    97
	 * Read the object from a stream
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    98
	 *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    99
	 * @param aStream The stream to read from.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   100
	 */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   101
	void InternalizeL(RReadStream& aStream) ;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   102
 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   103
	/**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   104
	 * Destructor 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   105
	 */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   106
	~CLogEntry();
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   107
	
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   108
	void ConstructL(RReadStream& aStream);
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   109
	void ConstructL(const CSisRegistryObject& aObject,TSwiLogTypes InstallInfo);
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   110
    
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   111
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   112
	 * Returns the Time
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   113
	 *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   114
	 * @return HBufC8 descriptor containing text.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   115
	 */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   116
    IMPORT_C const TTime GetTime() const; 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   117
    
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   118
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   119
	 * The package name.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   120
	 * @return the name of this package as reference to TDesC.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   121
	 */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   122
	IMPORT_C const TDesC& GetPkgName() const; 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   123
	
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   124
	/**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   125
	 * The Major Version
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   126
	 * @return he major version number of the package
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   127
	 */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   128
	IMPORT_C TInt32 GetMajorVersion() const; 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   129
	
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   130
	/**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   131
	 * The Minor Version.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   132
	 * @return the minor version number of the package.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   133
	 */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   134
	IMPORT_C TInt32 GetMinorVersion() const; 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   135
	
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   136
	/**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   137
	 * The Build Version.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   138
	 * @return the Build Version of the package.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   139
	 */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   140
	IMPORT_C TInt32 GetBuildVersion() const; 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   141
	
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   142
	/**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   143
	 * The UID.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   144
	 * @return the Uid of the package.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   145
	 */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   146
	IMPORT_C const TUid GetUid() const; 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   147
    
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   148
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   149
	 * Returns the install type for this package
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   150
	 * @return The install type
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   151
	 */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   152
	IMPORT_C TSwiLogTypes GetInstallType() const;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   153
   
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   154
private:
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   155
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   156
    HBufC* iPackageName ;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   157
	TInt32 iMajorVersion;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   158
	TInt32 iMinorVersion;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   159
	TInt32 iBuildVersion;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   160
	TSwiLogTypes iInstallType ; 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   161
	TTime  iEvent ;   
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   162
	TUid iUid; 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   163
};
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   164
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   165
#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   166
/**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   167
 * @internalComponent
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   168
 * @released
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   169
 */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   170
class CLogFileVersion : public CBase
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   171
    {
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   172
public:
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   173
    CLogFileVersion()
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   174
   		{
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   175
   		iLogFileMajorVersion = KLogFileMajorVersion;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   176
		iLogFileMinorVersion = KLogFileMinorVersion;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   177
	    }
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   178
	
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   179
    static CLogFileVersion* NewL(RReadStream& aStream);
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   180
	static CLogFileVersion* NewLC(RReadStream& aStream);
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   181
	
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   182
	/**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   183
	 * Write the object to a stream 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   184
	 *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   185
	 * @param aStream The stream to write to
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   186
	 */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   187
	 void ExternalizeL(RWriteStream& aStream) const;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   188
	
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   189
	/**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   190
	 * Read the object from a stream
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   191
	 *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   192
	 * @param aStream The stream to read from.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   193
	 */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   194
	 void InternalizeL(RReadStream& aStream) ;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   195
	 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   196
     void ConstructL();
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   197
	 void ConstructL(RReadStream& aStream);
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   198
	 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   199
	/**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   200
	 * Copy Constructor 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   201
	 */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   202
	CLogFileVersion(const CLogFileVersion& aObject1);
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   203
	
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   204
private:
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   205
	TUint8 iLogFileMajorVersion;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   206
	TUint8 iLogFileMinorVersion;  
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   207
  	 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   208
    };
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   209
#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   210
} //namespace
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   211
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   212
#endif
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   213
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   214