VirtualBox

Changeset 69062 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Oct 12, 2017 3:05:52 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
118342
Message:

IPRT: Added RTIniFileQueryPair for key/value pair enumeration.

Location:
trunk/include/iprt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/inifile.h

    r68317 r69062  
    7777
    7878/**
    79  * Queries a value in a section.
     79 * Queries a named value in a section.
    8080 *
    8181 * The first matching value is returned.  The matching is by default case
     
    9999                                     char *pszValue, size_t cbValue, size_t *pcbActual);
    100100
     101/**
     102 * Queries a key-value pair in a section by ordinal.
     103 *
     104 * @returns IPRT status code.
     105 * @retval  VERR_NOT_FOUND if the section wasn't found or if it contains no pair
     106 *          with the given ordinal value.
     107 *
     108 * @param   hIniFile        The INI-file handle.
     109 * @param   pszSection      The section name.  Pass NULL to refer to the
     110 *                          unsectioned key space at the top of the file.
     111 * @param   idxPair         The pair to fetch (counting from 0).
     112 *
     113 * @param   pszKey          Where to return the key name.
     114 * @param   cbKey           Size of the buffer @a pszKey points to.
     115 * @param   pcbKeyActual    Where to return the actual key size excluding
     116 *                          terminator on success.  On VERR_BUFFER_OVERFLOW this
     117 *                          will be set to the buffer size needed to hold the
     118 *                          value, terminator included.  Optional.
     119 *
     120 * @param   pszValue        Where to return the value.
     121 * @param   cbValue         Size of the buffer @a pszValue points to.
     122 * @param   pcbValueActual  Where to return the actual value size excluding
     123 *                          terminator on success.  On VERR_BUFFER_OVERFLOW this
     124 *                          will be set to the buffer size needed to hold the
     125 *                          value, terminator included. Optional.
     126 */
     127RTDECL(int)      RTIniFileQueryPair(RTINIFILE hIniFile, const char *pszSection, uint32_t idxPair,
     128                                    char *pszKey, size_t cbKey, size_t *pcbKeyActual,
     129                                    char *pszValue, size_t cbValue, size_t *pcbValueActual);
     130
    101131
    102132/** @} */
  • trunk/include/iprt/mangling.h

    r69011 r69062  
    10201020# define RTIniFileRetain                                RT_MANGLER(RTIniFileRetain)
    10211021# define RTIniFileRelease                               RT_MANGLER(RTIniFileRelease)
     1022# define RTIniFileQueryPair                             RT_MANGLER(RTIniFileQueryPair)
    10221023# define RTIniFileQueryValue                            RT_MANGLER(RTIniFileQueryValue)
    10231024# define RTIsoFsClose                                   RT_MANGLER(RTIsoFsClose)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette