Skip to content

Commit

Permalink
Merge pull request #161 from mattmundell/code-docs
Browse files Browse the repository at this point in the history
Clear doxygen warnings
  • Loading branch information
a-h-abdelsalam authored Jan 8, 2024
2 parents b86b69a + fea1196 commit c216336
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 53 deletions.
5 changes: 2 additions & 3 deletions doc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ FULL_PATH_NAMES = YES
# will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES.

STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@/gsad
STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@

# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which
Expand Down Expand Up @@ -753,7 +753,7 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.

INPUT = @CMAKE_SOURCE_DIR@/gsad/src
INPUT = @CMAKE_SOURCE_DIR@/src

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down Expand Up @@ -822,7 +822,6 @@ EXCLUDE_SYMBOLS =
# command).

EXAMPLE_PATH = @CMAKE_SOURCE_DIR@ \
@CMAKE_SOURCE_DIR@/gsad \
@CMAKE_CURRENT_SOURCE_DIR@

# If the value of the EXAMPLE_PATH tag contains directories, you can use the
Expand Down
5 changes: 2 additions & 3 deletions doc/Doxyfile_full.in
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ FULL_PATH_NAMES = YES
# will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES.

STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@/gsad
STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@

# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which
Expand Down Expand Up @@ -753,7 +753,7 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.

INPUT = @CMAKE_SOURCE_DIR@/gsad/src
INPUT = @CMAKE_SOURCE_DIR@/src

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down Expand Up @@ -822,7 +822,6 @@ EXCLUDE_SYMBOLS =
# command).

EXAMPLE_PATH = @CMAKE_SOURCE_DIR@ \
@CMAKE_SOURCE_DIR@/gsad \
@CMAKE_CURRENT_SOURCE_DIR@

# If the value of the EXAMPLE_PATH tag contains directories, you can use the
Expand Down
5 changes: 2 additions & 3 deletions doc/Doxyfile_xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ FULL_PATH_NAMES = YES
# will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES.

STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@/gsad
STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@

# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which
Expand Down Expand Up @@ -753,7 +753,7 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.

INPUT = @CMAKE_SOURCE_DIR@/gsad/src
INPUT = @CMAKE_SOURCE_DIR@/src

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down Expand Up @@ -822,7 +822,6 @@ EXCLUDE_SYMBOLS =
# command).

EXAMPLE_PATH = @CMAKE_SOURCE_DIR@ \
@CMAKE_SOURCE_DIR@/gsad \
@CMAKE_CURRENT_SOURCE_DIR@

