[xiph-cvs] cvs commit: icecast/win32/res Icecast2win.rc2
Michael Smith
msmith at xiph.org
Fri Aug 9 08:55:03 PDT 2002
msmith 02/08/09 11:55:02
Modified: . AUTHORS TODO
conf Makefile.am icecast.xml
web status.xsl
Added: win32 ConfigTab.cpp ConfigTab.h Icecast2win.cpp
Icecast2win.dsp Icecast2win.dsw Icecast2win.h
Icecast2win.rc Icecast2winDlg.cpp Icecast2winDlg.h
ResizableDialog.cpp ResizableDialog.h StatsTab.cpp
StatsTab.h Status.cpp Status.h StdAfx.cpp StdAfx.h
TabCtrlSSL.cpp TabCtrlSSL.h TabPageSSL.cpp
TabPageSSL.h black.bmp colors.h icecast.dsp
icecast.ico icecast.xml resource.h running.bmp
stopped.bmp
win32/res Icecast2win.rc2
Log:
oddsock's win32 port/GUI
Revision Changes Path
1.2 +3 -0 icecast/AUTHORS
Index: AUTHORS
===================================================================
RCS file: /usr/local/cvsroot/icecast/AUTHORS,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AUTHORS 10 Sep 2001 02:21:48 -0000 1.1
+++ AUTHORS 9 Aug 2002 15:55:01 -0000 1.2
@@ -1 +1,4 @@
Jack Moffitt <jack at icecast.org>
+Michael Smith <msmith at icecast.org>
+oddsock <oddsock at oddsock.org>
+
<p><p>1.5 +2 -8 icecast/TODO
Index: TODO
===================================================================
RCS file: /usr/local/cvsroot/icecast/TODO,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TODO 5 Aug 2002 14:48:00 -0000 1.4
+++ TODO 9 Aug 2002 15:55:01 -0000 1.5
@@ -2,15 +2,9 @@
----
- stats get off? this needs testing more testing.
-- seem to be some segfaults in httpp still. in a few of the cores i've
- been sent, the avl_tree is null when calling into the avl module.
-
-- ensure we don't connect a source if the fd would be more then FD_SETSIZE
- (1024, on linux). Otherwise memory gets overrun, and crashes result.
- Preferably allow using poll() instead of select() through a lightweight
- abstraction.
-
+- autoconf doesn't set HAS_POLL
+- automake isn't installing things (conf, web) correctly.
FEATURES
<p><p>1.2 +2 -2 icecast/conf/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/icecast/conf/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Makefile.am 10 Sep 2001 02:55:41 -0000 1.1
+++ Makefile.am 9 Aug 2002 15:55:01 -0000 1.2
@@ -5,8 +5,8 @@
EXTRA_DIST = icecast.xml
debug:
- $(MAKE) all CFLAGS="@DEBUG@"
+ $(MAKE) all CFLAGS="@DEBUG@"
profile:
- $(MAKE) all CFLAGS="@PROFILE@"
+ $(MAKE) all CFLAGS="@PROFILE@"
<p><p>1.9 +1 -1 icecast/conf/icecast.xml
Index: icecast.xml
===================================================================
RCS file: /usr/local/cvsroot/icecast/conf/icecast.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- icecast.xml 9 Aug 2002 08:11:36 -0000 1.8
+++ icecast.xml 9 Aug 2002 15:55:01 -0000 1.9
@@ -32,7 +32,7 @@
<paths>
<basedir>/usr/local/icecast</basedir>
<logdir>/tmp</logdir>
- <webroot>/usr/local/icecast/webroot</webroot>
+ <webroot>/usr/local/icecast/web</webroot>
</paths>
<logging>
<p><p>1.2 +12 -2 icecast/web/status.xsl
Index: status.xsl
===================================================================
RCS file: /usr/local/cvsroot/icecast/web/status.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- status.xsl 9 Aug 2002 15:41:44 -0000 1.1
+++ status.xsl 9 Aug 2002 15:55:01 -0000 1.2
@@ -94,7 +94,7 @@
</td>
<td>
<font class="default2">
-<b><xsl:value-of select="description" /></b>
+<b><xsl:value-of select="name" /></b>
</font>
</td>
</tr>
@@ -104,7 +104,17 @@
</td>
<td>
<font class="default2">
-<b></b>
+<b><xsl:value-of select="genre" /></b>
+</font>
+</td>
+</tr>
+<tr>
+<td width="100" >
+<font class="default1">Stream Description: </font>
+</td>
+<td>
+<font class="default2">
+<b><xsl:value-of select="description" /></b>
</font>
</td>
</tr>
<p><p>1.1 icecast/win32/ConfigTab.cpp
Index: ConfigTab.cpp
===================================================================
// ConfigTab.cpp : implementation file
//
#include "stdafx.h"
#include "Icecast2win.h"
#include "ConfigTab.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CConfigTab dialog
<p>CConfigTab::CConfigTab(CWnd* pParent /*=NULL*/)
: CTabPageSSL(CConfigTab::IDD, pParent)
{
//{{AFX_DATA_INIT(CConfigTab)
m_Config = _T("");
//}}AFX_DATA_INIT
}
<p>void CConfigTab::DoDataExchange(CDataExchange* pDX)
{
CTabPageSSL::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CConfigTab)
DDX_Control(pDX, IDC_CONFIG, m_ConfigCtrl);
DDX_Text(pDX, IDC_CONFIG, m_Config);
//}}AFX_DATA_MAP
}
<p>BEGIN_MESSAGE_MAP(CConfigTab, CTabPageSSL)
//{{AFX_MSG_MAP(CConfigTab)
ON_EN_KILLFOCUS(IDC_CONFIG, OnKillfocusConfig)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CConfigTab message handlers
void CConfigTab::SaveConfiguration()
{
// TODO: Add your command handler code here
// TODO: Add your control notification handler code here
FILE *filep;
char buffer[2046] = "";
CIcecast2winApp *myApp = (CIcecast2winApp *)AfxGetApp();
UpdateData(TRUE);
if (m_Config != "") {
filep = fopen(myApp->m_configFile, "w");
if (filep) {
fputs(LPCSTR(m_Config), filep);
fclose(filep);
}
}
}
BOOL CConfigTab::OnInitDialog()
{
CTabPageSSL::OnInitDialog();
// TODO: Add extra initialization here
AddAnchor(IDC_CONFIG, TOP_LEFT, BOTTOM_RIGHT);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CConfigTab::OnKillfocusConfig()
{
// TODO: Add your control notification handler code here
SaveConfiguration();
}
<p><p>1.1 icecast/win32/ConfigTab.h
Index: ConfigTab.h
===================================================================
#if !defined(AFX_CONFIGTAB_H__D8B0CC28_59FA_44E8_91A4_377C64F67DCF__INCLUDED_)
#define AFX_CONFIGTAB_H__D8B0CC28_59FA_44E8_91A4_377C64F67DCF__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ConfigTab.h : header file
//
#include "TabPageSSL.h"
/////////////////////////////////////////////////////////////////////////////
// CConfigTab dialog
class CConfigTab : public CTabPageSSL
{
// Construction
public:
void SaveConfiguration();
CConfigTab(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CConfigTab)
enum { IDD = IDD_CONFIGDIALOG };
CEdit m_ConfigCtrl;
CString m_Config;
//}}AFX_DATA
<p>// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CConfigTab)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CConfigTab)
virtual BOOL OnInitDialog();
afx_msg void OnKillfocusConfig();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CONFIGTAB_H__D8B0CC28_59FA_44E8_91A4_377C64F67DCF__INCLUDED_)
<p><p>1.1 icecast/win32/Icecast2win.cpp
Index: Icecast2win.cpp
===================================================================
// Icecast2win.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "Icecast2win.h"
#include "Icecast2winDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CIcecast2winApp
BEGIN_MESSAGE_MAP(CIcecast2winApp, CWinApp)
//{{AFX_MSG_MAP(CIcecast2winApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
#include "colors.h"
/////////////////////////////////////////////////////////////////////////////
// CIcecast2winApp construction
CIcecast2winApp::CIcecast2winApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CIcecast2winApp object
CIcecast2winApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CIcecast2winApp initialization
BOOL CIcecast2winApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
if (strlen(m_lpCmdLine) > 0) {
strcpy(m_configFile, m_lpCmdLine);
}
else {
strcpy(m_configFile, ".\\icecast.xml");
}
<p><p>#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CIcecast2winDlg dlg;
m_pMainWnd = &dlg;
// SetDialogBkColor(BGCOLOR,TEXTCOLOR);
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
<p><p>1.1 icecast/win32/Icecast2win.dsp
Index: Icecast2win.dsp
===================================================================
# Microsoft Developer Studio Project File - Name="Icecast2win" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=Icecast2win - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "Icecast2win.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "Icecast2win.mak" CFG="Icecast2win - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Icecast2win - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "Icecast2win - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "Icecast2win - Win32 Release"
# PROP BASE Use_MFC 5
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 5
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../" /I "../../libxslt/include" /I "../../iconv/include" /I "../../libxml2/include" /I "../src" /I "../src/httpp" /I "../src/thread" /I "../src/log" /I "../src/avl" /I "../src/net" /I "src/timings" /I "../../pthreads" /I "../../ogg/include" /I "../../vorbis/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
# ADD LINK32 Releaseicecast\icecast.lib ..\..\ogg\win32\Static_Release\ogg_static.lib ..\..\vorbis\win32\Vorbis_Static_Release\vorbis_static.lib ..\..\libxml2\lib\libxml2.lib ..\..\libxslt\lib\libxslt.lib ..\..\iconv\lib\iconv.lib ..\..\pthreads\pthreadVSE.lib ws2_32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /out:"Release/Icecast2.exe"
!ELSEIF "$(CFG)" == "Icecast2win - Win32 Debug"
# PROP BASE Use_MFC 5
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../" /I "../../libxslt/include" /I "../../iconv/include" /I "../../libxml2/include" /I "../src" /I "../src/httpp" /I "../src/thread" /I "../src/log" /I "../src/avl" /I "../src/net" /I "src/timings" /I "../../pthreads" /I "../../ogg/include" /I "../../vorbis/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_WIN32" /D "_AFXDLL" /FD /GZ /c
# SUBTRACT CPP /YX /Yc /Yu
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 Debugicecast\icecast.lib ..\..\..\ogg\win32\Static_Debug\ogg_static_d.lib ..\..\..\vorbis\win32\Vorbis_Static_Debug\vorbis_static_d.lib ..\..\libxml2\lib\libxml2.lib ..\..\libxslt\lib\libxslt.lib ..\..\iconv\lib\iconv.lib ..\..\pthreads\pthreadVSE.lib ws2_32.lib winmm.lib /nologo /subsystem:windows /incremental:no /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"LIBCMTD.lib" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "Icecast2win - Win32 Release"
# Name "Icecast2win - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\ConfigTab.cpp
# End Source File
# Begin Source File
SOURCE=.\Icecast2win.cpp
# End Source File
# Begin Source File
SOURCE=.\Icecast2win.rc
# End Source File
# Begin Source File
SOURCE=.\Icecast2winDlg.cpp
# End Source File
# Begin Source File
SOURCE=.\ResizableDialog.cpp
# End Source File
# Begin Source File
SOURCE=.\ResizableDialog.h
# End Source File
# Begin Source File
SOURCE=.\StatsTab.cpp
# End Source File
# Begin Source File
SOURCE=.\Status.cpp
# End Source File
# Begin Source File
SOURCE=.\StdAfx.cpp
# ADD CPP /Yc"stdafx.h"
# End Source File
# Begin Source File
SOURCE=.\TabCtrlSSL.cpp
# End Source File
# Begin Source File
SOURCE=.\TabCtrlSSL.h
# End Source File
# Begin Source File
SOURCE=.\TabPageSSL.cpp
# End Source File
# Begin Source File
SOURCE=.\TabPageSSL.h
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\colors.h
# End Source File
# Begin Source File
SOURCE=.\ConfigTab.h
# End Source File
# Begin Source File
SOURCE=.\Icecast2win.h
# End Source File
# Begin Source File
SOURCE=.\Icecast2winDlg.h
# End Source File
# Begin Source File
SOURCE=.\Resource.h
# End Source File
# Begin Source File
SOURCE=.\StatsTab.h
# End Source File
# Begin Source File
SOURCE=.\Status.h
# End Source File
# Begin Source File
SOURCE=.\StdAfx.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=.\bitmap1.bmp
# End Source File
# Begin Source File
SOURCE=.\bitmap2.bmp
# End Source File
# Begin Source File
SOURCE=.\black.bmp
# End Source File
# Begin Source File
SOURCE=.\cursor1.cur
# End Source File
# Begin Source File
SOURCE=.\cursor2.cur
# End Source File
# Begin Source File
SOURCE=.\green1.ico
# End Source File
# Begin Source File
SOURCE=.\icecast.ico
# End Source File
# Begin Source File
SOURCE=.\Icecast2.ico
# End Source File
# Begin Source File
SOURCE=.\res\Icecast2.ico
# End Source File
# Begin Source File
SOURCE=.\icecast2logo.bmp
# End Source File
# Begin Source File
SOURCE=.\icecast2logo2.bmp
# End Source File
# Begin Source File
SOURCE=.\res\Icecast2win.ico
# End Source File
# Begin Source File
SOURCE=.\res\Icecast2win.rc2
# End Source File
# Begin Source File
SOURCE=.\ico00001.ico
# End Source File
# Begin Source File
SOURCE=.\icon1.ico
# End Source File
# Begin Source File
SOURCE=.\icon2.ico
# End Source File
# Begin Source File
SOURCE=.\running.bmp
# End Source File
# Begin Source File
SOURCE=.\stopped.bmp
# End Source File
# End Group
# Begin Source File
SOURCE=.\ReadMe.txt
# End Source File
# End Target
# End Project
<p><p>1.1 icecast/win32/Icecast2win.dsw
Index: Icecast2win.dsw
===================================================================
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "Icecast2win"=.\Icecast2win.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name libxml
End Project Dependency
Begin Project Dependency
Project_Dep_Name icecast
End Project Dependency
Begin Project Dependency
Project_Dep_Name ogg_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name vorbis_static
End Project Dependency
}}}
###############################################################################
Project: "icecast"=.\icecast.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "ogg_static"=..\..\ogg\win32\ogg_static.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "vorbis_static"=..\..\vorbis\win32\vorbis_static.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
<p><p><p>1.1 icecast/win32/Icecast2win.h
Index: Icecast2win.h
===================================================================
// Icecast2win.h : main header file for the ICECAST2WIN application
//
#if !defined(AFX_ICECAST2WIN_H__76A528C9_A424_4417_BFDF_0E556A9EE4F1__INCLUDED_)
#define AFX_ICECAST2WIN_H__76A528C9_A424_4417_BFDF_0E556A9EE4F1__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
/////////////////////////////////////////////////////////////////////////////
// CIcecast2winApp:
// See Icecast2win.cpp for the implementation of this class
//
class CIcecast2winApp : public CWinApp
{
public:
char m_configFile[1024];
CIcecast2winApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CIcecast2winApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CIcecast2winApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
<p>/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ICECAST2WIN_H__76A528C9_A424_4417_BFDF_0E556A9EE4F1__INCLUDED_)
<p><p>1.1 icecast/win32/Icecast2win.rc
Index: Icecast2win.rc
===================================================================
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
"#define _AFX_NO_OLE_RESOURCES\r\n"
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
"\r\n"
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
"#ifdef _WIN32\r\n"
"LANGUAGE 9, 1\r\n"
"#pragma code_page(1252)\r\n"
"#endif //_WIN32\r\n"
"#include ""res\\Icecast2win.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
"#include ""afxres.rc"" // Standard components\r\n"
"#endif\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
<p>/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About Icecast2win"
FONT 8, "MS Sans Serif"
BEGIN
ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20
LTEXT "Icecast 2 Win32",IDC_STATIC,40,10,119,8,SS_NOPREFIX
DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP
END
IDD_ICECAST2WIN_DIALOG DIALOGEX 0, 0, 318, 249
STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION |
WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_APPWINDOW
CAPTION "icecast2"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
CONTROL "Tab1",IDC_MAINTAB,"SysTabControl32",0x0,0,48,318,201
PUSHBUTTON "Start Server",IDC_START,17,31,56,14
CONTROL "Start Server on Application Startup",IDC_AUTOSTART,
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,76,
29,81,17
CONTROL 159,IDC_STATIC,"Static",SS_BITMAP,0,0,117,20
CONTROL 151,IDC_SERVERSTATUS,"Static",SS_BITMAP,253,28,65,18,
WS_EX_CLIENTEDGE
RTEXT "Server Status",IDC_STATIC_SS,163,28,86,14
CONTROL 150,IDC_STATICBLACK,"Static",SS_BITMAP,116,0,200,20
END
IDD_SSTATUS DIALOG DISCARDABLE 0, 0, 320, 210
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "",IDC_FILLER2,0,199,319,11
CONTROL "List1",IDC_GLOBALSTAT_LIST,"SysListView32",LVS_REPORT |
WS_BORDER | WS_TABSTOP,9,34,300,147
CTEXT "Global Statistics",IDC_STATIC_GS,9,9,300,21
LTEXT "Server Has Been Running For ",IDC_STATIC_RUN,46,184,100,
8
LTEXT "",IDC_RUNNINGFOR,149,184,156,8
END
IDD_CONFIGDIALOG DIALOG DISCARDABLE 0, 0, 320, 210
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
EDITTEXT IDC_CONFIG,0,0,320,210,ES_MULTILINE | ES_AUTOVSCROLL |
ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL
END
IDD_STATSDIALOG DIALOG DISCARDABLE 0, 0, 320, 210
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "List1",IDC_STATSLIST,"SysListView32",LVS_REPORT |
WS_BORDER | WS_TABSTOP,142,34,149,160
CONTROL "List2",IDC_SOURCELIST,"SysListView32",LVS_REPORT |
WS_BORDER | WS_TABSTOP,9,34,111,159
LTEXT "",IDC_FILLER1,0,199,320,11
CTEXT "Source Level Statistics",IDC_STATIC_SLS,9,7,300,15
LTEXT "Click source to view statistics",IDC_STATIC,18,25,111,8
END
<p>#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "Icecast2win MFC Application\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "Icecast2win\0"
VALUE "LegalCopyright", "Copyright (C) 2001\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "Icecast2win.EXE\0"
VALUE "ProductName", "Icecast2win Application\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
<p>/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_ABOUTBOX, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 228
TOPMARGIN, 7
BOTTOMMARGIN, 48
END
END
#endif // APSTUDIO_INVOKED
<p>/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
IDB_BITMAP4 BITMAP DISCARDABLE "black.bmp"
IDB_BITMAP5 BITMAP DISCARDABLE "stopped.bmp"
IDB_BITMAP6 BITMAP DISCARDABLE "running.bmp"
IDB_BITMAP7 BITMAP DISCARDABLE "icecast2logo2.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME ICON DISCARDABLE "icecast.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//
IDR_MENU2 MENU DISCARDABLE
BEGIN
POPUP "Popup"
BEGIN
MENUITEM "Add To Global Stat List", ID_POPUP_ADDTOGLOBALSTATLIST
END
END
IDR_MENU3 MENU DISCARDABLE
BEGIN
POPUP " "
BEGIN
MENUITEM "Delete From Global Stats", ID__DELETEFROMGLOBALSTATS
END
END
<p>/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_ABOUTBOX "&About Icecast2win..."
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
<p><p>#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif //_WIN32
#include "res\Icecast2win.rc2" // non-Microsoft Visual C++ edited resources
#include "afxres.rc" // Standard components
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
<p><p><p>1.1 icecast/win32/Icecast2winDlg.cpp
Index: Icecast2winDlg.cpp
===================================================================
// Icecast2winDlg.cpp : implementation file
//
#include "stdafx.h"
#include "Icecast2win.h"
#include "Icecast2winDlg.h"
#include <process.h>
#include "ResizableDialog.h"
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <stdlib.h>
extern "C" {
#include "thread.h"
#include "avl.h"
#include "log.h"
#include "global.h"
#include "httpp.h"
#include "sock.h"
#include "connection.h"
#include "refbuf.h"
#include "client.h"
#include "stats.h"
}
<p>#include <afxinet.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
CEdit *g_accessControl;
CEdit *g_errorControl;
CIcecast2winDlg *g_mainDialog;
bool g_tailAccess = false;
bool g_tailError = false;
void CollectStats(stats_event_t *event);
CString gConfigurationSave;
#define MAXSTATSPERSOURCE 30
#define MAXSOURCES 1024
typedef struct tagElement {
CString name;
CString value;
} Element;
typedef struct tagElementAdditional {
CString source;
CString name;
CString value;
} ElementAdditional;
<p>typedef struct tagMainElement {
// char source[1024];
CString source;
long numStats;
Element stats[MAXSTATSPERSOURCE];
} MainElement;
typedef struct tagMainElementAdditional {
long numStats;
ElementAdditional stats[MAXSTATSPERSOURCE];
} MainElementAdditional;
<p>MainElement gStats[MAXSOURCES];
MainElement gGlobalStats;
MainElementAdditional gAdditionalGlobalStats;
long numMainStats;
extern "C" {
int main(int argc, char **argv);
}
void AddToAdditionalGlobalStats(CString source, CString name) {
int foundit = 0;
for (int i=0;i<gAdditionalGlobalStats.numStats;i++) {
if ((gAdditionalGlobalStats.stats[i].source == source) && (gAdditionalGlobalStats.stats[i].name == name)) {
foundit = 1;
break;
}
}
if (!foundit) {
gAdditionalGlobalStats.stats[gAdditionalGlobalStats.numStats].source = source;
gAdditionalGlobalStats.stats[gAdditionalGlobalStats.numStats].name = name;
gAdditionalGlobalStats.numStats++;
}
g_mainDialog->UpdateStatsLists();
}
void RemoveFromAdditionalGlobalStats(CString source, CString name) {
int foundit = 0;
for (int i=0;i<gAdditionalGlobalStats.numStats;i++) {
if ((gAdditionalGlobalStats.stats[i].source == source) && (gAdditionalGlobalStats.stats[i].name == name)) {
for (int j=i+1;j < gAdditionalGlobalStats.numStats;j++) {
gAdditionalGlobalStats.stats[j-1].name = gAdditionalGlobalStats.stats[j].name;
gAdditionalGlobalStats.stats[j-1].value = gAdditionalGlobalStats.stats[j].value;
gAdditionalGlobalStats.stats[j-1].source = gAdditionalGlobalStats.stats[j].source;
}
gAdditionalGlobalStats.numStats--;
break;
}
}
g_mainDialog->UpdateStatsLists();
}
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
class CAboutDlg : public CResizableDialog
{
public:
CAboutDlg();
// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CResizableDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CResizableDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAboutDlg, CResizableDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// No message handlers
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
<p>/////////////////////////////////////////////////////////////////////////////
// CIcecast2winDlg dialog
CIcecast2winDlg::CIcecast2winDlg(CWnd* pParent /*=NULL*/)
: CResizableDialog(CIcecast2winDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CIcecast2winDlg)
m_AccessEdit = _T("");
m_ErrorEdit = _T("");
m_ConfigEdit = _T("");
m_ServerStatus = _T("");
m_SourcesConnected = _T("");
m_NumClients = _T("");
m_StatsEdit = _T("");
m_Autostart = FALSE;
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CIcecast2winDlg::DoDataExchange(CDataExchange* pDX)
{
CResizableDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CIcecast2winDlg)
DDX_Control(pDX, IDC_STATIC_SS, m_SS);
DDX_Control(pDX, IDC_SERVERSTATUS, m_ServerStatusBitmap);
DDX_Control(pDX, IDC_START, m_StartButton);
DDX_Control(pDX, IDC_MAINTAB, m_MainTab);
DDX_Check(pDX, IDC_AUTOSTART, m_Autostart);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CIcecast2winDlg, CResizableDialog)
//{{AFX_MSG_MAP(CIcecast2winDlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_NOTIFY(TCN_SELCHANGE, IDC_MAINTAB, OnSelchangeMaintab)
ON_COMMAND(ID_FILE_EXIT, OnFileExit)
ON_WM_TIMER()
ON_COMMAND(ID_FILE_STARTSERVER, OnFileStartserver)
ON_COMMAND(ID_FILE_STOPSERVER, OnFileStopserver)
ON_BN_CLICKED(IDC_START, OnStart)
ON_WM_CLOSE()
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CIcecast2winDlg message handlers
#include "colors.h"
BOOL CIcecast2winDlg::OnInitDialog()
{
CResizableDialog::OnInitDialog();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
g_mainDialog = this;
// statsTab.SetDialogBkColor(BGCOLOR,TEXTCOLOR);
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
config_read();
statsTab.m_colSource0Width = m_colSource0Width;
statsTab.m_colStats0Width = m_colStats0Width;
statsTab.m_colStats1Width = m_colStats1Width;
statusTab.m_colStats0Width = m_colGStats0Width;
statusTab.m_colStats1Width = m_colGStats1Width;
statusTab.m_colStats2Width = m_colGStats2Width;
<p> configTab.Create(IDD_CONFIGDIALOG, this);
statsTab.Create(IDD_STATSDIALOG, this);
statusTab.Create(IDD_SSTATUS, this);
int nPageID = 0;
m_MainTab.AddSSLPage (_T("Server Status"), nPageID, (CTabPageSSL *)&statusTab);
nPageID++;
m_MainTab.AddSSLPage (_T("Configuration"), nPageID, (CTabPageSSL *)&configTab);
nPageID++;
m_MainTab.AddSSLPage (_T("Stats"), nPageID, (CTabPageSSL *)&statsTab);
nPageID++;
labelFont.CreateFont(24,0, 0, 0, FW_BOLD, 0, 0, 0, 0, OUT_TT_PRECIS, 0, PROOF_QUALITY, 0, "Arial");
runningBitmap.LoadBitmap(IDB_BITMAP6);
stoppedBitmap.LoadBitmap(IDB_BITMAP5);
m_SS.SetFont(&labelFont, TRUE);
UpdateData(FALSE);
LoadConfig();
AddAnchor(IDC_MAINTAB, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_STATICBLACK, TOP_LEFT, TOP_RIGHT);
EnableSaveRestore("icecast2win", "positions");
<p> if (m_Autostart) {
OnStart();
}
return TRUE; // return TRUE unless you set the focus to a control
}
void CIcecast2winDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CResizableDialog::OnSysCommand(nID, lParam);
}
}
// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.
void CIcecast2winDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CResizableDialog::OnPaint();
}
}
<p>// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CIcecast2winDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}
void CIcecast2winDlg::OnSelchangeMaintab(NMHDR* pNMHDR, LRESULT* pResult)
{
// TODO: Add your control notification handler code here
/*
if (m_MainTab.GetCurSel() == 0) {
EnableControl(IDC_NUMBER_CLIENTS);
EnableControl(IDC_SERVERSTATUS);
EnableControl(IDC_SOURCES_CONNECTED);
m_ConfigEditCtrl.ShowWindow(SW_HIDE);
m_StatsEditCtrl.ShowWindow(SW_HIDE);
}
if (m_MainTab.GetCurSel() == 99) {
DisableControl(IDC_NUMBER_CLIENTS);
DisableControl(IDC_SERVERSTATUS);
DisableControl(IDC_SOURCES_CONNECTED);
m_ConfigEditCtrl.ShowWindow(SW_HIDE);
m_StatsEditCtrl.ShowWindow(SW_HIDE);
}
if (m_MainTab.GetCurSel() == 99) {
DisableControl(IDC_NUMBER_CLIENTS);
DisableControl(IDC_SERVERSTATUS);
DisableControl(IDC_SOURCES_CONNECTED);
m_ConfigEditCtrl.ShowWindow(SW_HIDE);
m_StatsEditCtrl.ShowWindow(SW_HIDE);
}
if (m_MainTab.GetCurSel() == 1) {
DisableControl(IDC_NUMBER_CLIENTS);
DisableControl(IDC_SERVERSTATUS);
DisableControl(IDC_SOURCES_CONNECTED);
m_ConfigEditCtrl.ShowWindow(SW_SHOW);
m_StatsEditCtrl.ShowWindow(SW_HIDE);
LoadConfig();
ParseConfig();
}
if (m_MainTab.GetCurSel() == 2) {
DisableControl(IDC_NUMBER_CLIENTS);
DisableControl(IDC_SERVERSTATUS);
DisableControl(IDC_SOURCES_CONNECTED);
m_ConfigEditCtrl.ShowWindow(SW_HIDE);
m_StatsEditCtrl.ShowWindow(SW_SHOW);
if (global.running == ICE_RUNNING) {
CString statData;
for (int i=0;i<numMainStats;i++) {
if (!strcmp(gStats[i].source, "")) {
statData += "\r\nBase Server Data\r\n-------------------------\r\n";
for (int j=0;j<gStats[i].numStats;j++) {
statData += gStats[i].stats[j].name;
statData += " = ";
statData += gStats[i].stats[j].value;
statData += "\r\n";
}
}
else {
statData += "\r\nData For Source ";
statData += gStats[i].source;
statData += "\r\n-------------------------\r\n";
for (int j=0;j<gStats[i].numStats;j++) {
statData += gStats[i].stats[j].name;
statData += " = ";
statData += gStats[i].stats[j].value;
statData += "\r\n";
}
}
}
m_StatsEdit = statData;
UpdateData(FALSE);
}
else {
MessageBox("Server not running, cannot get stats", "Message", MB_OK);
}
}
*/
*pResult = 0;
}
void CIcecast2winDlg::LoadConfig()
{
FILE *filep;
char buffer[2046] = "";
CIcecast2winApp *myApp = (CIcecast2winApp *)AfxGetApp();
configTab.m_Config = "";
filep = fopen(myApp->m_configFile, "r");
if (filep) {
while (!feof(filep)) {
memset(buffer, '\000', sizeof(buffer));
fgets(buffer, sizeof(buffer), filep);
if (strlen(buffer) > 0) {
char *p1 = strstr(buffer, "\r\n");
if (p1) {
*p1 = '\000';
}
else {
buffer[strlen(buffer)-1] = '\000';
}
configTab.m_Config = configTab.m_Config + buffer;
configTab.m_Config += "\r\n";
}
}
}
else {
configTab.m_Config = " \
<icecast>\r\n \
<location>Here and There</location>\r\n\
<admin>nobody at me.org</admin>\r\n\
<limits>\r\n\
<clients>100</clients>\r\n\
<sources>2</sources>\r\n\
<threadpool>5</threadpool>\r\n\
<client-timeout>30</client-timeout>\r\n\
<header-timeout>15</header-timeout>\r\n\
<source-timeout>10</source-timeout>\r\n\
</limits>\r\n\
<source-password>changeme</source-password>\r\n\
<directory>\r\n\
<touch-freq>5</touch-freq>\r\n\
<server>\r\n\
<host>yp.icecast.org</host>\r\n\
<touch-freq>15</touch-freq>\r\n\
</server>\r\n\
</directory>\r\n\
<bind-address>0.0.0.0</bind-address>\r\n\
<port>8000</port>\r\n\
<paths>\r\n\
<basedir>./</basedir>\r\n\
<logdir>./</logdir>\r\n\
<webroot>./webroot</webroot>\r\n\
</paths>\r\n\
<logging>\r\n\
<accesslog>access.log</accesslog>\r\n\
<errorlog>error.log</errorlog>\r\n\
</logging>\r\n\
</icecast>\r\n\
";
}
gConfigurationSave = configTab.m_Config;
configTab.UpdateData(FALSE);
}
<p>void CIcecast2winDlg::OnFileExit()
{
// TODO: Add your command handler code here
DestroyWindow();
}
<p>void CIcecast2winDlg::ParseConfig()
{
char access[2046] = "";
char error[2046] = "";
char logdir[2046] = "";
memset(access, '\000', sizeof(access));
memset(error, '\000', sizeof(error));
memset(logdir, '\000', sizeof(logdir));
getTag(m_ConfigEdit.GetBuffer(0), "logdir", logdir);
getTag(m_ConfigEdit.GetBuffer(0), "accesslog", access);
getTag(m_ConfigEdit.GetBuffer(0), "errorlog", error);
m_AccessLog = logdir;
m_AccessLog += access;
m_ErrorLog = logdir;
m_ErrorLog += error;
}
void CIcecast2winDlg::getTag(char *pbuf, char *ptag, char *dest)
{
char openTag[256] = "";
char closeTag[256] = "";
sprintf(openTag, "<%s>", ptag);
sprintf(closeTag, "</%s>", ptag);
char *p1;
p1 = strstr(pbuf, openTag);
if (p1) {
p1 = p1 + strlen(openTag);
char *p2;
p2 = strstr(p1, closeTag);
if (p2) {
strncpy(dest, p1, p2-p1);
}
}
}
<p>void CIcecast2winDlg::EnableControl(UINT control)
{
CWnd *pWnd;
pWnd = GetDlgItem(control);
::ShowWindow(pWnd->GetSafeHwnd(), SW_SHOW);
}
void CIcecast2winDlg::DisableControl(UINT control)
{
CWnd *pWnd;
pWnd = GetDlgItem(control);
::ShowWindow(pWnd->GetSafeHwnd(), SW_HIDE);
}
<p><p>void CollectStats(stats_event_t *event)
{
Element tempElement;
char tempSource[1024] = "";
tempElement.name = "";
tempElement.value = "";
// memset(&tempElement, '\000', sizeof(tempElement));
if (event->name != NULL) {
//strcpy(tempElement.name, event->name);
tempElement.name = event->name;
}
if (event->value != NULL) {
//strcpy(tempElement.value, event->value);
tempElement.value = event->value;
}
if (event->source != NULL) {
strcpy(tempSource, event->source);
}
<p> int foundit = 0;
for (int i=0;i<numMainStats;i++) {
if (!strcmp(gStats[i].source, tempSource)) {
int foundit2 = 0;
for (int j=0;j<gStats[i].numStats;j++) {
// if (!strcmp(gStats[i].stats[j].name, tempElement.name)) {
// strcpy(gStats[i].stats[j].value, tempElement.value);
if (gStats[i].stats[j].name == tempElement.name) {
//strcpy(gStats[i].stats[j].value, tempElement.value);
gStats[i].stats[j].value = tempElement.value;
foundit2 = 1;
}
}
if (!foundit2) {
// memcpy(&gStats[i].stats[gStats[i].numStats], &tempElement, sizeof(tempElement));
gStats[i].stats[j].name = tempElement.name;
gStats[i].stats[j].value = tempElement.value;
gStats[i].numStats++;
}
foundit = 1;
}
}
if (!foundit) {
// strcpy(gStats[numMainStats].source, tempSource);
gStats[numMainStats].source = tempSource;
gStats[numMainStats].stats[0].name = tempElement.name;
gStats[numMainStats].stats[0].value = tempElement.value;
// memcpy(&gStats[numMainStats].stats[0], &tempElement, sizeof(tempElement));
gStats[numMainStats].numStats++;
numMainStats++;
}
g_mainDialog->UpdateStatsLists();
}
bool g_collectingStats = false;
void StartStats(void *dummy)
{
while (global.running != ICE_RUNNING) {
Sleep(500);
}
while (global.running == ICE_RUNNING) {
if (global.running == ICE_RUNNING) {
// memset(&gStats, '\000', sizeof(gStats));
for (int j=0;j<MAXSOURCES;j++) {
gStats[j].numStats = 0;
}
numMainStats = 0;
stats_callback(CollectStats);
}
if (global.running != ICE_RUNNING) {
_endthread();
}
}
_endthread();
}
void CIcecast2winDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
if (nIDEvent == 0) {
if (global.running == ICE_RUNNING) {
char buffer[255] = "";
CString tmp;
// Get info from stats...
m_ServerStatusBitmap.SetBitmap(HBITMAP(runningBitmap));
sprintf(buffer, "%d", global.sources);
tmp = buffer;
if (tmp != statusTab.m_Sources) {
statusTab.m_Sources = tmp;
statusTab.UpdateData(FALSE);
}
sprintf(buffer, "%d", global.clients);
tmp = buffer;
if (tmp != statusTab.m_Clients) {
statusTab.m_Clients = tmp;
statusTab.UpdateData(FALSE);
}
m_StartButton.GetWindowText(tmp);
if (tmp == "Start Server") {
m_StartButton.SetWindowText("Stop Server");
m_StartButton.SetState(0);
}
//UpdateData(FALSE);
time_t currentTime;
time(¤tTime);
time_t runningTime = currentTime - serverStart;
CTimeSpan runningFor(runningTime);
char timespan[1024] = "";
sprintf(timespan, "%d Days, %d Hours, %d Minutes, %d Seconds", runningFor.GetDays(), runningFor.GetHours(), runningFor.GetMinutes(), runningFor.GetSeconds());
statusTab.m_RunningFor = timespan;
statusTab.UpdateData(FALSE);
SetTimer(0, 500, NULL);
}
else {
statusTab.m_Sources = "0";
statusTab.m_Clients = "0";
m_ServerStatusBitmap.SetBitmap(HBITMAP(stoppedBitmap));
m_StartButton.SetWindowText("Start Server");
m_StartButton.SetState(0);
configTab.m_ConfigCtrl.SetReadOnly(FALSE);
UpdateData(FALSE);
statusTab.m_RunningFor = "Not running";
statusTab.UpdateData(FALSE);
//UpdateData(FALSE);
}
}
CResizableDialog::OnTimer(nIDEvent);
}
char g_configFile[1024] = "";
char g_progName[255] = "icecast2";
//int __argc = 2;
//char* __argv[2];
void StartServer(void *configfile)
{
int argc = 3;
char* argv[3];
strcpy(g_configFile, (char *)configfile);
argv[0] = g_progName;
argv[1] = "-c";
argv[2] = g_configFile;
time(&(g_mainDialog->serverStart));
main(argc, (char **)argv);
// g_mainDialog->StopServer();
global.running = ICE_HALTING;
_endthread();
<p>}
void CIcecast2winDlg::OnFileStartserver()
{
// TODO: Add your command handler code here
CIcecast2winApp *myApp = (CIcecast2winApp *)AfxGetApp();
if (gConfigurationSave == "") {
gConfigurationSave = m_ConfigEdit;
}
if (global.running == ICE_RUNNING) {
MessageBox("Server already running", "Error", MB_OK);
}
else {
m_ConfigEditCtrl.SetReadOnly(TRUE);
LoadConfig();
ParseConfig();
SetTimer(0, 500, NULL);
_beginthread(StartServer, 0, (void *)(LPCSTR)myApp->m_configFile);
// _beginthread(StartTailAccessLog, 0, (void *)0);
// _beginthread(StartTailErrorLog, 0, (void *)0);
// EDZ
_beginthread(StartStats, 0, (void *)CollectStats);
}
}
void CIcecast2winDlg::OnFileStopserver()
{
// TODO: Add your command handler code here
;
}
bool infocus = false;
void CIcecast2winDlg::StopServer()
{
KillTimer(0);
configTab.m_ConfigCtrl.SetReadOnly(FALSE);
global.running = ICE_HALTING;
m_StartButton.SetWindowText("Start Server");
m_StartButton.SetState(0);
m_ServerStatusBitmap.SetBitmap(HBITMAP(stoppedBitmap));
statusTab.m_RunningFor = "Not running";
statusTab.UpdateData(FALSE);
<p><p>}
<p>void CIcecast2winDlg::OnStart()
{
CIcecast2winApp *myApp = (CIcecast2winApp *)AfxGetApp();
// TODO: Add your control notification handler code here
if (global.running == ICE_RUNNING) {
StopServer();
}
else {
configTab.m_ConfigCtrl.SetReadOnly(TRUE);
ParseConfig();
SetTimer(0, 500, NULL);
_beginthread(StartServer, 0, (void *)(LPCSTR)myApp->m_configFile);
// EDZ
_beginthread(StartStats, 0, (void *)CollectStats);
}
}
void CIcecast2winDlg::UpdateStatsLists()
{
char item[1024] = "";
int l = 0;
for (int i=0;i<numMainStats;i++) {
int inthere = 0;
int k = 0;
for (l=0;l < gAdditionalGlobalStats.numStats;l++) {
for (int m=0;m < gStats[i].numStats;m++) {
if ((gAdditionalGlobalStats.stats[l].source == gStats[i].source) &&
(gAdditionalGlobalStats.stats[l].name == gStats[i].stats[m].name)) {
gAdditionalGlobalStats.stats[l].value = gStats[i].stats[m].value;
break;
}
}
}
if (strlen(gStats[i].source) > 0) {
for (k=0;k < statsTab.m_SourceListCtrl.GetItemCount();k++) {
statsTab.m_SourceListCtrl.GetItemText(k, 0, item, sizeof(item));
if (!strcmp(gStats[i].source, item)) {
inthere = 1;
break;
}
}
if (!inthere) {
if (gStats[i].source != "") {
LVITEM lvi;
lvi.mask = LVIF_IMAGE | LVIF_TEXT;
lvi.iItem = statsTab.m_SourceListCtrl.GetItemCount();
lvi.iSubItem = 0;
lvi.pszText = (LPTSTR)(LPCTSTR)gStats[i].source;
statsTab.m_SourceListCtrl.InsertItem(&lvi);
}
}
int nItemSelected = statsTab.m_SourceListCtrl.GetSelectionMark();
if (nItemSelected != -1) {
memset(item, '\000', sizeof(item));
statsTab.m_SourceListCtrl.GetItemText(nItemSelected, 0, item, sizeof(item));
if (!strcmp(gStats[i].source, item)) {
for (int l=0;l<gStats[i].numStats;l++) {
int inthere2 = 0;
char item2[1024] = "";
for (int m=0;m < statsTab.m_StatsListCtrl.GetItemCount();m++) {
statsTab.m_StatsListCtrl.GetItemText(m, 0, item2, sizeof(item2));
if (!strcmp(gStats[i].stats[l].name, item2)) {
LVITEM lvi;
lvi.mask = LVIF_TEXT;
lvi.iItem = m;
lvi.iSubItem = 1;
lvi.pszText = (LPTSTR)(LPCTSTR)gStats[i].stats[l].value;
statsTab.m_StatsListCtrl.SetItem(&lvi);
inthere2 = 1;
break;
}
}
if (!inthere2) {
LVITEM lvi;
lvi.mask = LVIF_TEXT;
lvi.iItem = statsTab.m_StatsListCtrl.GetItemCount();
lvi.iSubItem = 0;
lvi.pszText = (LPTSTR)(LPCTSTR)gStats[i].stats[l].name;
statsTab.m_StatsListCtrl.InsertItem(&lvi);
lvi.iSubItem = 1;
lvi.pszText = (LPTSTR)(LPCTSTR)gStats[i].stats[l].value;
statsTab.m_StatsListCtrl.SetItem(&lvi);
}
}
}
}
for (l=0;l < gAdditionalGlobalStats.numStats;l++) {
int inthere2 = 0;
char item2[1024] = "";
char item3[1024] = "";
CString itemSource;
CString itemName;
for (int m=0;m < statusTab.m_GlobalStatList.GetItemCount();m++) {
statusTab.m_GlobalStatList.GetItemText(m, 0, item2, sizeof(item2));
statusTab.m_GlobalStatList.GetItemText(m, 1, item3, sizeof(item3));
itemSource = item2;
itemName = item3;
if ((gAdditionalGlobalStats.stats[l].source == itemSource) &&
(gAdditionalGlobalStats.stats[l].name == itemName)) {
LVITEM lvi;
lvi.mask = LVIF_TEXT;
lvi.iItem = m;
lvi.iSubItem = 2;
lvi.pszText = (LPTSTR)(LPCTSTR)gAdditionalGlobalStats.stats[l].value;
statusTab.m_GlobalStatList.SetItem(&lvi);
inthere2 = 1;
break;
}
}
if (!inthere2) {
LVITEM lvi;
lvi.mask = LVIF_TEXT;
lvi.iItem = statusTab.m_GlobalStatList.GetItemCount();
lvi.iSubItem = 0;
lvi.pszText = (LPTSTR)(LPCTSTR)gAdditionalGlobalStats.stats[l].source;
statusTab.m_GlobalStatList.InsertItem(&lvi);
lvi.iSubItem = 1;
lvi.pszText = (LPTSTR)(LPCTSTR)gAdditionalGlobalStats.stats[l].name;
statusTab.m_GlobalStatList.SetItem(&lvi);
lvi.iSubItem = 2;
lvi.pszText = (LPTSTR)(LPCTSTR)gAdditionalGlobalStats.stats[l].value;
statusTab.m_GlobalStatList.SetItem(&lvi);
}
}
}
else {
for (k=0;k < gStats[i].numStats;k++) {
inthere = 0;
for (l=0;l < statusTab.m_GlobalStatList.GetItemCount();l++) {
statusTab.m_GlobalStatList.GetItemText(l, 1, item, sizeof(item));
if (!strcmp(gStats[i].stats[k].name, item)) {
inthere = 1;
break;
}
}
if (!inthere) {
LVITEM lvi;
lvi.mask = LVIF_IMAGE | LVIF_TEXT;
lvi.iItem = statsTab.m_SourceListCtrl.GetItemCount();
lvi.iSubItem = 0;
lvi.pszText = "Global Stat";
statusTab.m_GlobalStatList.InsertItem(&lvi);
lvi.iSubItem = 1;
lvi.pszText = (LPTSTR)(LPCTSTR)gStats[i].stats[k].name;
statusTab.m_GlobalStatList.SetItem(&lvi);
lvi.iSubItem = 2;
lvi.pszText = (LPTSTR)(LPCTSTR)gStats[i].stats[k].value;
statusTab.m_GlobalStatList.SetItem(&lvi);
}
else {
LVITEM lvi;
lvi.mask = LVIF_IMAGE | LVIF_TEXT;
lvi.iItem = l;
lvi.iSubItem = 2;
lvi.pszText = (LPTSTR)(LPCTSTR)gStats[i].stats[k].value;
statusTab.m_GlobalStatList.SetItem(&lvi);
}
}
}
}
}
char gAppName[255] = "icecast2";
char gConfigFile[255] = "icecast2.ini";
void CIcecast2winDlg::config_write()
{
char buf[255] = "";
char buf2[1024] = "";
UpdateData(TRUE);
m_colSource0Width = statsTab.m_SourceListCtrl.GetColumnWidth(0);
m_colStats0Width = statsTab.m_StatsListCtrl.GetColumnWidth(0);
m_colStats1Width = statsTab.m_StatsListCtrl.GetColumnWidth(1);
m_colGStats0Width = statusTab.m_GlobalStatList.GetColumnWidth(0);
m_colGStats1Width = statusTab.m_GlobalStatList.GetColumnWidth(1);
m_colGStats2Width = statusTab.m_GlobalStatList.GetColumnWidth(2);
<p> sprintf(buf, "%d", m_colSource0Width);
WritePrivateProfileString(gAppName, "col0SourceWidth", buf, gConfigFile);
sprintf(buf, "%d", m_colStats0Width);
WritePrivateProfileString(gAppName, "col0StatsWidth", buf, gConfigFile);
sprintf(buf, "%d", m_colStats1Width);
WritePrivateProfileString(gAppName, "col1StatsWidth", buf, gConfigFile);
sprintf(buf, "%d", m_colGStats0Width);
WritePrivateProfileString(gAppName, "col0GStatsWidth", buf, gConfigFile);
sprintf(buf, "%d", m_colGStats1Width);
WritePrivateProfileString(gAppName, "col1GStatsWidth", buf, gConfigFile);
sprintf(buf, "%d", m_colGStats2Width);
WritePrivateProfileString(gAppName, "col2GStatsWidth", buf, gConfigFile);
if (m_Autostart) {
WritePrivateProfileString(gAppName, "AutoStart", "1", gConfigFile);
}
else {
WritePrivateProfileString(gAppName, "AutoStart", "0", gConfigFile);
}
sprintf(buf, "%d", gAdditionalGlobalStats.numStats);
WritePrivateProfileString(gAppName, "numAdditionalStats", buf, gConfigFile);
for (int i=0;i<gAdditionalGlobalStats.numStats;i++) {
memset(buf, '\000', sizeof(buf));
sprintf(buf2, "AdditionalStatsSource%d", i);
WritePrivateProfileString(gAppName, buf2, gAdditionalGlobalStats.stats[i].source, gConfigFile);
memset(buf, '\000', sizeof(buf));
sprintf(buf2, "AdditionalStatsName%d", i);
WritePrivateProfileString(gAppName, buf2, gAdditionalGlobalStats.stats[i].name, gConfigFile);
gAdditionalGlobalStats.stats[i].name = buf;
}
}
void CIcecast2winDlg::config_read()
{
char buf2[255] = "";
char buf[255] = "";
CString tempString;
m_colSource0Width = GetPrivateProfileInt(gAppName, "col0SourceWidth", 150, gConfigFile);
m_colStats0Width = GetPrivateProfileInt(gAppName, "col0StatsWidth", 100, gConfigFile);
m_colStats1Width = GetPrivateProfileInt(gAppName, "col1StatsWidth", 150, gConfigFile);
m_colGStats0Width = GetPrivateProfileInt(gAppName, "col0GStatsWidth", 150, gConfigFile);
m_colGStats1Width = GetPrivateProfileInt(gAppName, "col1GStatsWidth", 150, gConfigFile);
m_colGStats2Width = GetPrivateProfileInt(gAppName, "col2GStatsWidth", 150, gConfigFile);
GetPrivateProfileString(gAppName, "AutoStart", "0", buf, sizeof(buf), gConfigFile);
if (!strcmp(buf, "1")) {
m_Autostart = true;
}
else{
m_Autostart = false;
}
int numAdditionalGlobalStats = GetPrivateProfileInt(gAppName, "numAdditionalStats", 0, gConfigFile);
for (int i=0;i<numAdditionalGlobalStats;i++) {
memset(buf, '\000', sizeof(buf));
sprintf(buf2, "AdditionalStatsSource%d", i);
GetPrivateProfileString(gAppName, buf2, "", buf, sizeof(buf), gConfigFile);
gAdditionalGlobalStats.stats[i].source = buf;
memset(buf, '\000', sizeof(buf));
sprintf(buf2, "AdditionalStatsName%d", i);
GetPrivateProfileString(gAppName, buf2, "", buf, sizeof(buf), gConfigFile);
gAdditionalGlobalStats.stats[i].name = buf;
gAdditionalGlobalStats.numStats++;
}
}
void CIcecast2winDlg::OnClose()
{
// TODO: Add your message handler code here and/or call default
config_write();
CResizableDialog::OnClose();
}
void CIcecast2winDlg::OnSize(UINT nType, int cx, int cy)
{
CResizableDialog::OnSize(nType, cx, cy);
int border1 = 0;
int border2 = 78;
// TODO: Add your message handler code here
if (m_MainTab.m_hWnd) {
CRect rect;
GetClientRect (&rect);
m_MainTab.ResizeDialog(0, rect.Width()-border1, rect.Height()-border2);
m_MainTab.ResizeDialog(1, rect.Width()-border1, rect.Height()-border2);
m_MainTab.ResizeDialog(2, rect.Width()-border1, rect.Height()-border2);
}
}
<p><p>1.1 icecast/win32/Icecast2winDlg.h
Index: Icecast2winDlg.h
===================================================================
// Icecast2winDlg.h : header file
//
#if !defined(AFX_ICECAST2WINDLG_H__23B4DA8B_C9BC_49C8_A62C_37FC6BC5E54A__INCLUDED_)
#define AFX_ICECAST2WINDLG_H__23B4DA8B_C9BC_49C8_A62C_37FC6BC5E54A__INCLUDED_
#include "ResizableDialog.h"
#include "TabCtrlSSL.h"
#include "TabPageSSL.h"
#include "ConfigTab.h"
#include "StatsTab.h"
#include "Status.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CIcecast2winDlg dialog
class CIcecast2winDlg : public CResizableDialog
{
// Construction
public:
time_t serverStart;
void config_read();
void config_write();
void UpdateStatsLists();
CConfigTab configTab;
CStatsTab statsTab;
CStatus statusTab;
int m_colSource0Width;
int m_colStats0Width;
int m_colStats1Width;
int m_colGStats0Width;
int m_colGStats1Width;
int m_colGStats2Width;
CFont labelFont;
CBitmap runningBitmap;
CBitmap stoppedBitmap;
<p><p> void StopServer();
bool m_isRunning;
void DisableControl(UINT control);
void EnableControl(UINT control);
void getTag(char *pbuf, char *ptag, char *dest);
CString m_ErrorLog;
CString m_AccessLog;
void ParseConfig();
void LoadConfig();
CIcecast2winDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CIcecast2winDlg)
enum { IDD = IDD_ICECAST2WIN_DIALOG };
CStatic m_SS;
CStatic m_ServerStatusBitmap;
CStatic m_iceLogo;
CButton m_StartButton;
CEdit m_StatsEditCtrl;
CEdit m_ConfigEditCtrl;
CEdit m_ErrorEditCtrl;
CEdit m_AccessEditCtrl;
CTabCtrlSSL m_MainTab;
CString m_AccessEdit;
CString m_ErrorEdit;
CString m_ConfigEdit;
CString m_ServerStatus;
CString m_SourcesConnected;
CString m_NumClients;
FILE *filep_accesslog;
FILE *filep_errorlog;
CString m_StatsEdit;
BOOL m_Autostart;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CIcecast2winDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CIcecast2winDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnSelchangeMaintab(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnFileExit();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnFileStartserver();
afx_msg void OnFileStopserver();
afx_msg void OnStart();
afx_msg void OnClose();
afx_msg void OnSize(UINT nType, int cx, int cy);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ICECAST2WINDLG_H__23B4DA8B_C9BC_49C8_A62C_37FC6BC5E54A__INCLUDED_)
<p><p>1.1 icecast/win32/ResizableDialog.cpp
Index: ResizableDialog.cpp
===================================================================
// ResizableDialog.cpp : implementation file
//
/////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2000 by Paolo Messina
// (ppescher at yahoo.com)
//
// Free for non-commercial use.
// You may change the code to your needs,
// provided that credits to the original
// author is given in the modified files.
//
/////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "ResizableDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CResizableDialog
inline void CResizableDialog::Construct()
{
m_bInitDone = FALSE;
m_bUseMinTrack = TRUE;
m_bUseMaxTrack = FALSE;
m_bUseMaxRect = FALSE;
m_bShowGrip = TRUE;
m_bEnableSaveRestore = FALSE;
m_szGripSize.cx = GetSystemMetrics(SM_CXVSCROLL);
m_szGripSize.cy = GetSystemMetrics(SM_CYHSCROLL);
}
CResizableDialog::CResizableDialog()
{
Construct();
}
CResizableDialog::CResizableDialog(UINT nIDTemplate, CWnd* pParentWnd)
: CDialog(nIDTemplate, pParentWnd)
{
Construct();
}
CResizableDialog::CResizableDialog(LPCTSTR lpszTemplateName, CWnd* pParentWnd)
: CDialog(lpszTemplateName, pParentWnd)
{
Construct();
}
CResizableDialog::~CResizableDialog()
{
// for safety
m_arrLayout.RemoveAll();
}
<p>BEGIN_MESSAGE_MAP(CResizableDialog, CDialog)
//{{AFX_MSG_MAP(CResizableDialog)
ON_WM_NCHITTEST()
ON_WM_GETMINMAXINFO()
ON_WM_SIZE()
ON_WM_DESTROY()
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
<p>/////////////////////////////////////////////////////////////////////////////
// CResizableDialog message handlers
<p>BOOL CResizableDialog::OnInitDialog()
{
CDialog::OnInitDialog();
UpdateGripPos();
// gets the template size as the min track size
CRect rc;
GetWindowRect(&rc);
m_ptMinTrackSize.x = rc.Width();
m_ptMinTrackSize.y = rc.Height();
m_bInitDone = TRUE;
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CResizableDialog::OnDestroy()
{
CDialog::OnDestroy();
if (m_bEnableSaveRestore)
SaveWindowRect();
// remove old windows
m_arrLayout.RemoveAll();
}
void CResizableDialog::OnPaint()
{
CPaintDC dc(this); // device context for painting
if (m_bShowGrip && !IsZoomed())
{
// draw size-grip
dc.DrawFrameControl(&m_rcGripRect, DFC_SCROLL, DFCS_SCROLLSIZEGRIP);
}
}
void CResizableDialog::OnSize(UINT nType, int cx, int cy)
{
CWnd::OnSize(nType, cx, cy);
if (nType == SIZE_MAXHIDE || nType == SIZE_MAXSHOW)
return; // arrangement not needed
if (m_bInitDone)
{
ArrangeLayout();
}
}
UINT CResizableDialog::OnNcHitTest(CPoint point)
{
CPoint pt = point;
ScreenToClient(&pt);
// if in size grip and in client area
if (m_bShowGrip && m_rcGripRect.PtInRect(pt) &&
pt.x >= 0 && pt.y >= 0)
return HTBOTTOMRIGHT;
return CDialog::OnNcHitTest(point);
}
void CResizableDialog::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)
{
if (!m_bInitDone)
return;
if (m_bUseMinTrack)
lpMMI->ptMinTrackSize = m_ptMinTrackSize;
if (m_bUseMaxTrack)
lpMMI->ptMaxTrackSize = m_ptMaxTrackSize;
if (m_bUseMaxRect)
{
lpMMI->ptMaxPosition = m_ptMaxPos;
lpMMI->ptMaxSize = m_ptMaxSize;
}
}
// layout functions
void CResizableDialog::AddAnchor(HWND wnd, CSize tl_type, CSize br_type)
{
ASSERT(wnd != NULL && ::IsWindow(wnd));
ASSERT(::IsChild(*this, wnd));
ASSERT(tl_type != NOANCHOR);
// get control's window class
CString st;
GetClassName(wnd, st.GetBufferSetLength(MAX_PATH), MAX_PATH);
st.ReleaseBuffer();
st.MakeUpper();
// add the style 'clipsiblings' to a GroupBox
// to avoid unnecessary repainting of controls inside
if (st == "BUTTON")
{
DWORD style = GetWindowLong(wnd, GWL_STYLE);
if (style & BS_GROUPBOX)
SetWindowLong(wnd, GWL_STYLE, style | WS_CLIPSIBLINGS);
}
// wnd classes that don't redraw client area correctly
// when the hor scroll pos changes due to a resizing
BOOL hscroll = FALSE;
if (st == "LISTBOX")
hscroll = TRUE;
// wnd classes that need refresh when resized
BOOL refresh = FALSE;
if (st == "STATIC")
{
DWORD style = GetWindowLong(wnd, GWL_STYLE);
switch (style & SS_TYPEMASK)
{
case SS_LEFT:
case SS_CENTER:
case SS_RIGHT:
// word-wrapped text needs refresh
refresh = TRUE;
}
// centered images or text need refresh
if (style & SS_CENTERIMAGE)
refresh = TRUE;
// simple text never needs refresh
if (style & SS_TYPEMASK == SS_SIMPLE)
refresh = FALSE;
}
// get dialog's and control's rect
CRect wndrc, objrc;
GetClientRect(&wndrc);
::GetWindowRect(wnd, &objrc);
ScreenToClient(&objrc);
CSize tl_margin, br_margin;
if (br_type == NOANCHOR)
br_type = tl_type;
// calculate margin for the top-left corner
tl_margin.cx = objrc.left - wndrc.Width() * tl_type.cx / 100;
tl_margin.cy = objrc.top - wndrc.Height() * tl_type.cy / 100;
// calculate margin for the bottom-right corner
br_margin.cx = objrc.right - wndrc.Width() * br_type.cx / 100;
br_margin.cy = objrc.bottom - wndrc.Height() * br_type.cy / 100;
// add to the list
Layout obj(wnd, tl_type, tl_margin, br_type, br_margin, hscroll, refresh);
m_arrLayout.Add(obj);
}
void CResizableDialog::ArrangeLayout()
{
// update size-grip
InvalidateRect(&m_rcGripRect);
UpdateGripPos();
InvalidateRect(&m_rcGripRect);
// init some vars
CRect wndrc;
GetClientRect(&wndrc);
int i, count = m_arrLayout.GetSize();
HDWP hdwp = BeginDeferWindowPos(count);
for (i=0; i<count; ++i)
{
Layout& obj = m_arrLayout[i];
CRect objrc, newrc;
CWnd* wnd = CWnd::FromHandle(obj.hwnd); // temporary solution
wnd->GetWindowRect(&objrc);
ScreenToClient(&objrc);
// calculate new top-left corner
newrc.left = obj.tl_margin.cx + wndrc.Width() * obj.tl_type.cx / 100;
newrc.top = obj.tl_margin.cy + wndrc.Height() * obj.tl_type.cy / 100;
// calculate new bottom-right corner
newrc.right = obj.br_margin.cx + wndrc.Width() * obj.br_type.cx / 100;
newrc.bottom = obj.br_margin.cy + wndrc.Height() * obj.br_type.cy / 100;
if (!newrc.EqualRect(&objrc))
{
if (obj.adj_hscroll)
{
// needs repainting, due to horiz scrolling
int diff = newrc.Width() - objrc.Width();
int max = wnd->GetScrollLimit(SB_HORZ);
obj.need_refresh = FALSE;
if (max > 0 && wnd->GetScrollPos(SB_HORZ) > max - diff)
{
obj.need_refresh = TRUE;
}
}
// set flags
DWORD flags = SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREPOSITION;
if (newrc.TopLeft() == objrc.TopLeft())
flags |= SWP_NOMOVE;
if (newrc.Size() == objrc.Size())
flags |= SWP_NOSIZE;
DeferWindowPos(hdwp, obj.hwnd, NULL, newrc.left, newrc.top,
newrc.Width(), newrc.Height(), flags);
}
}
// go re-arrange child windows
EndDeferWindowPos(hdwp);
// refresh those that need
for (i=0; i<count; ++i)
{
Layout& obj = m_arrLayout[i];
CWnd* wnd = CWnd::FromHandle(obj.hwnd); // temporary solution
if (obj.need_refresh)
{
wnd->Invalidate();
wnd->UpdateWindow();
}
}
}
void CResizableDialog::UpdateGripPos()
{
// size-grip goes bottom right in the client area
GetClientRect(&m_rcGripRect);
m_rcGripRect.left = m_rcGripRect.right - m_szGripSize.cx;
m_rcGripRect.top = m_rcGripRect.bottom - m_szGripSize.cy;
}
// protected members
void CResizableDialog::ShowSizeGrip(BOOL bShow)
{
if (m_bShowGrip != bShow)
{
m_bShowGrip = bShow;
InvalidateRect(&m_rcGripRect);
}
}
void CResizableDialog::SetMaximizedRect(const CRect& rc)
{
m_bUseMaxRect = TRUE;
m_ptMaxPos = rc.TopLeft();
m_ptMaxSize.x = rc.Width();
m_ptMaxSize.y = rc.Height();
}
void CResizableDialog::ResetMaximizedRect()
{
m_bUseMaxRect = FALSE;
}
void CResizableDialog::SetMinTrackSize(const CSize& size)
{
m_bUseMinTrack = TRUE;
m_ptMinTrackSize.x = size.cx;
m_ptMinTrackSize.y = size.cy;
}
void CResizableDialog::ResetMinTrackSize()
{
m_bUseMinTrack = FALSE;
}
void CResizableDialog::SetMaxTrackSize(const CSize& size)
{
m_bUseMaxTrack = TRUE;
m_ptMaxTrackSize.x = size.cx;
m_ptMaxTrackSize.y = size.cy;
}
void CResizableDialog::ResetMaxTrackSize()
{
m_bUseMaxTrack = FALSE;
}
// NOTE: this must be called after all the other settings
// to have the dialog and its controls displayed properly
void CResizableDialog::EnableSaveRestore(LPCTSTR pszSection, LPCTSTR pszEntry)
{
m_sSection = pszSection;
m_sEntry = pszEntry;
m_bEnableSaveRestore = TRUE;
LoadWindowRect();
}
<p>// used to save/restore window's size and position
// either in the registry or a private .INI file
// depending on your application settings
#define PROFILE_FMT _T("%d,%d,%d,%d,%d,%d")
void CResizableDialog::SaveWindowRect()
{
CString data;
WINDOWPLACEMENT wp;
ZeroMemory(&wp, sizeof(WINDOWPLACEMENT));
wp.length = sizeof(WINDOWPLACEMENT);
GetWindowPlacement(&wp);
RECT& rc = wp.rcNormalPosition; // alias
data.Format(PROFILE_FMT, rc.left, rc.top,
rc.right, rc.bottom, wp.showCmd, wp.flags);
AfxGetApp()->WriteProfileString(m_sSection, m_sEntry, data);
}
void CResizableDialog::LoadWindowRect()
{
CString data;
WINDOWPLACEMENT wp;
data = AfxGetApp()->GetProfileString(m_sSection, m_sEntry);
if (data.IsEmpty()) // never saved before
return;
ZeroMemory(&wp, sizeof(WINDOWPLACEMENT));
wp.length = sizeof(WINDOWPLACEMENT);
GetWindowPlacement(&wp);
RECT& rc = wp.rcNormalPosition; // alias
if (_stscanf(data, PROFILE_FMT, &rc.left, &rc.top,
&rc.right, &rc.bottom, &wp.showCmd, &wp.flags) == 6)
{
SetWindowPlacement(&wp);
}
}
<p><p>1.1 icecast/win32/ResizableDialog.h
Index: ResizableDialog.h
===================================================================
#if !defined(AFX_RESIZABLEDIALOG_H__INCLUDED_)
#define AFX_RESIZABLEDIALOG_H__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ResizableDialog.h : header file
//
/////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2000 by Paolo Messina
// (ppescher at yahoo.com)
//
// Free for non-commercial use.
// You may change the code to your needs,
// provided that credits to the original
// author is given in the modified files.
//
/////////////////////////////////////////////////////////////////////////////
#include <afxtempl.h>
#include <afxwin.h>
// useful compatibility constants (the only one required is NOANCHOR)
#if !defined(__SIZE_ANCHORS_)
#define __SIZE_ANCHORS_
const CSize
NOANCHOR(-1,-1),
TOP_LEFT(0,0), TOP_CENTER(50,0), TOP_RIGHT(100,0),
MIDDLE_LEFT(0,50), MIDDLE_CENTER(50,50), MIDDLE_RIGHT(100,50),
BOTTOM_LEFT(0,100), BOTTOM_CENTER(50,100), BOTTOM_RIGHT(100,100);
#endif // !defined(__SIZE_ANCHORS_)
/////////////////////////////////////////////////////////////////////////////
// CResizableDialog window
class CResizableDialog : public CDialog
{
// Construction
public:
CResizableDialog();
CResizableDialog(UINT nIDTemplate, CWnd* pParentWnd = NULL);
CResizableDialog(LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL);
// Attributes
private:
// flags
BOOL m_bShowGrip;
BOOL m_bUseMaxTrack;
BOOL m_bUseMinTrack;
BOOL m_bUseMaxRect;
BOOL m_bEnableSaveRestore;
// internal status
CString m_sSection; // section name and
CString m_sEntry; // entry for save/restore
BOOL m_bInitDone; // if all internal vars initialized
SIZE m_szGripSize; // set at construction time
CRect m_rcGripRect; // current pos of grip
POINT m_ptMinTrackSize; // min tracking size
POINT m_ptMaxTrackSize; // max tracking size
POINT m_ptMaxPos; // maximized position
POINT m_ptMaxSize; // maximized size
class Layout
{
public:
HWND hwnd;
BOOL adj_hscroll;
BOOL need_refresh;
// upper-left corner
CSize tl_type;
CSize tl_margin;
// bottom-right corner
CSize br_type;
CSize br_margin;
public:
Layout()
: hwnd(NULL), adj_hscroll(FALSE), need_refresh(FALSE),
tl_type(0,0), tl_margin(0,0),
br_type(0,0), br_margin(0,0)
{
};
Layout(HWND hw, SIZE tl_t, SIZE tl_m,
SIZE br_t, SIZE br_m, BOOL hscroll, BOOL refresh)
{
hwnd = hw;
adj_hscroll = hscroll;
need_refresh = refresh;
tl_type = tl_t;
tl_margin = tl_m;
br_type = br_t;
br_margin = br_m;
};
};
CArray<Layout, Layout&> m_arrLayout; // list of repositionable controls
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CResizableDialog)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CResizableDialog();
// used internally
private:
void Construct();
void LoadWindowRect();
void SaveWindowRect();
void ArrangeLayout();
void UpdateGripPos();
// callable from derived classes
//protected:
public:
void AddAnchor(HWND wnd, CSize tl_type,
CSize br_type = NOANCHOR); // add anchors to a control
void AddAnchor(UINT ctrl_ID, CSize tl_type,
CSize br_type = NOANCHOR) // add anchors to a control
{
AddAnchor(::GetDlgItem(*this, ctrl_ID), tl_type, br_type);
};
void ShowSizeGrip(BOOL bShow); // show or hide the size grip
void SetMaximizedRect(const CRect& rc); // set window rect when maximized
void ResetMaximizedRect(); // reset to default maximized rect
void SetMinTrackSize(const CSize& size); // set minimum tracking size
void ResetMinTrackSize(); // reset to default minimum tracking size
void SetMaxTrackSize(const CSize& size); // set maximum tracking size
void ResetMaxTrackSize(); // reset to default maximum tracking size
void EnableSaveRestore(LPCTSTR pszSection, LPCTSTR pszEntry); // section and entry in app's profile
// Generated message map functions
protected:
//{{AFX_MSG(CResizableDialog)
virtual BOOL OnInitDialog();
afx_msg UINT OnNcHitTest(CPoint point);
afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnDestroy();
afx_msg void OnPaint();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_RESIZABLEDIALOG_H__INCLUDED_)
<p>1.1 icecast/win32/StatsTab.cpp
Index: StatsTab.cpp
===================================================================
// StatsTab.cpp : implementation file
//
#include "stdafx.h"
#include "Icecast2win.h"
#include "StatsTab.h"
#include "Icecast2winDlg.h"
extern CIcecast2winDlg *g_mainDialog;
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern void AddToAdditionalGlobalStats(CString source, CString name);
/////////////////////////////////////////////////////////////////////////////
// CStatsTab dialog
<p>CStatsTab::CStatsTab(CWnd* pParent /*=NULL*/)
: CTabPageSSL(CStatsTab::IDD, pParent)
{
//{{AFX_DATA_INIT(CStatsTab)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
<p>void CStatsTab::DoDataExchange(CDataExchange* pDX)
{
CTabPageSSL::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CStatsTab)
DDX_Control(pDX, IDC_STATIC_SLS, m_SLS);
DDX_Control(pDX, IDC_STATSLIST, m_StatsListCtrl);
DDX_Control(pDX, IDC_SOURCELIST, m_SourceListCtrl);
//}}AFX_DATA_MAP
}
<p>BEGIN_MESSAGE_MAP(CStatsTab, CTabPageSSL)
//{{AFX_MSG_MAP(CStatsTab)
ON_NOTIFY(NM_DBLCLK, IDC_SOURCELIST, OnDblclkSourcelist)
ON_NOTIFY(NM_RCLICK, IDC_STATSLIST, OnRclickStatslist)
ON_NOTIFY(NM_CLICK, IDC_SOURCELIST, OnClickSourcelist)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CStatsTab message handlers
BOOL CStatsTab::OnInitDialog()
{
CTabPageSSL::OnInitDialog();
// TODO: Add extra initialization here
m_SourceListCtrl.InsertColumn(0, _T("Source"), LVCFMT_LEFT, m_colSource0Width);
m_StatsListCtrl.InsertColumn(0, _T("Statistic"), LVCFMT_LEFT, m_colStats0Width);
m_StatsListCtrl.InsertColumn(1, _T("Value"), LVCFMT_LEFT, m_colStats1Width);
AddAnchor(IDC_STATSLIST, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_SOURCELIST, TOP_LEFT, BOTTOM_LEFT);
AddAnchor(IDC_FILLER1, BOTTOM_LEFT, BOTTOM_RIGHT);
m_SourceListCtrl.SetSelectionMark(0);
m_SLS.SetFont(&(g_mainDialog->labelFont), TRUE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CStatsTab::OnDblclkSourcelist(NMHDR* pNMHDR, LRESULT* pResult)
{
// TODO: Add your control notification handler code here
g_mainDialog->UpdateStatsLists();
*pResult = 0;
}
void CStatsTab::OnRclickStatslist(NMHDR* pNMHDR, LRESULT* pResult)
{
// TODO: Add your control notification handler code here
CMenu menu;
CPoint point;
::GetCursorPos(&point); //where is the mouse?
DWORD dwSelectionMade;
menu.LoadMenu(IDR_MENU2);
CMenu *pmenuPopup = menu.GetSubMenu(0);
dwSelectionMade = pmenuPopup->TrackPopupMenu( (TPM_LEFTALIGN|TPM_LEFTBUTTON|
TPM_NONOTIFY|TPM_RETURNCMD),
point.x, point.y, this);
pmenuPopup->DestroyMenu();
char msg[255] ="";
char buffer[1024] = "";
char buffer2[1024] = "";
CString name;
CString source;
POSITION pos;
switch (dwSelectionMade) {
case ID_POPUP_ADDTOGLOBALSTATLIST :
pos = m_StatsListCtrl.GetFirstSelectedItemPosition();
if (pos != NULL) {
int nItem = m_StatsListCtrl.GetNextSelectedItem(pos);
LVITEM lvi;
lvi.mask = LVIF_TEXT;
lvi.iItem = nItem;
lvi.iSubItem = 0;
lvi.pszText = buffer;
lvi.cchTextMax = sizeof(buffer);
m_StatsListCtrl.GetItem(&lvi);
name = buffer;
}
pos = m_SourceListCtrl.GetFirstSelectedItemPosition();
if (pos != NULL) {
int nItem = m_SourceListCtrl.GetNextSelectedItem(pos);
LVITEM lvi;
lvi.mask = LVIF_TEXT;
lvi.iItem = nItem;
lvi.iSubItem = 0;
lvi.pszText = buffer2;
lvi.cchTextMax = sizeof(buffer2);
m_SourceListCtrl.GetItem(&lvi);
source = buffer2;
}
AddToAdditionalGlobalStats(source, name);
break;
default :
break;
}
*pResult = 0;
}
void CStatsTab::OnClickSourcelist(NMHDR* pNMHDR, LRESULT* pResult)
{
// TODO: Add your control notification handler code here
OnDblclkSourcelist(pNMHDR, pResult);
*pResult = 0;
}
<p><p>1.1 icecast/win32/StatsTab.h
Index: StatsTab.h
===================================================================
#if !defined(AFX_STATSTAB_H__64B82CAB_8D6D_45A6_84FD_666F6317E5F2__INCLUDED_)
#define AFX_STATSTAB_H__64B82CAB_8D6D_45A6_84FD_666F6317E5F2__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// StatsTab.h : header file
//
#include "TabPageSSL.h"
/////////////////////////////////////////////////////////////////////////////
// CStatsTab dialog
class CStatsTab : public CTabPageSSL
{
// Construction
public:
int m_colStats1Width;
int m_colStats0Width;
int m_colSource0Width;
CStatsTab(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CStatsTab)
enum { IDD = IDD_STATSDIALOG };
CStatic m_SLS;
CListCtrl m_StatsListCtrl;
CListCtrl m_SourceListCtrl;
//}}AFX_DATA
<p>// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CStatsTab)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CStatsTab)
virtual BOOL OnInitDialog();
afx_msg void OnDblclkSourcelist(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnRclickStatslist(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnClickSourcelist(NMHDR* pNMHDR, LRESULT* pResult);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STATSTAB_H__64B82CAB_8D6D_45A6_84FD_666F6317E5F2__INCLUDED_)
<p><p>1.1 icecast/win32/Status.cpp
Index: Status.cpp
===================================================================
// Status.cpp : implementation file
//
#include "stdafx.h"
#include "Icecast2win.h"
#include "Status.h"
#include "Icecast2winDlg.h"
extern CIcecast2winDlg *g_mainDialog;
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern void RemoveFromAdditionalGlobalStats(CString source, CString name);
/////////////////////////////////////////////////////////////////////////////
// CStatus dialog
<p>CStatus::CStatus(CWnd* pParent /*=NULL*/)
: CTabPageSSL(CStatus::IDD, pParent)
{
//{{AFX_DATA_INIT(CStatus)
m_Clients = _T("");
m_Sources = _T("");
m_RunningFor = _T("");
//}}AFX_DATA_INIT
}
<p>void CStatus::DoDataExchange(CDataExchange* pDX)
{
CTabPageSSL::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CStatus)
DDX_Control(pDX, IDC_STATIC_GS, m_GS);
DDX_Control(pDX, IDC_GLOBALSTAT_LIST, m_GlobalStatList);
DDX_Text(pDX, IDC_RUNNINGFOR, m_RunningFor);
//}}AFX_DATA_MAP
}
<p>BEGIN_MESSAGE_MAP(CStatus, CTabPageSSL)
//{{AFX_MSG_MAP(CStatus)
ON_NOTIFY(NM_RCLICK, IDC_GLOBALSTAT_LIST, OnRclickGlobalstatList)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CStatus message handlers
BOOL CStatus::OnInitDialog()
{
CTabPageSSL::OnInitDialog();
<p> m_GlobalStatList.InsertColumn(0, _T("Stat Type"), LVCFMT_LEFT, m_colStats0Width);
m_GlobalStatList.InsertColumn(1, _T("Name"), LVCFMT_LEFT, m_colStats1Width);
m_GlobalStatList.InsertColumn(2, _T("Value"), LVCFMT_LEFT, m_colStats2Width);
m_GlobalStatList.SetExtendedStyle(LVS_EX_FULLROWSELECT);
// TODO: Add extra initialization here
AddAnchor(IDC_FILLER2, BOTTOM_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_GLOBALSTAT_LIST, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_STATIC_RUN, BOTTOM_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_RUNNINGFOR, BOTTOM_LEFT, BOTTOM_RIGHT);
m_GS.SetFont(&(g_mainDialog->labelFont), TRUE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CStatus::OnRclickGlobalstatList(NMHDR* pNMHDR, LRESULT* pResult)
{
// TODO: Add your control notification handler code here
CMenu menu;
CPoint point;
::GetCursorPos(&point); //where is the mouse?
DWORD dwSelectionMade;
menu.LoadMenu(IDR_MENU3);
CMenu *pmenuPopup = menu.GetSubMenu(0);
dwSelectionMade = pmenuPopup->TrackPopupMenu( (TPM_LEFTALIGN|TPM_LEFTBUTTON|
TPM_NONOTIFY|TPM_RETURNCMD),
point.x, point.y, this);
pmenuPopup->DestroyMenu();
char msg[255] ="";
char buffer[1024] = "";
char buffer2[1024] = "";
CString name;
CString source;
POSITION pos;
int nItem;
switch (dwSelectionMade) {
case ID__DELETEFROMGLOBALSTATS :
pos = m_GlobalStatList.GetFirstSelectedItemPosition();
if (pos != NULL) {
nItem = m_GlobalStatList.GetNextSelectedItem(pos);
LVITEM lvi;
lvi.mask = LVIF_TEXT;
lvi.iItem = nItem;
lvi.iSubItem = 0;
lvi.pszText = buffer;
lvi.cchTextMax = sizeof(buffer);
m_GlobalStatList.GetItem(&lvi);
source = buffer;
lvi.iSubItem = 1;
lvi.pszText = buffer2;
lvi.cchTextMax = sizeof(buffer2);
m_GlobalStatList.GetItem(&lvi);
name = buffer2;
if (source == "Global Stat") {
MessageBox("Sorry, but you can't delete this type of stat", NULL, MB_OK);
}
else {
RemoveFromAdditionalGlobalStats(source, name);
m_GlobalStatList.DeleteItem(nItem);
}
}
break;
default :
break;
}
*pResult = 0;
}
<p><p>1.1 icecast/win32/Status.h
Index: Status.h
===================================================================
#if !defined(AFX_STATUS_H__DE59E22B_FD4F_4131_B347_48BD9FAC9348__INCLUDED_)
#define AFX_STATUS_H__DE59E22B_FD4F_4131_B347_48BD9FAC9348__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Status.h : header file
//
#include "TabPageSSL.h"
/////////////////////////////////////////////////////////////////////////////
// CStatus dialog
class CStatus : public CTabPageSSL
{
// Construction
public:
int m_colStats2Width;
int m_colStats1Width;
int m_colStats0Width;
CFont labelFont;
CStatus(CWnd* pParent = NULL); // standard constructor
// Dialog Data
CBitmap runningBitmap;
CBitmap stoppedBitmap;
//{{AFX_DATA(CStatus)
enum { IDD = IDD_SSTATUS };
CStatic m_GS;
CListCtrl m_GlobalStatList;
CString m_Clients;
CString m_Sources;
CString m_RunningFor;
//}}AFX_DATA
<p>// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CStatus)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CStatus)
virtual BOOL OnInitDialog();
afx_msg void OnRclickGlobalstatList(NMHDR* pNMHDR, LRESULT* pResult);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STATUS_H__DE59E22B_FD4F_4131_B347_48BD9FAC9348__INCLUDED_)
<p><p>1.1 icecast/win32/StdAfx.cpp
Index: StdAfx.cpp
===================================================================
// stdafx.cpp : source file that includes just the standard includes
// Icecast2win.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
<p><p><p><p><p>1.1 icecast/win32/StdAfx.h
Index: StdAfx.h
===================================================================
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__2C2EF8C3_43CD_47D2_A979_EC36873E602D__INCLUDED_)
#define AFX_STDAFX_H__2C2EF8C3_43CD_47D2_A979_EC36873E602D__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
<p>//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__2C2EF8C3_43CD_47D2_A979_EC36873E602D__INCLUDED_)
<p><p>1.1 icecast/win32/TabCtrlSSL.cpp
Index: TabCtrlSSL.cpp
===================================================================
// TabCtrlSSL.cpp : implementation file
//
#include "stdafx.h"
#include "TabCtrlSSL.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Construction
CTabCtrlSSL::CTabCtrlSSL () {
#ifndef _AFX_NO_OCC_SUPPORT
AfxEnableControlContainer ();
#endif // !_AFX_NO_OCC_SUPPORT
}
/////////////////////////////////////////////////////////////////////////////
// Destruction
CTabCtrlSSL::~CTabCtrlSSL (void) {
}
BEGIN_MESSAGE_MAP(CTabCtrlSSL, CTabCtrl)
//{{AFX_MSG_MAP(CTabCtrlSSL)
ON_WM_DESTROY ()
ON_WM_SETFOCUS ()
ON_WM_KILLFOCUS ()
ON_NOTIFY_REFLECT (TCN_SELCHANGING, OnSelChanging)
ON_NOTIFY_REFLECT (TCN_SELCHANGE, OnSelChange)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Page Functions
int CTabCtrlSSL::AddSSLPage (LPCTSTR pszTitle, int nPageID, CTabPageSSL* pTabPage) {
// Add a page to the tab control.
TabDelete tabDelete;
tabDelete.pTabPage = pTabPage;
tabDelete.bDelete = FALSE;
return AddPage (pszTitle, nPageID, tabDelete);
}
int CTabCtrlSSL::AddSSLPage (LPCTSTR pszTitle, int nPageID, LPCTSTR pszTemplateName) {
// Verify that the dialog template is compatible with CTabCtrlSSL
// (debug builds only). If your app asserts here, make sure the dialog
// resource you're adding to the view is a borderless child window and
// is not marked visible.
#ifdef _DEBUG
if (pszTemplateName != NULL) {
BOOL bResult = CheckDialogTemplate (pszTemplateName);
ASSERT (bResult);
}
#endif // _DEBUG
// Add a page to the tab control.
// Create a modeless dialog box.
CTabPageSSL* pDialog = new CTabPageSSL;
if (pDialog == NULL) {
return -1;
}
if (!pDialog->Create (pszTemplateName, this)) {
pDialog->DestroyWindow ();
delete pDialog;
return -1;
}
TabDelete tabDelete;
tabDelete.pTabPage = pDialog;
tabDelete.bDelete = TRUE;
return AddPage (pszTitle, nPageID, tabDelete);
}
int CTabCtrlSSL::AddSSLPage (LPCTSTR pszTitle, int nPageID, int nTemplateID) {
return AddSSLPage (pszTitle, nPageID, MAKEINTRESOURCE (nTemplateID));
}
BOOL CTabCtrlSSL::RemoveSSLPage (int nIndex) {
if (nIndex >= GetItemCount ())
return FALSE;
// Notify derived classes that the page is being destroyed.
OnDestroyPage (nIndex, m_nPageIDs[nIndex]);
// Switch pages if the page being deleted is the current page and it's
// not the only remaining page.
int nCount = GetItemCount ();
if (nCount > 1 && nIndex == GetCurSel ()) {
int nPage = nIndex + 1;
if (nPage >= nCount)
nPage = nCount - 2;
ActivateSSLPage (nPage);
}
// Remove the page from the tab control.
DeleteItem (nIndex);
// Destroy the dialog (if any) that represents the page.
TabDelete tabDelete = m_tabs[nIndex];
CTabPageSSL* pDialog = tabDelete.pTabPage;
if (pDialog != NULL) {
pDialog->DestroyWindow ();
delete pDialog;
}
// Clean up, repaint, and return.
m_tabs.RemoveAt (nIndex);
m_hFocusWnd.RemoveAt (nIndex);
m_nPageIDs.RemoveAt (nIndex);
Invalidate ();
return TRUE;
}
int CTabCtrlSSL::GetSSLPageCount (void) {
return GetItemCount ();
}
BOOL CTabCtrlSSL::GetSSLPageTitle (int nIndex, CString &strTitle) {
if (nIndex >= GetItemCount ())
return FALSE;
TCHAR szTitle[1024];
TC_ITEM item;
item.mask = TCIF_TEXT;
item.pszText = szTitle;
item.cchTextMax = sizeof szTitle / sizeof (TCHAR);
if (!GetItem (nIndex, &item))
return FALSE;
strTitle = item.pszText;
return TRUE;
}
BOOL CTabCtrlSSL::SetSSLPageTitle (int nIndex, LPCTSTR pszTitle) {
if (nIndex >= GetItemCount ())
return FALSE;
TC_ITEM item;
item.mask = TCIF_TEXT;
item.pszText = (LPTSTR) pszTitle;
BOOL bResult = SetItem (nIndex, &item);
if (bResult)
Invalidate ();
return bResult;
}
int CTabCtrlSSL::GetSSLPageID (int nIndex) {
if (nIndex >= GetItemCount ())
return -1;
return m_nPageIDs[nIndex];
}
int CTabCtrlSSL::SetSSLPageID (int nIndex, int nPageID) {
if (nIndex >= GetItemCount ())
return -1;
int nOldPageID = m_nPageIDs[nIndex];
m_nPageIDs[nIndex] = nPageID;
return nOldPageID;
}
BOOL CTabCtrlSSL::ActivateSSLPage (int nIndex) {
if (nIndex >= GetItemCount ())
return FALSE;
// Do nothing if the specified page is already active.
if (nIndex == GetCurSel ())
return TRUE;
// Deactivate the current page.
int nOldIndex = GetCurSel ();
if (nIndex != -1) {
TabDelete tabDelete = m_tabs[nOldIndex];
CTabPageSSL* pDialog = tabDelete.pTabPage;
if (pDialog != NULL) {
m_hFocusWnd[nOldIndex] = ::GetFocus ();
pDialog->ShowWindow (SW_HIDE);
}
}
// Activate the new one.
SetCurSel (nIndex);
TabDelete tabDelete = m_tabs[nIndex];
CTabPageSSL* pDialog = tabDelete.pTabPage;
if (pDialog != NULL) {
::SetFocus (m_hFocusWnd[nIndex]);
CRect rect;
GetClientRect (&rect);
ResizeDialog (nIndex, rect.Width (), rect.Height ());
pDialog->ShowWindow (SW_SHOW);
}
return TRUE;
}
int CTabCtrlSSL::GetSSLActivePage (void) {
return GetCurSel ();
}
CWnd* CTabCtrlSSL::GetSSLPage (int nIndex) {
if (nIndex >= GetItemCount ())
return NULL;
TabDelete tabDelete = m_tabs[nIndex];
return (CWnd*) tabDelete.pTabPage;
}
int CTabCtrlSSL::GetSSLPageIndex (int nPageID) {
int nCount = GetItemCount ();
if (nCount == 0)
return -1;
for (int i=0; i<nCount; i++) {
if (m_nPageIDs[i] == nPageID)
return i;
}
return -1;
}
/////////////////////////////////////////////////////////////////////////////
// Private helper functions
#ifdef _DEBUG
BOOL CTabCtrlSSL::CheckDialogTemplate (LPCTSTR pszTemplateName) {
// Verify that the dialog resource exists.
ASSERT (pszTemplateName != NULL);
HINSTANCE hInstance = AfxFindResourceHandle (pszTemplateName, RT_DIALOG);
HRSRC hResource = ::FindResource (hInstance, pszTemplateName, RT_DIALOG);
if (hResource == NULL)
return FALSE; // Resource doesn't exist
HGLOBAL hTemplate = LoadResource (hInstance, hResource);
ASSERT (hTemplate != NULL);
// Get the dialog's style bits.
DLGTEMPLATEEX* pTemplate = (DLGTEMPLATEEX*) LockResource (hTemplate);
DWORD dwStyle;
if (pTemplate->signature == 0xFFFF)
dwStyle = pTemplate->style;
else
dwStyle = ((DLGTEMPLATE*) pTemplate)->style;
UnlockResource (hTemplate);
FreeResource (hTemplate);
// Verify that the dialog is an invisible child window.
if (dwStyle & WS_VISIBLE)
return FALSE; // WS_VISIBLE flag is set
if (!(dwStyle & WS_CHILD))
return FALSE; // WS_CHILD flag isn't set
// Verify that the dialog has no border and no title bar.
if (dwStyle & (WS_BORDER | WS_THICKFRAME | DS_MODALFRAME))
return FALSE; // One or more border flags are set
if (dwStyle & WS_CAPTION)
return FALSE; // WS_CAPTION flag is set
return TRUE;
}
#endif // _DEBUG
void CTabCtrlSSL::ResizeDialog (int nIndex, int cx, int cy) {
if (nIndex != -1) {
TabDelete tabDelete = m_tabs[nIndex];
CTabPageSSL* pDialog = tabDelete.pTabPage;
if (pDialog != NULL) {
CRect rect;
GetItemRect (nIndex, &rect);
int x, y, nWidth, nHeight;
DWORD dwStyle = GetStyle ();
if (dwStyle & TCS_VERTICAL) { // Vertical tabs
int nTabWidth =
rect.Width () * GetRowCount ();
x = (dwStyle & TCS_RIGHT) ? 4 : nTabWidth + 4;
y = 4;
nWidth = cx - nTabWidth - 8;
nHeight = cy - 8;
}
else { // Horizontal tabs
int nTabHeight =
rect.Height () * GetRowCount ();
x = 4;
y = (dwStyle & TCS_BOTTOM) ? 4 : nTabHeight + 4;
nWidth = cx - 8;
nHeight = cy - nTabHeight - 8;
}
pDialog->SetWindowPos (NULL, x, y, nWidth, nHeight, SWP_NOZORDER);
}
}
}
/////////////////////////////////////////////////////////////////////////////
// Overridables
BOOL CTabCtrlSSL::OnInitPage (int nIndex, int nPageID) {
// TODO: Override in derived class to initialise pages.
return TRUE;
}
void CTabCtrlSSL::OnActivatePage (int nIndex, int nPageID) {
// TODO: Override in derived class to respond to page activations.
}
void CTabCtrlSSL::OnDeactivatePage (int nIndex, int nPageID) {
// TODO: Override in derived class to respond to page deactivations.
}
void CTabCtrlSSL::OnDestroyPage (int nIndex, int nPageID) {
// TODO: Override in derived class to free resources.
}
/////////////////////////////////////////////////////////////////////////////
// Message handlers
void CTabCtrlSSL::OnSelChanging (NMHDR* pNMHDR, LRESULT* pResult) {
// Notify derived classes that the selection is changing.
int nIndex = GetCurSel ();
if (nIndex == -1)
return;
OnDeactivatePage (nIndex, m_nPageIDs[nIndex]);
// Save the input focus and hide the old page.
TabDelete tabDelete = m_tabs[nIndex];
CTabPageSSL* pDialog = tabDelete.pTabPage;
if (pDialog != NULL) {
m_hFocusWnd[nIndex] = ::GetFocus ();
pDialog->ShowWindow (SW_HIDE);
}
*pResult = 0;
}
void CTabCtrlSSL::OnSelChange (NMHDR* pNMHDR, LRESULT* pResult) {
int nIndex = GetCurSel ();
if (nIndex == -1)
return;
// Show the new page.
TabDelete tabDelete = m_tabs[nIndex];
CTabPageSSL* pDialog = tabDelete.pTabPage;
if (pDialog != NULL) {
::SetFocus (m_hFocusWnd[nIndex]);
CRect rect;
GetClientRect (&rect);
ResizeDialog (nIndex, rect.Width (), rect.Height ());
pDialog->ShowWindow (SW_SHOW);
}
// Notify derived classes that the selection has changed.
OnActivatePage (nIndex, m_nPageIDs[nIndex]);
*pResult = 0;
}
void CTabCtrlSSL::OnSetFocus (CWnd* pOldWnd) {
CTabCtrl::OnSetFocus (pOldWnd);
// Set the focus to a control on the current page.
int nIndex = GetCurSel ();
if (nIndex != -1)
::SetFocus (m_hFocusWnd[nIndex]);
}
void CTabCtrlSSL::OnKillFocus (CWnd* pNewWnd) {
CTabCtrl::OnKillFocus (pNewWnd);
// Save the HWND of the control that holds the input focus.
int nIndex = GetCurSel ();
if (nIndex != -1)
m_hFocusWnd[nIndex] = ::GetFocus ();
}
// My thanks to Tomasz Sowinski for all his help coming up with a workable
// solution to the stack versus heap object destruction
void CTabCtrlSSL::OnDestroy (void) {
int nCount = m_tabs.GetSize ();
// Destroy dialogs and delete CTabCtrlSSL objects.
if (nCount > 0) {
for (int i=nCount - 1; i>=0; i--) {
OnDestroyPage (i, m_nPageIDs[i]);
TabDelete tabDelete = m_tabs[i];
CTabPageSSL* pDialog = tabDelete.pTabPage;
if (pDialog != NULL) {
pDialog->DestroyWindow ();
if (TRUE == tabDelete.bDelete) {
delete pDialog;
}
}
}
}
// Clean up the internal arrays.
m_tabs.RemoveAll ();
m_hFocusWnd.RemoveAll ();
m_nPageIDs.RemoveAll ();
CTabCtrl::OnDestroy ();
}
BOOL CTabCtrlSSL::OnCommand (WPARAM wParam, LPARAM lParam) {
// Forward WM_COMMAND messages to the dialog's parent.
return GetParent ()->SendMessage (WM_COMMAND, wParam, lParam);
}
BOOL CTabCtrlSSL::OnNotify (WPARAM wParam, LPARAM lParam, LRESULT* pResult) {
// Forward WM_NOTIFY messages to the dialog's parent.
return GetParent ()->SendMessage (WM_NOTIFY, wParam, lParam);
}
BOOL CTabCtrlSSL::OnCmdMsg (UINT nID, int nCode, void* pExtra,
AFX_CMDHANDLERINFO* pHandlerInfo) {
// Forward ActiveX control events to the dialog's parent.
#ifndef _AFX_NO_OCC_SUPPORT
if (nCode == CN_EVENT)
return GetParent ()->OnCmdMsg (nID, nCode, pExtra, pHandlerInfo);
#endif // !_AFX_NO_OCC_SUPPORT
return CTabCtrl::OnCmdMsg (nID, nCode, pExtra, pHandlerInfo);
}
int CTabCtrlSSL::AddPage (LPCTSTR pszTitle, int nPageID, TabDelete tabDelete) {
// Add a page to the tab control.
TC_ITEM item;
item.mask = TCIF_TEXT;
item.pszText = (LPTSTR) pszTitle;
int nIndex = GetItemCount ();
if (InsertItem (nIndex, &item) == -1)
return -1;
if (NULL == tabDelete.pTabPage) {
// Fail - no point calling the function with a NULL pointer!
DeleteItem (nIndex);
return -1;
}
else {
// Record the address of the dialog object and the page ID.
int nArrayIndex = m_tabs.Add (tabDelete);
ASSERT (nIndex == nArrayIndex);
nArrayIndex = m_nPageIDs.Add (nPageID);
ASSERT (nIndex == nArrayIndex);
// Size and position the dialog box within the view.
tabDelete.pTabPage->SetParent (this); // Just to be sure
CRect rect;
GetClientRect (&rect);
if (rect.Width () > 0 && rect.Height () > 0)
ResizeDialog (nIndex, rect.Width (), rect.Height ());
// Initialize the page.
if (OnInitPage (nIndex, nPageID)) {
// Make sure the first control in the dialog is the one that
// receives the input focus when the page is displayed.
HWND hwndFocus = tabDelete.pTabPage->GetTopWindow ()->m_hWnd;
nArrayIndex = m_hFocusWnd.Add (hwndFocus);
ASSERT (nIndex == nArrayIndex);
}
else {
// Make the control that currently has the input focus is the one
// that receives the input focus when the page is displayed.
m_hFocusWnd.Add (::GetFocus ());
}
// If this is the first page added to the view, make it visible.
if (nIndex == 0)
tabDelete.pTabPage->ShowWindow (SW_SHOW);
}
return nIndex;
}
<p><p>1.1 icecast/win32/TabCtrlSSL.h
Index: TabCtrlSSL.h
===================================================================
#if !defined(AFX_TABCTRLSSL_H__75BE48A7_864C_11D5_9F04_000102FB9990__INCLUDED_)
#define AFX_TABCTRLSSL_H__75BE48A7_864C_11D5_9F04_000102FB9990__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// TabCtrlEx.h : header file
//
#include <afxtempl.h>
#include "TabPageSSL.h"
#ifdef _DEBUG
#pragma pack (push, 1)
typedef struct {
WORD dlgVer;
WORD signature;
DWORD helpID;
DWORD exStyle;
DWORD style;
WORD cDlgItems;
short x;
short y;
short cx;
short cy;
} DLGTEMPLATEEX;
#pragma pack (pop)
#endif // _DEBUG
/////////////////////////////////////////////////////////////////////////////
// CTabCtrlSSL window
class CTabCtrlSSL : public CTabCtrl {
public:
// Construction
CTabCtrlSSL ();
// Destruction
virtual ~CTabCtrlSSL (void);
// Page Functions
int AddSSLPage (LPCTSTR pszTitle, int nPageID, CTabPageSSL* pTabPage);
int AddSSLPage (LPCTSTR pszTitle, int nPageID, LPCTSTR pszTemplateName);
int AddSSLPage (LPCTSTR pszTitle, int nPageID, int nTemplateID);
BOOL RemoveSSLPage (int nIndex);
int GetSSLPageCount (void);
BOOL GetSSLPageTitle (int nIndex, CString& strTitle);
BOOL SetSSLPageTitle (int nIndex, LPCTSTR pszTitle);
int GetSSLPageID (int nIndex);
int SetSSLPageID (int nIndex, int nPageID);
BOOL ActivateSSLPage (int nIndex);
int GetSSLActivePage (void);
CWnd* GetSSLPage (int nIndex);
int GetSSLPageIndex (int nPageID);
void ResizeDialog (int nIndex, int cx, int cy);
protected:
struct TabDelete {
CTabPageSSL* pTabPage;
BOOL bDelete;
};
CArray<TabDelete, TabDelete> m_tabs;
CArray<HWND, HWND> m_hFocusWnd;
CArray<int, int> m_nPageIDs;
int AddPage (LPCTSTR pszTitle, int nPageID, TabDelete tabDelete);
virtual BOOL OnInitPage (int nIndex, int nPageID);
virtual void OnActivatePage (int nIndex, int nPageID);
virtual void OnDeactivatePage (int nIndex, int nPageID);
virtual void OnDestroyPage (int nIndex, int nPageID);
virtual BOOL OnCommand (WPARAM wParam, LPARAM lParam);
virtual BOOL OnNotify (WPARAM wParam, LPARAM lParam, LRESULT* pResult);
virtual BOOL OnCmdMsg (UINT nID, int nCode, void* pExtra,
AFX_CMDHANDLERINFO* pHandlerInfo);
#ifdef _DEBUG
BOOL CheckDialogTemplate (LPCTSTR pszTemplateName);
#endif // _DEBUG
// Generated message map functions
protected:
//{{AFX_MSG(CTabCtrlSSL)
afx_msg void OnDestroy (void);
afx_msg void OnSetFocus (CWnd* pOldWnd);
afx_msg void OnKillFocus (CWnd* pNewWnd);
afx_msg void OnSelChanging (NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnSelChange (NMHDR* pNMHDR, LRESULT* pResult);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TABCTRLSSL_H__75BE48A7_864C_11D5_9F04_000102FB9990__INCLUDED_)
<p><p>1.1 icecast/win32/TabPageSSL.cpp
Index: TabPageSSL.cpp
===================================================================
#include "stdafx.h"
#include "TabPageSSL.h"
#include "ResizableDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Construction
CTabPageSSL::CTabPageSSL () {
#ifndef _AFX_NO_OCC_SUPPORT
AfxEnableControlContainer ();
#endif // !_AFX_NO_OCC_SUPPORT
}
CTabPageSSL::CTabPageSSL (UINT nIDTemplate, CWnd* pParent /*=NULL*/)
: CResizableDialog(nIDTemplate, pParent) {
#ifndef _AFX_NO_OCC_SUPPORT
AfxEnableControlContainer ();
#endif // !_AFX_NO_OCC_SUPPORT
}
/////////////////////////////////////////////////////////////////////////////
// Destruction
CTabPageSSL::~CTabPageSSL () {
}
/////////////////////////////////////////////////////////////////////////////
// Message Handlers
void CTabPageSSL::OnOK (void) {
//
// Prevent CDialog::OnOK from calling EndDialog.
//
}
void CTabPageSSL::OnCancel (void) {
//
// Prevent CDialog::OnCancel from calling EndDialog.
//
}
BOOL CTabPageSSL::OnCommand (WPARAM wParam, LPARAM lParam) {
// Call base class OnCommand to allow message map processing
CResizableDialog::OnCommand (wParam, lParam);
//
// Forward WM_COMMAND messages to the dialog's parent.
//
return GetParent ()->SendMessage (WM_COMMAND, wParam, lParam);
}
BOOL CTabPageSSL::OnNotify (WPARAM wParam, LPARAM lParam, LRESULT* pResult) {
//
// Forward WM_NOTIFY messages to the dialog's parent.
//
CResizableDialog::OnNotify (wParam, lParam, pResult);
return GetParent ()->SendMessage (WM_NOTIFY, wParam, lParam);
}
BOOL CTabPageSSL::OnCmdMsg (UINT nID, int nCode, void* pExtra,
AFX_CMDHANDLERINFO* pHandlerInfo) {
//
// Forward ActiveX control events to the dialog's parent.
//
#ifndef _AFX_NO_OCC_SUPPORT
if (nCode == CN_EVENT)
return GetParent ()->OnCmdMsg (nID, nCode, pExtra, pHandlerInfo);
#endif // !_AFX_NO_OCC_SUPPORT
return CResizableDialog::OnCmdMsg (nID, nCode, pExtra, pHandlerInfo);
}
<p><p>1.1 icecast/win32/TabPageSSL.h
Index: TabPageSSL.h
===================================================================
#if !defined(AFX_TABPAGESSL_H__619331B3_7DE7_4DB1_A039_2103E87E8E71__INCLUDED_)
#define AFX_TABPAGESSL_H__619331B3_7DE7_4DB1_A039_2103E87E8E71__INCLUDED_
/////////////////////////////////////////////////////////////////////////////
// CTabPageSSL declaration
#include "ResizableDialog.h"
class CTabPageSSL : public CResizableDialog
{
public:
// Construction
CTabPageSSL (); // Default Constructor
CTabPageSSL (UINT nIDTemplate, CWnd* pParent = NULL); // Standard Constructor
// Destruction
~CTabPageSSL ();
protected:
// Message Handlers
virtual BOOL OnCommand (WPARAM wParam, LPARAM lParam);
virtual BOOL OnNotify (WPARAM wParam, LPARAM lParam, LRESULT* pResult);
virtual void OnOK (void);
virtual void OnCancel (void);
virtual BOOL OnCmdMsg (UINT nID, int nCode, void* pExtra,
AFX_CMDHANDLERINFO* pHandlerInfo);
};
#endif // !defined(AFX_TABPAGE_H__619331B3_7DE7_4DB1_A039_2103E87E8E71__INCLUDED_)
<p><p>1.1 icecast/win32/black.bmp
Index: black.bmp
===================================================================
BM¸p
<p>1.1 icecast/win32/colors.h
Index: colors.h
===================================================================
#define BGCOLOR RGB(0,0,0)
#define TEXTCOLOR RGB(175,175,175)
#define TEXTBGCOLOR RGB(0,0,0)
#define LOGOCOLOR RGB(175,175,175)
<p><p><p>1.1 icecast/win32/icecast.dsp
Index: icecast.dsp
===================================================================
# Microsoft Developer Studio Project File - Name="icecast" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=icecast - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "icecast.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "icecast.mak" CFG="icecast - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "icecast - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "icecast - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "icecast - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Releaseicecast"
# PROP Intermediate_Dir "Releaseicecast"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../../libxslt/include" /I "../../iconv/include" /I "../../libxml2/include" /I "..\src" /I "..\src/httpp" /I "..\src/thread" /I "..\src/log" /I "..\src/avl" /I "..\src/net" /I "..\src/timings" /I "../../pthreads" /I "../../ogg/include" /I "../../vorbis/include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "icecast - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debugicecast"
# PROP Intermediate_Dir "Debugicecast"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../" /I "../../libxslt/include" /I "../../iconv/include" /I "../../libxml2/include" /I "..\src" /I "..\src/httpp" /I "..\src/thread" /I "..\src/log" /I "..\src/avl" /I "..\src/net" /I "..\src/timings" /I "../../pthreads" /I "../../ogg/include" /I "../../vorbis/include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "_WIN32" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "icecast - Win32 Release"
# Name "icecast - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\src\avl\avl.c
# End Source File
# Begin Source File
SOURCE=..\src\avl\avl.h
# End Source File
# Begin Source File
SOURCE=..\src\client.c
# End Source File
# Begin Source File
SOURCE=..\src\client.h
# End Source File
# Begin Source File
SOURCE=..\src\compat.h
# End Source File
# Begin Source File
SOURCE=..\src\config.c
# End Source File
# Begin Source File
SOURCE=..\src\config.h
# End Source File
# Begin Source File
SOURCE=..\src\connection.c
# End Source File
# Begin Source File
SOURCE=..\src\connection.h
# End Source File
# Begin Source File
SOURCE=..\src\format.c
# End Source File
# Begin Source File
SOURCE=..\src\format.h
# End Source File
# Begin Source File
SOURCE=..\src\format_mp3.c
# End Source File
# Begin Source File
SOURCE=..\src\format_mp3.h
# End Source File
# Begin Source File
SOURCE=..\src\format_vorbis.c
# End Source File
# Begin Source File
SOURCE=..\src\format_vorbis.h
# End Source File
# Begin Source File
SOURCE=..\src\global.c
# End Source File
# Begin Source File
SOURCE=..\src\global.h
# End Source File
# Begin Source File
SOURCE=..\src\httpp\httpp.c
# End Source File
# Begin Source File
SOURCE=..\src\httpp\httpp.h
# End Source File
# Begin Source File
SOURCE=..\src\log\log.c
# End Source File
# Begin Source File
SOURCE=..\src\log\log.h
# End Source File
# Begin Source File
SOURCE=..\src\logging.c
# End Source File
# Begin Source File
SOURCE=..\src\logging.h
# End Source File
# Begin Source File
SOURCE=..\src\main.c
# End Source File
# Begin Source File
SOURCE=..\src\os.h
# End Source File
# Begin Source File
SOURCE=..\src\refbuf.c
# End Source File
# Begin Source File
SOURCE=..\src\refbuf.h
# End Source File
# Begin Source File
SOURCE=..\src\net\resolver.c
# End Source File
# Begin Source File
SOURCE=..\src\net\resolver.h
# End Source File
# Begin Source File
SOURCE=..\src\sighandler.c
# End Source File
# Begin Source File
SOURCE=..\src\sighandler.h
# End Source File
# Begin Source File
SOURCE=..\src\slave.c
# End Source File
# Begin Source File
SOURCE=..\src\net\sock.c
# End Source File
# Begin Source File
SOURCE=..\src\net\sock.h
# End Source File
# Begin Source File
SOURCE=..\src\source.c
# End Source File
# Begin Source File
SOURCE=..\src\source.h
# End Source File
# Begin Source File
SOURCE=..\src\stats.c
# End Source File
# Begin Source File
SOURCE=..\src\stats.h
# End Source File
# Begin Source File
SOURCE=..\src\thread\thread.c
# End Source File
# Begin Source File
SOURCE=..\src\thread\thread.h
# End Source File
# Begin Source File
SOURCE=..\src\timing\timing.c
# End Source File
# Begin Source File
SOURCE=..\src\util.c
# End Source File
# Begin Source File
SOURCE=..\src\util.h
# End Source File
# Begin Source File
SOURCE=..\src\xslt.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\src\timing\timing.h
# End Source File
# Begin Source File
SOURCE=..\src\xslt.h
# End Source File
# End Group
# End Target
# End Project
<p><p>1.1 icecast/win32/icecast.ico
Index: icecast.ico
===================================================================
<p><p>1.1 icecast/win32/icecast.xml
Index: icecast.xml
===================================================================
<icecast>
<location>Jack's House</location>
<admin>jack at icecast.org</admin>
<limits>
<clients>100</clients>
<sources>2</sources>
<threadpool>5</threadpool>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
</limits>
<source-password>hackme</source-password>
<directory>
<touch-freq>5</touch-freq>
<server>
<host>yp.icecast.org</host>
<touch-freq>15</touch-freq>
</server>
</directory>
<hostname>localhost</hostname>
<port>8100</port>
<!--<bind-address>127.0.0.1</bind-address>-->
<!--<master-server>127.0.0.1</master-server>-->
<!--<master-server-port>8001</master-server-port>-->
<!--<master-update-interval>120</master-update-interval>-->
<paths>
<webroot>.\webroot</webroot>
<basedir>.</basedir>
<logdir>.</logdir>
</paths>
<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
</logging>
<security>
<chroot>0</chroot>
<!-- <changeowner>
<user>nobody</user>
<group>nogroup</group>
</changeowner> -->
</security>
</icecast>
<p><p>1.1 icecast/win32/resource.h
Index: resource.h
===================================================================
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by Icecast2win.rc
//
#define IDM_ABOUTBOX 0x0010
#define IDD_ABOUTBOX 100
#define IDS_ABOUTBOX 101
#define IDD_ICECAST2WIN_DIALOG 102
#define IDR_MAINFRAME 128
#define IDR_MENU1 132
#define IDB_BITMAP1 134
#define IDB_BITMAP2 135
#define IDI_R 141
#define IDI_G 142
#define IDI_ICON1 142
#define IDD_SERVERSTATUS 144
#define IDD_SSTATUS 145
#define IDD_CONFIGDIALOG 146
#define IDD_STATSDIALOG 147
#define IDB_BITMAP3 149
#define IDB_BITMAP4 150
#define IDB_BITMAP5 151
#define IDB_BITMAP6 152
#define IDR_MENU2 153
#define IDR_MENU3 154
#define IDC_CURSOR1 155
#define IDC_CURSOR2 156
#define IDB_BITMAP7 159
#define IDC_MAINTAB 1000
#define IDC_ERROR_EDIT 1003
#define IDC_ACCESS_EDIT 1004
#define IDC_CONFIG_EDIT 1006
#define IDC_SERVERSTATUS 1008
#define IDC_SOURCES_CONNECTED 1009
#define IDC_NUMBER_CLIENTS 1010
#define IDC_GROUP1 1011
#define IDC_STATS_EDIT 1012
#define IDC_CONFIG 1020
#define IDC_STATSLIST 1021
#define IDC_SOURCELIST 1022
#define IDC_START 1023
#define IDC_AUTOSTART 1024
#define IDC_FILLER1 1025
#define IDC_FILLER2 1026
#define IDC_STATIC_SS 1029
#define IDC_GLOBALSTAT_LIST 1030
#define IDC_STATIC_GS 1031
#define IDC_STATIC_SLS 1032
#define IDC_RUNNINGFOR 1033
#define IDC_STATIC_RUN 1034
#define IDC_STATICBLACK 1035
#define ID_FILE_STARTSERVER 32771
#define ID_FILE_EXIT 32772
#define ID_FILE_STOPSERVER 32774
#define ID_FILE 32775
#define ID_POPUP_ADDTOGLOBALSTATLIST 32776
#define ID__DELETEFROMGLOBALSTATS 32777
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 160
#define _APS_NEXT_COMMAND_VALUE 32778
#define _APS_NEXT_CONTROL_VALUE 1036
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
<p><p>1.1 icecast/win32/running.bmp
Index: running.bmp
===================================================================
BMØ
5
.ìýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýBfBf5
PEW4ìýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýÜ º
ìýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýý]#.ýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýPE5
ýýý5
dË º
kPEW4PEPEý º
kýýýk º
ý5
PEýý º
kýýk º
ýPE5
ýý5
PEýý.dkBfW45
ýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýPE5
ýý'©k º
ýIVBfýýIVPEý º
kýýýk º
ý5
PEýý º
kýýk º
ýPE5
ýý5
PEýÜk º
ý º
]#5
ýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýPE5
ýËd.ýýPE5
ýý5
PEý º
kýýýk º
ý5
PEýý º
kýýk º
ýPE5
ýý5
PEý5
W4ýýýPE5
ýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýPEPE5
]#;w ýýýPE5
ýý5
PEý º
kýýýk º
ý5
PEýý º
kýýk º
ýPE5
ýý5
PEý5
PEýýýPE5
ýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýPEPE5
;w ]#'©ýýPE5
ýý5
PEý º
kýýýk º
ý5
PEýý º
kýýk º
ýPE5
ýý5
PEý.dýýýPE5
ýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýPE5
ýý.]#ýýPE5
ýý5
PEý º
kIV º
5
dìý5
k5
º
IVPEýýk º
ýPEd. º
]#5
ýýW4IV º
.]#5
ýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýPE5
ýý º
kýý. º
ýý º
.ýÜ5
ËIVPE'©ýý º
.'©PEIVËýý5
Üý. º
5
PEBfìýýì;w PEBf5
º
ýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýPEBf º
'©W4PEýýýýýýýýýýýýýýýýýýýýýýýýý5
Üýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýý;w PEPEPE5
ìýýýýýýýýýýýýýýýýýýýýýýýýýPEËýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýý
ýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýýý
<p>1.1 icecast/win32/stopped.bmp
Index: stopped.bmp
===================================================================
BMØ
<p>1.1 icecast/win32/res/Icecast2win.rc2
Index: Icecast2win.rc2
===================================================================
//
// ICECAST2WIN.RC2 - resources Microsoft Visual C++ does not edit directly
//
#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
<p>/////////////////////////////////////////////////////////////////////////////
// Add manually edited resources here...
/////////////////////////////////////////////////////////////////////////////
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list