loggingservices/eventlogger/Shared/LogCliServShared.h
changeset 0 08ec8eefde2f
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __LOGCLISERVSHARED_H__
       
    17 #define __LOGCLISERVSHARED_H__
       
    18 
       
    19 // System includes
       
    20 #include <e32std.h>
       
    21 
       
    22 // User includes
       
    23 #include <logwrap.h>
       
    24 
       
    25 /**
       
    26 Type definitions
       
    27 @internalComponent
       
    28 */
       
    29 typedef TUint32 TLogOperationId;
       
    30 
       
    31 /**
       
    32 Constants
       
    33 @internalComponent
       
    34 */
       
    35 const TLogOperationId KLogNullOperationId = 0;
       
    36 const TLogViewId KLogNullViewId = 0;
       
    37 const TInt KLogMaxDateLength = 32;
       
    38 
       
    39 /**
       
    40 Enumerations
       
    41 @internalComponent
       
    42 */
       
    43 enum TLogServFunction
       
    44 	{	
       
    45 	ELogNone								=  0, 
       
    46 	//
       
    47 	ELogMakeTransient						=  1, // Debug
       
    48 	ELogSetHeapFail							=  2, // Debug
       
    49 	//
       
    50 	ELogOperationCancel						=  3,
       
    51 	ELogOperationGetResult					=  4,
       
    52 	ELogOperationInitiate					=  5,
       
    53 	//
       
    54 	ELogNotify								=  6,
       
    55 	ELogNotifyCancel						=  7,
       
    56 	//
       
    57 	ELogViewCreate							=  8,
       
    58 	ELogViewDelete							=  9,
       
    59 	ELogNOTUSED								= 10,
       
    60 	ELogViewCount							= 11,
       
    61 	ELogViewOperationInitiate				= 13,
       
    62 	ELogViewChangeNotificationsRequest		= 14,
       
    63 	ELogViewChangeNotificationsCancel		= 15,
       
    64 	ELogViewFetchChanges					= 16,
       
    65 	ELogViewNotifyLockStatusChange			= 17,
       
    66 	ELogViewNotifyLockStatusChangeCancel	= 18,
       
    67 	//
       
    68 	ELogNotifyExtended						= 30,
       
    69 	ELogNotifyExtendedCancel				= 31,
       
    70 	//
       
    71 	ELogIsServerReady						= 99, // Debug
       
    72 	//
       
    73 	ELogFunctionLast
       
    74 	};
       
    75 
       
    76 /**
       
    77 @internalComponent
       
    78 */
       
    79 enum TLogOperationType
       
    80 	{
       
    81 	ELogOperationEventAdd = 0, 
       
    82 	ELogOperationEventGet,
       
    83 	ELogOperationEventChange,
       
    84 	ELogOperationEventDelete,
       
    85 	//
       
    86 	ELogOperationTypeAdd, 
       
    87 	ELogOperationTypeGet,
       
    88 	ELogOperationTypeChange,
       
    89 	ELogOperationTypeDelete,
       
    90 	//
       
    91 	ELogOperationClearLog, 
       
    92 	ELogOperationClearRecent, 
       
    93 	//
       
    94 	ELogOperationConfigGet, 
       
    95 	ELogOperationConfigChange,
       
    96 	//
       
    97 	ELogOperationMaintain,
       
    98 	//
       
    99 	ELogOperationViewSetup,
       
   100 	ELogOperationViewRemoveEvent,
       
   101 	ELogOperationViewClearDuplicates,
       
   102 	ELogOperationViewSetFlags,
       
   103 	ELogOperationViewWindowFetch
       
   104 	};
       
   105 
       
   106 /**
       
   107 @internalComponent
       
   108 */
       
   109 enum TLogViewType
       
   110 	{
       
   111 	ELogViewTypeEvent = 0,
       
   112 	ELogViewTypeRecent,
       
   113 	ELogViewTypeDuplicate
       
   114 	};
       
   115 
       
   116 /**
       
   117 @internalComponent
       
   118 */
       
   119 enum TLogNavigation
       
   120 	{
       
   121 	ELogNavigateForwards = 0,
       
   122 	ELogNavigateBackwards,
       
   123 	ELogNavigateFirst,
       
   124 	ELogNavigateLast
       
   125 	};
       
   126 
       
   127 /**
       
   128 @internalComponent
       
   129 */
       
   130 enum TLogViewLockStatus
       
   131 	{
       
   132 	ELogViewWindowOpen = 0,
       
   133 	ELogViewWindowLocked
       
   134 	};
       
   135 
       
   136 /**
       
   137 @internalComponent
       
   138 */
       
   139 enum TLogFilterConstructionType
       
   140 	{
       
   141 	ELogFilterConstructFilterByFilterFieldByField = 0,
       
   142 	ELogFilterConstructFieldByFieldFilterByFilter
       
   143 	};
       
   144 
       
   145 
       
   146 /**
       
   147 @internalComponent
       
   148 */
       
   149 class TLogClientServerData
       
   150 	{
       
   151 public:
       
   152 
       
   153 	/**
       
   154 	 * The type of operation
       
   155 	 */
       
   156 	TLogOperationType iOperationType;
       
   157 
       
   158 	/** 
       
   159 	 * The operation id
       
   160 	 */
       
   161 	TLogOperationId iOperationId;
       
   162 
       
   163 	/**
       
   164 	 * Other spare transfer data slots
       
   165 	 */
       
   166 	TInt iDataSlot1;
       
   167 	TInt iDataSlot2;
       
   168 	};
       
   169 
       
   170 /**
       
   171 @internalComponent
       
   172 */
       
   173 class TLogWindow
       
   174 	{
       
   175 public:
       
   176 	IMPORT_C TLogWindow();
       
   177 
       
   178 public:
       
   179 	IMPORT_C TBool Contains(TInt aPosition) const;
       
   180 	IMPORT_C TInt Range() const;
       
   181 	IMPORT_C TInt WindowIndexFromCursorPosition(TInt aCursorPosition) const;
       
   182 	IMPORT_C void Reset();
       
   183 	void Normalize();
       
   184 
       
   185 public:
       
   186 	TInt iLower;
       
   187 	TInt iUpper;
       
   188 	};
       
   189 
       
   190 /**
       
   191 @internalComponent
       
   192 */
       
   193 class TLogWindowAndCursor : public TLogWindow
       
   194 	{
       
   195 public:
       
   196 	enum TAffected
       
   197 		{
       
   198 		EWindowUnaffected = 0,
       
   199 		EWindowAffected
       
   200 		};
       
   201 
       
   202 public:
       
   203 	TLogWindowAndCursor();
       
   204 	TLogWindowAndCursor(const TLogWindow& aWindow, TInt aCursorPosition);
       
   205 
       
   206 public:
       
   207 	TAffected AdjustForItemDeletion(TInt aItemIndex);
       
   208 	TAffected AdjustForItemAddition(TInt aItemIndex);
       
   209 	TInt WindowIndexFromCursorPosition() const;
       
   210 	void Reset();
       
   211 	void NormalizeWindowAndCursor();
       
   212 
       
   213 public:
       
   214 	TInt iCursorPosition;
       
   215 	TBool iValid;
       
   216 	};
       
   217 
       
   218 /**
       
   219 @internalComponent
       
   220 */
       
   221 class TLogTransferWindow : public TLogWindow
       
   222 	{
       
   223 public:
       
   224 	IMPORT_C TLogTransferWindow();
       
   225 	IMPORT_C void Reset();
       
   226 
       
   227 public:
       
   228 	TInt iBufferSize;
       
   229 	TInt iServerDataSize;//if iBufferSize is less than the length of the requested data from
       
   230 						 //the server, the server will set iServerDataSize with the minimal
       
   231 						 //size which the client side buffer should have.
       
   232 	};
       
   233 
       
   234 //**********************************
       
   235 // LogUtils
       
   236 //**********************************
       
   237 
       
   238 /** 
       
   239 Provide log engine system utilities.
       
   240 
       
   241 @internalComponent
       
   242 */
       
   243 class LogUtils
       
   244 	{
       
   245 public:
       
   246 	IMPORT_C static const TDesC& DateFormatForLocale();
       
   247 	};
       
   248 
       
   249 
       
   250 
       
   251 #endif