+/*!
+@brief
+ Returns the logging level of the query executor
+ \bt_p{query_executor}.
+
+See the \ref api-qexec-prop-log-lvl "logging level" property.
+
+@param[in] query_executor
+ Query executor of which to get the logging level.
+
+@returns
+ Logging level of \bt_p{query_executor}.
+
+@bt_pre_not_null{query_executor}
+
+@sa bt_query_executor_set_logging_level() —
+ Sets the logging level of a query executor.
+*/
+extern bt_logging_level bt_query_executor_get_logging_level(
+ const bt_query_executor *query_executor);
+
+/*! @} */
+
+/*!
+@name Interruption
+@{
+*/
+
+/*!
+@brief
+ Status codes for bt_query_executor_add_interrupter().
+*/
+typedef enum bt_query_executor_add_interrupter_status {
+ /*!
+ @brief
+ Success.
+ */
+ BT_QUERY_EXECUTOR_ADD_INTERRUPTER_STATUS_OK = __BT_FUNC_STATUS_OK,
+
+ /*!
+ @brief
+ Out of memory.
+ */
+ BT_QUERY_EXECUTOR_ADD_INTERRUPTER_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR,
+} bt_query_executor_add_interrupter_status;
+
+/*!
+@brief
+ Adds the \bt_intr \bt_p{interrupter} to the query executor
+ \bt_p{query_executor}.
+
+A \bt_comp_cls query method can check whether or not its executor is
+interrupted (any of its interrupters, including its default interrupter,
+is set) with bt_query_executor_is_interrupted().
+
+@note
+ @parblock
+ bt_query_executor_create() and
+ bt_query_executor_create_with_method_data() return a query executor
+ which comes with its own <em>default interrupter</em>.
+
+ Instead of adding your own interrupter to \bt_p{query_executor}, you
+ can set its default interrupter with
+
+ @code
+ bt_interrupter_set(bt_query_executor_borrow_default_interrupter());
+ @endcode
+ @endparblock
+
+@param[in] query_executor
+ Query executor to which to add \bt_p{interrupter}.
+@param[in] interrupter
+ Interrupter to add to \bt_p{query_executor}.
+
+@retval #BT_QUERY_EXECUTOR_ADD_INTERRUPTER_STATUS_OK
+ Success.
+@retval #BT_QUERY_EXECUTOR_ADD_INTERRUPTER_STATUS_MEMORY_ERROR
+ Out of memory.
+
+@bt_pre_not_null{query_executor}
+@bt_pre_not_null{interrupter}
+
+@sa bt_query_executor_borrow_default_interrupter() —
+ Borrows the default interrupter from a query executor.
+*/
+extern bt_query_executor_add_interrupter_status
+bt_query_executor_add_interrupter(bt_query_executor *query_executor,
+ const bt_interrupter *interrupter);
+
+/*!
+@brief
+ Borrows the default \bt_intr from the query executor
+ \bt_p{query_executor}.
+
+@param[in] query_executor
+ Query executor from which to borrow the default interrupter.
+
+@returns
+ @parblock
+ \em Borrowed reference of the default interrupter of
+ \bt_p{query_executor}.
+
+ The returned pointer remains valid as long as \bt_p{query_executor}
+ exists.
+ @endparblock
+
+@bt_pre_not_null{query_executor}
+
+@sa bt_query_executor_add_interrupter() —
+ Adds an interrupter to a query executor.
+*/
+extern bt_interrupter *bt_query_executor_borrow_default_interrupter(
+ bt_query_executor *query_executor);
+
+/*!
+@brief
+ Returns whether or not the query executor \bt_p{query_executor}
+ is interrupted, that is, whether or not any of its \bt_p_intr,
+ including its default interrupter, is set.
+
+@param[in] query_executor
+ Query executor to check.
+
+@returns
+ #BT_TRUE if \bt_p{query_executor} is interrupted (any of its
+ interrupters is set).
+
+@bt_pre_not_null{query_executor}
+*/
+extern bt_bool bt_query_executor_is_interrupted(
+ const bt_query_executor *query_executor);
+
+/*! @} */
+
+/*!
+@name Reference count
+@{
+*/
+
+/*!
+@brief
+ Increments the \ref api-fund-shared-object "reference count" of
+ the query executor \bt_p{query_executor}.
+
+@param[in] query_executor
+ @parblock
+ Query executor of which to increment the reference count.
+
+ Can be \c NULL.
+ @endparblock
+
+@sa bt_query_executor_put_ref() —
+ Decrements the reference count of a query executor.
+*/
+extern void bt_query_executor_get_ref(const bt_query_executor *query_executor);
+
+/*!
+@brief
+ Decrements the \ref api-fund-shared-object "reference count" of
+ the query executor \bt_p{query_executor}.
+
+@param[in] query_executor
+ @parblock
+ Query executor of which to decrement the reference count.
+
+ Can be \c NULL.
+ @endparblock
+
+@sa bt_query_executor_get_ref() —
+ Increments the reference count of a query executor.
+*/
+extern void bt_query_executor_put_ref(const bt_query_executor *query_executor);
+
+/*!
+@brief
+ Decrements the reference count of the query executor
+ \bt_p{_query_executor}, and then sets \bt_p{_query_executor} to \c NULL.
+
+@param _query_executor
+ @parblock
+ Query executor of which to decrement the reference count.
+
+ Can contain \c NULL.
+ @endparblock
+
+@bt_pre_assign_expr{_query_executor}
+*/
+#define BT_QUERY_EXECUTOR_PUT_REF_AND_RESET(_query_executor) \
+ do { \
+ bt_query_executor_put_ref(_query_executor); \
+ (_query_executor) = NULL; \
+ } while (0)
+
+/*!
+@brief
+ Decrements the reference count of the query executor \bt_p{_dst}, sets
+ \bt_p{_dst} to \bt_p{_src}, and then sets \bt_p{_src} to \c NULL.
+
+This macro effectively moves a query executor reference from the expression
+\bt_p{_src} to the expression \bt_p{_dst}, putting the existing
+\bt_p{_dst} reference.
+
+@param _dst
+ @parblock
+ Destination expression.
+
+ Can contain \c NULL.
+ @endparblock
+@param _src
+ @parblock
+ Source expression.
+
+ Can contain \c NULL.
+ @endparblock
+
+@bt_pre_assign_expr{_dst}
+@bt_pre_assign_expr{_src}
+*/
+#define BT_QUERY_EXECUTOR_MOVE_REF(_dst, _src) \
+ do { \
+ bt_query_executor_put_ref(_dst); \
+ (_dst) = (_src); \
+ (_src) = NULL; \
+ } while (0)
+
+/*! @} */
+
+/*! @} */
+