CA_Update_Profile()

Purpose

Updates an application profile.

Libraries

Blueworx Voice Response library (libvae.a)

Custom Server library (libca.a)

Syntax

#include "CA_header.h"
#include "CA_access_db.h"
int CA_Update_Profile (
 PROFILE_INFO_ST  *profile_info_sp,
 int              update_profile_mask,
 int              update_mailbox_mask[MAX_MAILBOXES]
);

Description

This subroutine updates an application profile in the Blueworx Voice Response database. The updated information is passed in the PROFILE_INFO_ST input structure.

CA_Update_Profile() uses a mask to specify the application profile fields to be updated. For example, suppose you want to change the state table associated with an application profile, and also prevent every mailbox belonging to that profile from taking messages. Your code might look like this:

PROFILE_INFO_ST profile_info;
int mailbox_mask[MAX_MAILBOXES];
unsigned int i;
strcpy (profile_info.state_table, "NEW_STATE_TABLE");
strcpy (profile_info.entry_label, "NEW_ENTRY_LABEL");
for (i = 0; i < MAX_MAILBOXES; i++)
{
  mailbox_mask[i] = UPDATE_MAILBOX_TAKE_MSGS;
  profile_info.mailbox_info[i].take_message = DO_NOT_TAKE_MESSAGES;
}
CA_Update_Profile (
  profile_info,
  UPDATE_STATE_TABLE | UPDATE_ENTRY_LABEL | UPDATE_MAILBOX,
  mailbox_mask
  );

Parameters

profile_info_sp
A pointer to the PROFILE_INFO_ST input structure that is filled in as described in PROFILE_INFO_ST.
update_profile_mask
A decimal value that specifies the application profile fields to be updated. The value is created by logically ORing the mask values of the fields that are to be updated:
update_name
Update application profile name.
update_state_table
Update state table name.
update_entry_label
Update state table entry point label.
update_subclass
Update subscriber class.
update_language
Update application profile language.
update_active_greeting
Update application profile greeting.
update_mailbox
Update mailboxes.
update_mailbox_mask
An array of decimal values that specifies the fields in the corresponding mailbox to update. These values need only be set if UPDATE_MAILBOX is set in the update_profile_mask; Otherwise, this parameter can be set to NULL. The value is created by logically ORing the mask values of the fields that are to be updated:
update_mailbox_status
Update mailbox status.
update_mailbox_password
Update mailbox password.
update_mailbox_greeting
Update mailbox greeting.
update_mailbox_user_status
Update mailbox owner status.
update_mailbox_take_msgs
Update mailbox take messages.
update_mailbox_prompt_lvl
Update mailbox prompt level.
update_mailbox_ref_number
Update mailbox referral number.
update_mailbox_ref_type
Update mailbox referral type.
update_mailbox_ret_order
Update mailbox retrieval order.
update_mailbox_acc_mode
Update mailbox access mode.

Return codes

0
Successful
-1
Unsuccessful (global error number CA_errno is set to indicate the error)

Error names

CA_ACCESS_NOBUFS
CA_CHECK_LANG_FAILED
CA_CHECK_STATE_TABLE_FAILED
CA_CHECK_SUBCLASS_FAILED
CA_DUPLICATE_PROFILE_KEY
CA_GET_DIGIT_NAME_FAILED
CA_INV_ACCESS_MODE
CA_INV_ADDR
CA_INV_ENTRY_LABEL
CA_INV_MAILBOX_STATUS
CA_INV_PASSWORD
CA_INV_PROFILE_ID
CA_INV_PROFILE_NAME
CA_INV_PROMPT_LEVEL
CA_INV_REFERRAL_NUMBER
CA_INV_REFERRAL_TYPE
CA_INV_REQUEST
CA_INV_RETRIEVAL_ORDER
CA_INV_STATE_TABLE_NAME
CA_INV_SUBCLASS
CA_INV_TAKE_MSG_FLAG
CA_INV_USER_STATUS
CA_LANG_NOT_FOUND
CA_LANG_NOT_IN_USE
CA_NO_MSG_RECV
CA_NOT_INIT
CA_PROFILE_NOT_FOUND
CA_REQ_FAILED
CA_STATE_TABLE_NOT_FOUND
CA_SUBCLASS_NOT_FOUND
CA_SUBCLASS_FILE_LOCKED
CA_TERMINATING
CA_UPDATE_XREFS_FAILED

Related information

CA_Create_Profile(), CA_Delete_Profile(), CA_Get_Profile(), CA_Get_Profile_Count(), CA_Get_Profile_List(), CA_Set_Profile_Defaults(), in the Blueworx Voice Response for AIX: Designing and Managing State Table Applications information.