1# resmgr_common.h 2 3## Overview 4 5Provides the enum types and structures for resource manager APIs. 6 7**File to include**: <resourcemanager/resmgr_common.h> 8 9**Library**: libohresmgr.so 10 11**System capability**: SystemCapability.Global.ResourceManager 12 13**Since**: 12 14 15**Related module**: [resourcemanager](capi-resourcemanager.md) 16 17## Summary 18 19### Structs 20 21| Name| typedef Keyword| Description| 22| -- | -- | -- | 23| [ResourceManager_Configuration](capi-resourcemanager-resourcemanager-configuration.md) | ResourceManager_Configuration | Enumerates device states.| 24 25### Enums 26 27| Name| typedef Keyword| Description| 28| -- | -- | -- | 29| [ResourceManager_ErrorCode](#resourcemanager_errorcode) | - | Enumerates resource manager error codes.| 30| [ScreenDensity](#screendensity) | - | Enumerates screen density types.| 31| [ResourceManager_Direction](#resourcemanager_direction) | ResourceManager_Direction | Enumerates screen orientations.| 32| [ResourceManager_ColorMode](#resourcemanager_colormode) | ResourceManager_ColorMode | Enumerates color modes.| 33| [ResourceManager_DeviceType](#resourcemanager_devicetype) | ResourceManager_DeviceType | Enumerates device types.| 34 35## Enum Description 36 37### ResourceManager_ErrorCode 38 39``` 40enum ResourceManager_ErrorCode 41``` 42 43**Description** 44 45Enumerates resource manager error codes. 46 47**Since**: 12 48 49| Enum Item| Description| 50| -- | -- | 51| SUCCESS = 0 | Operation successful.| 52| ERROR_CODE_INVALID_INPUT_PARAMETER = 401 | Invalid input parameter.| 53| ERROR_CODE_RES_ID_NOT_FOUND = 9001001 | Invalid resource ID.| 54| ERROR_CODE_RES_NOT_FOUND_BY_ID = 9001002 | Invalid resource name.| 55| ERROR_CODE_RES_NAME_NOT_FOUND = 9001003 | No matching resource found based on the resource ID.| 56| ERROR_CODE_RES_NOT_FOUND_BY_NAME = 9001004 | No matching resource found based on the resource name.| 57| ERROR_CODE_RES_PATH_INVALID = 9001005 | Invalid relative path.| 58| ERROR_CODE_RES_REF_TOO_MUCH = 9001006 | Resource referenced cyclically.| 59| ERROR_CODE_RES_ID_FORMAT_ERROR = 9001007 | Failed to format the resource obtained based on the specified resource ID.| 60| ERROR_CODE_RES_NAME_FORMAT_ERROR = 9001008 | Failed to format the resource obtained based on the specified resource name.| 61| ERROR_CODE_SYSTEM_RES_MANAGER_GET_FAILED = 9001009 | Failed to access system resources.| 62| ERROR_CODE_OVERLAY_RES_PATH_INVALID = 9001010 | Invalid overlay path.| 63| ERROR_CODE_OUT_OF_MEMORY = 9001100 | A memory overflow occurs.| 64 65### ScreenDensity 66 67``` 68enum ScreenDensity 69``` 70 71**Description** 72 73Enumerates screen density types. 74 75**Since**: 12 76 77| Enum Item| Description| 78| -- | -- | 79| SCREEN_SDPI = 120 | Screen density with small-scale dots per inch (SDPI).| 80| SCREEN_MDPI = 160 | Screen density with medium-scale dots per inch (MDPI).| 81| SCREEN_LDPI = 240 | Screen density with large-scale dots per inch (LDPI).| 82| SCREEN_XLDPI = 320 | Screen density with extra-large-scale dots per inch (XLDPI).| 83| SCREEN_XXLDPI = 480 | Screen density with extra-extra-large-scale dots per inch (XXLDPI).| 84| SCREEN_XXXLDPI = 640 | Screen density with extra-extra-extra-large-scale dots per inch (XXXLDPI).| 85 86### ResourceManager_Direction 87 88``` 89enum ResourceManager_Direction 90``` 91 92**Description** 93 94Enumerates screen orientations. 95 96**Since**: 12 97 98| Enum Item| Description| 99| -- | -- | 100| DIRECTION_VERTICAL = 0 | Vertical direction.| 101| DIRECTION_HORIZONTAL = 1 | Horizontal direction.| 102 103### ResourceManager_ColorMode 104 105``` 106enum ResourceManager_ColorMode 107``` 108 109**Description** 110 111Enumerates color modes. 112 113**Since**: 12 114 115| Enum Item| Description| 116| -- | -- | 117| DARK = 0 | Dark mode.| 118| LIGHT = 1 | Light mode.| 119 120### ResourceManager_DeviceType 121 122``` 123enum ResourceManager_DeviceType 124``` 125 126**Description** 127 128Enumerates device types. 129 130**Since**: 12 131 132| Enum Item| Description| 133| -- | -- | 134| DEVICE_TYPE_PHONE = 0X00 | Smartphone| 135| DEVICE_TYPE_TABLET = 0x01 | Tablet| 136| DEVICE_TYPE_CAR = 0x02 | Automobile| 137| DEVICE_TYPE_PC = 0x03 | Computer| 138| DEVICE_TYPE_TV = 0x04 | TV.| 139| DEVICE_TYPE_WEARABLE = 0x06 | Wearable| 140| DEVICE_TYPE_2IN1 = 0x07 | 2-in-1 device| 141