Merge branch 'master' into my-osx
authormaan <maan@Gumbo.local>
Thu, 15 Jun 2006 08:17:41 +0000 (10:17 +0200)
committermaan <maan@Gumbo.local>
Thu, 15 Jun 2006 08:17:41 +0000 (10:17 +0200)
1  2 
configure.ac
error.h

diff --combined configure.ac
index 4dcf0f2b795161e5ee3e00f2a27e02948fed1a40,49b3198abd066bf1b4d8e281fcb0609b5161d3a3..81d1cbba04e4ffc08341cee2528c0313f22bc7b2
@@@ -86,7 -86,7 +86,7 @@@ write_ldflags="
  write_writers="file"
  
  client_cmdline_objs="client.cmdline"
- client_errlist_objs="client net string crypt"
+ client_errlist_objs="client net string crypt fd sched stdin stdout client_common"
  client_ldflags=""
  
  ########################################################################### ssl
@@@ -152,31 -152,6 +152,31 @@@ if test ${have_ucred} = yes; the
        AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
  fi
  
 +########################################################################### osx
 +
 +AC_MSG_CHECKING(for CoreAudio (MacOs))
 +AC_TRY_LINK([
 +      #include <CoreAudio/CoreAudio.h>
 +],[
 +      AudioDeviceID id;
 +],[have_core_audio=yes],[have_core_audio=no])
 +AC_MSG_RESULT($have_core_audio)
 +if test ${have_core_audio} = yes; then
 +      f1="-framework CoreAudio"
 +      f2="-framework AudioToolbox"
 +      f3="-framework AudioUnit"
 +      f4="-framework CoreServices"
 +      f="$f1 $f2 $f3 $f4"
 +      audiod_errlist_objs="$audiod_errlist_objs osx_writer"
 +      audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline"
 +      audiod_ldflags="$audiod_ldflags $f"
 +
 +      write_errlist_objs="$write_errlist_objs osx_writer"
 +      write_cmdline_objs="$write_cmdline_objs osx_write.cmdline"
 +      write_ldflags="$write_ldflags $f"
 +      write_writers="$write_writers osx"
 +      AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on MacOs)
 +fi
  ########################################################################### gtk2
  
  pkg_modules="gtk+-2.0 >= 2.0.0"
diff --combined error.h
index a64348e342e2aeef66a09b9e2e808f57366b002d,78e3242cdd71b0d5484033d671b24088e735bf91..89dbb0f69f1ffa984f740fa8b7a0e3b5d24d035b
+++ b/error.h
@@@ -20,6 -20,7 +20,7 @@@
  
  /** \cond list of all subsystems that support the shiny error facility */
  enum para_subsystem {
+       SS_CLIENT,
        SS_GUI,
        SS_TIME,
        SS_WAV,
@@@ -31,7 -32,7 +32,7 @@@
        SS_RECV,
        SS_NET,
        SS_ORTP_RECV,
-       SS_CLIENT,
+       SS_CLIENT_COMMON,
        SS_AUDIOC,
        SS_SCHED,
        SS_AUDIOD,
        SS_WRITE_COMMON,
        SS_ALSA_WRITER,
        SS_FILE_WRITER,
 +      SS_OSX_WRITER,
        NUM_SS
  };
  
  /* these do not need error handling (yet) */
  #define SERVER_ERRORS
+ #define CLIENT_ERRORS
  #define WAV_ERRORS
  #define COMPRESS_ERRORS
  #define TIME_ERRORS
  extern const char **para_errlist[];
  /** \endcond */
  
 +#define OSX_WRITER_ERRORS \
 +      PARA_ERROR(STREAM_FORMAT, "could not set stream format"), \
 +      PARA_ERROR(ADD_CALLBACK, "can not add callback"), \
 +      PARA_ERROR(READ_STDIN, "failed to read from stdin"), \
 +      PARA_ERROR(OPEN_COMP, "OpenAComponent() error"), \
 +      PARA_ERROR(UNIT_INIT, "AudioUnitInitialize() error"), \
 +      PARA_ERROR(DEFAULT_COMP, "can not find default audio output component"), \
 +
 +
  #define AUDIOC_ERRORS \
        PARA_ERROR(AUDIOC_SYNTAX, "audioc syntax error"), \
        PARA_ERROR(AUDIOC_READ, "audioc read error"), \
        PARA_ERROR(AUDIOC_OVERRUN, "audioc buffer overrun"), \
  
  
- #define CLIENT_ERRORS \
+ #define CLIENT_COMMON_ERRORS \
        PARA_ERROR(CLIENT_SYNTAX, "syntax error"), \
        PARA_ERROR(INVALID_CHALLENGE, "did not receive valid challenge"), \
-       PARA_ERROR(CLIENT_AUTH, "authentication failed"), \
-       PARA_ERROR(SHORT_CLIENT_WRITE, "short client write"), \
        PARA_ERROR(NO_CONFIG, "config file not found"), \
+       PARA_ERROR(CLIENT_AUTH, "authentication failed"), \
+       PARA_ERROR(SERVER_EOF, "connection closed by para_server"), \
+       PARA_ERROR(INPUT_EOF, "end of input"), \
+       PARA_ERROR(HANDSHAKE_COMPLETE, ""), /* not really an error */ \
  
  #define SCHED_ERRORS \
        PARA_ERROR(TASK_KILLED, "task killed"), \
        PARA_ERROR(NO_SUCH_TASK, "task not found"), \
+       PARA_ERROR(NOT_INITIALIZED, "scheduler not yet initialized"), \
  
  
  #define STDIN_ERRORS \
@@@ -556,9 -554,9 +564,10 @@@ SS_ENUM(WRITE)
  SS_ENUM(WRITE_COMMON);
  SS_ENUM(ALSA_WRITER);
  SS_ENUM(FILE_WRITER);
 +SS_ENUM(OSX_WRITER);
  SS_ENUM(RINGBUFFER);
  SS_ENUM(CLIENT);
+ SS_ENUM(CLIENT_COMMON);
  SS_ENUM(AUDIOC);
  /** \endcond */
  #undef PARA_ERROR