1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-22 20:43:02 +01:00

Now closing the window will end the call

This commit is contained in:
mannol 2014-07-04 18:04:03 +02:00
parent 10d0e99d72
commit 65e726a51a
5 changed files with 735 additions and 128 deletions

View File

@ -1,125 +1,707 @@
TOXIC_VERSION = 0.4.3
REV = $(shell git rev-list HEAD --count)
VERSION = $(TOXIC_VERSION)_r$(REV)
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.0
CFG_DIR = ../cfg
SRC_DIR = ../src
MISC_DIR = ../misc
DOC_DIR = ../doc
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
DATADIR = $(PREFIX)/share/toxic
MANDIR = $(PREFIX)/man
DATAFILES = DHTnodes toxic.conf.example
MANFILES = toxic.1 toxic.conf.5
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
LIBS = libtoxcore ncursesw
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:
.PHONY : .NOTPARALLEL
CFLAGS = -std=gnu99 -pthread -Wimplicit-function-declaration -Wreturn-type -O1
CFLAGS += -DTOXICVER="\"$(VERSION)\"" -DHAVE_WIDECHAR -D_XOPEN_SOURCE_EXTENDED
CFLAGS += -DPACKAGE_DATADIR="\"$(abspath $(DATADIR))\""
CFLAGS += $(USER_CFLAGS)
LDFLAGS = $(USER_LDFLAGS)
#=============================================================================
# Special targets provided by cmake.
OBJ = chat.o chat_commands.o configdir.o dns.o execute.o file_senders.o
OBJ += friendlist.o global_commands.o groupchat.o line_info.o input.o
OBJ += log.o misc_tools.o prompt.o settings.o toxic.o toxic_strings.o windows.o
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Variables for audio support
AUDIO_LIBS = libtoxav openal
AUDIO_CFLAGS = -D_SUPPORT_AUDIO
AUDIO_OBJ = device.o audio_call.o
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
# Check on wich system we are running
UNAME_S = $(shell uname -s)
ifeq ($(UNAME_S), Linux)
-include $(CFG_DIR)/Linux.mk
endif
ifeq ($(UNAME_S), Darwin)
-include $(CFG_DIR)/Darwin.mk
endif
ifeq ($(UNAME_S), Solaris)
-include $(CFG_DIR)/Solaris.mk
endif
.SUFFIXES: .hpux_make_needs_suffix_list
# Check on which platform we are running
UNAME_M = $(shell uname -m)
ifeq ($(UNAME_M), x86_64)
-include $(CFG_DIR)/x86_64.mk
endif
ifneq ($(filter %86, $(UNAME_M)),)
-include $(CFG_DIR)/x86.mk
endif
ifneq ($(filter arm%, $(UNAME_M)),)
-include $(CFG_DIR)/arm.mk
endif
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# Check if we can build audio
CHECK_AUDIO_LIBS = $(shell pkg-config $(AUDIO_LIBS) || echo -n "error")
ifneq ($(CHECK_AUDIO_LIBS), error)
LIBS += $(AUDIO_LIBS)
CFLAGS += $(AUDIO_CFLAGS)
OBJ += $(AUDIO_OBJ)
else
ifneq ($(MAKECMDGOALS), clean)
MISSING_AUDIO_LIBS = $(shell for lib in $(AUDIO_LIBS) ; do if ! pkg-config $$lib ; then echo $$lib ; fi ; done)
$(warning WARNING -- Toxic will be compiled without audio support)
$(warning WARNING -- You need these libraries for audio support)
$(warning WARNING -- $(MISSING_AUDIO_LIBS))
endif
endif
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
# Check if we can build Toxic
CHECK_LIBS = $(shell pkg-config $(LIBS) || echo -n "error")
ifneq ($(CHECK_LIBS), error)
CFLAGS += $(shell pkg-config --cflags $(LIBS))
LDFLAGS += $(shell pkg-config --libs $(LIBS))
else
ifneq ($(MAKECMDGOALS), clean)
MISSING_LIBS = $(shell for lib in $(LIBS) ; do if ! pkg-config $$lib ; then echo $$lib ; fi ; done)
$(warning ERROR -- Cannot compile Toxic)
$(warning ERROR -- You need these libraries)
$(warning ERROR -- $(MISSING_LIBS))
$(error ERROR)
endif
endif
#=============================================================================
# Set environment variables for the build.
# Targets
all: toxic
# The shell in which to execute make rules.
SHELL = /bin/sh
toxic: $(OBJ)
$(CC) $(CFLAGS) -o toxic $(OBJ) $(LDFLAGS)
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
install: toxic
mkdir -p $(abspath $(DESTDIR)/$(BINDIR))
mkdir -p $(abspath $(DESTDIR)/$(DATADIR))
mkdir -p $(abspath $(DESTDIR)/$(MANDIR))
@echo "Installing toxic executable"
@install -m 0755 toxic $(abspath $(DESTDIR)/$(BINDIR))
@echo "Installing data files"
@for f in $(DATAFILES) ; do \
install -m 0644 $(MISC_DIR)/$$f $(abspath $(DESTDIR)/$(DATADIR)) ;\
done
@echo "Installing man pages"
@for f in $(MANFILES) ; do \
section=$(abspath $(DESTDIR)/$(MANDIR))/man`echo $$f | rev | cut -d "." -f 1` ;\
file=$$section/$$f ;\
mkdir -p $$section ;\
install -m 0644 $(DOC_DIR)/$$f $$file ;\
sed -i'' -e 's:__VERSION__:'$(VERSION)':g' $$file ;\
sed -i'' -e 's:__DATADIR__:'$(abspath $(DATADIR))':g' $$file ;\
gzip -f -9 $$file ;\
done
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
%.o: $(SRC_DIR)/%.c
$(CC) $(CFLAGS) -o $*.o -c $(SRC_DIR)/$*.c
$(CC) -MM $(CFLAGS) $(SRC_DIR)/$*.c > $*.d
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/mannol/Programming/Github/toxic
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/mannol/Programming/Github/toxic/build
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
/usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# The main all target
all: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start /home/mannol/Programming/Github/toxic/build/CMakeFiles /home/mannol/Programming/Github/toxic/build/CMakeFiles/progress.marks
$(MAKE) -f CMakeFiles/Makefile2 all
$(CMAKE_COMMAND) -E cmake_progress_start /home/mannol/Programming/Github/toxic/build/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
rm -rf *.d *.o toxic
$(MAKE) -f CMakeFiles/Makefile2 clean
.PHONY : clean
-include $(CFG_DIR)/help.mk
# The main clean target
clean/fast: clean
.PHONY : clean/fast
-include $(OBJ:.o=.d)
# Prepare targets for installation.
preinstall: all
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall/fast
# clear depends
depend:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
#=============================================================================
# Target rules for targets named toxic
# Build rule for target.
toxic: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 toxic
.PHONY : toxic
# fast build rule for target.
toxic/fast:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/build
.PHONY : toxic/fast
src/audio_call.o: src/audio_call.c.o
.PHONY : src/audio_call.o
# target to build an object file
src/audio_call.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/audio_call.c.o
.PHONY : src/audio_call.c.o
src/audio_call.i: src/audio_call.c.i
.PHONY : src/audio_call.i
# target to preprocess a source file
src/audio_call.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/audio_call.c.i
.PHONY : src/audio_call.c.i
src/audio_call.s: src/audio_call.c.s
.PHONY : src/audio_call.s
# target to generate assembly for a file
src/audio_call.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/audio_call.c.s
.PHONY : src/audio_call.c.s
src/chat.o: src/chat.c.o
.PHONY : src/chat.o
# target to build an object file
src/chat.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/chat.c.o
.PHONY : src/chat.c.o
src/chat.i: src/chat.c.i
.PHONY : src/chat.i
# target to preprocess a source file
src/chat.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/chat.c.i
.PHONY : src/chat.c.i
src/chat.s: src/chat.c.s
.PHONY : src/chat.s
# target to generate assembly for a file
src/chat.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/chat.c.s
.PHONY : src/chat.c.s
src/chat_commands.o: src/chat_commands.c.o
.PHONY : src/chat_commands.o
# target to build an object file
src/chat_commands.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/chat_commands.c.o
.PHONY : src/chat_commands.c.o
src/chat_commands.i: src/chat_commands.c.i
.PHONY : src/chat_commands.i
# target to preprocess a source file
src/chat_commands.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/chat_commands.c.i
.PHONY : src/chat_commands.c.i
src/chat_commands.s: src/chat_commands.c.s
.PHONY : src/chat_commands.s
# target to generate assembly for a file
src/chat_commands.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/chat_commands.c.s
.PHONY : src/chat_commands.c.s
src/configdir.o: src/configdir.c.o
.PHONY : src/configdir.o
# target to build an object file
src/configdir.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/configdir.c.o
.PHONY : src/configdir.c.o
src/configdir.i: src/configdir.c.i
.PHONY : src/configdir.i
# target to preprocess a source file
src/configdir.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/configdir.c.i
.PHONY : src/configdir.c.i
src/configdir.s: src/configdir.c.s
.PHONY : src/configdir.s
# target to generate assembly for a file
src/configdir.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/configdir.c.s
.PHONY : src/configdir.c.s
src/device.o: src/device.c.o
.PHONY : src/device.o
# target to build an object file
src/device.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/device.c.o
.PHONY : src/device.c.o
src/device.i: src/device.c.i
.PHONY : src/device.i
# target to preprocess a source file
src/device.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/device.c.i
.PHONY : src/device.c.i
src/device.s: src/device.c.s
.PHONY : src/device.s
# target to generate assembly for a file
src/device.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/device.c.s
.PHONY : src/device.c.s
src/dns.o: src/dns.c.o
.PHONY : src/dns.o
# target to build an object file
src/dns.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/dns.c.o
.PHONY : src/dns.c.o
src/dns.i: src/dns.c.i
.PHONY : src/dns.i
# target to preprocess a source file
src/dns.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/dns.c.i
.PHONY : src/dns.c.i
src/dns.s: src/dns.c.s
.PHONY : src/dns.s
# target to generate assembly for a file
src/dns.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/dns.c.s
.PHONY : src/dns.c.s
src/execute.o: src/execute.c.o
.PHONY : src/execute.o
# target to build an object file
src/execute.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/execute.c.o
.PHONY : src/execute.c.o
src/execute.i: src/execute.c.i
.PHONY : src/execute.i
# target to preprocess a source file
src/execute.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/execute.c.i
.PHONY : src/execute.c.i
src/execute.s: src/execute.c.s
.PHONY : src/execute.s
# target to generate assembly for a file
src/execute.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/execute.c.s
.PHONY : src/execute.c.s
src/file_senders.o: src/file_senders.c.o
.PHONY : src/file_senders.o
# target to build an object file
src/file_senders.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/file_senders.c.o
.PHONY : src/file_senders.c.o
src/file_senders.i: src/file_senders.c.i
.PHONY : src/file_senders.i
# target to preprocess a source file
src/file_senders.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/file_senders.c.i
.PHONY : src/file_senders.c.i
src/file_senders.s: src/file_senders.c.s
.PHONY : src/file_senders.s
# target to generate assembly for a file
src/file_senders.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/file_senders.c.s
.PHONY : src/file_senders.c.s
src/friendlist.o: src/friendlist.c.o
.PHONY : src/friendlist.o
# target to build an object file
src/friendlist.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/friendlist.c.o
.PHONY : src/friendlist.c.o
src/friendlist.i: src/friendlist.c.i
.PHONY : src/friendlist.i
# target to preprocess a source file
src/friendlist.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/friendlist.c.i
.PHONY : src/friendlist.c.i
src/friendlist.s: src/friendlist.c.s
.PHONY : src/friendlist.s
# target to generate assembly for a file
src/friendlist.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/friendlist.c.s
.PHONY : src/friendlist.c.s
src/global_commands.o: src/global_commands.c.o
.PHONY : src/global_commands.o
# target to build an object file
src/global_commands.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/global_commands.c.o
.PHONY : src/global_commands.c.o
src/global_commands.i: src/global_commands.c.i
.PHONY : src/global_commands.i
# target to preprocess a source file
src/global_commands.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/global_commands.c.i
.PHONY : src/global_commands.c.i
src/global_commands.s: src/global_commands.c.s
.PHONY : src/global_commands.s
# target to generate assembly for a file
src/global_commands.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/global_commands.c.s
.PHONY : src/global_commands.c.s
src/groupchat.o: src/groupchat.c.o
.PHONY : src/groupchat.o
# target to build an object file
src/groupchat.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/groupchat.c.o
.PHONY : src/groupchat.c.o
src/groupchat.i: src/groupchat.c.i
.PHONY : src/groupchat.i
# target to preprocess a source file
src/groupchat.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/groupchat.c.i
.PHONY : src/groupchat.c.i
src/groupchat.s: src/groupchat.c.s
.PHONY : src/groupchat.s
# target to generate assembly for a file
src/groupchat.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/groupchat.c.s
.PHONY : src/groupchat.c.s
src/input.o: src/input.c.o
.PHONY : src/input.o
# target to build an object file
src/input.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/input.c.o
.PHONY : src/input.c.o
src/input.i: src/input.c.i
.PHONY : src/input.i
# target to preprocess a source file
src/input.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/input.c.i
.PHONY : src/input.c.i
src/input.s: src/input.c.s
.PHONY : src/input.s
# target to generate assembly for a file
src/input.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/input.c.s
.PHONY : src/input.c.s
src/line_info.o: src/line_info.c.o
.PHONY : src/line_info.o
# target to build an object file
src/line_info.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/line_info.c.o
.PHONY : src/line_info.c.o
src/line_info.i: src/line_info.c.i
.PHONY : src/line_info.i
# target to preprocess a source file
src/line_info.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/line_info.c.i
.PHONY : src/line_info.c.i
src/line_info.s: src/line_info.c.s
.PHONY : src/line_info.s
# target to generate assembly for a file
src/line_info.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/line_info.c.s
.PHONY : src/line_info.c.s
src/log.o: src/log.c.o
.PHONY : src/log.o
# target to build an object file
src/log.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/log.c.o
.PHONY : src/log.c.o
src/log.i: src/log.c.i
.PHONY : src/log.i
# target to preprocess a source file
src/log.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/log.c.i
.PHONY : src/log.c.i
src/log.s: src/log.c.s
.PHONY : src/log.s
# target to generate assembly for a file
src/log.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/log.c.s
.PHONY : src/log.c.s
src/misc_tools.o: src/misc_tools.c.o
.PHONY : src/misc_tools.o
# target to build an object file
src/misc_tools.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/misc_tools.c.o
.PHONY : src/misc_tools.c.o
src/misc_tools.i: src/misc_tools.c.i
.PHONY : src/misc_tools.i
# target to preprocess a source file
src/misc_tools.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/misc_tools.c.i
.PHONY : src/misc_tools.c.i
src/misc_tools.s: src/misc_tools.c.s
.PHONY : src/misc_tools.s
# target to generate assembly for a file
src/misc_tools.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/misc_tools.c.s
.PHONY : src/misc_tools.c.s
src/notify.o: src/notify.c.o
.PHONY : src/notify.o
# target to build an object file
src/notify.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/notify.c.o
.PHONY : src/notify.c.o
src/notify.i: src/notify.c.i
.PHONY : src/notify.i
# target to preprocess a source file
src/notify.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/notify.c.i
.PHONY : src/notify.c.i
src/notify.s: src/notify.c.s
.PHONY : src/notify.s
# target to generate assembly for a file
src/notify.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/notify.c.s
.PHONY : src/notify.c.s
src/prompt.o: src/prompt.c.o
.PHONY : src/prompt.o
# target to build an object file
src/prompt.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/prompt.c.o
.PHONY : src/prompt.c.o
src/prompt.i: src/prompt.c.i
.PHONY : src/prompt.i
# target to preprocess a source file
src/prompt.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/prompt.c.i
.PHONY : src/prompt.c.i
src/prompt.s: src/prompt.c.s
.PHONY : src/prompt.s
# target to generate assembly for a file
src/prompt.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/prompt.c.s
.PHONY : src/prompt.c.s
src/settings.o: src/settings.c.o
.PHONY : src/settings.o
# target to build an object file
src/settings.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/settings.c.o
.PHONY : src/settings.c.o
src/settings.i: src/settings.c.i
.PHONY : src/settings.i
# target to preprocess a source file
src/settings.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/settings.c.i
.PHONY : src/settings.c.i
src/settings.s: src/settings.c.s
.PHONY : src/settings.s
# target to generate assembly for a file
src/settings.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/settings.c.s
.PHONY : src/settings.c.s
src/toxic.o: src/toxic.c.o
.PHONY : src/toxic.o
# target to build an object file
src/toxic.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/toxic.c.o
.PHONY : src/toxic.c.o
src/toxic.i: src/toxic.c.i
.PHONY : src/toxic.i
# target to preprocess a source file
src/toxic.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/toxic.c.i
.PHONY : src/toxic.c.i
src/toxic.s: src/toxic.c.s
.PHONY : src/toxic.s
# target to generate assembly for a file
src/toxic.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/toxic.c.s
.PHONY : src/toxic.c.s
src/toxic_strings.o: src/toxic_strings.c.o
.PHONY : src/toxic_strings.o
# target to build an object file
src/toxic_strings.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/toxic_strings.c.o
.PHONY : src/toxic_strings.c.o
src/toxic_strings.i: src/toxic_strings.c.i
.PHONY : src/toxic_strings.i
# target to preprocess a source file
src/toxic_strings.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/toxic_strings.c.i
.PHONY : src/toxic_strings.c.i
src/toxic_strings.s: src/toxic_strings.c.s
.PHONY : src/toxic_strings.s
# target to generate assembly for a file
src/toxic_strings.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/toxic_strings.c.s
.PHONY : src/toxic_strings.c.s
src/windows.o: src/windows.c.o
.PHONY : src/windows.o
# target to build an object file
src/windows.c.o:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/windows.c.o
.PHONY : src/windows.c.o
src/windows.i: src/windows.c.i
.PHONY : src/windows.i
# target to preprocess a source file
src/windows.c.i:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/windows.c.i
.PHONY : src/windows.c.i
src/windows.s: src/windows.c.s
.PHONY : src/windows.s
# target to generate assembly for a file
src/windows.c.s:
$(MAKE) -f CMakeFiles/toxic.dir/build.make CMakeFiles/toxic.dir/src/windows.c.s
.PHONY : src/windows.c.s
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... edit_cache"
@echo "... rebuild_cache"
@echo "... toxic"
@echo "... src/audio_call.o"
@echo "... src/audio_call.i"
@echo "... src/audio_call.s"
@echo "... src/chat.o"
@echo "... src/chat.i"
@echo "... src/chat.s"
@echo "... src/chat_commands.o"
@echo "... src/chat_commands.i"
@echo "... src/chat_commands.s"
@echo "... src/configdir.o"
@echo "... src/configdir.i"
@echo "... src/configdir.s"
@echo "... src/device.o"
@echo "... src/device.i"
@echo "... src/device.s"
@echo "... src/dns.o"
@echo "... src/dns.i"
@echo "... src/dns.s"
@echo "... src/execute.o"
@echo "... src/execute.i"
@echo "... src/execute.s"
@echo "... src/file_senders.o"
@echo "... src/file_senders.i"
@echo "... src/file_senders.s"
@echo "... src/friendlist.o"
@echo "... src/friendlist.i"
@echo "... src/friendlist.s"
@echo "... src/global_commands.o"
@echo "... src/global_commands.i"
@echo "... src/global_commands.s"
@echo "... src/groupchat.o"
@echo "... src/groupchat.i"
@echo "... src/groupchat.s"
@echo "... src/input.o"
@echo "... src/input.i"
@echo "... src/input.s"
@echo "... src/line_info.o"
@echo "... src/line_info.i"
@echo "... src/line_info.s"
@echo "... src/log.o"
@echo "... src/log.i"
@echo "... src/log.s"
@echo "... src/misc_tools.o"
@echo "... src/misc_tools.i"
@echo "... src/misc_tools.s"
@echo "... src/notify.o"
@echo "... src/notify.i"
@echo "... src/notify.s"
@echo "... src/prompt.o"
@echo "... src/prompt.i"
@echo "... src/prompt.s"
@echo "... src/settings.o"
@echo "... src/settings.i"
@echo "... src/settings.s"
@echo "... src/toxic.o"
@echo "... src/toxic.i"
@echo "... src/toxic.s"
@echo "... src/toxic_strings.o"
@echo "... src/toxic_strings.i"
@echo "... src/toxic_strings.s"
@echo "... src/windows.o"
@echo "... src/windows.i"
@echo "... src/windows.s"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system
.PHONY: clean all install

View File

@ -309,13 +309,11 @@ void callback_recv_ending ( int32_t call_index, void* arg )
{
CB_BODY(call_index, arg, onEnding);
stop_transmission(call_index);
((ToxWindow*)arg)->call_idx = -1;
}
void callback_recv_error ( int32_t call_index, void* arg )
{
CB_BODY(call_index, arg, onError);
stop_transmission(call_index);
((ToxWindow*)arg)->call_idx = -1;
}
void callback_call_started ( int32_t call_index, void* arg )
{
@ -336,7 +334,6 @@ void callback_call_canceled ( int32_t call_index, void* arg )
/* In case call is active */
stop_transmission(call_index);
((ToxWindow*)arg)->call_idx = -1;
}
void callback_call_rejected ( int32_t call_index, void* arg )
{
@ -346,13 +343,11 @@ void callback_call_ended ( int32_t call_index, void* arg )
{
CB_BODY(call_index, arg, onEnd);
stop_transmission(call_index);
((ToxWindow*)arg)->call_idx = -1;
}
void callback_requ_timeout ( int32_t call_index, void* arg )
{
CB_BODY(call_index, arg, onRequestTimeout);
((ToxWindow*)arg)->call_idx = -1;
}
void callback_peer_timeout ( int32_t call_index, void* arg )
{
@ -362,7 +357,6 @@ void callback_peer_timeout ( int32_t call_index, void* arg )
* actions that one can possibly take on timeout
*/
toxav_stop_call(ASettins.av, call_index);
((ToxWindow*)arg)->call_idx = -1;
}
/*
* End of Callbacks
@ -762,3 +756,27 @@ void cmd_sense(WINDOW * window, ToxWindow * self, Tox *m, int argc, char (*argv)
on_error:
print_err (self, error_str);
}
void stop_current_call(ToxWindow* self)
{
ToxAvCallState callstate;
if ( ASettins.av != NULL && self->call_idx != -1 &&
( callstate = toxav_get_call_state(ASettins.av, self->call_idx) ) != av_CallNonExistant) {
switch (callstate)
{
case av_CallActive:
case av_CallHold:
toxav_hangup(ASettins.av, self->call_idx);
break;
case av_CallInviting:
toxav_cancel(ASettins.av, self->call_idx, 0, "Not interested anymore");
break;
case av_CallStarting:
toxav_reject(ASettins.av, self->call_idx, "Not interested");
break;
default:
break;
}
}
}

View File

@ -42,7 +42,6 @@ typedef enum _AudioError {
ToxAv *init_audio(ToxWindow *self, Tox *tox);
void terminate_audio();
int start_transmission(ToxWindow *self);
int stop_transmission(int call_index);
void stop_current_call(ToxWindow *self);
#endif /* _audio_h */

View File

@ -24,6 +24,7 @@
#include <string.h>
#include <time.h>
#include <wchar.h>
#include <assert.h>
#include "toxic.h"
#include "windows.h"
@ -114,11 +115,17 @@ void kill_chat_window(ToxWindow *self, Tox *m)
log_disable(ctx->log);
line_info_cleanup(ctx->hst);
#ifdef _SUPPORT_AUDIO
stop_current_call(self);
#endif
int f_num = self->num;
delwin(ctx->linewin);
delwin(ctx->history);
delwin(self->window);
delwin(statusbar->topline);
del_window(self);
disable_chatwin(f_num);
@ -424,7 +431,7 @@ static void chat_onGroupInvite(ToxWindow *self, Tox *m, int32_t friendnumber, co
void chat_onInvite (ToxWindow *self, ToxAv *av, int call_index)
{
if (self->num != toxav_get_peer_id(av, call_index, 0))
if (!self || self->num != toxav_get_peer_id(av, call_index, 0))
return;
/* call_index is set here and reset on call end */
@ -438,7 +445,7 @@ void chat_onInvite (ToxWindow *self, ToxAv *av, int call_index)
void chat_onRinging (ToxWindow *self, ToxAv *av, int call_index)
{
if ( self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
if ( !self || self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
return;
line_info_add(self, NULL, NULL, NULL, "Ringing...\"cancel\" ?", SYS_MSG, 0, 0);
@ -446,7 +453,7 @@ void chat_onRinging (ToxWindow *self, ToxAv *av, int call_index)
void chat_onStarting (ToxWindow *self, ToxAv *av, int call_index)
{
if ( self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
if ( !self || self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
return;
init_infobox(self);
@ -456,7 +463,7 @@ void chat_onStarting (ToxWindow *self, ToxAv *av, int call_index)
void chat_onEnding (ToxWindow *self, ToxAv *av, int call_index)
{
if (self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
if (!self || self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
return;
kill_infobox(self);
@ -466,7 +473,7 @@ void chat_onEnding (ToxWindow *self, ToxAv *av, int call_index)
void chat_onError (ToxWindow *self, ToxAv *av, int call_index)
{
if (self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
if (!self || self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
return;
self->call_idx = -1;
@ -475,7 +482,7 @@ void chat_onError (ToxWindow *self, ToxAv *av, int call_index)
void chat_onStart (ToxWindow *self, ToxAv *av, int call_index)
{
if ( self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
if ( !self || self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
return;
init_infobox(self);
@ -485,7 +492,7 @@ void chat_onStart (ToxWindow *self, ToxAv *av, int call_index)
void chat_onCancel (ToxWindow *self, ToxAv *av, int call_index)
{
if ( self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
if ( !self || self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
return;
kill_infobox(self);
@ -495,7 +502,7 @@ void chat_onCancel (ToxWindow *self, ToxAv *av, int call_index)
void chat_onReject (ToxWindow *self, ToxAv *av, int call_index)
{
if (self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
if (!self || self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
return;
self->call_idx = -1;
@ -504,7 +511,7 @@ void chat_onReject (ToxWindow *self, ToxAv *av, int call_index)
void chat_onEnd (ToxWindow *self, ToxAv *av, int call_index)
{
if (self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
if (!self || self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
return;
kill_infobox(self);
@ -514,7 +521,7 @@ void chat_onEnd (ToxWindow *self, ToxAv *av, int call_index)
void chat_onRequestTimeout (ToxWindow *self, ToxAv *av, int call_index)
{
if (self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
if (!self || self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
return;
self->call_idx = -1;
@ -523,7 +530,7 @@ void chat_onRequestTimeout (ToxWindow *self, ToxAv *av, int call_index)
void chat_onPeerTimeout (ToxWindow *self, ToxAv *av, int call_index)
{
if (self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
if (!self || self->call_idx != call_index || self->num != toxav_get_peer_id(av, call_index, 0))
return;
kill_infobox(self);

View File

@ -560,7 +560,8 @@ static void friendlist_onAv(ToxWindow *self, ToxAv *av, int call_index)
if (friends[id].chatwin == -1) {
if (get_num_active_windows() < MAX_WINDOWS_NUM) {
friends[id].chatwin = add_window(m, new_chat(m, friends[id].num));
if (toxav_get_call_state(av, call_index) == av_CallStarting) /* Only open windows when call is incoming */
friends[id].chatwin = add_window(m, new_chat(m, friends[id].num));
} else {
uint8_t nick[TOX_MAX_NAME_LENGTH] = {'\0'};
int n_len = tox_get_name(m, id, nick);