Perform an Action

A command object (type ACI_COMMAND) stores information about the action that you want to run, as well as all the parameters that this action requires, such as:

There is no limit to the number of parameters that can be stored, but there can only be one action.

Create an Action

The following example shows how to create a command object.

// Create the command object
t_aciObject* pCommand = NULL;
aciObjectCreate(&pCommand, ACI_COMMAND);

// Set command to execute
aciObjectParamSetString(pCommand, ACI_COM_COMMAND, "QUERY");

// Set http method
aciObjectParamSetBool(pCommand, ACI_COM_USE_POST,TRUE);

// Set action parameters
aciObjectParamSetString(
  pCommand, "Text", "Reducing heart attack risk");
aciObjectParamSetString(pCommand, "LanguageType", "English");
aciObjectParamSetBool(pCommand, "TotalResults", TRUE);

// Create security string
aciObjectSetUserSecurityInfo(pCommand, "notes", ACI_SECURITY_USERNAME, "jbloggs");
aciObjectSetUserSecurityInfo(
  pCommand, "notes", ACI_SECURITY_GROUP, "techusers");

_FT_HTML5_bannerTitle.htm