Main Page   Compound List   File List   Compound Members   File Members  

netfone.h File Reference

#include <windows.h>
#include <shellapi.h>
#include <windowsx.h>
#include <winsock.h>
#include <mmsystem.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <memory.h>
#include <time.h>
#include <float.h>
#include <io.h>
#include <commdlg.h>
#include <math.h>
#include <wchar.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <share.h>
#include <commctrl.h>
#include "md5.h"
#include "aes.h"
#include "blowfish.h"
#include "des.h"
#include "ndes.h"
#include "idea.h"
#include "ulaw.h"
#include "gsm.h"
#include "adpcm_u.h"
#include "celp.h"
#include "rtp.h"
#include "rtpacket.h"
#include "lpc.h"
#include "vox.h"
#include "resource.h"
#include "HtmlHelp.h"

Go to the source code of this file.

Compounds

struct  _CLIENT_DATA
struct  audio_descr_t
struct  auxSocket
struct  localLoop
struct  ratestuff
struct  respHeader
struct  soundbuf

Defines

#define _INC_SHELLAPI
#define WM_COMMAND_ID(x)   (LOWORD(x))
#define WM_COMMAND_NOTIFY   (HIWORD(wParam))
#define AES_BLOCK_SIZE   BLOCK_SIZE
#define HTML_HELP
#define HEXDUMP
#define Assert(x)
#define Gag(text)   OutputDebugString("Gag me with a " #text "!\r\n");
#define NETFONE_COMMAND_PORT   2074
#define RANT_ON_ERROR
#define MAX_HOST   256
#define GWL_CLIENT   0
#define WINDOW_TYPE_CLIENT   1
#define FRAME_TIMER_ID   1
#define TIMEOUT_CONNECTION   30
#define TIMEOUT_AUDIO_OUTPUT   4
#define TIMEOUT_RESEND_LWL   (119)
#define TIMEOUT_RESEND_SDES   10
#define BroadcastUnsubscribe   10
#define MAX_PRINTF_OUTPUT   1024
#define LPC_FRAME_SIZE   160
#define REMEMBER_CONNECTIONS   5
#define IN_MULTICAST(i)   ((ntohl((long)(i)) & 0xF0000000) == 0xE0000000)
#define WM_SOCKET_SELECT   (WM_USER + 100)
#define WM_SOCKET_ASYNC   (WM_USER + 101)
#define WM_SOCKET_LWL   (WM_USER + 102)
#define WM_SOCKET_CONTROL   (WM_USER + 103)
#define WM_CLEAN_UP_YOUR_ACT   (WM_USER + 104)
#define WM_NEW_COMMANDLINE   (WM_USER + 200)
#define HANDLE_WM_SOCKET_SELECT(hwnd, wParam, lParam, fn)
#define FORWARD_WM_SOCKET_SELECT(hwnd, socket, serr, sevent, fn)
#define HANDLE_WM_SOCKET_ASYNC(hwnd, wParam, lParam, fn)
#define FORWARD_WM_GETXBYX(hwnd, hAsync, serr, cbBuffer, fn)
#define ELEMENTS(array)   (sizeof(array)/sizeof((array)[0]))
#define Format(n)   rstring(IDS_FORMATS + (n))
#define Lrstring(n)   ((LPSTR) rstring(n))
#define ID(x)   MAKEINTRESOURCE(x)
#define IDI_BASE   1000
 Resource IDs.

