TIBCO FTL®

Typedefs | Functions
props.h File Reference

Properties objects represent a set of configuration properties (name/value pairs). More...

## Typedefs
typedef struct __tibProperties * | tibProperties
| Properties objects hold name/value pairs. More...
typedef void(* | tibRealmOAuth2TokenFetchCallback) (tibEx e, tibRealm realm, char *buffer, tibint32_t size, void *closure)
| Applications specify this callback if they intend to return an OAuth 2.0 access token during intial connect and when the FTLServer makes a request to provide a refreshed OAuth 2.0 access token. More...

## Functions
TIB_API tibProperties | tibProperties_Copy (tibEx e, tibProperties properties)
TIB_API tibProperties | tibProperties_Create (tibEx e)
| Create an empty property list object without any default values. More...
TIB_API void | tibProperties_Destroy (tibEx e, tibProperties properties)
| Destroy a property list object. More...
TIB_API tibbool_t | tibProperties_Exists (tibEx e, tibProperties properties, const char *name)
| Check whether a property exists. More...
TIB_API tibbool_t | tibProperties_GetBoolean (tibEx e, tibProperties properties, const char *name)
| Get a boolean property. More...
TIB_API tibdouble_t | tibProperties_GetDouble (tibEx e, tibProperties properties, const char *name)
| Get a double property. More...
TIB_API tibint32_t | tibProperties_GetInt (tibEx e, tibProperties properties, const char *name)
| Get an integer property. More...
TIB_API tibint64_t | tibProperties_GetLong (tibEx e, tibProperties properties, const char *name)
| Get a long integer property. More...
TIB_API const tibMessage | tibProperties_GetMessage (tibEx e, tibProperties properties, const char *name)
| Get a tibMessage property. More...
TIB_API const char * | tibProperties_GetString (tibEx e, tibProperties properties, const char *name)
| Get a string property. More...
TIB_API tibbool_t | tibProperties_Remove (tibEx e, tibProperties properties, const char *name)
| Remove a property. More...
TIB_API void | tibProperties_SetBoolean (tibEx e, tibProperties properties, const char *name, tibbool_t value)
| Set a boolean property. More...
TIB_API void | tibProperties_SetDouble (tibEx e, tibProperties properties, const char *name, tibdouble_t value)
| Set a double property. More...
TIB_API void | tibProperties_SetInt (tibEx e, tibProperties properties, const char *name, tibint32_t value)
| Set an integer property. More...
TIB_API void | tibProperties_SetLong (tibEx e, tibProperties properties, const char *name, tibint64_t value)
| Set a long integer property. More...
TIB_API void | tibProperties_SetMessage (tibEx e, tibProperties properties, const char *name, const tibMessage value)
| Set a tibMessage property. More...
TIB_API void | tibProperties_SetOAuth2TokenFetchCallback (tibEx e, tibProperties properties, tibRealmOAuth2TokenFetchCallback callback, void *closure)
| OAuth2 Token fetch callback. More...
TIB_API void | tibProperties_SetString (tibEx e, tibProperties properties, const char *name, const char *value)
| Set a string property. More...

## Detailed Description

Properties objects represent a set of configuration properties (name/value pairs).

This file defines properties objects and calls that manipulate them.

## Typedef Documentation

## ◆ tibProperties

typedef struct __tibProperties* tibProperties

Properties objects hold name/value pairs.

Programs pass properties to FTL object creation calls.

Many property names include an indication of the required datatype for the value. For example, TIB_EVENTQUEUE_PROPERTY_INT_DISCARD_POLICY requires an integer value.

Properties objects are not thread-safe.

## ◆ tibRealmOAuth2TokenFetchCallback

typedef void(* tibRealmOAuth2TokenFetchCallback) (tibEx e, tibRealm realm, char *buffer, tibint32_t size, void *closure)

Applications specify this callback if they intend to return an OAuth 2.0 access token during intial connect and when the FTLServer makes a request to provide a refreshed OAuth 2.0 access token.

## Function Documentation

## ◆ tibProperties_Copy()

TIB_API tibProperties tibProperties_Copy | ( | tibEx | e,
|  | tibProperties | properties
| ) |  |

## ◆ tibProperties_Create()

TIB_API tibProperties tibProperties_Create | ( | tibEx | e | ) |

Create an empty property list object without any default values.

As a mechanism for configuring objects, some FTL creation calls accept a properties object, which contains paired property names and values.

Properties objects are not thread-safe.

Parameters

  e | The exception object captures information about failures.

