diff options
Diffstat (limited to 'include/asterisk/res_odbc.h')
-rw-r--r-- | include/asterisk/res_odbc.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asterisk/res_odbc.h b/include/asterisk/res_odbc.h index ad22045db..005cf29cb 100644 --- a/include/asterisk/res_odbc.h +++ b/include/asterisk/res_odbc.h @@ -31,6 +31,7 @@ #include <sqlext.h> #include <sqltypes.h> #include "asterisk/linkedlists.h" +#include "asterisk/strings.h" typedef enum { ODBC_SUCCESS=0, ODBC_FAIL=-1} odbc_status; @@ -183,4 +184,14 @@ int ast_odbc_clear_cache(const char *database, const char *tablename); */ #define ast_odbc_release_table(ptr) if (ptr) { AST_RWLIST_UNLOCK(&(ptr)->columns); } +/*!\brief Wrapper for SQLGetData to use with dynamic strings + * \param buf Address of the pointer to the ast_str structure. + * \param maxlen The maximum size of the resulting string, or 0 for no limit. + * \param StatementHandle The statement handle from which to retrieve data. + * \param ColumnNumber Column number (1-based offset) for which to retrieve data. + * \param TargetType The SQL constant indicating what kind of data is to be retrieved (usually SQL_CHAR) + * \param StrLen_or_Ind A pointer to a length indicator, specifying the total length of data. + */ +SQLRETURN ast_odbc_ast_str_SQLGetData(struct ast_str **buf, int pmaxlen, SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLLEN *StrLen_or_Ind); + #endif /* _ASTERISK_RES_ODBC_H */ |