#define IDM_BASE   2000
#define IDD_BASE   3000
#define IDA_BASE   4000
#define IDI_FRAME   ID(1000)
#define IDI_CLIENT   ID(1001)
#define IDI_SERVER   ID(1002)
#define IDM_FRAME_BASE   2000
#define IDM_FRAME   ID(IDM_FRAME_BASE)
#define IDM_CONNECTION_BASE   (IDM_FRAME_BASE + 0)
#define IDM_CONNECTION_EXIT   (IDM_CONNECTION_BASE + 3)
#define IDM_WINDOW_BASE   (IDM_FRAME_BASE + 100)
#define IDM_WINDOW_CASCADE   (IDM_WINDOW_BASE + 0)
#define IDM_WINDOW_TILE_VERTICALLY   (IDM_WINDOW_BASE + 1)
#define IDM_WINDOW_TILE_HORIZONTALLY   (IDM_WINDOW_BASE + 2)
#define IDM_WINDOW_ARRANGE_ICONS   (IDM_WINDOW_BASE + 3)
#define IDM_WINDOW_FIRST_CHILD   (IDM_WINDOW_BASE + 4)
#define IDM_HELP_BASE   (IDM_FRAME_BASE + 200)
#define IDM_HELP_ABOUT   (IDM_HELP_BASE + 0)
#define IDM_CUSTOM   9000
#define IDD_ABOUT   ID(3000)
#define IDD_NEW   ID(3100)
#define IDD_NEW_HOST   3101
#define IDD_NEW_HOST_LABEL   3102
#define IDA_FRAME   ID(4000)
#define BUFL   8000
#define LONG   long
#define SPEAK_FREE_FRAME_CLASS   "SpeakFreeFrameClass"
#define EXCHANGE_SAMPLE_RATE   8000
#define fComp2X   1
#define fDebug   2
#define fSetDest   4
#define fDestSpkr   0
#define fDestJack   8
#define fLoopBack   16
#define fCompGSM   32
#define fEncDES   64
#define fEncOTP   128
#define fEncIDEA   256
#define fCompADPCM   512
#define fEncPGP   1024
#define fKeyPGP   2048
#define fCompLPC   4096
#define fFaceData   8192
#define fFaceOffer   16384
#define fNewProto   0x8000
#define fCompVOX   0x10000
#define fCompLPC10   0x20000
#define fCompRobust   0x40000
#define fEncBF   0x80000
#define fCompCELP   0x100000
#define fEncAES   0x200000
#define fProtocol   0x40000000
#define faceRequest   1
#define faceReply   2
#define faceLess   4
#define fCompressionModes   (fComp2X | fCompGSM | fCompADPCM | fCompLPC | fCompVOX | fCompLPC10 | fCompCELP)
#define fFromModem   0x8000
#define fPlayback   0x02000000
#define fAnsNewMsg   0x01000000
#define isSoundPacket(c)   (((c) & (fFaceData | fKeyPGP)) == 0)
#define PROTOCOL_SPEAKFREE   0
#define PROTOCOL_VAT   1
#define PROTOCOL_RTP   2
#define PROTOCOL_VATRTP_CRYPT   3
#define PROTOCOL_UNKNOWN   4
#define IS_LOCALHOST(i)   (ntohl((long)(i)) == 0x7F000001)
#define LOOPBACK_ENABLED   1
#define LOOPBACK_PLAYING   2
#define CLIENTPTR(w)   ((LPCLIENT_DATA)GetWindowLong((w), GWL_CLIENT))
#define IS_CLIENT_WINDOW(w)   (CLIENTPTR(w)->dwType == WINDOW_TYPE_CLIENT)
#define FSinit   0
#define FSrequest   1
#define FSreply   2
#define FScomplete   3
#define FSabandoned   4
#define FaceFetchInterval   250
#define FaceTimeout   20
#define FaceMaxRetries   10
#define AORA_MINIMUM_DELAY   500
#define AORA_ACTION_DELAY   500
#define AORA_MAXIMUM_RATE_PERCENT   10
#define AORA_MAXIMUM_RATE_DELAY   3000
#define TRAY
#define WM_TRAY_NOTIFY   (WM_USER + 300)
#define TRAY_TIMER_ID   7
#define modemInputQueue   10240
#define modemOutputQueue   10240
#define LazarusLength   15
#define V   (void)
#define errorRant(hwnd)   {if (modemShowRant) { modemRant(hwnd); } }
#define RTCP_APP_TEXT_CHAT   "SFtc"
#define WM_CHAT_TEXT_SEND   (WM_USER + 1004)

Typedefs

typedef soundbuf soundbuf
typedef ratestuff rate_t
typedef INT SOCKERR
typedef WORD PORT
typedef WORD SOCKEVENT
typedef enum _CLIENT_STATE CLIENT_STATE
typedef _CLIENT_DATA CLIENT_DATA
typedef _CLIENT_DATALPCLIENT_DATA

Enumerations

enum  _CLIENT_STATE {
  Embryonic, Idle, SendingLiveAudio, Transferring,
  PlayingReceivedAudio
}
enum  public_key_package { Unspecified, PGP, GPG }
enum  audio_encoding_t {
  AE_PCMU, AE_PCMA, AE_G721, AE_IDVI,
  AE_G723, AE_GSM, AE_1016, AE_LPC,
  AE_L8, AE_L16, AE_L24, AE_L32,
  AE_G728, AE_TRUE, AE_MAX
}

Functions