Returns
  On success, this call returns a new properties object.
  On failure, this call returns `NULL`.

## ◆ tibProperties_Destroy()

TIB_API void tibProperties_Destroy | ( | tibEx | e,
|  | tibProperties | properties
| ) |  |

Destroy a property list object.

An application can destroy a properties object to reclaim its resources. Destroying a properties object does not invalidate objects created with it. (For example, the queue creation call copies property values into the new queue.)

Parameters

  e | The exception object captures information about failures.
  properties | The call destroys this properties object.

Returns
  void

## ◆ tibProperties_Exists()

TIB_API tibbool_t tibProperties_Exists | ( | tibEx | e,
|  | tibProperties | properties,
|  | const char * | name
| ) |  |

Check whether a property exists.

Parameters

  e | The exception object captures information about failures.
  properties | The call searches this properties object.
  name | The call checks for this property.

Returns
  tibtrue if the property exists, tibfalse otherwise.

## ◆ tibProperties_GetBoolean()

TIB_API tibbool_t tibProperties_GetBoolean | ( | tibEx | e,
|  | tibProperties | properties,
|  | const char * | name
| ) |  |

Get a boolean property.

Return the boolean value of property name.

Parameters

  e | The exception object captures information about failures.
  properties | The call searches this properties object.
  name | The call gets the value of this property.

Returns
  a boolean property value

Exceptions

  TIB_NOT_FOUND | indicates the property does not exist.
  TIB_ILLEGAL_STATE | indicates the property exists, but its value has a different type.

## ◆ tibProperties_GetDouble()

TIB_API tibdouble_t tibProperties_GetDouble | ( | tibEx | e,
|  | tibProperties | properties,
|  | const char * | name
| ) |  |

Get a double property.

Return the double value of property name.

Parameters

  e | The exception object captures information about failures.
  properties | The call searches this properties object.
  name | The call gets the value of this property.

Returns
  a double property value

Exceptions

  TIB_NOT_FOUND | indicates the property does not exist.
  TIB_ILLEGAL_STATE | indicates the property exists, but its value has a different type.

## ◆ tibProperties_GetInt()

TIB_API tibint32_t tibProperties_GetInt | ( | tibEx | e,
|  | tibProperties | properties,
|  | const char * | name
| ) |  |

Get an integer property.

Return the integer value of property name.

Parameters

  e | The exception object captures information about failures.
  properties | The call searches this properties object.
  name | The call gets the value of this property.

Returns
  an integer property value

Exceptions

  TIB_NOT_FOUND | indicates the property does not exist.
  TIB_ILLEGAL_STATE | indicates the property exists, but its value has a different type.

## ◆ tibProperties_GetLong()

TIB_API tibint64_t tibProperties_GetLong | ( | tibEx | e,
|  | tibProperties | properties,
|  | const char * | name
| ) |  |

Get a long integer property.

Return the long integer value of property name.

Parameters

  e | The exception object captures information about failures.
  properties | The call searches this properties object.
  name | The call gets the value of this property.

Returns
  a long integer property value

Exceptions

  TIB_NOT_FOUND | indicates the property does not exist.
  TIB_ILLEGAL_STATE | indicates the property exists, but its value has a different type.

## ◆ tibProperties_GetMessage()

TIB_API const tibMessage tibProperties_GetMessage | ( | tibEx | e,
|  | tibProperties | properties,
|  | const char * | name
| ) |  |

Get a tibMessage property.

Return the tibMessage value of property name.

Parameters

  e | The exception object captures information about failures.
  properties | The call searches this properties object.
  name | The call gets the value of this property.

Returns
  a read-only tibMessage property value

Exceptions

  TIB_NOT_FOUND | indicates the property does not exist.
  TIB_ILLEGAL_STATE | indicates the property exists, but its value has a different type.

## ◆ tibProperties_GetString()

TIB_API const char * tibProperties_GetString | ( | tibEx | e,
|  | tibProperties | properties,
|  | const char * | name
| ) |  |

Get a string property.

Return the string value of property name.

Parameters

  e | The exception object captures information about failures.
  properties | The call searches this properties object.
  name | The call gets the value of this property.

Returns
  a string property value

Exceptions

  TIB_NOT_FOUND | indicates the property does not exist.
  TIB_ILLEGAL_STATE | indicates the property exists, but its value has a different type.

## ◆ tibProperties_Remove()

TIB_API tibbool_t tibProperties_Remove | ( | tibEx | e,
|  | tibProperties | properties,
|  | const char * | name
| ) |  |

