LIBSSDP
 All Classes Files Functions Variables Typedefs Macros
Functions
ssdp_cache_display.c File Reference
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include "common_definitions.h"
#include "log.h"
#include "ssdp_cache.h"
#include "ssdp_cache_output_format.h"
Include dependency graph for ssdp_cache_display.c:

Go to the source code of this file.

Functions

static void get_window_size (int *width, int *height)
 
static void move_cursor (int row, int col)
 
void display_ssdp_cache (ssdp_cache_s *ssdp_cache, BOOL draw_asci)
 

Detailed Description

Functions for displaying the SSDP cache.

Definition in file ssdp_cache_display.c.

Function Documentation

void display_ssdp_cache ( ssdp_cache_s ssdp_cache,
BOOL  draw_asci 
)

Displays the SSDP cache list as a table in the terminal.

Parameters
ssdp_cacheThe SSDP cache to display.
draw_asciDraw the table with ASCII characters only as oposed to UTF8.

Definition at line 40 of file ssdp_cache_display.c.

static void get_window_size ( int *  width,
int *  height 
)
static

Read the terminal width and height.

Parameters
widthThe buffer to set the width in.
heightThe buffer to set the height in.

Definition at line 22 of file ssdp_cache_display.c.

static void move_cursor ( int  row,
int  col 
)
static

Moves the terminal cursor to the given coords.

Parameters
rowThe row to move the cursor to.
colThe column to move the cursor to.

Definition at line 36 of file ssdp_cache_display.c.