HWND createTrayIcon (void)
void updateTrayToolTipText (void)
void blinkTrayIcon (BOOL blink)
void lwl_ask_set_target (const char *target)
void revlong (long *l)
void revshort (short *s)
LRESULT CALLBACK connectWndProc (HWND hwnd, UINT nMessage, WPARAM wParam, LPARAM lParam)
HWND createNewConnection (LPCLIENT_DATA pClientData)
void connFetchFace (HWND hwndClient, LPCLIENT_DATA pClientData)
VOID aboutDialogue (HWND hwndParent)
VOID propellerHeadDialogue (HWND hwndParent)
BOOL CALLBACK propellerHeadDlgProc (HWND hwnd, UINT nMessage, WPARAM wParam, LPARAM lParam)
void propUpdateAudio (void)
VOID benchDialogue (HWND hwndParent)
BOOL newHostDialogue (HWND hwndParent, LPSTR pszHostName, LPIN_ADDR paddr, unsigned short *port)
VOID genKeyDialogue (HWND hwnd)
VOID connectionProperties (HWND hwnd, LPCLIENT_DATA d)
VOID modemSetupDialogue (HWND hwnd)
void modemRant (HWND hwnd)
VOID multicastGroupsDialogue (HWND hwnd)
VOID answerDialogue (HWND hwndParent)
BOOL CALLBACK answerDlgProc (HWND hwnd, UINT nMessage, WPARAM wParam, LPARAM lParam)
int faceDialogue (HWND hWndParent)
BOOL CALLBACK faceDlgProc (HWND hwnd, UINT nMessage, WPARAM wParam, LPARAM lParam)
VOID lwl_ask (HWND hwnd)
VOID lwl_tell_settings (HWND hwnd)
BOOL voxMonitorDialog (HWND hwndParent)
BOOL IsVoxMonitorMessage (MSG *pmsg)
void voxMonitorUpdate (long nAudio, long nVox)
BOOL IsVoxMonitorOn ()
LRESULT CALLBACK Frame_WndProc (HWND hwnd, UINT nMessage, WPARAM wParam, LPARAM lParam)
void ParseCommandLine (HWND hwnd, LPSTR pszCmdLine)
BOOL InitApplication (HINSTANCE hInstance)
BOOL InitInstance (HINSTANCE hInstance, LPSTR pszCmdLine, INT nCmdShow)
void SetupICQ (void)
void SetICQData (HKEY hSpeakFreelyKey, char *szSpeakFreelyPath)
void DefaultMessageLoop ()
int readWaveInit (HWND hwndApp, LPCLIENT_DATA d, LPSTR szFileName)
int readWaveNext (HWND hwnd, LPCLIENT_DATA d)
void readWaveTerm (LPCLIENT_DATA d)
void AES_cbc_encrypt (unsigned char *in, unsigned char *out, int len, aes_ctx *ctx)
void AES_cbc_decrypt (unsigned char *in, unsigned char *out, int len, aes_ctx *ctx)
int answerOpen (void)
void answerSave (struct in_addr IPaddr, LPSTR hostName, soundbuf *sb)
void answerSync (void)
void answerClose (void)
int answerEnabled (void)
void loop_flush (LPCLIENT_DATA d)
int loop_sendto (LPCLIENT_DATA d, const char *buf, int len, const struct sockaddr *to, int tolen)
int loop_recvfrom (LPCLIENT_DATA d, char *buf, int len, struct sockaddr *from, int *fromlen)
int loop_samples (LPCLIENT_DATA d)
BOOL loop_control_port (LPCLIENT_DATA d)
void closeFaceFile (void)
int openFaceFile (HWND hwnd)
void processFaceRequest (soundbuf *d)
void processFaceData (HWND hwnd, LPCLIENT_DATA c, soundbuf *d)
int sendLwlMessage (HWND hDlg, int dobye)
int lwl_reconnect (HWND hDlg)
int rtp_make_sdes (char **pkt, unsigned long ssrc_i, int port, int exact, int strict)
int rtp_make_bye (unsigned char *p, unsigned long ssrc_i, char *raison, int strict)
int rtp_make_app (unsigned char *p, unsigned long ssrc_i, int strict, char *type, char *content)
LONG rtpout (soundbuf *sb, unsigned long ssrc_i, unsigned long timestamp_i, unsigned short seq_i, int spurt)
int isValidRTCPpacket (unsigned char *p, int len)
int isRTCPByepacket (unsigned char *p, int len)
int isRTCPAPPpacket (unsigned char *p, int len, char *name, unsigned char **app_ptr)
int isrtp (unsigned char *pkt, int len)
int parseSDES (unsigned char *packet, struct rtcp_sdes_request *r)
void copySDESitem (char *s, char *d)
void string_DES_key (LPSTR key, LPBYTE des_key, char algorithm[16])
VOID chatDialogue (HWND hwndParent)
BOOL CALLBACK chatDlgProc (HWND hwnd, UINT nMessage, WPARAM wParam, LPARAM lParam)
void chatLog (HWND hwnd, char *ident, char *text)
VOID consoleDialogue (HWND hwndParent)
BOOL CALLBACK consoleDlgProc (HWND hwnd, UINT nMessage, WPARAM wParam, LPARAM lParam)
void consoleLog (char *text)
void vcPrintf (LPCSTR lpFormat, va_list arglist)
void cPrintf (LPCSTR lpFormat,...)
int isvat (unsigned char *pkt, int len)
LONG vatout (soundbuf *sb, unsigned long ssrc_i, unsigned long timestamp_i, int spurt)
int makeVATid (char **vp, unsigned long ssrc_i)
int makevatdone (unsigned char *v, unsigned long ssrc_i)
void lpc10init (void)
int lpc10encode (unsigned char *in, unsigned char *out, int inlen)
int lpc10decode (unsigned char *in, unsigned char *out, int inlen)
double spectrum (short *samples, int nsamples, double *ps, int nfreqs, double maxpwr)
void spectrumEnd (void)
VOID spectralDialogue (HWND hwndParent)
BOOL CALLBACK spectralDlgProc (HWND hwnd, UINT nMessage, WPARAM wParam, LPARAM lParam)
void spectrumUpdate (LPSTR buffer, WORD buflen, DWORD channels, DWORD rate, DWORD bytesec, WORD align, BOOL isInput)
char * rstring (int resid)
char * rfilter (int resid)
INT MsgBox (HWND hwndParent, UINT fuType, LPSTR pszFormat,...)
VOID WinPrintf (HDC hdc, INT row, INT col, LPSTR pszFormat,...)
VOID displayHelpTopicString (LPCSTR topicStr)
VOID displayHelpTopic (int topicResID)
LPSTR SockerrToString (SOCKERR serr)
SOCKERR ResetSocket (SOCKET sock)
SOCKERR CreateSocket (SOCKET *psock, INT type, ULONG address, PORT port)
void playSound (HWND hWnd, LPCLIENT_DATA pClientData, soundbuf *d, int bitsPerSample, int samplesPerSecond)
void decodeAnswerPacket (soundbuf *d, int bitsPerSample, int samplesPerSecond, LPSTR *pcmData, DWORD *pcmLength)
VOID newConnection (HWND hwnd, LPSTR connectionFile, LPSTR knownHost)
void adpcmdecomp (struct soundbuf *sb)
int startWaveInput (HWND hwnd)
int inputSampleCount (void)
void terminateWaveInput (void)
void compress2X (soundbuf *asb)
void createSoundBuffer (LPSTR buffer, WORD buflen, DWORD channels, DWORD rate, DWORD bytesec, WORD align)
void shipSoundBuffer (HWND hwnd, LPCLIENT_DATA pClientData)
VOID startSoundFile (HWND hwnd, LPSTR pszFile)
LPBYTE GIFtoBMP (LPBYTE gif, int imageNumber)
void sessionKeyGenerate (LPSTR key, BOOL binary)
int makeInternalEncryptionKeys (HWND hwnd, LPCLIENT_DATA d)
void multicastJoin (HWND hwnd, int join)
void propeller (int control, DWORD value)
int obtainOutput (HWND hwnd)
unsigned char alaw2ulaw (unsigned char aval)
void rate_start (rate_t *rate, int inrate, int outrate)
void rate_flow (rate_t *rate, unsigned char *ibuf, unsigned char *obuf, int *isamp, int *osamp)
void xd (void *buf, int bufl, int dochar)

