menufw/hierarchynavigator/hnmetadatamodel/inc/hnglobals.h
changeset 1 5315654608de
parent 0 f72a12da539e
child 4 4d54b72983ae
equal deleted inserted replaced
0:f72a12da539e 1:5315654608de
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:    
    14 * Description:
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 #ifndef C_HNGLOBALS_H
    19 #ifndef C_HNGLOBALS_H
    36 /**
    36 /**
    37  * Maximun integer character length
    37  * Maximun integer character length
    38  */
    38  */
    39 const TInt KMaxLength = 12;
    39 const TInt KMaxLength = 12;
    40 
    40 
    41 /** 
    41 /**
    42  * Single character length.
    42  * Single character length.
    43  */
    43  */
    44 const TInt KSingleChar( 1 );
    44 const TInt KSingleChar( 1 );
    45 
    45 
    46 /** 
    46 /**
    47  * Default datagranularity.
    47  * Default datagranularity.
    48  */
    48  */
    49 const TInt KDefaultGranularity( 8 );
    49 const TInt KDefaultGranularity( 8 );
    50 
    50 
    51 /** 
    51 /**
    52  * Max digit number.
    52  * Max digit number.
    53  */
    53  */
    54 const TInt KMaxDigitNumber( 10 );
    54 const TInt KMaxDigitNumber( 10 );
    55 
    55 
    56 /** 
    56 /**
    57  * A number of cached suites. 
    57  * A number of cached suites.
    58  */
    58  */
    59 const TInt KXmlModelCacheMaxLength( 10 );
    59 const TInt KXmlModelCacheMaxLength( 10 );
    60 
    60 
    61 /**
    61 /**
    62  * Used to check if root suite loaded for display.
    62  * Used to check if root suite loaded for display.
    65 
    65 
    66 /**
    66 /**
    67  * KErrNoMemory code from MenuService
    67  * KErrNoMemory code from MenuService
    68  */
    68  */
    69 const TInt KSErrNoMemory = 1007;
    69 const TInt KSErrNoMemory = 1007;
    70 /** 
    70 /**
    71  * Logical relations namespace
    71  * Logical relations namespace
    72  */
    72  */
    73 namespace HnLogicalRelations
    73 namespace HnLogicalRelations
    74     { 
    74     {
    75     /** 
    75     /**
    76      * Greater. 
    76      * Greater.
    77      */
    77      */
    78     _LIT8( KLogicalGreater8,        ">"  );
    78     _LIT8( KLogicalGreater8,        ">"  );
    79     
    79 
    80     /** 
    80     /**
    81      * Less. 
    81      * Less.
    82      */
    82      */
    83     _LIT8( KLogicalLess8,           "<"  );
    83     _LIT8( KLogicalLess8,           "<"  );
    84     
    84 
    85     /** 
    85     /**
    86      * Equals. 
    86      * Equals.
    87      */
    87      */
    88     _LIT8( KLogicalEqual8,          "="  );
    88     _LIT8( KLogicalEqual8,          "="  );
    89     
    89 
    90     /** 
    90     /**
    91      * Different. 
    91      * Different.
    92      */
    92      */
    93     _LIT8( KLogicalDifferent8,      "!="  );
    93     _LIT8( KLogicalDifferent8,      "!="  );
    94     
    94 
    95     /** 
    95     /**
    96      * And. 
    96      * And.
    97      */
    97      */
    98     _LIT8( KLogicalAnd8,            "&"  );
    98     _LIT8( KLogicalAnd8,            "&"  );
    99     
    99 
   100     /** 
   100     /**
   101      * Or. 
   101      * Or.
   102      */
   102      */
   103     _LIT8( KLogicalOr8,             "|"  );
   103     _LIT8( KLogicalOr8,             "|"  );
   104     
   104 
   105     /** 
   105     /**
   106      * Nas. 
   106      * Nas.
   107      */
   107      */
   108     _LIT8( KLogicalHas8,            "HAS" );
   108     _LIT8( KLogicalHas8,            "HAS" );
   109     
   109 
   110     /** 
   110     /**
   111      * Has not. 
   111      * Has not.
   112      */
   112      */
   113 	_LIT8( KLogicalHasNot8,         "HASNOT" );
   113 	_LIT8( KLogicalHasNot8,         "HASNOT" );
   114     }
   114     }
   115 
   115 
   116 /** 
   116 /**
   117  * Event namespace
   117  * Event namespace
   118  */
   118  */
   119 namespace HnEvent
   119 namespace HnEvent
   120     {
   120     {
   121     /** 
   121     /**
   122      * Event data. 
   122      * Event data.
   123      */
   123      */
   124     _LIT8( KEventArgNamespace8,     "event_data");
   124     _LIT8( KEventArgNamespace8,     "event_data");
   125     
   125 
   126     /** 
   126     /**
   127      * Dropped before custom id. 
   127      * Dropped before custom id.
   128      */
   128      */
   129     _LIT8( KDroppedBefore8,         "dropped_before_custom_id" );
   129     _LIT8( KDroppedBefore8,         "dropped_before_custom_id" );
   130     
   130 
   131     /** 
   131     /**
   132      * Dragged custom id. 
   132      * Dragged custom id.
   133      */
   133      */
   134     _LIT8( KDragged8,               "dragged_custom_id" );
   134     _LIT8( KDragged8,               "dragged_custom_id" );
   135     
   135 
   136     /** 
   136     /**
   137      * Highlight offset. 
   137      * Highlight offset.
   138      */
   138      */
   139     _LIT8( KHighlightOffset8,       "highlight_offset" );
   139     _LIT8( KHighlightOffset8,       "highlight_offset" );
   140     
   140 
   141     }
   141     }
   142 
   142 
   143 
   143 
   144 _LIT8( KMm8,                        "mm" );
   144 _LIT8( KMm8,                        "mm" );
   145 _LIT8( KContentElementName8,        "content" );
   145 _LIT8( KContentElementName8,        "content" );
   181 _LIT8( 	KEventAttrName8,            "event" );
   181 _LIT8( 	KEventAttrName8,            "event" );
   182 _LIT8( 	KPositionAttrName8,         "position" );
   182 _LIT8( 	KPositionAttrName8,         "position" );
   183 _LIT8( 	KMenuConditionAttrName8,    "condition" );
   183 _LIT8( 	KMenuConditionAttrName8,    "condition" );
   184 _LIT8(  KIndexAttrName8, 			"index" );
   184 _LIT8(  KIndexAttrName8, 			"index" );
   185 _LIT8( 	KMenuDimmAttrName8,    	    "dimm" );
   185 _LIT8( 	KMenuDimmAttrName8,    	    "dimm" );
   186 _LIT8( 	KGenreAttrName8,            "genre" ); 
   186 _LIT8( 	KGenreAttrName8,            "genre" );
   187 _LIT8( 	KTitleAttrName8,            "title" );
   187 _LIT8( 	KTitleAttrName8,            "title" );
   188 _LIT8(  KEmptyTextAttrName8,        "emptytext" );
   188 _LIT8(  KEmptyTextAttrName8,        "emptytext" );
   189 _LIT8( 	KNameAttrName8,             "name" );
   189 _LIT8( 	KNameAttrName8,             "name" );
   190 _LIT8(  KWidgetAttrName8,           "widget" );
   190 _LIT8(  KWidgetAttrName8,           "widget" );
   191 _LIT8( 	KCountAttrName8,            "count" );
   191 _LIT8( 	KCountAttrName8,            "count" );
   313 _LIT8(  KMoveFocusBeforeDelete,     "MoveFocusBeforeDelete");
   313 _LIT8(  KMoveFocusBeforeDelete,     "MoveFocusBeforeDelete");
   314 _LIT8( 	KRefreshIcons,              "RefreshIcons" );
   314 _LIT8( 	KRefreshIcons,              "RefreshIcons" );
   315 _LIT8(  KEvaluateMdModel,           "EvaluateMdModel" );
   315 _LIT8(  KEvaluateMdModel,           "EvaluateMdModel" );
   316 _LIT8(  KDisableActionsForItem,     "DisableActionsForItem" );
   316 _LIT8(  KDisableActionsForItem,     "DisableActionsForItem" );
   317 
   317 
   318 _LIT( 	KSuiteName,                 "suite_name" ); 
   318 _LIT( 	KSuiteName,                 "suite_name" );
   319 _LIT8(  KSuiteName8, 				"suite_name" );
   319 _LIT8(  KSuiteName8, 				"suite_name" );
   320 
   320 
   321 //
   321 //
   322 _LIT8 ( KHnRequest, "KHnRequest" );
   322 _LIT8 ( KHnRequest, "KHnRequest" );
   323 // widget types
   323 // widget types
   349 _LIT8(  KTemplate8,                 "mul_template" );
   349 _LIT8(  KTemplate8,                 "mul_template" );
   350 
   350 
   351 _LIT8(	KTitleName8, 				"suite" );
   351 _LIT8(	KTitleName8, 				"suite" );
   352 _LIT8(	KItemName8, 				"item" );
   352 _LIT8(	KItemName8, 				"item" );
   353 _LIT8(	KGenreName8, 				"genre" );
   353 _LIT8(	KGenreName8, 				"genre" );
   354 _LIT8(	KLocalizationName8, 		"localization" ); 
   354 _LIT8(	KLocalizationName8, 		"localization" );
   355 
   355 
   356 _LIT8(	KEventName8, 				"event" );
   356 _LIT8(	KEventName8, 				"event" );
   357 _LIT8(	KMenuItemName8, 			"menuitem" );
   357 _LIT8(	KMenuItemName8, 			"menuitem" );
   358 _LIT(	KMenuItemName,	 			"menuitem" );
   358 _LIT(	KMenuItemName,	 			"menuitem" );
   359 _LIT8(	KMenuItemSpecificName8, 			"menuitem_specific" );
   359 _LIT8(	KMenuItemSpecificName8, 			"menuitem_specific" );
   360 _LIT(	KMenuItemSpecificName,	 			"menuitem_specific" );
   360 _LIT(	KMenuItemSpecificName,	 			"menuitem_specific" );
   361 
   361 
   362 _LIT( 	KRoot, 						"root" ); 
   362 _LIT( 	KRoot, 						"root" );
   363 _LIT8(   KRoot8,                    "root" );
   363 _LIT8(   KRoot8,                    "root" );
   364 _LIT( 	KExtension, 				".r" ); // rsc, r01, r02, etc.
   364 _LIT( 	KExtension, 				".r" ); // rsc, r01, r02, etc.
   365 _LIT( 	KExtensionRsc, 				".rsc" );
   365 _LIT( 	KExtensionRsc, 				".rsc" );
   366 
   366 
   367 
   367 
   368 _LIT8(	KHexStart8, 				"0x"); 
   368 _LIT8(	KHexStart8, 				"0x");
   369 _LIT( 	KDrive ,					"C:");
   369 _LIT( 	KDrive ,					"C:");
   370 _LIT( 	KEntriesSuffix, 			"suites\\");
   370 _LIT( 	KEntriesSuffix, 			"suites\\");
   371 
   371 
   372 _LIT8(  KMoveLocked8,               "move_locked" );
   372 _LIT8(  KMoveLocked8,               "move_locked" );
   373 _LIT8(  KRemoveLocked8,             "remove_locked" );
   373 _LIT8(  KRemoveLocked8,             "remove_locked" );
   392 _LIT( 	KOpenSuiteMdEvent,      	"open_suite" );
   392 _LIT( 	KOpenSuiteMdEvent,      	"open_suite" );
   393 _LIT(   KReevaluateMdEvent,         "reevaluate_model" );
   393 _LIT(   KReevaluateMdEvent,         "reevaluate_model" );
   394 _LIT(   KSwitchWidgetMdEvent,       "switch_widget" );
   394 _LIT(   KSwitchWidgetMdEvent,       "switch_widget" );
   395 _LIT(   KStartEditModeMdEvent,      "start_edit_mode" );
   395 _LIT(   KStartEditModeMdEvent,      "start_edit_mode" );
   396 _LIT(   KStopEditModeMdEvent,       "stop_edit_mode" );
   396 _LIT(   KStopEditModeMdEvent,       "stop_edit_mode" );
   397 _LIT(   KZoomLarge,       			"zoom_large" );
       
   398 _LIT(   KZoomNormal,       			"zoom_normal" );
       
   399 _LIT(   KZoomSmall,       			"zoom_small" );
       
   400 _LIT(   KAppGainForeground,         "gain_foreground" );
   397 _LIT(   KAppGainForeground,         "gain_foreground" );
   401 _LIT(   KAppGainBackground,         "gain_background" );
   398 _LIT(   KAppGainBackground,         "gain_background" );
   402 _LIT(   KSetFocusEvent,             "set_focus" );
   399 _LIT(   KSetFocusEvent,             "set_focus" );
   403 _LIT(   KRefreshUiMdEvent,          "refresh_ui" );
   400 _LIT(   KRefreshUiMdEvent,          "refresh_ui" );
   404 _LIT(   KRefreshToolbarMdEvent,     "refresh_toolbar" );
   401 _LIT(   KRefreshToolbarMdEvent,     "refresh_toolbar" );
   421 _LIT( 	KSuiteLoadingLogFile, 		"c:\\logs\\menu" );
   418 _LIT( 	KSuiteLoadingLogFile, 		"c:\\logs\\menu" );
   422 
   419 
   423 #endif// _DEBUG
   420 #endif// _DEBUG
   424 
   421 
   425 // info notes for notifying lack of configuration files
   422 // info notes for notifying lack of configuration files
   426 _LIT( KDebugNoteDirNotFound, 
   423 _LIT( KDebugNoteDirNotFound,
   427 	"Directory containing suite configuration not found!" );
   424 	"Directory containing suite configuration not found!" );
   428 _LIT( KDebugNoteFileNotFound, 
   425 _LIT( KDebugNoteFileNotFound,
   429 	"File containing suite configuration not found!" );
   426 	"File containing suite configuration not found!" );
   430 _LIT( KDebugNoteOtherError, 
   427 _LIT( KDebugNoteOtherError,
   431 	"Loading suite configuration returned error: %d" );
   428 	"Loading suite configuration returned error: %d" );
   432 
   429 
   433 _LIT8( KStar8, "*" );
   430 _LIT8( KStar8, "*" );
   434 
   431 
   435 
   432 
   444 _LIT( 	KOnSuiteLoad,               "suite:load" );
   441 _LIT( 	KOnSuiteLoad,               "suite:load" );
   445 _LIT(   KOnSuiteUnLoad,             "suite:unload" );
   442 _LIT(   KOnSuiteUnLoad,             "suite:unload" );
   446 _LIT( 	KOnFocusGain,               "item:focus" );
   443 _LIT( 	KOnFocusGain,               "item:focus" );
   447 _LIT(   KOnFocusLost,               "item:unfocus" );
   444 _LIT(   KOnFocusLost,               "item:unfocus" );
   448 
   445 
   449 _LIT8(  KIndexWithBrackets8,        "[$index]");    
   446 _LIT8(  KIndexWithBrackets8,        "[$index]");
   450 _LIT8(  KIndex8,                    "$index" );
   447 _LIT8(  KIndex8,                    "$index" );
   451 _LIT(   KIndex,                     "$index" );
   448 _LIT(   KIndex,                     "$index" );
   452 _LIT8(  KCount,                     "/[$count]" );
   449 _LIT8(  KCount,                     "/[$count]" );
   453 
   450 
   454 
   451 
   505 
   502 
   506 const TUint32 KMenuShowFolder = 0x0000000c;
   503 const TUint32 KMenuShowFolder = 0x0000000c;
   507 
   504 
   508 const TInt KTimeStampBufferLength = 25;
   505 const TInt KTimeStampBufferLength = 25;
   509 
   506 
   510 const TInt KUidStringLength = 10; 
   507 const TInt KUidStringLength = 10;
   511 
   508 
   512 const TInt KTimeStampCutOff = 5; 
   509 const TInt KTimeStampCutOff = 5;
   513 
   510 
   514 /**
   511 /**
   515  * Order in which drives are searched for suites.
   512  * Order in which drives are searched for suites.
   516  */
   513  */
   517 const TInt KDriveSearchOrder[] = { EDriveY, EDriveX, EDriveW, EDriveV, EDriveU,
   514 const TInt KDriveSearchOrder[] = { EDriveY, EDriveX, EDriveW, EDriveV, EDriveU,
   548  */
   545  */
   549 enum TImageSource
   546 enum TImageSource
   550     {
   547     {
   551     EImageSourceUndefined = 0,
   548     EImageSourceUndefined = 0,
   552     EImageSourceFile,
   549     EImageSourceFile,
   553     EImageSourceResource, 
   550     EImageSourceResource,
   554     EImageSourceApplicationUid,
   551     EImageSourceApplicationUid,
   555     EImageSourceLiw
   552     EImageSourceLiw
   556     };
   553     };
   557 
   554 
   558 /**
   555 /**