mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
Add doxygen target.
This commit is contained in:
parent
4fbf249480
commit
329f31bd75
4 changed files with 1350 additions and 5 deletions
|
@ -226,3 +226,6 @@ cppcheck: ${rofi_SOURCES}
|
||||||
|
|
||||||
ohcount: ${rofi_SOURCES}
|
ohcount: ${rofi_SOURCES}
|
||||||
ohcount -i ${top_srcdir}/source/
|
ohcount -i ${top_srcdir}/source/
|
||||||
|
|
||||||
|
doxy: ${rofi_SOURCES}
|
||||||
|
doxygen ${top_srcdir}/doc/rofi.doxy
|
||||||
|
|
1296
doc/rofi.doxy
Normal file
1296
doc/rofi.doxy
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,24 @@
|
||||||
#ifndef __SSH_DIALOG_H__
|
#ifndef __SSH_DIALOG_H__
|
||||||
#define __SSH_DIALOG_H__
|
#define __SSH_DIALOG_H__
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup SSHMode SSH
|
||||||
|
*
|
||||||
|
* SSH Mode, returns a list of known SSH hosts the user can log into.
|
||||||
|
* It does this by parsing the SSH config file and optional the known host and host list
|
||||||
|
* It also keeps history of the last choosen hosts.
|
||||||
|
*
|
||||||
|
* This mode uses the following options from the #config object:
|
||||||
|
* * #_Settings::ssh_command
|
||||||
|
* * #_Settings::parse_known_hosts
|
||||||
|
* * #_Settings::parse_hosts
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SSH Mode object.
|
||||||
|
*/
|
||||||
extern Mode ssh_mode;
|
extern Mode ssh_mode;
|
||||||
|
/*@}*/
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/**
|
/*
|
||||||
* rofi
|
* rofi
|
||||||
*
|
*
|
||||||
* MIT/X11 License
|
* MIT/X11 License
|
||||||
|
@ -25,10 +25,13 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \ingroup SSHMode
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <X11/X.h>
|
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
@ -44,10 +47,15 @@
|
||||||
#include "history.h"
|
#include "history.h"
|
||||||
#include "dialogs/ssh.h"
|
#include "dialogs/ssh.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the history file where previously choosen hosts are stored.
|
||||||
|
*/
|
||||||
#define SSH_CACHE_FILE "rofi-2.sshcache"
|
#define SSH_CACHE_FILE "rofi-2.sshcache"
|
||||||
|
|
||||||
// Used in get_ssh() when splitting lines from the user's
|
/**
|
||||||
// SSH config file into tokens.
|
* Used in get_ssh() when splitting lines from the user's
|
||||||
|
* SSH config file into tokens.
|
||||||
|
*/
|
||||||
#define SSH_TOKEN_DELIM "= \t\r\n"
|
#define SSH_TOKEN_DELIM "= \t\r\n"
|
||||||
|
|
||||||
static inline int execshssh ( const char *host )
|
static inline int execshssh ( const char *host )
|
||||||
|
@ -315,13 +323,23 @@ static char ** get_ssh ( unsigned int *length )
|
||||||
return retv;
|
return retv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The internal data structure holding the private data of the SSH Mode.
|
||||||
|
*/
|
||||||
typedef struct _SSHModePrivateData
|
typedef struct _SSHModePrivateData
|
||||||
{
|
{
|
||||||
unsigned int id;
|
/** List if available ssh hosts.*/
|
||||||
char **cmd_list;
|
char **cmd_list;
|
||||||
|
/** Length of the #cmd_list.*/
|
||||||
unsigned int cmd_list_length;
|
unsigned int cmd_list_length;
|
||||||
} SSHModePrivateData;
|
} SSHModePrivateData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param sw Object handle to the SSH Mode object.
|
||||||
|
*
|
||||||
|
* Initializes the SSH Mode private data object and
|
||||||
|
* loads the relevant ssh information.
|
||||||
|
*/
|
||||||
static void ssh_mode_init ( Mode *sw )
|
static void ssh_mode_init ( Mode *sw )
|
||||||
{
|
{
|
||||||
if ( sw->private_data == NULL ) {
|
if ( sw->private_data == NULL ) {
|
||||||
|
@ -331,11 +349,19 @@ static void ssh_mode_init ( Mode *sw )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param sw Object handle to the SSH Mode object.
|
||||||
|
*
|
||||||
|
* Get the number of SSH entries.
|
||||||
|
*
|
||||||
|
* @returns the number of ssh entries.
|
||||||
|
*/
|
||||||
static unsigned int ssh_mode_get_num_entries ( const Mode *sw )
|
static unsigned int ssh_mode_get_num_entries ( const Mode *sw )
|
||||||
{
|
{
|
||||||
const SSHModePrivateData *rmpd = (const SSHModePrivateData *) sw->private_data;
|
const SSHModePrivateData *rmpd = (const SSHModePrivateData *) sw->private_data;
|
||||||
return rmpd->cmd_list_length;
|
return rmpd->cmd_list_length;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ModeMode ssh_mode_result ( Mode *sw, int mretv, char **input, unsigned int selected_line )
|
static ModeMode ssh_mode_result ( Mode *sw, int mretv, char **input, unsigned int selected_line )
|
||||||
{
|
{
|
||||||
ModeMode retv = MODE_EXIT;
|
ModeMode retv = MODE_EXIT;
|
||||||
|
@ -410,3 +436,4 @@ Mode ssh_mode =
|
||||||
.private_data = NULL,
|
.private_data = NULL,
|
||||||
.free = NULL
|
.free = NULL
|
||||||
};
|
};
|
||||||
|
/*@}*/
|
||||||
|
|
Loading…
Reference in a new issue