Variables

HWND trayIconWindow
SOCKET sCommand
auxSocketasList
HINSTANCE hInst
HACCEL hAccel
HWND hwndMDIFrame
HWND hwndMDIClient
HWND hDlgPropeller
HWND hDlgAnswer
HWND hDlgChat
HWND hDlgConsole
HWND hDlgSpectral
LPSTR pszFrameClass
LPSTR pszMDIClientClass
LPSTR pszClientClass
LPSTR pszAppName
INT tmAveCharWidth
INT tmHeight
LPSTR commandLine
int holped
DWORD HtmlHelpContext
UINT fileOpenHelpButton
char * fileHelpKey
UINT jitterBuf
BOOL jitterPause
HWAVEOUT hWaveOut
HWAVEIN hWaveIn
soundbuf ebuf
int audioChannels
int samplesPerSecond
int bytesPerSecond
int sampleAlignment
int bitsPerSample
int currentOutputRate
int openOnAnswerMessage
int voxmode
int breakinput
int compression
int gsmcompress
int adpcmcompress
int lpccompress
int lpc10compress
int celpcompress
int robust
int voxcompress
int protocolXmit
int protocolSent
int protocolAuto
gsm gsmh
rate_t xrate
int currentInputSamples
int broadcasting
int listeners
int bConferencing
int isWaveSound
int inputActive
int outputActive
int inputPaused
int halfDuplex
int aboutInSamples
int aboutInBits
int aboutOutSamples
int aboutOutBits
public_key_package pk_package
long packetsReceived
long packetsSent
long inputPacketsLost
long outputPacketsLost
int openConnections
int halfDuplexTransition
int outputInShutdown
long outputPending
long microsecondsPending
double smoothedMicrosecondsPending
int messageQueueSize
long messageChecks
int aboutUDPmax
int netMaxSamples
int alwaysBindSocket
int useSendNotSendto
int waNetNoConnect
int waNetUseSend
int waNetMultiTTLisChar
int waNetNoOutOverflow
int waNetNoMsgLoopIns
int waNetSynchronousGetHostname
int waNetSynchronousGetHostnameAction
int waProtNoHeartbeat
int waProtUseLargerRTCPackets
int waProtNoVAT
int waProtNoRTP
int waProtNoRTCPCrypt
int waAudioHalf
int waAudio11025
int waAudioRingMaxVolume
int waAudioNoOutputRateAdjustment
int waAudioBeepOnTransmit
int modemEnable
char modemInitString [128]
char baudrate [12]
char commport [12]
int modemHandle
int modemSessions
int modemShowRant
int rememberedConnections
LPSTR rememberedConnection [REMEMBER_CONNECTIONS]
int multiMemberships
int multiLoop
int multiBrainDead
char answerFileName [MAX_PATH]
char answerOutFileName [MAX_PATH]
int answerRecord
char faceFileName [MAX_PATH]
HFILE faceFile
int faceShow
char lwl_s_server [MAX_PATH]
char lwl_s_email [80]
char lwl_s_fullname [80]
char lwl_s_phone [80]
char lwl_s_location [80]
int lwl_s_publish
int lwl_s_exact
char lwl_a_server [MAX_PATH]
int lwl_a_exact
int lwl_t_published
int lwl_t_resend
int lwl_t_pending
sockaddr_in lookhost
unsigned long ssrc
unsigned long timestamp
unsigned short seq
unsigned long rtpdesrand
char * sdes
int sdesl
int spurt
char * vatid
int vatidl
char * rtpsdes
int rtpsdesl
HCURSOR phoneCursor
HCURSOR earCursor
HCURSOR boltCursor
u_long Lazarus
int LazarusLong
char blankit []
BOOL spectrumBarGraph
BOOL spectrumVoicePrint
BOOL spectrumTransmitOnly
BOOL spectrumReceiveOnly
BOOL spectrumMaxEnergy


Define Documentation

#define _INC_SHELLAPI
 

#define AES_BLOCK_SIZE   BLOCK_SIZE
 

#define AORA_ACTION_DELAY   500
 

#define AORA_MAXIMUM_RATE_DELAY   3000
 

#define AORA_MAXIMUM_RATE_PERCENT   10
 

#define AORA_MINIMUM_DELAY   500
 

#define Assert  
 

Value:

