Developer

API Reference

IvParm_InitParm()

Brew Release
Brew MP 1.0.2
See Also
None
Description
Initialize a IvParm object, with specified Id or an extended name
Parameters
  • pIvParm
    []:
    Pointer to the IvParm interface object.
  • nParmId
    []:
    The parameter Id.
  • pszParmName
    []:
    Name of the extended parameter
  • dwValue
    []:
    The parameter value, if not valid should be set 0
  • pwszBuf
    []:
    Buffer for param values which are not listed or which are extended
Interface
Prototype
   int IvParm_InitParm(IvParm         *pIvParm,
                       AEEVParameter  nParmId,
                       char           *pszParmName,
                       uint32         dwValue,
                       AECHAR         *pwszBuf);

Return
AEE_SUCCESS : If the function was able to fill the buffer completely. AEE_ENOMEMORY : If the parser isn't able to allocate memory AEE_EBADPARM : If nParmId-nValue is not a valid pair. AEE_EFAILED : Otherwise.
Side Effect
None
Comment
After creating a IvParm object, user can use this interface to define the parameter. If the value is of pre-defined type then the user can give the value directly in dwValue, else he has to fill in pwszBuf
    E.g., If the user wants to intialise this paramter with TYPE id and give it
    value of HOME, he can say that as, 
    
       nResult = IvParm_InitParm(pIvParm,
                                 AEEVPARM_TYPE,
                                 NULL,
                                 AEEVTYPE_HOME,
                                 NULL);

   If the values isn't predefined, like LANGUAGE, and user wants to assosciate,
   "en:German" as its value, then he can say as,

   pwszBuf points to wide string of "en:German"

   nResult = IvParm_InitParm(pIvParm,
                             AEEVPARM_LANG,
                             NULL,
                             0,
                             pwszBuf);

   If the user wants to intialiase a parameter with an extended value he can so,

   If user wants to assign "GUEST" to role parameter, which isn't listed in
   AEEVRRole types then he can do as follows,

   pwszBuf points to wide string of "X-Guest"

   nResult = IvParm_InitParm(pIvParm,
                             AEEVPARM_ROLE,
                             NULL,
                             0,
                             pwszBuf);
  • Follow