Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
66c8355a
Commit
66c8355a
authored
Aug 22, 2005
by
jpbl
Browse files
See changelog
parent
58420831
Changes
38
Hide whitespace changes
Inline
Side-by-side
CHANGES
View file @
66c8355a
SFLphone (0.4.1-rc1) / 2005-08-11
SFLphone (0.4.1-pre2) / now
* rearranged utilspp use
SFLphone (0.4.1-pre1) / 2005-08-11
* Use libeXosip2
* Add blink notification for voice-message
* Add scrolling text
...
...
ChangeLog
View file @
66c8355a
Jean-Philippe Barette-LaPierre (28 April 2005) version 0.4.1-pre1
- Manager has now a LifetimeLibrary policy.
- Utilspp has been rearranged.
Laurielle LEA (10 August 2005) version 0.4
- Add blink notification for voice-message
- Cleanup code
...
...
DEPS
View file @
66c8355a
...
...
@@ -2,4 +2,4 @@ PortAudio: http://portaudio.com/archives/pa_snapshot_v19.tar.gz
Common C++ 2 1.3.6: http://sourceforge.net/projects/cplusplus/
ccRTP 1.3.0: http://sourceforge.net/projects/cplusplus/
libosip 2.2.1: http://savannah.gnu.org/projects/osip/
libeXosip2-1.9.1-pre15: http://www.antisip.com/download/
libeXosip2-1.9.1-pre15: http://www.antisip.com/download/
\ No newline at end of file
INSTALL
View file @
66c8355a
Installation
Instructions
*************************
Copyright
(
C
)
1994
,
1995
,
1996
,
1999
,
2000
,
2001
,
2002
,
2004
,
2005
Free
Software
Foundation
,
Inc
.
...
...
Makefile.am
View file @
66c8355a
SUBDIRS
=
stund src skins rings pixmaps utilspp
SUBDIRS
=
utilspp stund src skins rings pixmaps
configure.ac
View file @
66c8355a
...
...
@@ -137,11 +137,12 @@ src/audio/pacpp/source/Makefile \
src/audio/pacpp/source/portaudiocpp/Makefile \
src/gui/Makefile \
src/gui/qt/Makefile \
utilspp/Makefile \
utilspp/singleton/Makefile \
stund/Makefile \
pixmaps/Makefile \
skins/Makefile \
skins/emetal/Makefile \
skins/metal/Makefile \
rings/Makefile \
utilspp/Makefile \
)
src/Makefile.am
View file @
66c8355a
...
...
@@ -36,8 +36,8 @@ sflphone_SOURCES = \
sflphone_CXXFLAGS
=
-DPREFIX
=
\"
$(prefix)
\"
-DPROGSHAREDIR
=
\"
${datadir}
/sflphone
\"
sflphone_LDFLAGS
=
$(QT_LDFLAGS)
$(X_LDFLAGS)
sflphone_LDADD
=
gui/libguiframework.la audio/libaudio.la ../stund/libstun.la
-lpthread
$(LIBQT)
$(SFLPHONE_LIBS)
sflphone_LDFLAGS
=
$(QT_LDFLAGS)
$(X_LDFLAGS)
-static
sflphone_LDADD
=
gui/libguiframework.la audio/libaudio.la ../stund/libstun.la
../utilspp/libutilspp.la
-lpthread
$(LIBQT)
$(SFLPHONE_LIBS)
KDE_CXXFLAGS
=
$(USE_EXCEPTIONS)
AM_CPPFLAGS
=
$(QT_INCLUDES)
$(X_INCLUDES)
-Iaudio
/pacpp/include
$(libccext2_CFLAGS)
$(libccgnu2_CFLAGS)
$(portaudio_CFLAGS)
...
...
src/audio/audiocodec.cpp
View file @
66c8355a
...
...
@@ -17,7 +17,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include
<string.h>
#include
<iostream>
#include
<string>
...
...
src/main.cpp
View file @
66c8355a
...
...
@@ -36,22 +36,29 @@
int
main
(
int
argc
,
char
**
argv
)
{
int
exit_code
;
Config
::
setTree
(
new
ConfigurationTree
());
GuiFramework
*
GUI
;
#if defined(GUI_QT)
QApplication
a
(
argc
,
argv
);
Manager
::
instance
().
initConfigFile
();
GUI
=
new
QtGUIMainWindow
(
0
,
0
,
Qt
::
WDestructiveClose
|
Qt
::
WStyle_Customize
|
Qt
::
WStyle_NoBorder
);
Manager
::
instance
().
setGui
(
GUI
);
Manager
::
instance
().
init
();
a
.
setMainWidget
((
QtGUIMainWindow
*
)
GUI
);
return
a
.
exec
();
{
utilspp
::
LifetimeLibraryGuard
<
utilspp
::
LifetimeLibrarySingleton
>
guard
();
(
void
)
guard
;
QApplication
a
(
argc
,
argv
);
Manager
::
instance
().
initConfigFile
();
GUI
=
new
QtGUIMainWindow
(
0
,
0
,
Qt
::
WDestructiveClose
|
Qt
::
WStyle_Customize
|
Qt
::
WStyle_NoBorder
);
Manager
::
instance
().
setGui
(
GUI
);
Manager
::
instance
().
init
();
a
.
setMainWidget
((
QtGUIMainWindow
*
)
GUI
);
exit_code
=
a
.
exec
();
}
#endif
return
exit_code
;
}
...
...
src/manager.h
View file @
66c8355a
...
...
@@ -21,12 +21,14 @@
#ifndef SFLPHONE_MANAGER_H
#define SFLPHONE_MANAGER_H
#include
"utilspp/
s
ingleton
_holder
.hpp"
#include
"utilspp/
S
ingleton.hpp"
#include
"managerimpl.h"
typedef
utilspp
::
singleton_holder
<
ManagerImpl
>
Manager
;
typedef
utilspp
::
SingletonHolder
<
ManagerImpl
,
utilspp
::
CreationUsingNew
,
utilspp
::
LifetimeLibrary
,
utilspp
::
ThreadingSingle
>
Manager
;
#endif
utilspp/utilspp/Makefile.am
0 → 100644
View file @
66c8355a
SUBDIRS
=
singleton
lib_LTLIBRARIES
=
libutilspp.la
libutilspp_la_SOURCES
=
\
NonCopyable.hpp
\
NullType.hpp
\
Singleton.hpp
\
SmartPtr.hpp
\
ThreadingFactoryMutex.hpp
\
ThreadingSingle.hpp
\
TypeList.hpp
\
TypeTrait.hpp
pkginclude_HEADERS
=
\
NonCopyable.hpp
\
NullType.hpp
\
Singleton.hpp
\
SmartPtr.hpp
\
ThreadingFactoryMutex.hpp
\
ThreadingSingle.hpp
\
TypeList.hpp
\
TypeTrait.hpp
pkgincludedir
=
$(includedir)
/utilspp
libutilspp_la_LIBADD
=
./singleton/libsingleton.la
utilspp/utilspp/NonCopyable.hpp
0 → 100644
View file @
66c8355a
/*
* Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (cURLpp), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef UTILSPP_NONCOPYABLE_HPP
#define UTILSPP_NONCOPYABLE_HPP
namespace
utilspp
{
class
NonCopyable
{
public:
NonCopyable
()
{}
private:
NonCopyable
(
const
NonCopyable
&
r
)
{}
};
};
#endif
utilspp/utilspp/NullType.hpp
0 → 100644
View file @
66c8355a
/*
* Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (cURLpp), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef UTILSPP_NULLTYPE_HPP
#define UTILSPP_NULLTYPE_HPP
namespace
utilspp
{
struct
NullType
;
};
#endif
utilspp/utilspp/Singleton.hpp
0 → 100644
View file @
66c8355a
#include
"ThreadingSingle.hpp"
#include
"singleton/SingletonHolder.hpp"
#include
"singleton/LifetimeLibrary.hpp"
utilspp/utilspp/SmartPtr.hpp
0 → 100644
View file @
66c8355a
/*
* Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (cURLpp), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef UTILSPP_SMARTPTR_HPP
#define UTILSPP_SMARTPTR_HPP
#include
<stdexcept>
#include
"NonCopyable.hpp"
#define NULL_BODY_ERROR "the smart pointer contain a NULL pointer"
namespace
utilspp
{
template
<
typename
Type
=
unsigned
int
>
class
FastCount
{
public:
FastCount
(
Type
count
=
1
)
:
mCount
(
count
)
{}
FastCount
&
operator
++
()
{
mCount
++
;
return
*
this
;
}
FastCount
&
operator
--
()
{
mCount
--
;
return
*
this
;
}
operator
Type
()
{
return
mCount
;
}
Type
useCount
()
{
return
mCount
;
}
private:
Type
mCount
;
};
template
<
typename
ContentType
,
typename
CountPolicy
=
FastCount
>
class
CountingBody
:
public
utilspp
::
NonCopyable
{
public:
CountingBody
(
ContentType
*
body
)
:
mBody
(
body
)
{}
void
inc
()
{
++
mCount
;
}
void
dec
()
{
--
mCount
;
if
(
mCount
<=
0
)
{
delete
this
;
}
}
ContentType
*
get
()
{
return
mBody
;
}
protected:
~
CountingBody
()
{
if
(
mBody
!=
NULL
)
{
delete
mBody
;
mBody
=
NULL
;
}
}
private:
CountPolicy
mCount
;
ContentType
*
mBody
;
};
template
<
typename
ContentType
,
typename
CountingBodyPolicy
=
CountingBody
>
class
SharedPtr
{
public:
SharedPtr
()
:
mContent
(
new
CountingPolicy
<
ContentType
>
(
NULL
))
{}
explicit
SharedPtr
(
ContentType
*
content
)
:
mContent
(
new
CountingBodyPolicy
<
ContentType
>
(
content
))
{}
~
SharedPtr
()
{
mContent
->
dec
();
}
SharedPtr
(
const
SharedPtr
&
other
)
:
mContent
(
other
.
mContent
)
{
mContent
->
inc
();
}
SharedPtr
&
operator
=
(
const
SharedPtr
&
other
)
{
if
(
mContent
->
get
()
!=
other
.
mContent
->
get
())
{
mContent
->
dec
();
mContent
=
other
.
mContent
;
mContent
->
inc
();
}
return
(
*
this
);
}
SharedPtr
&
operator
=
(
ContentType
*
content
)
{
mContent
--
;
mContent
=
new
CountingBodyPolicy
<
ContentType
>
(
content
);
}
bool
operator
==
(
const
SharedPtr
&
other
)
const
{
return
(
mContent
->
get
()
==
other
.
mContent
->
get
());
}
bool
operator
!=
(
const
SharedPtr
&
other
)
const
{
return
(
mContent
->
get
()
!=
other
.
mContent
->
get
());
}
bool
operator
<
(
const
SharedPtr
&
other
)
const
{
return
(
mContent
->
get
()
<
other
.
mContent
->
get
());
}
operator
ContentType
*
()
{
return
mContent
->
get
();
}
ContentType
&
operator
*
()
{
if
(
mContent
->
get
()
==
NULL
)
{
throw
std
::
runtime_error
(
NULL_BODY_ERROR
);
}
return
*
mContent
->
get
();
}
ContentType
*
operator
->
()
{
if
(
mContent
->
get
()
==
NULL
)
{
throw
std
::
runtime_error
(
NULL_BODY_ERROR
);
}
return
mContent
->
get
();
}
private:
CountingBodyPolicy
*
mContent
;
};
};
#endif
utilspp/utilspp/ThreadingFactoryMutex.hpp
0 → 100644
View file @
66c8355a
/*
* Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (cURLpp), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef THREADING_FACTORY_MUTEX_HPP
#define THREADING_FACTORY_MUTEX_HPP
namespace
utilspp
{
template
<
typename
T
>
struct
ThreadingFactoryMutex
{
struct
lock
{
lock
();
lock
(
const
T
&
);
};
typedef
T
VolatileType
;
};
};
#include
"ThreadingFactoryMutex.inl"
#endif
utilspp/utilspp/ThreadingFactoryMutex.inl
0 → 100644
View file @
66c8355a
/*
* Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (cURLpp), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef THREADING_FACTORY_MUTEX_INL
#define THREADING_FACTORY_MUTEX_INL
template< typename T >
inline
utilspp::ThreadingSingle< T >::lock::lock()
{};
template< typename T >
inline
utilspp::ThreadingSingle< T >::lock::lock( const T & )
{};
#endif
\ No newline at end of file
utilspp/utilspp/ThreadingSingle.hpp
0 → 100644
View file @
66c8355a
/*
* Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (cURLpp), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef SINGLE_THREADED_HPP
#define SINGLE_THREADED_HPP
#include
"NullType.hpp"
namespace
utilspp
{
template
<
typename
T
=
utilspp
::
NullType
>
struct
ThreadingSingle
{
struct
mutex
{
void
lock
();
void
unlock
();
};
struct
lock
{
lock
();
lock
(
mutex
&
m
);
};
typedef
T
VolatileType
;
};
};
#include
"ThreadingSingle.inl"
#endif
utilspp/utilspp/ThreadingSingle.inl
0 → 100644
View file @
66c8355a
/*
* Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (cURLpp), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef SINGLE_THREADED_INL
#define SINGLE_THREADED_INL
template< typename T >
inline
utilspp::ThreadingSingle< T >::lock::lock()
{};
template< typename T >
inline
utilspp::ThreadingSingle< T >::lock::lock(
utilspp::ThreadingSingle< T >::mutex & )
{}
template< typename T >
inline
void
utilspp::ThreadingSingle< T >::mutex::lock()
{};
template< typename T >
inline
void
utilspp::ThreadingSingle< T >::mutex::unlock()
{};
#endif
utilspp/utilspp/TypeList.hpp
0 → 100644
View file @
66c8355a
/*
* Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (cURLpp), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,