{ if (!(x)) { char erm[128]; wsprintf((LPSTR) erm, \
        (LPSTR) "Assertion %s failed at line %d of file %s.", (LPCSTR) #x, __LINE__,(LPSTR) __FILE__); \
        FatalAppExit(0, (LPCSTR) erm); }}

#define BroadcastUnsubscribe   10
 

#define BUFL   8000
 

#define CLIENTPTR      ((LPCLIENT_DATA)GetWindowLong((w), GWL_CLIENT))
 

#define ELEMENTS array       (sizeof(array)/sizeof((array)[0]))
 

#define errorRant hwnd       {if (modemShowRant) { modemRant(hwnd); } }
 

#define EXCHANGE_SAMPLE_RATE   8000
 

#define FaceFetchInterval   250
 

#define faceLess   4
 

#define FaceMaxRetries   10
 

#define faceReply   2
 

#define faceRequest   1
 

#define FaceTimeout   20
 

#define fAnsNewMsg   0x01000000
 

#define fComp2X   1
 

#define fCompADPCM   512
 

#define fCompCELP   0x100000
 

#define fCompGSM   32
 

#define fCompLPC   4096
 

#define fCompLPC10   0x20000
 

#define fCompressionModes   (fComp2X | fCompGSM | fCompADPCM | fCompLPC | fCompVOX | fCompLPC10 | fCompCELP)
 

#define fCompRobust   0x40000
 

#define fCompVOX   0x10000
 

#define fDebug   2
 

#define fDestJack   8
 

#define fDestSpkr   0
 

#define fEncAES   0x200000
 

#define fEncBF   0x80000
 

#define fEncDES   64
 

#define fEncIDEA   256
 

#define fEncOTP   128
 

#define fEncPGP   1024
 

#define fFaceData   8192
 

#define fFaceOffer   16384
 

#define fFromModem   0x8000
 

#define fKeyPGP   2048
 

#define fLoopBack   16
 

#define fNewProto   0x8000
 

#define Format      rstring(IDS_FORMATS + (n))
 

#define FORWARD_WM_GETXBYX hwnd,
hAsync,
serr,
cbBuffer,
fn   
 

Value:

(void)(fn)((hwnd), WM_SOCKET_ASYNC, (WPARAM)(hAsync), \
    (LPARAM)WSAMAKEASYNCREPLY(cbBuffer, serr))

#define FORWARD_WM_SOCKET_SELECT hwnd,
socket,
serr,
sevent,
fn   
 

Value:

(void)(fn)((hwnd), WM_SOCKET_SELECT, (WPARAM)(socket), \
    (LPARAM)WSAMAKESELECTREPLY(sevent, serr))

#define fPlayback   0x02000000
 

#define fProtocol   0x40000000
 

#define FRAME_TIMER_ID   1
 

#define FSabandoned   4
 

#define FScomplete   3
 

#define fSetDest   4
 

#define FSinit   0
 

#define FSreply   2
 

#define FSrequest   1
 

#define Gag text       OutputDebugString("Gag me with a " #text "!\r\n");
 

#define GWL_CLIENT   0
 

#define HANDLE_WM_SOCKET_ASYNC hwnd,
wParam,
lParam,
fn   
 

Value:

((fn)((hwnd), (HANDLE)(wParam), (SOCKERR)WSAGETASYNCERROR(lParam), \
    (WORD)WSAGETASYNCBUFLEN(lParam)), 0L)

#define HANDLE_WM_SOCKET_SELECT hwnd,
wParam,
lParam,
fn   
 

Value:

((fn)((hwnd), (SOCKET)(wParam), (SOCKERR)WSAGETSELECTERROR(lParam), \
    (SOCKEVENT)WSAGETSELECTEVENT(lParam)), 0L)

#define HEXDUMP
 

#define HTML_HELP
 

#define ID      MAKEINTRESOURCE(x)
 

#define IDA_BASE   4000
 

#define IDA_FRAME   ID(4000)
 

#define IDD_ABOUT   ID(3000)
 

#define IDD_BASE   3000
 

#define IDD_NEW   ID(3100)
 

#define IDD_NEW_HOST   3101
 

#define IDD_NEW_HOST_LABEL   3102
 

#define IDI_BASE   1000
 

Resource IDs.

#define IDI_CLIENT   ID(1001)
 

#define IDI_FRAME   ID(1000)
 

#define IDI_SERVER   ID(1002)
 

#define IDM_BASE   2000
 

#define IDM_CONNECTION_BASE   (IDM_FRAME_BASE + 0)
 

#define IDM_CONNECTION_EXIT   (IDM_CONNECTION_BASE + 3)
 

#define IDM_CUSTOM   9000
 

#define IDM_FRAME   ID(IDM_FRAME_BASE)
 

#define IDM_FRAME_BASE   2000
 

#define IDM_HELP_ABOUT   (IDM_HELP_BASE + 0)
 

#define IDM_HELP_BASE   (IDM_FRAME_BASE + 200)
 

#define IDM_WINDOW_ARRANGE_ICONS   (IDM_WINDOW_BASE + 3)
 

#define IDM_WINDOW_BASE   (IDM_FRAME_BASE + 100)
 

#define IDM_WINDOW_CASCADE   (IDM_WINDOW_BASE + 0)
 

#define IDM_WINDOW_FIRST_CHILD   (IDM_WINDOW_BASE + 4)
 

#define IDM_WINDOW_TILE_HORIZONTALLY   (IDM_WINDOW_BASE + 2)
 

#define IDM_WINDOW_TILE_VERTICALLY   (IDM_WINDOW_BASE + 1)
 

#define IN_MULTICAST      ((ntohl((long)(i)) & 0xF0000000) == 0xE0000000)
 

#define IS_CLIENT_WINDOW      (CLIENTPTR(w)->dwType == WINDOW_TYPE_CLIENT)
 

#define IS_LOCALHOST      (ntohl((long)(i)) == 0x7F000001)
 

#define isSoundPacket c       (((c) & (fFaceData | fKeyPGP)) == 0)
 

#define LazarusLength   15
 

#define LONG   long
 

#define LOOPBACK_ENABLED   1
 

#define LOOPBACK_PLAYING   2
 

#define LPC_FRAME_SIZE   160
 

#define Lrstring      ((LPSTR) rstring(n))
 

#define MAX_HOST   256
 

#define MAX_PRINTF_OUTPUT   1024
 

#define modemInputQueue   10240
 

#define modemOutputQueue   10240
 

#define NETFONE_COMMAND_PORT   2074
 

#define PROTOCOL_RTP   2
 

#define PROTOCOL_SPEAKFREE   0
 

#define PROTOCOL_UNKNOWN   4
 

#define PROTOCOL_VAT   1
 

#define PROTOCOL_VATRTP_CRYPT   3
 

#define RANT_ON_ERROR
 

#define REMEMBER_CONNECTIONS   5
 

#define RTCP_APP_TEXT_CHAT   "SFtc"
 

#define SPEAK_FREE_FRAME_CLASS   "SpeakFreeFrameClass"
 

#define TIMEOUT_AUDIO_OUTPUT   4
 

#define TIMEOUT_CONNECTION   30
 

#define TIMEOUT_RESEND_LWL   (119)
 

#define TIMEOUT_RESEND_SDES   10
 

#define TRAY
 

#define TRAY_TIMER_ID   7
 

#define V   (void)
 

#define WINDOW_TYPE_CLIENT   1
 

#define WM_CHAT_TEXT_SEND   (WM_USER + 1004)
 

#define WM_CLEAN_UP_YOUR_ACT   (WM_USER + 104)
 

#define WM_COMMAND_ID      (LOWORD(x))
 

#define WM_COMMAND_NOTIFY   (HIWORD(wParam))
 

#define WM_NEW_COMMANDLINE   (WM_USER + 200)
 

#define WM_SOCKET_ASYNC   (WM_USER + 101)
 

#define WM_SOCKET_CONTROL   (WM_USER + 103)
 

#define WM_SOCKET_LWL   (WM_USER + 102)
 

#define WM_SOCKET_SELECT   (WM_USER + 100)
 

#define WM_TRAY_NOTIFY   (WM_USER + 300)
 


Typedef Documentation

typedef struct _CLIENT_DATA CLIENT_DATA
 

typedef enum _CLIENT_STATE CLIENT_STATE
 

typedef struct _CLIENT_DATA * LPCLIENT_DATA
 

typedef WORD PORT
 

typedef struct ratestuff rate_t
 

typedef INT SOCKERR
 

typedef WORD SOCKEVENT
 

typedef struct soundbuf soundbuf
 


Enumeration Type Documentation

enum _CLIENT_STATE
 

Enumeration values:
Embryonic 
Idle 
SendingLiveAudio 
Transferring 
PlayingReceivedAudio 

enum audio_encoding_t
 

Enumeration values:
AE_PCMU 
AE_PCMA 
AE_G721 
AE_IDVI 
AE_G723 
AE_GSM 
AE_1016 
AE_LPC 
AE_L8 
AE_L16 
AE_L24 
AE_L32 
AE_G728 
AE_TRUE 
AE_MAX 

enum public_key_package
 

Enumeration values:
Unspecified 
PGP 
GPG 


Function Documentation

VOID aboutDialogue HWND    hwndParent
 

void adpcmdecomp struct soundbuf   sb
 

void AES_cbc_decrypt unsigned char *    in,
unsigned char *    out,
int    len,
aes_ctx *    ctx
 

void AES_cbc_encrypt unsigned char *    in,
unsigned char *    out,
int    len,
aes_ctx *    ctx
 

unsigned char alaw2ulaw unsigned char    aval
 

void answerClose void   
 

VOID answerDialogue HWND    hwndParent
 

BOOL CALLBACK answerDlgProc HWND    hwnd,
UINT    nMessage,
WPARAM    wParam,
LPARAM    lParam
 

int answerEnabled void   
 

int answerOpen void   
 

void answerSave struct in_addr    IPaddr,
LPSTR    hostName,
soundbuf   sb
 

void answerSync void   
 

VOID benchDialogue HWND    hwndParent
 

void blinkTrayIcon BOOL    blink
 

VOID chatDialogue HWND    hwndParent
 

BOOL CALLBACK chatDlgProc HWND    hwnd,
UINT    nMessage,
WPARAM    wParam,
LPARAM    lParam
 

void chatLog HWND    hwnd,
char *    ident,
char *    text
 

void closeFaceFile void   
 

void compress2X soundbuf   asb
 

VOID connectionProperties HWND    hwnd,
LPCLIENT_DATA    d
 

LRESULT CALLBACK connectWndProc HWND    hwnd,
UINT    nMessage,
WPARAM    wParam,
LPARAM    lParam
 

void connFetchFace HWND    hwndClient,
LPCLIENT_DATA    pClientData
 

VOID consoleDialogue HWND    hwndParent
 

BOOL CALLBACK consoleDlgProc HWND    hwnd,
UINT    nMessage,
WPARAM    wParam,
LPARAM    lParam
 

void consoleLog char *    text
 

void copySDESitem char *    s,
char *    d
 

void cPrintf LPCSTR    lpFormat,
...   
 

HWND createNewConnection LPCLIENT_DATA    pClientData
 

SOCKERR CreateSocket SOCKET *    psock,
INT    type,
ULONG    address,
PORT    port
 

void createSoundBuffer LPSTR    buffer,
WORD    buflen,
DWORD    channels,
DWORD    rate,
DWORD    bytesec,
WORD    align
 

HWND createTrayIcon void   
 

void decodeAnswerPacket soundbuf   d,
int    bitsPerSample,
int    samplesPerSecond,
LPSTR *    pcmData,
DWORD *    pcmLength
 

void DefaultMessageLoop  
 

VOID displayHelpTopic int    topicResID
 

VOID displayHelpTopicString LPCSTR    topicStr
 

int faceDialogue HWND    hWndParent
 

BOOL CALLBACK faceDlgProc HWND    hwnd,
UINT    nMessage,
WPARAM    wParam,
LPARAM    lParam
 

LRESULT CALLBACK Frame_WndProc HWND    hwnd,
UINT    nMessage,
WPARAM    wParam,
LPARAM    lParam
 

VOID genKeyDialogue HWND    hwnd
 

LPBYTE GIFtoBMP LPBYTE    gif,
int    imageNumber
 

BOOL InitApplication HINSTANCE    hInstance
 

BOOL InitInstance HINSTANCE    hInstance,
LPSTR    pszCmdLine,
INT    nCmdShow
 

int inputSampleCount void   
 

int isRTCPAPPpacket unsigned char *    p,
int    len,
char *    name,
unsigned char **    app_ptr
 

int isRTCPByepacket unsigned char *    p,
int    len
 

int isrtp unsigned char *    pkt,
int    len
 

int isValidRTCPpacket unsigned char *    p,
int    len
 

int isvat unsigned char *    pkt,
int    len
 

BOOL IsVoxMonitorMessage MSG *    pmsg
 

BOOL IsVoxMonitorOn  
 

BOOL loop_control_port LPCLIENT_DATA    d
 

void loop_flush LPCLIENT_DATA    d
 

int loop_recvfrom LPCLIENT_DATA    d,
char *    buf,
int    len,
struct sockaddr *    from,
int *    fromlen
 

int loop_samples LPCLIENT_DATA    d
 

int loop_sendto LPCLIENT_DATA    d,
const char *    buf,
int    len,
const struct sockaddr *    to,
int    tolen
 

int lpc10decode unsigned char *    in,
unsigned char *    out,
int    inlen
 

int lpc10encode unsigned char *    in,
unsigned char *    out,
int    inlen
 

void lpc10init void   
 

VOID lwl_ask HWND    hwnd
 

void lwl_ask_set_target const char *    target
 

int lwl_reconnect HWND    hDlg
 

VOID lwl_tell_settings HWND    hwnd
 

int makeInternalEncryptionKeys HWND    hwnd,
LPCLIENT_DATA    d
 

int makevatdone unsigned char *    v,
unsigned long    ssrc_i
 

int makeVATid char **    vp,
unsigned long    ssrc_i
 

void modemRant HWND    hwnd
 

VOID modemSetupDialogue HWND    hwnd
 

INT MsgBox HWND    hwndParent,
UINT    fuType,
LPSTR    pszFormat,
...   
 

VOID multicastGroupsDialogue HWND    hwnd
 

void multicastJoin HWND    hwnd,
int    join
 

VOID newConnection HWND    hwnd,
LPSTR    connectionFile,
LPSTR    knownHost
 

BOOL newHostDialogue HWND    hwndParent,
LPSTR    pszHostName,
LPIN_ADDR    paddr,
unsigned short *    port
 

int obtainOutput HWND    hwnd
 

int openFaceFile HWND    hwnd
 

void ParseCommandLine HWND    hwnd,
LPSTR    pszCmdLine
 

int parseSDES unsigned char *    packet,
struct rtcp_sdes_request   r
 

void playSound HWND    hWnd,
LPCLIENT_DATA    pClientData,
soundbuf   d,
int    bitsPerSample,
int    samplesPerSecond
 

void processFaceData HWND    hwnd,
LPCLIENT_DATA    c,
soundbuf   d
 

void processFaceRequest soundbuf   d
 

void propeller int    control,
DWORD    value
 

VOID propellerHeadDialogue HWND    hwndParent
 

BOOL CALLBACK propellerHeadDlgProc HWND    hwnd,
UINT    nMessage,
WPARAM    wParam,
LPARAM    lParam
 

void propUpdateAudio void   
 

void rate_flow rate_t   rate,
unsigned char *    ibuf,
unsigned char *    obuf,
int *    isamp,
int *    osamp
 

void rate_start rate_t   rate,
int    inrate,
int    outrate
 

int readWaveInit HWND    hwndApp,
LPCLIENT_DATA    d,
LPSTR    szFileName
 

int readWaveNext HWND    hwnd,
LPCLIENT_DATA    d
 

void readWaveTerm LPCLIENT_DATA    d
 

SOCKERR ResetSocket SOCKET    sock
 

void revlong long *    l
 

void revshort short *    s
 

char* rfilter int    resid
 

char* rstring int    resid
 

int rtp_make_app unsigned char *    p,
unsigned long    ssrc_i,
int    strict,
char *    type,
char *    content
 

int rtp_make_bye unsigned char *    p,
unsigned long    ssrc_i,
char *    raison,
int    strict
 

int rtp_make_sdes char **    pkt,
unsigned long    ssrc_i,
int    port,
int    exact,
int    strict
 

LONG rtpout soundbuf   sb,
unsigned long    ssrc_i,
unsigned long    timestamp_i,
unsigned short    seq_i,
int    spurt
 

int sendLwlMessage HWND    hDlg,
int    dobye
 

void sessionKeyGenerate LPSTR    key,
BOOL    binary
 

void SetICQData HKEY    hSpeakFreelyKey,
char *    szSpeakFreelyPath
 

void SetupICQ void   
 

void shipSoundBuffer HWND    hwnd,
LPCLIENT_DATA    pClientData
 

LPSTR SockerrToString SOCKERR    serr
 

VOID spectralDialogue HWND    hwndParent
 

BOOL CALLBACK spectralDlgProc HWND    hwnd,
UINT    nMessage,
WPARAM    wParam,
LPARAM    lParam
 

double spectrum short *    samples,
int    nsamples,
double *    ps,
int    nfreqs,
double    maxpwr
 

void spectrumEnd void   
 

void spectrumUpdate LPSTR    buffer,
WORD    buflen,
DWORD    channels,
DWORD    rate,
DWORD    bytesec,
WORD    align,
BOOL    isInput
 

VOID startSoundFile HWND    hwnd,
LPSTR    pszFile
 

int startWaveInput HWND    hwnd
 

void string_DES_key LPSTR    key,
LPBYTE    des_key,
char    algorithm[16]
 

void terminateWaveInput void   
 

void updateTrayToolTipText void   
 

LONG vatout soundbuf   sb,
unsigned long    ssrc_i,
unsigned long    timestamp_i,
int    spurt
 

void vcPrintf LPCSTR    lpFormat,
va_list    arglist
 

BOOL voxMonitorDialog HWND    hwndParent
 

void voxMonitorUpdate long    nAudio,
long    nVox
 

VOID WinPrintf HDC    hdc,
INT    row,
INT    col,
LPSTR    pszFormat,
...   
 

void xd void *    buf,
int    bufl,
int    dochar
 


Variable Documentation

int aboutInBits
 

int aboutInSamples
 

int aboutOutBits
 

int aboutOutSamples
 

int aboutUDPmax
 

int adpcmcompress
 

int alwaysBindSocket
 

char answerFileName[MAX_PATH]
 

char answerOutFileName[MAX_PATH]
 

int answerRecord
 

struct auxSocket* asList
 

int audioChannels
 

char baudrate[12]
 

int bConferencing
 

int bitsPerSample
 

char blankit[]
 

HCURSOR boltCursor
 

int breakinput
 

int broadcasting
 

int bytesPerSecond
 

int celpcompress
 

LPSTR commandLine
 

char commport[12]
 

int compression
 

int currentInputSamples
 

int currentOutputRate
 

HCURSOR earCursor
 

soundbuf ebuf
 

HFILE faceFile
 

char faceFileName[MAX_PATH]
 

int faceShow
 

char* fileHelpKey
 

UINT fileOpenHelpButton
 

int gsmcompress
 

gsm gsmh
 

HACCEL hAccel
 

int halfDuplex
 

int halfDuplexTransition
 

HWND hDlgAnswer
 

HWND hDlgChat
 

HWND hDlgConsole
 

HWND hDlgPropeller
 

HWND hDlgSpectral
 

HINSTANCE hInst
 

int holped
 

DWORD HtmlHelpContext
 

HWAVEIN hWaveIn
 

HWAVEOUT hWaveOut
 

HWND hwndMDIClient
 

HWND hwndMDIFrame
 

int inputActive
 

long inputPacketsLost
 

int inputPaused
 

int isWaveSound
 

UINT jitterBuf
 

BOOL jitterPause
 

u_long Lazarus
 

int LazarusLong
 

int listeners
 

struct sockaddr_in lookhost
 

int lpc10compress
 

int lpccompress
 

int lwl_a_exact
 

char lwl_a_server[MAX_PATH]
 

char lwl_s_email[80]
 

int lwl_s_exact
 

char lwl_s_fullname[80]
 

char lwl_s_location[80]
 

char lwl_s_phone[80]
 

int lwl_s_publish
 

char lwl_s_server[MAX_PATH]
 

int lwl_t_pending
 

int lwl_t_published
 

int lwl_t_resend
 

long messageChecks
 

int messageQueueSize
 

long microsecondsPending
 

int modemEnable
 

int modemHandle
 

char modemInitString[128]
 

int modemSessions
 

int modemShowRant
 

int multiBrainDead
 

int multiLoop
 

int multiMemberships
 

int netMaxSamples
 

int openConnections
 

int openOnAnswerMessage
 

int outputActive
 

int outputInShutdown
 

long outputPacketsLost
 

long outputPending
 

long packetsReceived
 

long packetsSent
 

HCURSOR phoneCursor
 

public_key_package pk_package
 

int protocolAuto
 

int protocolSent
 

int protocolXmit
 

LPSTR pszAppName
 

LPSTR pszClientClass
 

LPSTR pszFrameClass
 

LPSTR pszMDIClientClass
 

LPSTR rememberedConnection[REMEMBER_CONNECTIONS]
 

int rememberedConnections
 

int robust
 

unsigned long rtpdesrand
 

char* rtpsdes
 

int rtpsdesl
 

int sampleAlignment
 

int samplesPerSecond
 

SOCKET sCommand
 

char* sdes
 

int sdesl
 

unsigned short seq
 

double smoothedMicrosecondsPending
 

BOOL spectrumBarGraph
 

BOOL spectrumMaxEnergy
 

BOOL spectrumReceiveOnly
 

BOOL spectrumTransmitOnly
 

BOOL spectrumVoicePrint
 

int spurt
 

unsigned long ssrc
 

unsigned long timestamp
 

INT tmAveCharWidth
 

INT tmHeight
 

HWND trayIconWindow
 

int useSendNotSendto
 

char* vatid
 

int vatidl
 

int voxcompress
 

int voxmode
 

int waAudio11025
 

int waAudioBeepOnTransmit
 

int waAudioHalf
 

int waAudioNoOutputRateAdjustment
 

int waAudioRingMaxVolume
 

int waNetMultiTTLisChar
 

int waNetNoConnect
 

int waNetNoMsgLoopIns
 

int waNetNoOutOverflow
 

int waNetSynchronousGetHostname
 

int waNetSynchronousGetHostnameAction
 

int waNetUseSend
 

int waProtNoHeartbeat
 

int waProtNoRTCPCrypt
 

int waProtNoRTP
 

int waProtNoVAT
 

int waProtUseLargerRTCPackets
 

rate_t xrate
 


Generated on Tue Feb 10 08:26:36 2004 for Speak-FreelyforWindows by doxygen1.2.18