Remove a property.

Remove the property name from properties.

Parameters

  e | The exception object captures information about failures.
  properties | The call removes the property from this properties object.
  name | The call removes this property.

Returns
  tibtrue indicates the call removed the property.
  tibfalse indicates the property did not exist.

## ◆ tibProperties_SetBoolean()

TIB_API void tibProperties_SetBoolean | ( | tibEx | e,
|  | tibProperties | properties,
|  | const char * | name,
|  | tibbool_t | value
| ) |  |

Set a boolean property.

- If name is not yet in the properties object, this call adds the name and value pair.
- If name is already in the properties object, this call changes its value.

Parameters

  e | The exception object captures information about failures.
  properties | The call modifies this properties object.
  name | The call sets this property.
  value | The call sets the property to this value.

Exceptions

  TIB_ILLEGAL_STATE | indicates the property already exists, but its value has a different type.

## ◆ tibProperties_SetDouble()

TIB_API void tibProperties_SetDouble | ( | tibEx | e,
|  | tibProperties | properties,
|  | const char * | name,
|  | tibdouble_t | value
| ) |  |

Set a double property.

- If name is not yet in the properties object, this call adds the name and value pair.
- If name is already in the properties object, this call changes its value.

Parameters

  e | The exception object captures information about failures.
  properties | The call modifies this properties object.
  name | The call sets this property.
  value | The call sets the property to this value.

Exceptions

  TIB_ILLEGAL_STATE | indicates the property already exists, but its value has a different type.

## ◆ tibProperties_SetInt()

TIB_API void tibProperties_SetInt | ( | tibEx | e,
|  | tibProperties | properties,
|  | const char * | name,
|  | tibint32_t | value
| ) |  |

Set an integer property.

- If name is not yet in the properties object, this call adds the name and value pair.
- If name is already in the properties object, this call changes its value.

Parameters

  e | The exception object captures information about failures.
  properties | The call modifies this properties object.
  name | The call sets this property.
  value | The call sets the property to this value.

Exceptions

  TIB_ILLEGAL_STATE | indicates the property already exists, but its value has a different type.

## ◆ tibProperties_SetLong()

TIB_API void tibProperties_SetLong | ( | tibEx | e,
|  | tibProperties | properties,
|  | const char * | name,
|  | tibint64_t | value
| ) |  |

Set a long integer property.

- If name is not yet in the properties object, this call adds the name and value pair.
- If name is already in the properties object, this call changes its value.

Parameters

  e | The exception object captures information about failures.
  properties | The call modifies this properties object.
  name | The call sets this property.
  value | The call sets the property to this value.

Exceptions

  TIB_ILLEGAL_STATE | indicates the property already exists, but its value has a different type.

## ◆ tibProperties_SetMessage()

TIB_API void tibProperties_SetMessage | ( | tibEx | e,
|  | tibProperties | properties,
|  | const char * | name,
|  | const tibMessage | value
| ) |  |

Set a tibMessage property.

- If name is not yet in the properties object, this call adds the name and value pair.
- If name is already in the properties object, this call changes its value.

Parameters

  e | The exception object captures information about failures.
  properties | The call modifies this properties object.
  name | The call sets this property.
  value | The call sets the property to this value.

Note
  The call copies the value, so you may re-use the tibMessage storage after this call returns.

Exceptions

  TIB_ILLEGAL_STATE | indicates the property already exists, but its value has a different type.

## ◆ tibProperties_SetOAuth2TokenFetchCallback()

TIB_API void tibProperties_SetOAuth2TokenFetchCallback | ( | tibEx | e,
|  | tibProperties | properties,
|  | tibRealmOAuth2TokenFetchCallback | callback,
|  | void * | closure
| ) |  |

OAuth2 Token fetch callback.

Applications may use this callback, that gets invoked before realm connect as well as when the token needs to be refresh

## ◆ tibProperties_SetString()

TIB_API void tibProperties_SetString | ( | tibEx | e,
|  | tibProperties | properties,
|  | const char * | name,
|  | const char * | value
| ) |  |

Set a string property.

- If name is not yet in the properties object, this call adds the name and value pair.
- If name is already in the properties object, this call changes its value.

Parameters

  e | The exception object captures information about failures.
  properties | The call modifies this properties object.
  name | The call sets this property.
  value | The call sets the property to this value.

Note
  The call copies the value, so you may re-use the string storage after this call returns.

Exceptions

  TIB_ILLEGAL_STATE | indicates the property already exists, but its value has a different type.