PebbleOS v4.47.0
Loading...
Searching...
No Matches
status_codes.h File Reference

Global status codes and related macros. More...

#include <stdint.h>

Macros

#define DECLARE_DOMAIN_STATUS(e)   ((status_t)(e & (1 << 30)))
 
#define PASSED(s)   ((status_t)(s) >= 0)
 
#define FAILED(s)   ((status_t)(s) < 0)
 

Typedefs

typedef int32_t status_t
 Return value for system operations. See StatusCode for possible values.
 

Enumerations

enum  StatusCode {
  S_SUCCESS = 0 , E_ERROR = -1 , E_UNKNOWN = -2 , E_INTERNAL = -3 ,
  E_INVALID_ARGUMENT = -4 , E_OUT_OF_MEMORY = -5 , E_OUT_OF_STORAGE = -6 , E_OUT_OF_RESOURCES = -7 ,
  E_RANGE = -8 , E_DOES_NOT_EXIST = -9 , E_INVALID_OPERATION = -10 , E_BUSY = -11 ,
  E_AGAIN = -12 , S_TRUE = 1 , S_FALSE = 0 , S_NO_MORE_ITEMS = 2 ,
  S_NO_ACTION_REQUIRED = 3
}
 Status codes. See status_t. More...
 

Detailed Description

Global status codes and related macros.

Macro Definition Documentation

◆ DECLARE_DOMAIN_STATUS

#define DECLARE_DOMAIN_STATUS (   e)    ((status_t)(e & (1 << 30)))

◆ FAILED

#define FAILED (   s)    ((status_t)(s) < 0)

◆ PASSED

#define PASSED (   s)    ((status_t)(s) >= 0)

Typedef Documentation

◆ status_t

typedef int32_t status_t

Return value for system operations. See StatusCode for possible values.

Enumeration Type Documentation

◆ StatusCode

enum StatusCode

Status codes. See status_t.

Enumerator
S_SUCCESS 

Operation completed successfully.

E_ERROR 

An error occurred (no description).

E_UNKNOWN 

No idea what went wrong.

E_INTERNAL 

There was a generic internal logic error.

E_INVALID_ARGUMENT 

The function was not called correctly.

E_OUT_OF_MEMORY 

Insufficient allocatable memory available.

E_OUT_OF_STORAGE 

Insufficient long-term storage available.

E_OUT_OF_RESOURCES 

Insufficient resources available.

E_RANGE 

Argument out of range (may be dynamic).

E_DOES_NOT_EXIST 

Target of operation does not exist.

E_INVALID_OPERATION 

Operation not allowed (may depend on state).

E_BUSY 

Another operation prevented this one.

E_AGAIN 

Operation not completed; try again.

S_TRUE 

Equivalent of boolean true.

S_FALSE 

Equivalent of boolean false.

S_NO_MORE_ITEMS 

For list-style requests. At end of list.

S_NO_ACTION_REQUIRED 

No action was taken as none was required.