# If the value of the EXAMPLE_PATH tag contains directories, you can use the
Expand Down
3 changes: 0 additions & 3 deletions src/gsad.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
* \section Introduction
* \verbinclude README.md
*
* \section Installation
* \verbinclude INSTALL
*
* \section copying License
* \verbinclude LICENSE
*/
Expand Down
60 changes: 20 additions & 40 deletions src/gsad_gmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,13 @@ message_invalid (gvm_connection_t *connection, credentials_t *credentials,
* @brief Set redirect or return a basic action_result page based on entity.
*
* @param[in] connection Connection to manager
* @param[in] credentials Username and password for authentication.
* @param[in] params Request parameters.
* @param[in] entity Entity.
* @param[in] action Name of the action.
* @param[in] response_data Response data.
*
* @return Enveloped XML object.
*/
static gchar *
response_from_entity (gvm_connection_t *connection, credentials_t *credentials,
Expand Down Expand Up @@ -798,7 +805,6 @@ response_from_entity (gvm_connection_t *connection, credentials_t *credentials,
* @param[in] type Type of resource.
* @param[in] credentials Username and password for authentication.
* @param[in] params Request parameters.
* @param[in] extra_xml Extra XML to insert inside page element.
* @param[in] arguments Extra arguments for GMP GET command.
* @param[out] response_data Extra data return for the HTTP response.
*
Expand Down Expand Up @@ -942,7 +948,6 @@ get_one (gvm_connection_t *connection, const char *type,
* @param[in] type Entity type.
* @param[in] credentials Username and password for authentication.
* @param[in] params Request parameters.
* @param[in] extra_xml Extra XML to insert inside page element.
* @param[in] arguments Extra arguments for GMP GET command.
* @param[out] response_data Extra data return for the HTTP response.
*
Expand Down Expand Up @@ -1397,6 +1402,7 @@ export_resource (gvm_connection_t *connection, const char *type,
* @brief Export a list of resources.
*
* @param[in] connection Connection to manager.
* @param[in] type Type of resource.
* @param[in] credentials Username and password for authentication.
* @param[in] params Request parameters.
* @param[out] response_data Extra data return for the HTTP response.
Expand Down Expand Up @@ -1700,7 +1706,6 @@ move_resource_to_trash (gvm_connection_t *connection, const char *type,
* @brief Delete a resource from the trashcan
*
* @param[in] connection Connection to manager.
* @param[in] type Type of resource.
* @param[in] credentials Username and password for authentication.
* @param[in] params Request parameters.
* @param[out] response_data Extra data return for the HTTP response.
Expand Down Expand Up @@ -1870,19 +1875,6 @@ resource_action (gvm_connection_t *connection, credentials_t *credentials,
} \
}

/**
* @brief Returns page to create a new container task.
*
* @param[in] connection Connection to manager.
* @param[in] credentials Credentials of user issuing the action.
* @param[in] params Request parameters.
* @param[in] message If not NULL, display message.
* @param[in] extra_xml Extra XML to insert inside page element.
* @param[out] response_data Extra data return for the HTTP response.
*
* @return Enveloped XML object.
*/

/**
* @brief Create a report, get all tasks, envelope the result.
*
Expand Down Expand Up @@ -3325,10 +3317,10 @@ create_credential_gmp (gvm_connection_t *connection, credentials_t *credentials,
/**
* @brief Get one credential, envelope the result.
*
* @param[in] connection Connection to manager.
* @param[in] connection Connection to manager.
* @param[in] credentials Username and password for authentication.
* @param[in] params Request parameters.
* @param[in] commands Extra commands to run before the others.
* @param[in] extra_xml Extra XML to insert inside page element.
* @param[out] response_data Extra data return for the HTTP response.
*
* @return Enveloped XML object.
Expand Down Expand Up @@ -4307,14 +4299,13 @@ get_alerts (gvm_connection_t *connection, credentials_t *, params_t *,
#define EVENT_TYPE_TICKET_RECEIVED "Ticket received"
#define EVENT_TYPE_ASSIGNED_TICKET_CHANGED "Assigned ticket changed"
#define EVENT_TYPE_OWNED_TICKET_CHANGED "Owned ticket changed"

/**
* @brief Send event data for an alert.
*
* @param[in] xml XML.
* @param[out] data Data.
* @param[out] event Event.
*
* @return 0 on success, -1 on error.
*/
static void
append_alert_event_data (GString *xml, params_t *data, const char *event)
Expand Down Expand Up @@ -5588,9 +5579,8 @@ delete_target_gmp (gvm_connection_t *connection, credentials_t *credentials,
* @brief Restore a resource, get all trash, envelope the result.
*
* @param[in] connection Connection to manager.
* @param[in] connection Connection to manager.
* @param[in] credentials Username and password for authentication.
* @param[in] params Request parameters.
* @param[in] credentials Username and password for authentication.
* @param[in] params Request parameters.
* @param[out] response_data Extra data return for the HTTP response.
*
* @return Enveloped XML object.
Expand Down Expand Up @@ -7815,9 +7805,7 @@ delete_report_gmp (gvm_connection_t *connection, credentials_t *credentials,
* @param[in] connection Connection to manager.
* @param[in] credentials Username and password for authentication.
* @param[in] params Request parameters.
* @param[in] commands Extra commands to run before the others.
* @param[in] extra_xml Extra XML to insert inside page element.
* @param[out] error Set to 1 if error, else 0.
* @param[out] response_data Extra data return for the HTTP response.
*
* @return Report.
Expand Down Expand Up @@ -10987,6 +10975,8 @@ get_trash_gmp (gvm_connection_t *connection, credentials_t *credentials,
* @param[out] xml GString to write responses to.
* @param[out] modify_failed_flag Pointer to an int to set to 1 on failure
* to modify one of the settings.
* @param[out] response_data Extra data return for the HTTP response.
*
* @return 0 on success, -1 on error.
*/
static int
Expand Down Expand Up @@ -11054,10 +11044,6 @@ send_settings_filters (gvm_connection_t *connection, params_t *data,
* @param[in] credentials Credentials of user issuing the action.
* @param[in] params Request parameters.
* @param[in] accept_language Accept-Language, from browser.
* @param[out] timezone Timezone. Caller must free.
* @param[out] password Password. Caller must free.
* @param[out] severity Severity. Caller must free.
* @param[out] language Language. Caller must free.
* @param[out] response_data Extra data return for the HTTP response.
*
* @return Enveloped XML object.
Expand Down Expand Up @@ -12947,9 +12933,9 @@ create_port_range_gmp (gvm_connection_t *connection, credentials_t *credentials,
* @brief Get one port_list, envelope the result.
*
* @param[in] connection Connection to manager.
* @param[in] credentials Username and password for authentication.
* @param[in] params Request parameters.
* @param[in] commands Extra commands to run before the others.
* @param[in] credentials Username and password for authentication.
* @param[in] params Request parameters.
* @param[in] extra_xml Extra XML to insert inside page element.
* @param[out] response_data Extra data return for the HTTP response.
*
* @return Enveloped XML object.
Expand Down Expand Up @@ -15694,7 +15680,6 @@ get_asset_gmp (gvm_connection_t *connection, credentials_t *credentials,
* @param[in] connection Connection to manager.
* @param[in] credentials Credentials for the manager connection.
* @param[in] params Request parameters.
* @param[in] extra_xml Extra XML to insert inside page element.
* @param[out] response_data Extra data return for the HTTP response.
*
* @return XML enveloped assets response or error message.
Expand Down Expand Up @@ -16874,17 +16859,12 @@ authenticate_gmp (const gchar *username, const gchar *password, gchar **role,
}

/**
* @brief Check authentication credentials.
* @brief Log out.
*
* @param[in] username Username.
* @param[in] password Password.
* @param[out] role Role.
* @param[out] timezone Timezone.
* @param[out] capabilities Capabilities of manager.
* @param[out] language User Interface Language, or NULL.
* @param[out] pw_warning Password warning message, NULL if password is OK.
*
* @return 0 success, 1 manager down, 2 failed, 3 timeout, -1 error.
* @return 0 success, else error.
*/
int
logout_gmp (const gchar *username, const gchar *password)
Expand Down
1 change: 0 additions & 1 deletion src/gsad_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,6 @@ add_cors_headers (http_response_t *response)
* @brief Add header to forbid caching to a HTTP response.
*
* @param[in] response The HTTP response to add the headers to.
* @param[in] allow_caching 1 to allow caching, 0 to forbid.
*/
void
add_forbid_caching_headers (http_response_t *response)
Expand Down

0 comments on commit c216336

Please sign in to comment.