FreeRDP
xf_utils.c File Reference
#include <string.h>
#include <winpr/assert.h>
#include <winpr/wtypes.h>
#include <winpr/path.h>
#include "xf_utils.h"
#include "xfreerdp.h"
#include <freerdp/log.h>

Macros

#define TAG   CLIENT_TAG("xfreerdp.utils")
 

Functions

static void write_log (wLog *log, DWORD level, const char *fname, const char *fkt, size_t line,...)
 
char * Safe_XGetAtomNameEx (wLog *log, Display *display, Atom atom, const char *varname)
 
Atom Logging_XInternAtom (wLog *log, Display *display, _Xconst char *atom_name, Bool only_if_exists)
 
int LogTagAndXChangeProperty_ex (const char *tag, const char *file, const char *fkt, size_t line, Display *display, Window w, Atom property, Atom type, int format, int mode, const unsigned char *data, int nelements)
 
int LogDynAndXChangeProperty_ex (wLog *log, const char *file, const char *fkt, size_t line, Display *display, Window w, Atom property, Atom type, int format, int mode, const unsigned char *data, int nelements)
 
int LogTagAndXDeleteProperty_ex (const char *tag, const char *file, const char *fkt, size_t line, Display *display, Window w, Atom property)
 
int LogDynAndXDeleteProperty_ex (wLog *log, const char *file, const char *fkt, size_t line, Display *display, Window w, Atom property)
 
int LogTagAndXConvertSelection_ex (const char *tag, const char *file, const char *fkt, size_t line, Display *display, Atom selection, Atom target, Atom property, Window requestor, Time time)
 
int LogDynAndXConvertSelection_ex (wLog *log, const char *file, const char *fkt, size_t line, Display *display, Atom selection, Atom target, Atom property, Window requestor, Time time)
 
int LogTagAndXGetWindowProperty_ex (const char *tag, const char *file, const char *fkt, size_t line, Display *display, Window w, Atom property, long long_offset, long long_length, int delete, Atom req_type, Atom *actual_type_return, int *actual_format_return, unsigned long *nitems_return, unsigned long *bytes_after_return, unsigned char **prop_return)
 
int LogDynAndXGetWindowProperty_ex (wLog *log, const char *file, const char *fkt, size_t line, Display *display, Window w, Atom property, long long_offset, long long_length, int delete, Atom req_type, Atom *actual_type_return, int *actual_format_return, unsigned long *nitems_return, unsigned long *bytes_after_return, unsigned char **prop_return)
 
BOOL IsGnome (void)
 
BOOL run_action_script (xfContext *xfc, const char *what, const char *arg, fn_action_script_run fkt, void *user)
 

Variables

static const DWORD log_level = WLOG_TRACE
 

Macro Definition Documentation

◆ TAG

#define TAG   CLIENT_TAG("xfreerdp.utils")

FreeRDP: A Remote Desktop Protocol Implementation X11 helper utilities

Copyright 2023 Armin Novak armin.nosp@m..nov.nosp@m.ak@th.nosp@m.inca.nosp@m.st.co.nosp@m.m Copyringht 2023 Thincast Technologies GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ IsGnome()

BOOL IsGnome ( void  )
Here is the caller graph for this function:

◆ LogDynAndXChangeProperty_ex()

int LogDynAndXChangeProperty_ex ( wLog *  log,
const char *  file,
const char *  fkt,
size_t  line,
Display *  display,
Window  w,
Atom  property,
Atom  type,
int  format,
int  mode,
const unsigned char *  data,
int  nelements 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LogDynAndXConvertSelection_ex()

int LogDynAndXConvertSelection_ex ( wLog *  log,
const char *  file,
const char *  fkt,
size_t  line,
Display *  display,
Atom  selection,
Atom  target,
Atom  property,
Window  requestor,
Time  time 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LogDynAndXDeleteProperty_ex()

int LogDynAndXDeleteProperty_ex ( wLog *  log,
const char *  file,
const char *  fkt,
size_t  line,
Display *  display,
Window  w,
Atom  property 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LogDynAndXGetWindowProperty_ex()

int LogDynAndXGetWindowProperty_ex ( wLog *  log,
const char *  file,
const char *  fkt,
size_t  line,
Display *  display,
Window  w,
Atom  property,
long  long_offset,
long  long_length,
int  delete,
Atom  req_type,
Atom *  actual_type_return,
int *  actual_format_return,
unsigned long *  nitems_return,
unsigned long *  bytes_after_return,
unsigned char **  prop_return 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Logging_XInternAtom()

Atom Logging_XInternAtom ( wLog *  log,
Display *  display,
_Xconst char *  atom_name,
Bool  only_if_exists 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LogTagAndXChangeProperty_ex()

int LogTagAndXChangeProperty_ex ( const char *  tag,
const char *  file,
const char *  fkt,
size_t  line,
Display *  display,
Window  w,
Atom  property,
Atom  type,
int  format,
int  mode,
const unsigned char *  data,
int  nelements 
)
Here is the call graph for this function:

◆ LogTagAndXConvertSelection_ex()

int LogTagAndXConvertSelection_ex ( const char *  tag,
const char *  file,
const char *  fkt,
size_t  line,
Display *  display,
Atom  selection,
Atom  target,
Atom  property,
Window  requestor,
Time  time 
)
Here is the call graph for this function:

◆ LogTagAndXDeleteProperty_ex()

int LogTagAndXDeleteProperty_ex ( const char *  tag,
const char *  file,
const char *  fkt,
size_t  line,
Display *  display,
Window  w,
Atom  property 
)
Here is the call graph for this function:

◆ LogTagAndXGetWindowProperty_ex()

int LogTagAndXGetWindowProperty_ex ( const char *  tag,
const char *  file,
const char *  fkt,
size_t  line,
Display *  display,
Window  w,
Atom  property,
long  long_offset,
long  long_length,
int  delete,
Atom  req_type,
Atom *  actual_type_return,
int *  actual_format_return,
unsigned long *  nitems_return,
unsigned long *  bytes_after_return,
unsigned char **  prop_return 
)
Here is the call graph for this function:

◆ run_action_script()

BOOL run_action_script ( xfContext *  xfc,
const char *  what,
const char *  arg,
fn_action_script_run  fkt,
void *  user 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Safe_XGetAtomNameEx()

char* Safe_XGetAtomNameEx ( wLog *  log,
Display *  display,
Atom  atom,
const char *  varname 
)

◆ write_log()

static void write_log ( wLog *  log,
DWORD  level,
const char *  fname,
const char *  fkt,
size_t  line,
  ... 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ log_level

const DWORD log_level = WLOG_TRACE
static