changeset 25 | 98b66e4fb0be |
parent 24 | 84a16765cd86 |
child 42 | d17dc5398051 |
24:84a16765cd86 | 25:98b66e4fb0be |
---|---|
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". |
29 #define SOFTWARECOMPONENTREGISTRY_H |
29 #define SOFTWARECOMPONENTREGISTRY_H |
30 |
30 |
31 #include <e32base.h> |
31 #include <e32base.h> |
32 #include <usif/usifcommon.h> |
32 #include <usif/usifcommon.h> |
33 #include <usif/scr/screntries.h> |
33 #include <usif/scr/screntries.h> |
34 #include <usif/scr/appregentries.h> |
|
34 #include <scs/scsclient.h> |
35 #include <scs/scsclient.h> |
36 #include <usif/scr/appreginfo.h> |
|
35 |
37 |
36 namespace Usif |
38 namespace Usif |
37 { |
39 { |
38 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
40 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
39 class CScrLogEntry; |
41 class CScrLogEntry; |
135 |
137 |
136 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
138 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
137 |
139 |
138 @param aName The non-localizable name of the component being added. |
140 @param aName The non-localizable name of the component being added. |
139 @param aVendor The non-localizable vendor name of the component being added. |
141 @param aVendor The non-localizable vendor name of the component being added. |
140 @param aUniqueSwTypeName The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava. |
142 @param aUniqueSwTypeName The non-localized, unique software type name, such as @see KSoftwareTypeNative and @see KSoftwareTypeJava. |
141 @param aGlobalId A named, nullable, case-sensitive string used to specify a deterministic identifier for the component |
143 @param aGlobalId A named, nullable, case-sensitive string used to specify a deterministic identifier for the component |
142 that is unique within the context of that software type. The global component id might be |
144 that is unique within the context of that software type. The global component id might be |
143 the package UID for native applications or the MIDlet name/vendor pair for Java MIDLets, etc. |
145 the package UID for native applications or the MIDlet name/vendor pair for Java MIDLets, etc. |
144 Note that if KNullDesC is provided, the global identifier will be empty. |
146 Note that if KNullDesC is provided, the global identifier will be empty. |
145 @param aCompOpType The type of the component operation. Typical operations are install or upgrade. @see Usif::TScrComponentOperationType |
147 @param aCompOpType The type of the component operation. Typical operations are install or upgrade. @see TScrComponentOperationType |
146 @return The component ID of the newly added entry. |
148 @return The component ID of the newly added entry. |
147 |
149 |
148 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
150 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
149 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
151 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
150 @leave Or system-wide error codes. |
152 @leave Or system-wide error codes. |
162 @param aUniqueSwTypeName The non-localized, unique software type name, e.g. "Native". |
164 @param aUniqueSwTypeName The non-localized, unique software type name, e.g. "Native". |
163 @param aGlobalId A named, nullable, case-sensitive string used to specify a deterministic identifier for the component |
165 @param aGlobalId A named, nullable, case-sensitive string used to specify a deterministic identifier for the component |
164 that is unique within the context of that software type. The global component id would be |
166 that is unique within the context of that software type. The global component id would be |
165 the package UID for native applications or the midlet-names for Java, etc. |
167 the package UID for native applications or the midlet-names for Java, etc. |
166 Note that if KNullDesC is provided, the global identifier will be empty. |
168 Note that if KNullDesC is provided, the global identifier will be empty. |
167 @param aCompOpType The type of the component operation. Typical operations are install or upgrade. @see Usif::TScrComponentOperationType |
169 @param aCompOpType The type of the component operation. Typical operations are install or upgrade. @see TScrComponentOperationType |
168 @return The component ID of the newly added entry. |
170 @return The component ID of the newly added entry. |
169 |
171 |
170 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
172 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
171 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
173 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
172 @leave Or system-wide error codes. |
174 @leave Or system-wide error codes. |
553 @leave System-wide error codes. |
555 @leave System-wide error codes. |
554 */ |
556 */ |
555 IMPORT_C TBool GetComponentL(TComponentId aComponentId, CComponentEntry& aEntry, TLanguage aLocale=KUnspecifiedLocale) const; |
557 IMPORT_C TBool GetComponentL(TComponentId aComponentId, CComponentEntry& aEntry, TLanguage aLocale=KUnspecifiedLocale) const; |
556 |
558 |
557 /** |
559 /** |
558 Retrieves the localized information from ComponentLocalizable table for a given component id. |
560 Retrieves the localized information from ComponentLocalizable table for a given component id. |
559 |
561 |
560 @param aComponentId The unique ID of the given software component. |
562 @param aComponentId The unique ID of the given software component. |
561 @param aCompLocalizedInfoArray An output parameter for returning localized information for a given component id. |
563 @param aCompLocalizedInfoArray An output parameter for returning localized information for a given component id. |
562 @leave System-wide error codes. |
564 @leave System-wide error codes. |
563 @capability ReadUserData Accessing a component's localized information requires ReadUserData |
565 @capability ReadUserData Accessing a component's localized information requires ReadUserData |
579 |
581 |
580 /** |
582 /** |
581 Retrieves the local component id of a given global component id. |
583 Retrieves the local component id of a given global component id. |
582 |
584 |
583 @param aGlobalIdName A deterministic identifier for the component that is unique within the context of that software type. |
585 @param aGlobalIdName A deterministic identifier for the component that is unique within the context of that software type. |
584 @param aUniqueSwTypeName The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava. |
586 @param aUniqueSwTypeName The non-localized, unique software type name, such as @see KSoftwareTypeNative and @see KSoftwareTypeJava. |
585 @return The local unique component id. |
587 @return The local unique component id. |
586 |
588 |
587 @leave KErrNotFound Software component with this global id is not present in the system. |
589 @leave KErrNotFound Software component with this global id is not present in the system. |
588 @leave System-wide error codes. |
590 @leave System-wide error codes. |
589 */ |
591 */ |
591 |
593 |
592 /** |
594 /** |
593 Retrieves a specific software component entry with the specified global id and software type name for a given locale. |
595 Retrieves a specific software component entry with the specified global id and software type name for a given locale. |
594 |
596 |
595 @param aGlobalIdName A deterministic identifier for the component that is unique within the context of that software type. |
597 @param aGlobalIdName A deterministic identifier for the component that is unique within the context of that software type. |
596 @param aUniqueSwTypeName The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava. |
598 @param aUniqueSwTypeName The non-localized, unique software type name, such as @see KSoftwareTypeNative and @see KSoftwareTypeJava. |
597 @param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale. |
599 @param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale. |
598 If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used to find |
600 If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used to find |
599 the names. If it fails, then the non-localized names are returned. If non-localized versions |
601 the names. If it fails, then the non-localized names are returned. If non-localized versions |
600 couldn't be found too, the first available language for the component is retrieved. |
602 couldn't be found too, the first available language for the component is retrieved. |
601 If KNonLocalized is provided, then the non-localized component and vendor names are returned, |
603 If KNonLocalized is provided, then the non-localized component and vendor names are returned, |
691 If a particular language is provided, then the property is searched for this particular language |
693 If a particular language is provided, then the property is searched for this particular language |
692 and its downgraded languages. If there is no property with the provided language, then the function |
694 and its downgraded languages. If there is no property with the provided language, then the function |
693 leaves with KErrNotFound. |
695 leaves with KErrNotFound. |
694 @return Returns a pointer to the property object containing the requested component property entry. |
696 @return Returns a pointer to the property object containing the requested component property entry. |
695 The ownership is transferred. If the property couldn't be found, then NULL is returned. |
697 The ownership is transferred. If the property couldn't be found, then NULL is returned. |
696 @leave System-wide error codes. |
698 @leave A system-wide error code. |
697 */ |
699 */ |
698 IMPORT_C CPropertyEntry* GetComponentPropertyL(TComponentId aComponentId, const TDesC& aPropertyName, TLanguage aLocale=KUnspecifiedLocale) const; |
700 IMPORT_C CPropertyEntry* GetComponentPropertyL(TComponentId aComponentId, const TDesC& aPropertyName, TLanguage aLocale=KUnspecifiedLocale) const; |
699 |
701 |
700 /** |
702 /** |
701 Retrieves the set of properties for a particular locale belonging to the given component. |
703 Retrieves the set of properties for a particular locale belonging to the given component. |
711 If non-localized versions couldn't be found too, the function leaves with KErrNotFound. |
713 If non-localized versions couldn't be found too, the function leaves with KErrNotFound. |
712 If KNonLocalized is provided, then the non-localized versions of properties are returned, |
714 If KNonLocalized is provided, then the non-localized versions of properties are returned, |
713 If non-localized versions don't exist, then the function will leave with KErrNotFound. |
715 If non-localized versions don't exist, then the function will leave with KErrNotFound. |
714 If a particular language is provided, then the properties are searched for this particular language |
716 If a particular language is provided, then the properties are searched for this particular language |
715 and its downgraded languages. Otherwise, the function leaves with KErrNotFound. |
717 and its downgraded languages. Otherwise, the function leaves with KErrNotFound. |
716 @leave System-wide error codes. |
718 @leave A system-wide error code. |
717 */ |
719 */ |
718 IMPORT_C void GetComponentPropertiesL(TComponentId aComponentId, RPointerArray<CPropertyEntry>& aProperties, TLanguage aLocale=KUnspecifiedLocale) const; |
720 IMPORT_C void GetComponentPropertiesL(TComponentId aComponentId, RPointerArray<CPropertyEntry>& aProperties, TLanguage aLocale=KUnspecifiedLocale) const; |
719 |
721 |
720 /** |
722 /** |
721 Returns whether all drives registered for the given component are present. |
723 Returns whether all drives registered for the given component are present. |
733 /** |
735 /** |
734 Sets the SCOMO state of a given component. |
736 Sets the SCOMO state of a given component. |
735 |
737 |
736 @param aComponentId The unique ID of the given software component. |
738 @param aComponentId The unique ID of the given software component. |
737 @param aScomoState The new SCOMO state of the component. |
739 @param aScomoState The new SCOMO state of the component. |
738 @leave System-wide error codes. |
740 @leave A system-wide error code. |
739 */ |
741 */ |
740 IMPORT_C void SetScomoStateL(TComponentId aComponentId, TScomoState aScomoState) const; |
742 IMPORT_C void SetScomoStateL(TComponentId aComponentId, TScomoState aScomoState) const; |
741 |
743 |
742 /** |
744 /** |
743 Retrieves the UID of the plug-in which is responsible for a given MIME type. |
745 Retrieves the UID of the plug-in which is responsible for a given MIME type. |
744 |
746 |
745 @param aMimeType The MIME type. |
747 @param aMimeType The MIME type. |
746 @return The UID of the plug-in. |
748 @return The UID of the plug-in. |
747 @leave KErrSifUnsupportedSoftwareType There is no corresponding plug-in for this MIME type. |
749 @leave KErrSifUnsupportedSoftwareType There is no corresponding plug-in for this MIME type. |
748 @leave System-wide error codes. |
750 @leave A system-wide error code. |
749 @internalTechnology |
751 @internalTechnology |
750 */ |
752 */ |
751 IMPORT_C TUid GetPluginUidL(const TDesC& aMimeType) const; |
753 IMPORT_C TUid GetPluginUidL(const TDesC& aMimeType) const; |
752 |
754 |
753 /** |
755 /** |
754 Retrieves the UID of the plug-in that installed a given component. |
756 Retrieves the UID of the plug-in that installed a given component. |
755 |
757 |
756 @param aComponentId Component's local identifier. |
758 @param aComponentId Component's local identifier. |
757 @return The UID of the plug-in. |
759 @return The UID of the plug-in. |
758 @leave System-wide error codes. |
760 @leave A system-wide error code. |
759 @internalTechnology |
761 @internalTechnology |
760 */ |
762 */ |
761 IMPORT_C TUid GetPluginUidL(TComponentId aComponentId) const; |
763 IMPORT_C TUid GetPluginUidL(TComponentId aComponentId) const; |
762 |
764 |
763 /** |
765 /** |
771 @param aExecutionLayerSecureId The secure id of the installer's execution layer which refers to an executable that interprets or |
773 @param aExecutionLayerSecureId The secure id of the installer's execution layer which refers to an executable that interprets or |
772 executes byte code for programs written in a high level language Java, Python, Widgets, etc. |
774 executes byte code for programs written in a high level language Java, Python, Widgets, etc. |
773 This paramater is optional. If it doesn't exist, it should be equal to the installer's secure id. |
775 This paramater is optional. If it doesn't exist, it should be equal to the installer's secure id. |
774 @param aMimeTypes The list of MIME types associated with this software type. |
776 @param aMimeTypes The list of MIME types associated with this software type. |
775 @param aLocalizedSwTypeNames A pointer to the list of optional localized software type names. |
777 @param aLocalizedSwTypeNames A pointer to the list of optional localized software type names. |
776 @leave System-wide error codes. |
778 @leave A system-wide error code. |
777 @internalTechnology |
779 @internalTechnology |
778 */ |
780 */ |
779 IMPORT_C void AddSoftwareTypeL(const TDesC& aUniqueSwTypeName, TUid aSifPluginUid, TSecureId aInstallerSecureId, TSecureId aExecutionLayerSecureId, const RPointerArray<HBufC>& aMimeTypes, const RPointerArray<CLocalizedSoftwareTypeName>* aLocalizedSwTypeNames = NULL); |
781 IMPORT_C void AddSoftwareTypeL(const TDesC& aUniqueSwTypeName, TUid aSifPluginUid, TSecureId aInstallerSecureId, TSecureId aExecutionLayerSecureId, const RPointerArray<HBufC>& aMimeTypes, const RPointerArray<CLocalizedSoftwareTypeName>* aLocalizedSwTypeNames = NULL); |
780 |
782 |
781 /** |
783 /** |
784 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
786 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
785 N.B. If the software type doesn't exist, the function completes successfully. |
787 N.B. If the software type doesn't exist, the function completes successfully. |
786 |
788 |
787 @param aUniqueSwTypeName Non-localized unique software type name. |
789 @param aUniqueSwTypeName Non-localized unique software type name. |
788 @param aDeletedMimeTypes An output parameter, where the MIME types deleted from SCR as a result of this operation will be stored. |
790 @param aDeletedMimeTypes An output parameter, where the MIME types deleted from SCR as a result of this operation will be stored. |
789 @leave System-wide error codes. |
791 @leave A system-wide error code. |
790 @internalTechnology |
792 @internalTechnology |
791 */ |
793 */ |
792 IMPORT_C void DeleteSoftwareTypeL(const TDesC& aUniqueSwTypeName, RPointerArray<HBufC>& aDeletedMimeTypes); |
794 IMPORT_C void DeleteSoftwareTypeL(const TDesC& aUniqueSwTypeName, RPointerArray<HBufC>& aDeletedMimeTypes); |
793 |
795 |
794 /** |
796 /** |
795 Returns whether the software installer of a given component is present. |
797 Returns whether the software installer of a given component is present. |
796 |
798 |
797 @param aComponentId The unique ID of the given software component. |
799 @param aComponentId The unique ID of the given software component. |
798 @return ETrue, if the software installer of the given component is present; otherwise EFalse. |
800 @return ETrue, if the software installer of the given component is present; otherwise EFalse. |
799 @leave System-wide error codes. |
801 @leave A system-wide error code. |
800 */ |
802 */ |
801 IMPORT_C TBool IsComponentOrphanedL(TComponentId aComponentId); |
803 IMPORT_C TBool IsComponentOrphanedL(TComponentId aComponentId); |
802 |
804 |
803 /** |
805 /** |
804 Retrieve the log entries recorded by SCR. A log entry (@see Usif::CScrLogEntry) contains information |
806 Retrieve the log entries recorded by SCR. A log entry (@see Usif::CScrLogEntry) contains information |
807 @param aLogEntries The caller supplies an empty array of CScrLogEntry which is loaded |
809 @param aLogEntries The caller supplies an empty array of CScrLogEntry which is loaded |
808 with the log entries from the SCR. If the SCR Log is empty then the array count |
810 with the log entries from the SCR. If the SCR Log is empty then the array count |
809 will be zero. The caller is responsible for deleting all memory. |
811 will be zero. The caller is responsible for deleting all memory. |
810 @param aUniqueSwTypeName Optional parameter for non-localized unique software type name. |
812 @param aUniqueSwTypeName Optional parameter for non-localized unique software type name. |
811 If provided, only the log entries of the given software type are returned. |
813 If provided, only the log entries of the given software type are returned. |
812 @leave System-wide error codes. |
814 @leave A system-wide error code. |
813 @capability ReadUserData |
815 @capability ReadUserData |
814 */ |
816 */ |
815 IMPORT_C void RetrieveLogEntriesL(RPointerArray<CScrLogEntry>& aLogEntries, const TDesC* aUniqueSwTypeName=NULL) const; |
817 IMPORT_C void RetrieveLogEntriesL(RPointerArray<CScrLogEntry>& aLogEntries, const TDesC* aUniqueSwTypeName=NULL) const; |
816 |
818 |
817 /** |
819 /** |
820 @param aVersionLeft The version on the left side of the equality. |
822 @param aVersionLeft The version on the left side of the equality. |
821 @param aVersionRight The version on the right side of the equality. |
823 @param aVersionRight The version on the right side of the equality. |
822 @return A positive value indicates that the left version is greater than the right version. |
824 @return A positive value indicates that the left version is greater than the right version. |
823 A negative value indicates that the left version is less than the right version. |
825 A negative value indicates that the left version is less than the right version. |
824 Zero indicates that the left and right versions are equal. |
826 Zero indicates that the left and right versions are equal. |
825 @leave System-wide error codes. |
827 @leave A system-wide error code. |
826 */ |
828 */ |
827 IMPORT_C static TInt CompareVersionsL(const TDesC& aVersionLeft, const TDesC& aVersionRight); |
829 IMPORT_C static TInt CompareVersionsL(const TDesC& aVersionLeft, const TDesC& aVersionRight); |
828 |
830 |
829 /** |
831 /** |
830 Returns whether the component is on a read-only drive. |
832 Returns whether the component is on a read-only drive. |
831 |
833 |
832 @param aComponentId The unique ID of the software component. |
834 @param aComponentId The unique ID of the software component. |
833 @return ETrue, if the component is present on a read only drive; otherwise EFalse. |
835 @return ETrue, if the component is present on a read only drive; otherwise EFalse. |
834 @leave System-wide error codes. |
836 @leave A system-wide error code. |
835 */ |
837 */ |
836 IMPORT_C TBool IsComponentOnReadOnlyDriveL(TComponentId aComponentId) const; |
838 IMPORT_C TBool IsComponentOnReadOnlyDriveL(TComponentId aComponentId) const; |
837 |
839 |
838 /** |
840 /** |
839 Returns whether the component is present on the device. As a component might be |
841 Returns whether the component is present on the device. As a component might be |
845 might not be updated immediately when a media card is replaced. |
847 might not be updated immediately when a media card is replaced. |
846 |
848 |
847 @param aComponentId The unique ID of the component. |
849 @param aComponentId The unique ID of the component. |
848 @return ETrue, if the component is present; otherwise EFalse. |
850 @return ETrue, if the component is present; otherwise EFalse. |
849 |
851 |
850 @leave System-wide error codes. |
852 @leave A system-wide error code. |
851 */ |
853 */ |
852 IMPORT_C TBool IsComponentPresentL(TComponentId aComponentId) const; |
854 IMPORT_C TBool IsComponentPresentL(TComponentId aComponentId) const; |
853 |
855 |
854 /** |
856 /** |
855 Sets whether the software component is present fully after being installed on to a |
857 Sets whether the software component is present fully after being installed on to a |
860 @param aComponentId The unique ID of the given software component. |
862 @param aComponentId The unique ID of the given software component. |
861 @param aValue ETrue to set component as present. EFalse to set component as not present. |
863 @param aValue ETrue to set component as present. EFalse to set component as not present. |
862 |
864 |
863 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
865 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
864 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
866 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
865 @leave Or system-wide error codes. |
867 @leave Or a system-wide error code. |
866 */ |
868 */ |
867 IMPORT_C void SetIsComponentPresentL(TComponentId aComponentId, TBool aValue); |
869 IMPORT_C void SetIsComponentPresentL(TComponentId aComponentId, TBool aValue); |
868 |
870 |
869 /** |
871 /** |
870 Gets the installed supported language ID's array. |
872 Gets the installed supported language ID's array. |
871 |
873 |
872 @param aComponentId The unique ID of the given software component. |
874 @param aComponentId The unique ID of the given software component. |
873 @param aMatchingSupportedLanguages RArray containing the list of installed supported languages |
875 @param aMatchingSupportedLanguages RArray containing the list of installed supported languages |
874 |
876 |
875 @leave Or system-wide error codes. |
877 @leave A system-wide error code. |
876 @capability ReadUserData Accessing the installed supported language ID's array requires ReadUserData |
878 @capability ReadUserData Accessing the installed supported language ID's array requires ReadUserData |
877 */ |
879 */ |
878 IMPORT_C void GetComponentSupportedLocalesListL(TComponentId aComponentId, RArray<TLanguage>& aMatchingSupportedLanguages) const; |
880 IMPORT_C void GetComponentSupportedLocalesListL(TComponentId aComponentId, RArray<TLanguage>& aMatchingSupportedLanguages) const; |
879 |
881 |
882 /** |
|
883 Adds a new application entry to the SCR database. |
|
884 |
|
885 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
886 |
|
887 @param aComponentId The componentId associated to the application |
|
888 @param aApplicationRegistrationData The information associated with the application. |
|
889 @leave KErrArgument If the AppUid or AppFile in aApplicationRegistrationData is NULL |
|
890 Or a system-wide error code. |
|
891 */ |
|
892 |
|
893 IMPORT_C void AddApplicationEntryL(const TComponentId aComponentId, const CApplicationRegistrationData& aApplicationRegistrationData); |
|
894 |
|
895 /** |
|
896 Deletes the information of all applications associated to an existing component entry from the SCR database. |
|
897 |
|
898 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
899 |
|
900 @param aComponentId The componentId, associated to which, all applications are deleted. |
|
901 @leave A system-wide error code. |
|
902 */ |
|
903 IMPORT_C void DeleteApplicationEntriesL(TComponentId aComponentId); |
|
904 |
|
905 /** |
|
906 Deletes an application entry from the SCR database. |
|
907 |
|
908 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
909 |
|
910 @param aApplicationUid Uid of the application to be deleted. |
|
911 @leave A system-wide error code. |
|
912 */ |
|
913 IMPORT_C void DeleteApplicationEntryL(TUid aApplicationUid); |
|
914 |
|
915 /** |
|
916 Gets the Component Id associated to a given Application Uid |
|
917 |
|
918 @param aAppUid The AppUid of an application. |
|
919 @return The componentId associated with the given application. |
|
920 @leave A system-wide error code. |
|
921 */ |
|
922 IMPORT_C TComponentId GetComponentIdForAppL(TUid aAppUid) const; |
|
923 |
|
924 /** |
|
925 Gets the array of Application Uids associated to a given Component. |
|
926 |
|
927 @param aCompId ComponentId of a component whose associated applications need to be fetched. |
|
928 @param aAppUids Returns the array of application Uids associated with the component. |
|
929 @leave A system-wide error code. |
|
930 */ |
|
931 IMPORT_C void GetAppUidsForComponentL(TComponentId aCompId, RArray<TUid>& aAppUids) const; |
|
932 |
|
933 /** |
|
934 Returns the array of application launchers. |
|
935 N.B. This function can only be used by AppArc to determine the launcher associated with |
|
936 an application. |
|
937 |
|
938 @param aLaunchers The current list of launchers present on the device. |
|
939 @leave A system-wide error code. |
|
940 */ |
|
941 IMPORT_C void GetApplicationLaunchersL(RPointerArray<CLauncherExecutable>& aLaunchers) const; |
|
942 |
|
880 private: |
943 private: |
881 |
944 |
882 TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const; |
945 TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const; |
883 template <class C> void SendDependencyArgsL(TInt aFunction, const C& aSupplierId, const CGlobalComponentId& aDependantGlobalCompId); |
946 template <class C> void SendDependencyArgsL(TInt aFunction, const C& aSupplierId, const CGlobalComponentId& aDependantGlobalCompId); |
884 template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize); |
947 template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize); |
946 and its downgraded languages. If there is no name and vendor with the provided language, |
1009 and its downgraded languages. If there is no name and vendor with the provided language, |
947 then the function leaves with KErrScrUnsupportedLocale. |
1010 then the function leaves with KErrScrUnsupportedLocale. |
948 @return Returns the next component matching the given filter. If no more components can be found, returns NULL. |
1011 @return Returns the next component matching the given filter. If no more components can be found, returns NULL. |
949 The ownership is transferred to the calling client. |
1012 The ownership is transferred to the calling client. |
950 @leave KErrScrUnsupportedLocale The requested component name/vendor couldn't be found for the specified locale. |
1013 @leave KErrScrUnsupportedLocale The requested component name/vendor couldn't be found for the specified locale. |
951 @leave A system-wide error code. |
1014 @leave Or a system-wide error code. |
952 |
1015 |
953 @capability ReadUserData Accessing list of components installed by the user requires ReadUserData |
1016 @capability ReadUserData Accessing list of components installed by the user requires ReadUserData |
954 */ |
1017 */ |
955 IMPORT_C CComponentEntry* NextComponentL(TLanguage aLocale=KUnspecifiedLocale) const; |
1018 IMPORT_C CComponentEntry* NextComponentL(TLanguage aLocale=KUnspecifiedLocale) const; |
956 |
1019 |
970 If a particular language is provided, then the names are searched for this particular language |
1033 If a particular language is provided, then the names are searched for this particular language |
971 and its downgraded languages. If there is no name and vendor with the provided language, |
1034 and its downgraded languages. If there is no name and vendor with the provided language, |
972 then the function leaves with KErrScrUnsupportedLocale. |
1035 then the function leaves with KErrScrUnsupportedLocale. |
973 @return EFalse, if the end of the view has been reached. Otherwise, ETrue. |
1036 @return EFalse, if the end of the view has been reached. Otherwise, ETrue. |
974 @leave KErrScrUnsupportedLocale The requested component name/vendor couldn't be found for the specified locale. |
1037 @leave KErrScrUnsupportedLocale The requested component name/vendor couldn't be found for the specified locale. |
975 @leave A system-wide error code. |
1038 @leave Or a system-wide error code. |
976 |
1039 |
977 @capability ReadUserData Accessing list of components installed by the user requires ReadUserData |
1040 @capability ReadUserData Accessing list of components installed by the user requires ReadUserData |
978 */ |
1041 */ |
979 IMPORT_C TBool NextComponentL(CComponentEntry& aEntry, TLanguage aLocale=KUnspecifiedLocale) const; |
1042 IMPORT_C TBool NextComponentL(CComponentEntry& aEntry, TLanguage aLocale=KUnspecifiedLocale) const; |
980 |
1043 |
995 and if non-localized versions don't exist, the function will leave with KErrScrUnsupportedLocale. |
1058 and if non-localized versions don't exist, the function will leave with KErrScrUnsupportedLocale. |
996 If a particular language is provided, then the names are searched for this particular language |
1059 If a particular language is provided, then the names are searched for this particular language |
997 and its downgraded languages. If there is no name and vendor with the provided language, |
1060 and its downgraded languages. If there is no name and vendor with the provided language, |
998 then the function leaves with KErrScrUnsupportedLocale. |
1061 then the function leaves with KErrScrUnsupportedLocale. |
999 @leave KErrScrUnsupportedLocale The requested component name/vendor couldn't be found for the specified locale. |
1062 @leave KErrScrUnsupportedLocale The requested component name/vendor couldn't be found for the specified locale. |
1000 @leave A system-wide error code. |
1063 @leave Or a system-wide error code. |
1001 |
1064 |
1002 @capability ReadUserData Accessing list of components installed by the user requires ReadUserData |
1065 @capability ReadUserData Accessing list of components installed by the user requires ReadUserData |
1003 */ |
1066 */ |
1004 IMPORT_C void NextComponentSetL(TInt aMaxCount, RPointerArray<CComponentEntry>& aComponentList, TLanguage aLocale=KUnspecifiedLocale) const; |
1067 IMPORT_C void NextComponentSetL(TInt aMaxCount, RPointerArray<CComponentEntry>& aComponentList, TLanguage aLocale=KUnspecifiedLocale) const; |
1005 |
1068 |
1006 private: |
1069 private: |
1070 void CheckSubSessionHandleL() const; //Checks for Valid SubSessionHandle |
|
1007 TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const; |
1071 TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const; |
1008 template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize); |
1072 template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize); |
1009 template <class T, class C> friend TBool GetObjectL(const C& aConnection, T& aObject, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
1073 template <class T, class C> friend TBool GetObjectL(const C& aConnection, T& aObject, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
1010 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RArray<T>& aArray); |
1074 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RArray<T>& aArray); |
1011 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray); |
1075 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray); |
1017 */ |
1081 */ |
1018 { |
1082 { |
1019 public: |
1083 public: |
1020 /** |
1084 /** |
1021 Default constructor of registry file list sub-session. |
1085 Default constructor of registry file list sub-session. |
1022 */ |
1086 */ |
1023 IMPORT_C RSoftwareComponentRegistryFilesList(); |
1087 IMPORT_C RSoftwareComponentRegistryFilesList(); |
1024 |
1088 |
1025 /** |
1089 /** |
1026 Closes the registry view on the SCR server. |
1090 Closes the registry view on the SCR server. |
1027 */ |
1091 */ |
1061 @leave A system-wide error code. |
1125 @leave A system-wide error code. |
1062 */ |
1126 */ |
1063 IMPORT_C void NextFileSetL(TInt aMaxCount, RPointerArray<HBufC>& aFileList) const; |
1127 IMPORT_C void NextFileSetL(TInt aMaxCount, RPointerArray<HBufC>& aFileList) const; |
1064 |
1128 |
1065 private: |
1129 private: |
1130 void CheckSubSessionHandleL() const; //Checks for Valid SubSessionHandle |
|
1066 TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const; |
1131 TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const; |
1067 template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize); |
1132 template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize); |
1068 template <class T, class C> friend T* GetObjectL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
1133 template <class T, class C> friend T* GetObjectL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
1069 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray); |
1134 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray); |
1070 }; |
1135 }; |
1071 |
1136 |
1072 }// End of namespace Usif |
1137 |
1073 |
1138 NONSHARABLE_CLASS(RApplicationRegistryView) : public RScsClientSubsessionBase |
1139 /** |
|
1140 This class opens a sub-session to the SCR server and sends a request to create a complete Application Registration view. |
|
1141 This class can only be used by Apparc. |
|
1142 */ |
|
1143 { |
|
1144 public: |
|
1145 /** |
|
1146 Default constructor of registry view sub-session. |
|
1147 */ |
|
1148 IMPORT_C RApplicationRegistryView(); |
|
1149 |
|
1150 /** |
|
1151 Closes the registry view on the SCR server. |
|
1152 */ |
|
1153 IMPORT_C void Close(); |
|
1154 |
|
1155 |
|
1156 /** |
|
1157 Opens a complete view of Application Registration in the SCR. |
|
1158 |
|
1159 If the call to this function completes successfully, then the interface client will access |
|
1160 the enumerated records by using @see RApplicationRegistryView::GetNextApplicationRegistrationInfoL. |
|
1161 |
|
1162 If a transaction owned by another session is in progress on the SCR server, the open view request |
|
1163 will be rejected. |
|
1164 |
|
1165 N.B. After this function completes successfully, GetNextApplicationRegistrationInfoL function |
|
1166 can be used |
|
1167 |
|
1168 @param aCompReg An active SCR connection. |
|
1169 @param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale. |
|
1170 if aLocale is provided, then Application Registration Info for that locale is returned(if present in SCR). |
|
1171 If aLocale is provided but the localizable info for that locale is not present in the SCR then |
|
1172 its(aLocale) downgraded path (@see BaflUtils::GetDowngradePathL) is used to find |
|
1173 the reg details. If it fails, then application registration info for that application is not returned. |
|
1174 If alocale is not provided i.e. KUnspecifiedLocale then it takes the current locale or its downgradables. |
|
1175 @leave A system-wide error code. |
|
1176 */ |
|
1177 IMPORT_C void OpenViewL(const RSoftwareComponentRegistry& aCompReg, TLanguage aLocale=KUnspecifiedLocale); |
|
1178 |
|
1179 /** |
|
1180 Opens a view of the Application Registration information for a list of AppUids. |
|
1181 |
|
1182 If the call to this function completes successfully, then the interface client will access |
|
1183 the enumerated records by using @see RApplicationRegistryView::GetNextApplicationRegistrationInfoL. |
|
1184 |
|
1185 If a transaction owned by another session is in progress on the SCR server, the open view request |
|
1186 will be rejected. |
|
1187 |
|
1188 N.B. After this function completes successfully, GetNextApplicationRegistrationInfoL function |
|
1189 can be used |
|
1190 |
|
1191 @param aCompReg An active SCR connection. |
|
1192 @param aAppRegAppUids Array of AppUids to be fetched. |
|
1193 @param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale. |
|
1194 if aLocale is provided, then Application Registration Info for that locale is returned(if present in SCR). |
|
1195 If aLocale is provided but the localizable info for that locale is not present in the SCR then |
|
1196 its(aLocale) downgraded path (@see BaflUtils::GetDowngradePathL) is used to find |
|
1197 the reg details. If it fails, then application registration info for that application is not returned. |
|
1198 If alocale is not provided i.e. KUnspecifiedLocale then it takes the current locale or its downgradables. |
|
1199 @leave A system-wide error code. |
|
1200 */ |
|
1201 |
|
1202 IMPORT_C void OpenViewL(const RSoftwareComponentRegistry& aCompReg, const RArray<TUid>& aAppRegAppUids, TLanguage aLocale=KUnspecifiedLocale); |
|
1203 |
|
1204 /** |
|
1205 Retrieves the next Application Registration entry from the view which has already been |
|
1206 created in the SCR with @see RApplicationRegistryView::OpenApplicationRegistrationViewL. |
|
1207 |
|
1208 @param aNoOfEntries Number of AppInfo Entries to be fetched in a single call. |
|
1209 @param aApplicationRegistration An output parameter for returning the array of CApplicationRegistrationData. |
|
1210 @leave A system-wide error code |
|
1211 */ |
|
1212 IMPORT_C void GetNextApplicationRegistrationInfoL(TInt aNoOfEntries, RPointerArray<CApplicationRegistrationData>& aApplicationRegistration) const; |
|
1213 |
|
1214 private: |
|
1215 TInt iNoOfEntries; |
|
1216 TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const; |
|
1217 template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize); |
|
1218 template <class T, class C> friend TBool GetObjectL(const C& aConnection, T& aObject, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
|
1219 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RArray<T>& aArray); |
|
1220 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray); |
|
1221 |
|
1222 }; //End of RApplicationRegistryView |
|
1223 |
|
1224 |
|
1225 |
|
1226 NONSHARABLE_CLASS(RApplicationInfoView) : public RScsClientSubsessionBase |
|
1227 /** |
|
1228 This class opens a sub-session to the SCR server and sends a request to create a AppInfo view |
|
1229 by using the supplied filter on the server side. |
|
1230 It returns information associated to a list of applications, information includes the full pathname to the application and the application's caption and short caption informtion @see TAppRegInfo, |
|
1231 however localizable specific information is retrieved only if the app has localizable information |
|
1232 matching the locale with which the subsession was opened or matching the current device language. |
|
1233 It is different from class RApplicationRegistryView in the following ways: |
|
1234 1. This subsession has the ability to filter the applciations based on certain parameters @see CAppInfoFilter. |
|
1235 2. This returns specific information contained in TAppRegInfo, however class RApplicationRegistryView returns all the information associated with an app in CApplicationRegistrationData. |
|
1236 3. Functionality provided by this class can be used by all, however class RApplicationRegistryView can be used only by AppArc. |
|
1237 |
|
1238 */ |
|
1239 { |
|
1240 public: |
|
1241 /** |
|
1242 Default constructor of AppInfo sub-session. |
|
1243 */ |
|
1244 IMPORT_C RApplicationInfoView(); |
|
1245 |
|
1246 /** |
|
1247 Closes the registry view on the SCR server. |
|
1248 */ |
|
1249 IMPORT_C void Close(); |
|
1250 |
|
1251 /** |
|
1252 Opens a view of Application Info in the SCR. |
|
1253 |
|
1254 If the call to this function completes successfully, then the interface client can access |
|
1255 the enumerated records by using @see RAppInfoView::GetNextAppInfoL. |
|
1256 |
|
1257 If a transaction owned by another session is in progress on the SCR server, the open view request |
|
1258 will be rejected. |
|
1259 |
|
1260 N.B. After this function completes successfully, GetNextAppInfoL function |
|
1261 can be used |
|
1262 |
|
1263 @param aCompReg An active SCR connection. |
|
1264 @param aAppInfoFilter Pointer to the filter object which will be used by the SCR to enumerate the Application Info. Also @see CAppInfoFilter. |
|
1265 |
|
1266 @leave A system-wide error code. |
|
1267 @capability ReadUserData, Accessing list of App Info requires ReadUserData |
|
1268 */ |
|
1269 IMPORT_C void OpenViewL(const RSoftwareComponentRegistry& aCompReg, CAppInfoFilter* aAppInfoFilter = NULL,TLanguage aLocale = KUnspecifiedLocale); |
|
1270 |
|
1271 /** |
|
1272 Retrieves the next AppInfo entry from the view which has already been |
|
1273 created in the SCR with @see RSoftwareComponentRegistryView::OpenAppInfoViewL. |
|
1274 |
|
1275 @param aNoOfEntries Number of AppInfo Entries to be fetched in a single call. |
|
1276 @param aAppInfo An output parameter for returning the array of AppInfo. |
|
1277 @leave A system-wide error code. |
|
1278 */ |
|
1279 IMPORT_C void GetNextAppInfoL(TInt aNoOfEntries, RPointerArray<TAppRegInfo>& aAppInfo) const; |
|
1280 |
|
1281 private: |
|
1282 TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const; |
|
1283 template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize); |
|
1284 template <class T, class C> friend TBool GetObjectL(const C& aConnection, T& aObject, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
|
1285 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RArray<T>& aArray); |
|
1286 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray); |
|
1287 |
|
1288 };//End of RApplicationInfoView |
|
1289 |
|
1290 NONSHARABLE_CLASS(RRegistrationInfoForApplication) : public RScsClientSubsessionBase |
|
1291 /** |
|
1292 This class opens a sub-session to the SCR server with a particular application uid |
|
1293 and fetches the respective details for this particular application only. |
|
1294 */ |
|
1295 { |
|
1296 public: |
|
1297 /** |
|
1298 Default constructor of registry view sub-session. |
|
1299 */ |
|
1300 IMPORT_C RRegistrationInfoForApplication(); |
|
1301 |
|
1302 /** |
|
1303 Closes the registry view on the SCR server. |
|
1304 */ |
|
1305 IMPORT_C void Close(); |
|
1306 |
|
1307 /** |
|
1308 Creates a new subsession for the given App Uid. |
|
1309 @param aCompReg An active SCR connection. |
|
1310 @param aAppUid The Application ID to be used for further queries. |
|
1311 @param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale. |
|
1312 If KUnspecifiedLocale is provided, the current locale with its nearest language |
|
1313 (@see BaflUtils::GetEquivalentLanguageList) will be used . |
|
1314 @leave KErrNotFound If aAppUid is not found. |
|
1315 Or a system-wide error code. |
|
1316 */ |
|
1317 IMPORT_C void OpenL(const RSoftwareComponentRegistry& aCompReg,const TUid aAppUid,TLanguage aLocale=KUnspecifiedLocale); |
|
1318 |
|
1319 /** |
|
1320 Returns the list of Service Uids for the application. |
|
1321 |
|
1322 @param aServiceUids The list of Service Uids retrieved for the application. |
|
1323 @leave A system-wide error code. |
|
1324 */ |
|
1325 IMPORT_C void GetAppServicesUidsL(RArray<TUid>& aServiceUids) const; |
|
1326 |
|
1327 /** |
|
1328 Returns the Application Language(Locale) for the application. |
|
1329 This is identified after mapping the Application languages to the nearest device language. |
|
1330 @return TLanguage The Application Language(Locale) retrieved for the application. |
|
1331 @leave A system-wide error code. |
|
1332 */ |
|
1333 IMPORT_C TLanguage ApplicationLanguageL() const; |
|
1334 |
|
1335 /** |
|
1336 Returns the default Screen Number for the application. |
|
1337 |
|
1338 @return The default Screen Number retrieved for the application. |
|
1339 @leave A system-wide error code. |
|
1340 */ |
|
1341 IMPORT_C TInt DefaultScreenNumberL() const; |
|
1342 |
|
1343 /** |
|
1344 Returns the number of defined icons for the application and locale. |
|
1345 |
|
1346 @return The number of defined icons retrieved for the given locale of the application. |
|
1347 @leave A system-wide error code. |
|
1348 */ |
|
1349 IMPORT_C TInt NumberOfOwnDefinedIconsL() const; |
|
1350 |
|
1351 /** |
|
1352 Returns the array of files owned by the application . |
|
1353 |
|
1354 @param aAppOwnedFiles returns array of Files owned by the application. |
|
1355 @leave A system-wide error code. |
|
1356 */ |
|
1357 IMPORT_C void GetAppOwnedFilesL(RPointerArray<HBufC>& aAppOwnedFiles) const; |
|
1358 |
|
1359 /** |
|
1360 Returns the characteristics of the application. |
|
1361 |
|
1362 @param aApplicationCharacteristics returns capabilty of the application. |
|
1363 @leave A system-wide error code. |
|
1364 */ |
|
1365 IMPORT_C void GetAppCharacteristicsL(TApplicationCharacteristics& aApplicationCharacteristics) const; |
|
1366 /** |
|
1367 Returns the file name of the icon associated with the application. |
|
1368 |
|
1369 @param aFullFileName returns file name of the icon associated with the application. |
|
1370 @leave A system-wide error code. |
|
1371 */ |
|
1372 IMPORT_C void GetAppIconL(HBufC*& aFullFileName) const; |
|
1373 |
|
1374 /** |
|
1375 Returns the file name of the icon associated with the application, given a View Uid. |
|
1376 |
|
1377 @param aViewUid view Uid of the app |
|
1378 @param aFullFileName returns file name of the icon of the application. |
|
1379 @leave A system-wide error code. |
|
1380 */ |
|
1381 IMPORT_C void GetAppViewIconL(TUid aViewUid,HBufC*& aFullFileName) const; |
|
1382 |
|
1383 /** Returns the view information published by the application for the current locale. |
|
1384 |
|
1385 @param aAppViewInfoArray On return, the array contains information on all of the views |
|
1386 published by the specified application for the current locale. |
|
1387 @see CAppViewData |
|
1388 @leave A system-wide error code. |
|
1389 **/ |
|
1390 |
|
1391 IMPORT_C void GetAppViewsL(RPointerArray<CAppViewData>& aAppViewInfoArray) const; |
|
1392 |
|
1393 private: |
|
1394 void CheckSubSessionHandleL() const; //Checks for Valid SubSessionHandle |
|
1395 TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const; |
|
1396 template <class C> void SendDependencyArgsL(TInt aFunction, const C& aSupplierId, const CGlobalComponentId& aDependantGlobalCompId); |
|
1397 template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize); |
|
1398 template <class T, class C> friend T* GetObjectL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
|
1399 template <class T, class C> friend TBool GetObjectL(const C& aConnection, T& aObject, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
|
1400 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RArray<T>& aArray); |
|
1401 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray); |
|
1402 |
|
1403 }; //End of RRegistrationInfoForApplication |
|
1404 |
|
1405 NONSHARABLE_CLASS(RApplicationRegistrationInfo) : public RScsClientSubsessionBase |
|
1406 /** |
|
1407 This class opens a sub-session to the SCR server and is used to retrieve application information. |
|
1408 |
|
1409 */ |
|
1410 { |
|
1411 public: |
|
1412 /** |
|
1413 Default constructor of registry view sub-session. |
|
1414 */ |
|
1415 IMPORT_C RApplicationRegistrationInfo(); |
|
1416 |
|
1417 /** |
|
1418 Closes the registry view sub-session on the SCR server. |
|
1419 */ |
|
1420 IMPORT_C void Close(); |
|
1421 |
|
1422 /** |
|
1423 Creates a new subsession with SCR. |
|
1424 |
|
1425 Once the call to this function succeeds, the client will be able to query SCR for various information |
|
1426 such as data type and service information. |
|
1427 |
|
1428 If a transaction is owned by another session is in progress on the SCR server, then this request |
|
1429 will be rejected. |
|
1430 |
|
1431 @param aCompReg An active SCR connection. |
|
1432 @leave A system-wide error code. |
|
1433 */ |
|
1434 IMPORT_C void OpenL(const RSoftwareComponentRegistry& aCompReg); |
|
1435 |
|
1436 /** |
|
1437 Returns the App Uid for a given Service Uid that handles the specified datatype with the highest priority. |
|
1438 |
|
1439 @param aName The Data Type Text. |
|
1440 @param aServiceUid The Service Uid. |
|
1441 @return The App Uid for the given Data type and Service Uid. |
|
1442 @leave A system-wide error code. |
|
1443 */ |
|
1444 IMPORT_C TUid GetAppForDataTypeAndServiceL(const TDesC &aName,const TUid aServiceUid) const; |
|
1445 |
|
1446 /** |
|
1447 Return the App Uid for the given Data type with the highest priority. |
|
1448 |
|
1449 @param aName The Data Type Text. |
|
1450 @return The App Uid for the given Data type. |
|
1451 @leave KErrNotFound If the AppUid is not found |
|
1452 Or a system-wide error code. |
|
1453 */ |
|
1454 IMPORT_C TUid GetAppForDataTypeL(const TDesC &aName) const; |
|
1455 |
|
1456 /** |
|
1457 Return the Service Info details for the set parameters of the filter. |
|
1458 |
|
1459 @param aAppServiceInfoFilter A pointer to AppServiceInfoFilter enumerating the parameters on the basis of which serviceinfo details are to be fetched. |
|
1460 @param aAppServiceInfoArray On return contains the service info details assoicated with the parameters set in the filter. |
|
1461 @param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale. |
|
1462 If KUnspecifiedLocale is provided, the current locale with its nearest language (@see BaflUtils::GetEquivalentLanguageList) is used to find |
|
1463 the names. |
|
1464 @leave KErrNotFound If the Service Info details are not found |
|
1465 Or a system-wide error code. |
|
1466 */ |
|
1467 IMPORT_C void GetServiceInfoL(CAppServiceInfoFilter* aAppServiceInfoFilter, RPointerArray<CServiceInfo>& aAppServiceInfoArray, TLanguage aLocale=KUnspecifiedLocale) const; |
|
1468 |
|
1469 /** |
|
1470 Return the basic application information contained in TAppRegInfo for a given application present in the SCR DB. |
|
1471 |
|
1472 @param aAppUid An application's Uid. |
|
1473 @param aAppInfo An output parameter for returning the array of AppInfo. |
|
1474 @param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale. |
|
1475 If KUnspecifiedLocale is provided, the current locale with its nearest language (@see BaflUtils::GetEquivalentLanguageList) is used to find |
|
1476 the names. |
|
1477 @return ETrue if found, EFalse if application is not found |
|
1478 |
|
1479 @leave A system-wide error code. |
|
1480 */ |
|
1481 IMPORT_C TBool GetAppInfoL(TUid aAppUid, TAppRegInfo& aAppInfo, TLanguage aLocale=KUnspecifiedLocale); |
|
1482 |
|
1483 |
|
1484 private: |
|
1485 void CheckSubSessionHandleL() const; //Checks for Valid SubSessionHandle |
|
1486 TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const; |
|
1487 template <class C> void SendDependencyArgsL(TInt aFunction, const C& aSupplierId, const CGlobalComponentId& aDependantGlobalCompId); |
|
1488 template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize); |
|
1489 template <class T, class C> friend T* GetObjectL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
|
1490 template <class T, class C> friend TBool GetObjectL(const C& aConnection, T& aObject, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
|
1491 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RArray<T>& aArray); |
|
1492 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray); |
|
1493 |
|
1494 }; //End of RApplicationRegistrationInfo |
|
1495 |
|
1496 }// End of namespace Usif |
|
1074 #endif // SOFTWARECOMPONENTREGISTRY_H |
1497 #endif // SOFTWARECOMPONENTREGISTRY_H |