# Standard C Language Types

The following simple data types are defined in the Essbase API for the C programming language:

Simple Data Types
Other Data Types
Bitmask Data Types
Pointer Types
Miscellaneous Types
Array Types
API Definitions

## Simple Data Types

Data Type | Essbase Type
typedef char | ESS_CHAR_T
typedef short | ESS_SHORT_T
typedef long | ESS_LONG_T
typedef unsigned char | ESS_UCHAR_T
typedef unsigned short | ESS_USHORT_T
typedef unsigned long | ESS_ULONG_T
typedef float | ESS_FLOAT_T
typedef double | ESS_DOUBLE_T
typedef unsigned long | ESS_TIME_T
typedef unsigned long | ESS_DATE_T

## Other Data Types

Data Type | Essbase Type | Description
typedef void | *ESS_HCTX_T | API context handle
typedef void | *ESS_HINST_T | API instance handle
typedef unsigned char | ESS_BOOL_T | boolean
typedef size_t | ESS_SIZE_T | size of a memory block
typedef char | *ESS_STR_T | string (array of char)
typedef void | ESS_VOID_T | void

## Bitmask Data Types

The values for these data types consist of bit values that are combined to provide additional values when appropriate. For example, a caller needing WRITE access to a database must have the READ and WRITE privileges, thus ESS_ACCESS_WRITE equals the bit values for ESS_PRIV_READ and ESS__PRIV_WRITE. Similarly, ESS_OBJTYPE_BACKUP is a combination of ESS_OBJTYPE_ASCBACKUP and ESS_OBJTYPE_BINBACKUP.

Data Type | Essbase Type | Description
typedef unsigned short | ESS_ACCESS_T | Essbase access level. Possible bit values are: ESS_PRIV_NONE - 0x0000 - no privilege ESS_PRIV_READ - 0x0001 - read data ESS_PRIV_WRITE - 0x0002 - write data ESS_PRIV_CALC - 0x0004 - calculate data ESS_PRIV_DBLOAD - 0x0010 - load and unload databases ESS_PRIV_DBDESIGN - 0x0020 - design databases ESS_PRIV_DBCREATE - 0x0040 - create, delete, and edit databases ESS_PRIV_APPLOAD - 0x0100 - load and unload applications ESS_PRIV_APPDESIGN - 0x0200 - design applications ESS_PRIV_APPCREATE - 0x0400 - create, delete, and edit applications ESS_PRIV_USERCREATE - 0x1000 - create, delete, and edit users The access types are combinations of privileges. The valid values are: ESS_ACCESS_NONE - 0x0000 ESS_ACCESS_READ - 0x0111 ESS_ACCESS_WRITE - 0x0113 ESS_ACCESS_CALC - 0x0117 ESS_ACCESS_METAREAD - 0x0118 ESS_ACCESS_DBDESIGN - 0x0137 ESS_ACCESS_DBCREATE - 0x0177 ESS_ACCESS_APPDESIGN - 0x0377 ESS_ACCESS_APPCREATE - 0x0777 ESS_ACCESS_FILTER - 0x0110 ESS_ACCESS_DBALL - 0x00ff - full database access ESS_ACCESS_APPALL - 0x0fff - full application/database access ESS_ACCESS_SUPER - 0xffff - supervisor (unrestricted access)
typedef unsigned long | ESS_OBJTYPE_T | File object type. Single object types are: ESS_OBJTYPE_NONE ESS_OBJTYPE_OUTLINE ESS_OBJTYPE_CALCSCRIPT ESS_OBJTYPE_REPORT ESS_OBJTYPE_RULES ESS_OBJTYPE_ALIAS ESS_OBJTYPE_STRUCTURE ESS_OBJTYPE_ASCBACKUP ESS_OBJTYPE_BINBACKUP ESS_OBJTYPE_EXCEL ESS_OBJTYPE_LOTUS2 ESS_OBJTYPE_LOTUS3 ESS_OBJTYPE_TEXT ESS_OBJTYPE_PARTITION ESS_OBJTYPE_LOTUS4 ESS_OBJTYPE_WIZARD ESS_OBJTYPE_SELECTION ESS_OBJTYPE_LRO #define ESS_OBJTYPE_MAX 0x08000000 /* maximum single object type value */ Combined object types are: ESS_OBJTYPE_BACKUP ESS_OBJTYPE_WORKSHEET ESS_OBJTYPE_DATA ESS_OBJTYPE_ALL

## Pointer Types

Data Type | Essbase Type | Description
char | *ESS_PCHAR_T | pointer to char
unsigned char | *ESS_PUCHAR_T | pointer to unsigned char
short | *ESS_PSHORT_T | pointer to short
unsigned short | *ESS_PUSHORT_T | pointer to unsigned short
long | *ESS_PLONG_T | pointer to long
unsigned long | *ESS_PULONG_T | pointer to unsigned long
double | *ESS_PDOUBLE_T | pointer to double
float | *ESS_PFLOAT_T | pointer to float
ESS_ACCESS_T | *ESS_PACCESS_T | pointer to Essbase access level
ESS_BOOL_T | *ESS_PBOOL_T | pointer to boolean
ESS_HCTX_T | *ESS_PHCTX_T | pointer to Essbase API context handle
ESS_HINST_T | *ESS_PHINST_T | pointer to Essbase API instance handle
ESS_HCTX_T | *ESS_PHCTX_T | pointer to Essbase API context handle
ESS_SIZE_T | *ESS_PSIZE_T | pointer to size of a memory block
ESS_STR_T | *ESS_PSTR_T | pointer to string
ESS_VOID_T | *ESS_PVOID_T | pointer to void

## Miscellaneous Types

Data Type | Essbase Type | Description
typedef long | ESS_STS_T | return value from API functions
typedef ESS_STS_T | (*ESS_FUNC_T)() | pointer to function

## Array Types

The following array types are defined using the appropriate maximum string length. For example, the type ESS_USERNAME_T is defined as typedef char ESS_USERNAME_T[ESS_USERNAME_LEN].

Data Type | Essbase Type | Description
typedef char | ESS_USERNAME_T | user name
typedef char | ESS_PASSWORD_T | password
typedef char | ESS_SVRNAME_T | server name
typedef char | ESS_APPNAME_T | application name
typedef char | ESS_DBNAME_T | database name
typedef char | ESS_OBJNAME_T | object name
typedef char | ESS_MBRNAME_T | member name
typedef char | ESS_FTRNAME_T | filter name
typedef char | ESS_ALIASNAME_T | alias table name
typedef char | ESS_PATH_T | file path name
typedef char | ESS_DESC_T | app/database description

## API Definitions

Essbase Type | Value
#define ESS_TRUE | 1
#define ESS_FALSE | 0
#define ESS_NULL | NULL