summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2014-07-15 14:45:28 (GMT)
committerSwift Review <review@swift.im>2014-10-01 12:15:02 (GMT)
commita2296b00c88df201b0eb58e867aeb17a87e6332c (patch)
tree9fdebba1b5e9202ca669786a41dd94f080ba5807
parenta24d8c0e93d70312fc90d5fdf6214ade9a475e92 (diff)
downloadswift-a2296b00c88df201b0eb58e867aeb17a87e6332c.zip
swift-a2296b00c88df201b0eb58e867aeb17a87e6332c.tar.bz2
Port many of Isode's local fixes upstream
Includes fixes to: Build with new Visual Studio and Boost Avoid error caused when Avahi is present but Qt is not Make declaration of XMPPRosterImpl::addContact consistent with implementation Includes enhancements to: Allow user-configurable mt.exe Allow splitting openssl paths Allow disabling gconf lookup Make idn support optional Allow disabling various library detections Remove use of non-Python2.4 features in sconscripts Test-Information: Builds Change-Id: Iee91ee80291a8bdf87cc169c915e4dad1cc1055b
-rw-r--r--3rdParty/CppUnit/SConscript2
-rw-r--r--3rdParty/HippoMocks/hippomocks.h608
-rw-r--r--3rdParty/SCons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/vc.py35
-rw-r--r--BuildTools/SCons/SConscript.boot83
-rw-r--r--BuildTools/SCons/SConstruct100
-rw-r--r--BuildTools/SCons/Tools/Test.py11
-rw-r--r--BuildTools/SCons/Version.py11
-rw-r--r--COPYING.thirdparty35
-rw-r--r--Documentation/SwiftenDevelopersGuide/Examples/EchoBot/SConscript4
-rw-r--r--Documentation/SwiftenDevelopersGuide/SConscript6
-rw-r--r--QA/Checker/SConscript4
-rw-r--r--Slimber/SConscript8
-rw-r--r--SwifTools/Application/UnixApplicationPathProvider.cpp5
-rw-r--r--Swiften/Client/XMLBeautifier.h7
-rw-r--r--Swiften/EventLoop/EventLoop.h6
-rw-r--r--Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h16
-rw-r--r--Swiften/Network/PlatformNetworkEnvironment.h6
-rw-r--r--Swiften/Network/SConscript8
-rw-r--r--Swiften/Network/SolarisNetworkEnvironment.cpp292
-rw-r--r--Swiften/Network/SolarisNetworkEnvironment.h29
-rw-r--r--Swiften/Parser/PayloadParserFactoryCollection.cpp6
-rw-r--r--Swiften/Roster/XMPPRosterImpl.h2
-rw-r--r--Swiften/Serializer/PayloadSerializerCollection.cpp6
-rw-r--r--Swiften/Session/BasicSessionStream.cpp20
24 files changed, 892 insertions, 418 deletions
diff --git a/3rdParty/CppUnit/SConscript b/3rdParty/CppUnit/SConscript
index ad287f3..addc8ab 100644
--- a/3rdParty/CppUnit/SConscript
+++ b/3rdParty/CppUnit/SConscript
@@ -4,6 +4,8 @@ if env["TEST"] :
if env["PLATFORM"] == "win32" :
cppflags = ["/I" + Dir("src/include").abspath]
+ elif env["PLATFORM"] == "sunos" :
+ cppflags = [("-I" + Dir("src/include").abspath)]
else :
cppflags = [("-isystem", Dir("src/include").abspath)]
diff --git a/3rdParty/HippoMocks/hippomocks.h b/3rdParty/HippoMocks/hippomocks.h
index 802d719..3483dce 100644
--- a/3rdParty/HippoMocks/hippomocks.h
+++ b/3rdParty/HippoMocks/hippomocks.h
@@ -10,7 +10,7 @@
#define EXCEPTION_BUFFER_SIZE 65536
#endif
-#ifndef VIRT_FUNC_LIMIT
+#ifndef VIRT_FUNC_LIMIT
#define VIRT_FUNC_LIMIT 1024
#elif VIRT_FUNC_LIMIT > 1024
#error Adjust the code to support more than 1024 virtual functions before setting the VIRT_FUNC_LIMIT above 1024
@@ -30,9 +30,10 @@
#include <iostream>
#include <sstream>
#include <cstring>
+#include <string>
#ifdef _MSC_VER
-// these warnings are pointless and huge, and will confuse new users.
+// these warnings are pointless and huge, and will confuse new users.
#pragma warning(push)
// If you can't generate an assignment operator the least you can do is shut up.
#pragma warning(disable: 4512)
@@ -56,24 +57,24 @@ class base_mock {
public:
void destroy() { unwriteVft(); delete this; }
virtual ~base_mock() {}
- void *rewriteVft(void *newVf)
+ void *rewriteVft(void *newVf)
{
void *oldVf = *(void **)this;
*(void **)this = newVf;
return oldVf;
}
- void unwriteVft()
+ void unwriteVft()
{
*(void **)this = (*(void ***)this)[-1];
}
};
-class NullType
+class NullType
{
-public:
- bool operator==(const NullType &) const
+public:
+ bool operator==(const NullType &) const
{
- return true;
+ return true;
}
};
@@ -86,7 +87,7 @@ inline std::ostream &operator<<(std::ostream &os, NotPrintable const&)
}
template <typename T>
-struct printArg
+struct printArg
{
static inline void print(std::ostream &os, T arg, bool withComma)
{
@@ -103,14 +104,14 @@ struct printArg<NullType>
}
};
-class base_tuple
+class base_tuple
{
protected:
- base_tuple()
+ base_tuple()
{
- }
-public:
- virtual ~base_tuple()
+ }
+public:
+ virtual ~base_tuple()
{
}
virtual bool operator==(const base_tuple &) const = 0;
@@ -139,9 +140,9 @@ struct comparer
}
};
-template <typename A = NullType, typename B = NullType, typename C = NullType, typename D = NullType,
- typename E = NullType, typename F = NullType, typename G = NullType, typename H = NullType,
- typename I = NullType, typename J = NullType, typename K = NullType, typename L = NullType,
+template <typename A = NullType, typename B = NullType, typename C = NullType, typename D = NullType,
+ typename E = NullType, typename F = NullType, typename G = NullType, typename H = NullType,
+ typename I = NullType, typename J = NullType, typename K = NullType, typename L = NullType,
typename M = NullType, typename N = NullType, typename O = NullType, typename P = NullType>
class tuple : public base_tuple
{
@@ -162,13 +163,13 @@ public:
typename no_cref<N>::type n;
typename no_cref<O>::type o;
typename no_cref<P>::type p;
- tuple(typename no_cref<A>::type a = typename no_cref<A>::type(), typename no_cref<B>::type b = typename no_cref<B>::type(),
- typename no_cref<C>::type c = typename no_cref<C>::type(), typename no_cref<D>::type d = typename no_cref<D>::type(),
- typename no_cref<E>::type e = typename no_cref<E>::type(), typename no_cref<F>::type f = typename no_cref<F>::type(),
+ tuple(typename no_cref<A>::type a = typename no_cref<A>::type(), typename no_cref<B>::type b = typename no_cref<B>::type(),
+ typename no_cref<C>::type c = typename no_cref<C>::type(), typename no_cref<D>::type d = typename no_cref<D>::type(),
+ typename no_cref<E>::type e = typename no_cref<E>::type(), typename no_cref<F>::type f = typename no_cref<F>::type(),
typename no_cref<G>::type g = typename no_cref<G>::type(), typename no_cref<H>::type h = typename no_cref<H>::type(),
- typename no_cref<I>::type i = typename no_cref<I>::type(), typename no_cref<J>::type j = typename no_cref<J>::type(),
- typename no_cref<K>::type k = typename no_cref<K>::type(), typename no_cref<L>::type l = typename no_cref<L>::type(),
- typename no_cref<M>::type m = typename no_cref<M>::type(), typename no_cref<N>::type n = typename no_cref<N>::type(),
+ typename no_cref<I>::type i = typename no_cref<I>::type(), typename no_cref<J>::type j = typename no_cref<J>::type(),
+ typename no_cref<K>::type k = typename no_cref<K>::type(), typename no_cref<L>::type l = typename no_cref<L>::type(),
+ typename no_cref<M>::type m = typename no_cref<M>::type(), typename no_cref<N>::type n = typename no_cref<N>::type(),
typename no_cref<O>::type o = typename no_cref<O>::type(), typename no_cref<P>::type p = typename no_cref<P>::type())
: a(a), b(b), c(c), d(d), e(e), f(f), g(g), h(h), i(i), j(j), k(k), l(l), m(m), n(n), o(o), p(p)
{}
@@ -570,7 +571,7 @@ int getFunctionIndex(T func) {
// mock types
template <class T>
-class mock : public base_mock
+class mock : public base_mock
{
friend class MockRepository;
unsigned char remaining[sizeof(T)];
@@ -581,10 +582,10 @@ protected:
MockRepository *repo;
public:
int funcMap[VIRT_FUNC_LIMIT];
- mock(MockRepository *repo)
+ mock(MockRepository *repo)
: repo(repo)
{
- for (int i = 0; i < VIRT_FUNC_LIMIT; i++)
+ for (int i = 0; i < VIRT_FUNC_LIMIT; i++)
{
funcs[i] = getNonvirtualMemberFunctionAddress<void (*)()>(&mock<T>::NotImplemented);
funcMap[i] = -1;
@@ -592,9 +593,9 @@ public:
memset(remaining, 0, sizeof(remaining));
oldVft = base_mock::rewriteVft(funcs);
}
- int translateX(int x)
+ int translateX(int x)
{
- for (int i = 0; i < VIRT_FUNC_LIMIT; i++)
+ for (int i = 0; i < VIRT_FUNC_LIMIT; i++)
{
if (funcMap[i] == x) return i;
}
@@ -607,7 +608,7 @@ class classMock : public mock<T>
{
void *backupVft;
public:
- classMock(MockRepository *repo)
+ classMock(MockRepository *repo)
: mock<T>(repo)
{
mock<T>::oldVft = base_mock::rewriteVft((void *)mock<T>::funcs);
@@ -622,11 +623,11 @@ public:
};
//Type-safe exception wrapping
-class ExceptionHolder
-{
+class ExceptionHolder
+{
public:
virtual ~ExceptionHolder() {}
- virtual void rethrow() = 0;
+ virtual void rethrow() = 0;
};
template <class T>
@@ -641,16 +642,16 @@ public:
class VirtualDestructable { public: virtual ~VirtualDestructable() {} };
template <typename Y>
-class TupleInvocable : public VirtualDestructable
+class TupleInvocable : public VirtualDestructable
{
public:
virtual Y operator()(const base_tuple &tupl) = 0;
};
template <typename Y,
- typename A = NullType, typename B = NullType, typename C = NullType, typename D = NullType,
- typename E = NullType, typename F = NullType, typename G = NullType, typename H = NullType,
- typename I = NullType, typename J = NullType, typename K = NullType, typename L = NullType,
+ typename A = NullType, typename B = NullType, typename C = NullType, typename D = NullType,
+ typename E = NullType, typename F = NullType, typename G = NullType, typename H = NullType,
+ typename I = NullType, typename J = NullType, typename K = NullType, typename L = NullType,
typename M = NullType, typename N = NullType, typename O = NullType, typename P = NullType>
class Invocable : public TupleInvocable<Y>
{
@@ -658,14 +659,14 @@ public:
virtual Y operator()(A a = A(), B b = B(), C c = C(), D d = D(), E e = E(), F f = F(), G g = G(), H h = H(), I i = I(), J j = J(), K k = K(), L l = L(), M m = M(), N n = N(), O o = O(), P p = P()) = 0;
virtual Y operator()(const base_tuple &tupl) {
const tuple<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &rTupl = reinterpret_cast<const tuple<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &>(tupl);
- return (*this)(rTupl.a, rTupl.b, rTupl.c, rTupl.d, rTupl.e, rTupl.f, rTupl.g, rTupl.h,
+ return (*this)(rTupl.a, rTupl.b, rTupl.c, rTupl.d, rTupl.e, rTupl.f, rTupl.g, rTupl.h,
rTupl.i, rTupl.j, rTupl.k, rTupl.l, rTupl.m, rTupl.n, rTupl.o, rTupl.p);
}
};
template <typename T, typename Y,
- typename A, typename B, typename C, typename D,
- typename E, typename F, typename G, typename H,
- typename I, typename J, typename K, typename L,
+ typename A, typename B, typename C, typename D,
+ typename E, typename F, typename G, typename H,
+ typename I, typename J, typename K, typename L,
typename M, typename N, typename O, typename P>
class DoWrapper : public Invocable<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> {
T &t;
@@ -678,9 +679,9 @@ public:
using Invocable<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P>::operator();
};
template <typename T, typename Y,
- typename A, typename B, typename C, typename D,
- typename E, typename F, typename G, typename H,
- typename I, typename J, typename K, typename L,
+ typename A, typename B, typename C, typename D,
+ typename E, typename F, typename G, typename H,
+ typename I, typename J, typename K, typename L,
typename M, typename N, typename O>
class DoWrapper<T,Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,NullType> : public Invocable<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> {
T &t;
@@ -693,9 +694,9 @@ public:
using Invocable<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O>::operator();
};
template <typename T, typename Y,
- typename A, typename B, typename C, typename D,
- typename E, typename F, typename G, typename H,
- typename I, typename J, typename K, typename L,
+ typename A, typename B, typename C, typename D,
+ typename E, typename F, typename G, typename H,
+ typename I, typename J, typename K, typename L,
typename M, typename N>
class DoWrapper<T,Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,NullType,NullType> : public Invocable<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> {
T &t;
@@ -708,9 +709,9 @@ public:
using Invocable<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N>::operator();
};
template <typename T, typename Y,
- typename A, typename B, typename C, typename D,
- typename E, typename F, typename G, typename H,
- typename I, typename J, typename K, typename L,
+ typename A, typename B, typename C, typename D,
+ typename E, typename F, typename G, typename H,
+ typename I, typename J, typename K, typename L,
typename M>
class DoWrapper<T,Y,A,B,C,D,E,F,G,H,I,J,K,L,M,NullType,NullType,NullType> : public Invocable<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> {
T &t;
@@ -723,8 +724,8 @@ public:
using Invocable<Y,A,B,C,D,E,F,G,H,I,J,K,L,M>::operator();
};
template <typename T, typename Y,
- typename A, typename B, typename C, typename D,
- typename E, typename F, typename G, typename H,
+ typename A, typename B, typename C, typename D,
+ typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L>
class DoWrapper<T,Y,A,B,C,D,E,F,G,H,I,J,K,L,NullType,NullType,NullType,NullType> : public Invocable<Y,A,B,C,D,E,F,G,H,I,J,K,L> {
T &t;
@@ -737,8 +738,8 @@ public:
using Invocable<Y,A,B,C,D,E,F,G,H,I,J,K,L>::operator();
};
template <typename T, typename Y,
- typename A, typename B, typename C, typename D,
- typename E, typename F, typename G, typename H,
+ typename A, typename B, typename C, typename D,
+ typename E, typename F, typename G, typename H,
typename I, typename J, typename K>
class DoWrapper<T,Y,A,B,C,D,E,F,G,H,I,J,K,NullType,NullType,NullType,NullType,NullType> : public Invocable<Y,A,B,C,D,E,F,G,H,I,J,K> {
T &t;
@@ -751,8 +752,8 @@ public:
using Invocable<Y,A,B,C,D,E,F,G,H,I,J,K>::operator();
};
template <typename T, typename Y,
- typename A, typename B, typename C, typename D,
- typename E, typename F, typename G, typename H,
+ typename A, typename B, typename C, typename D,
+ typename E, typename F, typename G, typename H,
typename I, typename J>
class DoWrapper<T,Y,A,B,C,D,E,F,G,H,I,J,NullType,NullType,NullType,NullType,NullType,NullType> : public Invocable<Y,A,B,C,D,E,F,G,H,I,J> {
T &t;
@@ -765,8 +766,8 @@ public:
using Invocable<Y,A,B,C,D,E,F,G,H,I,J>::operator();
};
template <typename T, typename Y,
- typename A, typename B, typename C, typename D,
- typename E, typename F, typename G, typename H,
+ typename A, typename B, typename C, typename D,
+ typename E, typename F, typename G, typename H,
typename I>
class DoWrapper<T,Y,A,B,C,D,E,F,G,H,I,NullType,NullType,NullType,NullType,NullType,NullType,NullType> : public Invocable<Y,A,B,C,D,E,F,G,H,I>{
T &t;
@@ -779,7 +780,7 @@ public:
using Invocable<Y,A,B,C,D,E,F,G,H,I>::operator();
};
template <typename T, typename Y,
- typename A, typename B, typename C, typename D,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H>
class DoWrapper<T,Y,A,B,C,D,E,F,G,H,NullType,NullType,NullType,NullType,NullType,NullType,NullType,NullType> : public Invocable<Y,A,B,C,D,E,F,G,H> {
T &t;
@@ -792,7 +793,7 @@ public:
using Invocable<Y,A,B,C,D,E,F,G,H>::operator();
};
template <typename T, typename Y,
- typename A, typename B, typename C, typename D,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G>
class DoWrapper<T,Y,A,B,C,D,E,F,G,NullType,NullType,NullType,NullType,NullType,NullType,NullType,NullType,NullType> : public Invocable<Y,A,B,C,D,E,F,G> {
T &t;
@@ -805,7 +806,7 @@ public:
using Invocable<Y,A,B,C,D,E,F,G>::operator();
};
template <typename T, typename Y,
- typename A, typename B, typename C, typename D,
+ typename A, typename B, typename C, typename D,
typename E, typename F>
class DoWrapper<T,Y,A,B,C,D,E,F,NullType,NullType,NullType,NullType,NullType,NullType,NullType,NullType,NullType,NullType> : public Invocable<Y,A,B,C,D,E,F> {
T &t;
@@ -818,7 +819,7 @@ public:
using Invocable<Y,A,B,C,D,E,F>::operator();
};
template <typename T, typename Y,
- typename A, typename B, typename C, typename D,
+ typename A, typename B, typename C, typename D,
typename E>
class DoWrapper<T,Y,A,B,C,D,E,NullType,NullType,NullType,NullType,NullType,NullType,NullType,NullType,NullType,NullType,NullType> : public Invocable<Y,A,B,C,D,E> {
T &t;
@@ -916,12 +917,12 @@ public:
const char *funcName;
const char *fileName;
protected:
- Call(RegistrationType expectation, base_mock *mock, int funcIndex, int X, const char *funcName, const char *fileName)
- : retVal(0),
- eHolder(0),
- mock(mock),
+ Call(RegistrationType expectation, base_mock *mock, int funcIndex, int X, const char *funcName, const char *fileName)
+ : retVal(0),
+ eHolder(0),
+ mock(mock),
functor(0),
- funcIndex(funcIndex),
+ funcIndex(funcIndex),
expectation(expectation),
satisfied(false),
lineno(X),
@@ -931,7 +932,7 @@ protected:
}
public:
virtual const base_tuple *getArgs() const = 0;
- virtual ~Call()
+ virtual ~Call()
{
delete eHolder;
delete functor;
@@ -941,10 +942,10 @@ public:
std::ostream &operator<<(std::ostream &os, const Call &call);
-template <typename Y,
- typename A = NullType, typename B = NullType, typename C = NullType, typename D = NullType,
- typename E = NullType, typename F = NullType, typename G = NullType, typename H = NullType,
- typename I = NullType, typename J = NullType, typename K = NullType, typename L = NullType,
+template <typename Y,
+ typename A = NullType, typename B = NullType, typename C = NullType, typename D = NullType,
+ typename E = NullType, typename F = NullType, typename G = NullType, typename H = NullType,
+ typename I = NullType, typename J = NullType, typename K = NullType, typename L = NullType,
typename M = NullType, typename N = NullType, typename O = NullType, typename P = NullType>
class TCall : public Call {
private:
@@ -954,13 +955,13 @@ public:
TCall(RegistrationType expectation, base_mock *mock, int funcIndex, int X, const char *funcName, const char *fileName) : Call(expectation, mock, funcIndex, X, funcName, fileName), args(0) {}
~TCall() { delete args; }
bool matchesArgs(const base_tuple &tupl) { return !args || *args == reinterpret_cast<const tuple<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &>(tupl); }
- TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &With(A a = A(), B b = B(), C c = C(), D d = D(), E e = E(), F f = F(), G g = G(), H h = H(), I i = I(), J j = J(), K k = K(), L l = L(), M m = M(), N n = N(), O o = O(), P p = P()) {
- args = new tuple<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P>(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
- return *this;
+ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &With(A a = A(), B b = B(), C c = C(), D d = D(), E e = E(), F f = F(), G g = G(), H h = H(), I i = I(), J j = J(), K k = K(), L l = L(), M m = M(), N n = N(), O o = O(), P p = P()) {
+ args = new tuple<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P>(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
+ return *this;
}
- TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &After(Call &call) {
+ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &After(Call &call) {
previousCalls.push_back(&call);
- return *this;
+ return *this;
}
template <typename T>
Call &Do(T &function) { functor = new DoWrapper<T,Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P>(function); return *this; }
@@ -969,9 +970,9 @@ public:
Call &Throw(Ex exception) { eHolder = new ExceptionWrapper<Ex>(exception); return *this; }
};
-template <typename A, typename B, typename C, typename D,
- typename E, typename F, typename G, typename H,
- typename I, typename J, typename K, typename L,
+template <typename A, typename B, typename C, typename D,
+ typename E, typename F, typename G, typename H,
+ typename I, typename J, typename K, typename L,
typename M, typename N, typename O, typename P>
class TCall<void,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> : public Call {
private:
@@ -981,13 +982,13 @@ public:
TCall(RegistrationType expectation, base_mock *mock, int funcIndex, int X, const char *funcName, const char *fileName) : Call(expectation, mock, funcIndex, X, funcName, fileName), args(0) {}
~TCall() { delete args; }
bool matchesArgs(const base_tuple &tupl) { return (!args) || (*args == reinterpret_cast<const tuple<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &>(tupl)); }
- TCall<void,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &With(A a = A(), B b = B(), C c = C(), D d = D(), E e = E(), F f = F(), G g = G(), H h = H(), I i = I(), J j = J(), K k = K(), L l = L(), M m = M(), N n = N(), O o = O(), P p = P()) {
- args = new tuple<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P>(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
- return *this;
+ TCall<void,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &With(A a = A(), B b = B(), C c = C(), D d = D(), E e = E(), F f = F(), G g = G(), H h = H(), I i = I(), J j = J(), K k = K(), L l = L(), M m = M(), N n = N(), O o = O(), P p = P()) {
+ args = new tuple<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P>(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
+ return *this;
}
- TCall<void,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &After(Call &call) {
+ TCall<void,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &After(Call &call) {
previousCalls.push_back(&call);
- return *this;
+ return *this;
}
template <typename T>
Call &Do(T &function) { functor = new DoWrapper<T,void,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P>(function); return *this; }
@@ -1023,71 +1024,71 @@ public:
TCall<Y> &RegisterExpect_(Z2 *mck, Y (Z::*func)(), const char *funcName, const char *fileName, unsigned long lineNo);
template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A>
TCall<Y,A> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A), const char *funcName, const char *fileName, unsigned long lineNo);
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
typename A, typename B>
TCall<Y,A,B> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B), const char *funcName, const char *fileName, unsigned long lineNo);
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
typename A, typename B, typename C>
TCall<Y,A,B,C> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C), const char *funcName, const char *fileName, unsigned long lineNo);
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
typename A, typename B, typename C, typename D>
TCall<Y,A,B,C,D> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D), const char *funcName, const char *fileName, unsigned long lineNo);
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E>
TCall<Y,A,B,C,D,E> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E), const char *funcName, const char *fileName, unsigned long lineNo);
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F>
TCall<Y,A,B,C,D,E,F> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F), const char *funcName, const char *fileName, unsigned long lineNo);
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G>
TCall<Y,A,B,C,D,E,F,G> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G), const char *funcName, const char *fileName, unsigned long lineNo);
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H>
TCall<Y,A,B,C,D,E,F,G,H> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H), const char *funcName, const char *fileName, unsigned long lineNo);
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I>
TCall<Y,A,B,C,D,E,F,G,H,I> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I), const char *funcName, const char *fileName, unsigned long lineNo);
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J>
TCall<Y,A,B,C,D,E,F,G,H,I,J> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J), const char *funcName, const char *fileName, unsigned long lineNo);
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K), const char *funcName, const char *fileName, unsigned long lineNo);
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L), const char *funcName, const char *fileName, unsigned long lineNo);
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M), const char *funcName, const char *fileName, unsigned long lineNo);
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M, typename N>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N), const char *funcName, const char *fileName, unsigned long lineNo);
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M, typename N, typename O>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O), const char *funcName, const char *fileName, unsigned long lineNo);
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M, typename N, typename O, typename P>
@@ -1099,71 +1100,71 @@ public:
TCall<Y> &RegisterExpect_(Z2 *mck, Y (Z::*func)() volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)())(func), funcName, fileName, lineNo); }
template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A>
TCall<Y,A> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
typename A, typename B>
TCall<Y,A,B> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
typename A, typename B, typename C>
TCall<Y,A,B,C> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
typename A, typename B, typename C, typename D>
TCall<Y,A,B,C,D> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E>
TCall<Y,A,B,C,D,E> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F>
TCall<Y,A,B,C,D,E,F> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G>
TCall<Y,A,B,C,D,E,F,G> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H>
TCall<Y,A,B,C,D,E,F,G,H> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I>
TCall<Y,A,B,C,D,E,F,G,H,I> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J>
TCall<Y,A,B,C,D,E,F,G,H,I,J> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L,M))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M, typename N>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L,M,N))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M, typename N, typename O>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O) volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M, typename N, typename O, typename P>
@@ -1173,71 +1174,71 @@ public:
TCall<Y> &RegisterExpect_(Z2 *mck, Y (Z::*func)() const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)())(func), funcName, fileName, lineNo); }
template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A>
TCall<Y,A> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
typename A, typename B>
TCall<Y,A,B> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
typename A, typename B, typename C>
TCall<Y,A,B,C> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
typename A, typename B, typename C, typename D>
TCall<Y,A,B,C,D> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E>
TCall<Y,A,B,C,D,E> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F>
TCall<Y,A,B,C,D,E,F> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G>
TCall<Y,A,B,C,D,E,F,G> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H>
TCall<Y,A,B,C,D,E,F,G,H> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I>
TCall<Y,A,B,C,D,E,F,G,H,I> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J>
TCall<Y,A,B,C,D,E,F,G,H,I,J> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L,M))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M, typename N>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L,M,N))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M, typename N, typename O>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O) const volatile, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M, typename N, typename O, typename P>
@@ -1247,71 +1248,71 @@ public:
TCall<Y> &RegisterExpect_(Z2 *mck, Y (Z::*func)() const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)())(func), funcName, fileName, lineNo); }
template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A>
TCall<Y,A> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
typename A, typename B>
TCall<Y,A,B> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
typename A, typename B, typename C>
TCall<Y,A,B,C> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
typename A, typename B, typename C, typename D>
TCall<Y,A,B,C,D> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E>
TCall<Y,A,B,C,D,E> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F>
TCall<Y,A,B,C,D,E,F> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G>
TCall<Y,A,B,C,D,E,F,G> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H>
TCall<Y,A,B,C,D,E,F,G,H> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I>
TCall<Y,A,B,C,D,E,F,G,H,I> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J>
TCall<Y,A,B,C,D,E,F,G,H,I,J> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L,M))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M, typename N>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L,M,N))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M, typename N, typename O>
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> &RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O) const, const char *funcName, const char *fileName, unsigned long lineNo) { return RegisterExpect_<X,expect>(mck, (Y(Z::*)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O))(func), funcName, fileName, lineNo); }
- template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+ template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M, typename N, typename O, typename P>
@@ -1321,9 +1322,9 @@ public:
void BasicRegisterExpect(mock<Z> *zMock, int funcIndex, void (base_mock::*func)(), int X);
template <typename Z>
Z DoExpectation(base_mock *mock, int funcno, const base_tuple &tuple);
- void DoVoidExpectation(base_mock *mock, int funcno, const base_tuple &tuple)
+ void DoVoidExpectation(base_mock *mock, int funcno, const base_tuple &tuple)
{
- for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end(); ++i)
+ for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end(); ++i)
{
Call *call = *i;
if (call->mock == mock &&
@@ -1343,7 +1344,7 @@ public:
if (!allSatisfy) continue;
call->satisfied = true;
-
+
if (call->eHolder)
call->eHolder->rethrow();
@@ -1353,7 +1354,7 @@ public:
return;
}
}
- for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end(); ++i)
+ for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end(); ++i)
{
Call *call = *i;
if (call->mock == mock &&
@@ -1376,7 +1377,7 @@ public:
throw ExpectationException(this, call->getArgs(), call->funcName);
}
}
- for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end(); ++i)
+ for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end(); ++i)
{
Call *call = *i;
if (call->mock == mock &&
@@ -1406,21 +1407,21 @@ public:
}
}
const char *funcName = NULL;
- for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end() && !funcName; ++i)
+ for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end() && !funcName; ++i)
{
Call *call = *i;
if (call->mock == mock &&
call->funcIndex == funcno)
funcName = call->funcName;
}
- for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end() && !funcName; ++i)
+ for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end() && !funcName; ++i)
{
Call *call = *i;
if (call->mock == mock &&
call->funcIndex == funcno)
funcName = call->funcName;
}
- for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end() && !funcName; ++i)
+ for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end() && !funcName; ++i)
{
Call *call = *i;
if (call->mock == mock &&
@@ -1429,42 +1430,42 @@ public:
}
throw ExpectationException(this, &tuple, funcName);
}
- MockRepository()
+ MockRepository()
: autoExpect(true)
{
}
- ~MockRepository()
+ ~MockRepository()
{
if (!std::uncaught_exception())
VerifyAll();
reset();
- for (std::list<base_mock *>::iterator i = mocks.begin(); i != mocks.end(); i++)
+ for (std::list<base_mock *>::iterator i = mocks.begin(); i != mocks.end(); i++)
{
(*i)->destroy();
}
mocks.clear();
}
- void reset()
+ void reset()
{
- for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end(); i++)
+ for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end(); i++)
{
delete *i;
}
expectations.clear();
- for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end(); i++)
+ for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end(); i++)
{
delete *i;
}
neverCalls.clear();
- for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end(); i++)
+ for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end(); i++)
{
delete *i;
}
optionals.clear();
}
- void VerifyAll()
+ void VerifyAll()
{
- for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end(); i++)
+ for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end(); i++)
{
if (!(*i)->satisfied)
throw CallMissingException(this);
@@ -1479,7 +1480,7 @@ public:
// mock function providers
template <typename Z, typename Y>
class mockFuncs : public mock<Z> {
-private:
+private:
mockFuncs();
public:
template <int X>
@@ -1588,7 +1589,7 @@ public:
template <typename Z>
class mockFuncs<Z, void> : public mock<Z> {
-private:
+private:
mockFuncs();
public:
template <int X>
@@ -1707,13 +1708,13 @@ void MockRepository::BasicRegisterExpect(mock<Z> *zMock, int funcIndex, void (ba
// Mock repository implementation
template <int X, RegistrationType expect, typename Z2, typename Y, typename Z>
-TCall<Y> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(), const char *funcName, const char *fileName, unsigned long lineNo)
+TCall<Y> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(), const char *funcName, const char *fileName, unsigned long lineNo)
{
int funcIndex = getFunctionIndex(func);
Y (mockFuncs<Z2, Y>::*mfp)();
mfp = &mockFuncs<Z2, Y>::template expectation0<X>;
- BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
- funcIndex,
+ BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
+ funcIndex,
reinterpret_cast<void (base_mock::*)()>(mfp),X);
TCall<Y> *call = new TCall<Y>(expect, reinterpret_cast<base_mock *>(mck), funcIndex, lineNo, funcName, fileName);
switch(expect)
@@ -1721,7 +1722,7 @@ TCall<Y> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(), const char *f
case Never: neverCalls.push_back(call); break;
case DontCare: optionals.push_back(call); break;
case Once:
- if (autoExpect && expectations.size() > 0)
+ if (autoExpect && expectations.size() > 0)
{
call->previousCalls.push_back(expectations.back());
}
@@ -1731,12 +1732,12 @@ TCall<Y> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(), const char *f
return *call;
}
template <int X, RegistrationType expect, typename Z2, typename Y, typename Z, typename A>
-TCall<Y,A> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A), const char *funcName, const char *fileName, unsigned long lineNo)
+TCall<Y,A> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A), const char *funcName, const char *fileName, unsigned long lineNo)
{
int funcIndex = getFunctionIndex(func);
Y (mockFuncs<Z2, Y>::*mfp)(A);
mfp = &mockFuncs<Z2, Y>::template expectation1<X,A>;
- BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
+ BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
funcIndex,
reinterpret_cast<void (base_mock::*)()>(mfp),X);
TCall<Y,A> *call = new TCall<Y,A>(expect, reinterpret_cast<base_mock *>(mck), funcIndex, lineNo, funcName, fileName);
@@ -1745,7 +1746,7 @@ TCall<Y,A> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A), const char
case Never: neverCalls.push_back(call); break;
case DontCare: optionals.push_back(call); break;
case Once:
- if (autoExpect && expectations.size() > 0)
+ if (autoExpect && expectations.size() > 0)
{
call->previousCalls.push_back(expectations.back());
}
@@ -1754,14 +1755,14 @@ TCall<Y,A> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A), const char
}
return *call;
}
-template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
typename A, typename B>
-TCall<Y,A,B> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B), const char *funcName, const char *fileName, unsigned long lineNo)
+TCall<Y,A,B> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B), const char *funcName, const char *fileName, unsigned long lineNo)
{
int funcIndex = getFunctionIndex(func);
Y (mockFuncs<Z2, Y>::*mfp)(A,B);
mfp = &mockFuncs<Z2, Y>::template expectation2<X,A,B>;
- BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
+ BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
funcIndex,
reinterpret_cast<void (base_mock::*)()>(mfp),X);
TCall<Y,A,B> *call = new TCall<Y,A,B>(expect, reinterpret_cast<base_mock *>(mck), funcIndex, lineNo, funcName, fileName);
@@ -1770,7 +1771,7 @@ TCall<Y,A,B> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B), const
case Never: neverCalls.push_back(call); break;
case DontCare: optionals.push_back(call); break;
case Once:
- if (autoExpect && expectations.size() > 0)
+ if (autoExpect && expectations.size() > 0)
{
call->previousCalls.push_back(expectations.back());
}
@@ -1779,14 +1780,14 @@ TCall<Y,A,B> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B), const
}
return *call;
}
-template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
typename A, typename B, typename C>
-TCall<Y,A,B,C> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C), const char *funcName, const char *fileName, unsigned long lineNo)
+TCall<Y,A,B,C> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C), const char *funcName, const char *fileName, unsigned long lineNo)
{
int funcIndex = getFunctionIndex(func);
Y (mockFuncs<Z2, Y>::*mfp)(A,B,C);
mfp = &mockFuncs<Z2, Y>::template expectation3<X,A,B,C>;
- BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
+ BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
funcIndex,
reinterpret_cast<void (base_mock::*)()>(mfp),X);
TCall<Y,A,B,C> *call = new TCall<Y,A,B,C>(expect, reinterpret_cast<base_mock *>(mck), funcIndex, lineNo, funcName, fileName);
@@ -1795,7 +1796,7 @@ TCall<Y,A,B,C> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C), co
case Never: neverCalls.push_back(call); break;
case DontCare: optionals.push_back(call); break;
case Once:
- if (autoExpect && expectations.size() > 0)
+ if (autoExpect && expectations.size() > 0)
{
call->previousCalls.push_back(expectations.back());
}
@@ -1804,14 +1805,14 @@ TCall<Y,A,B,C> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C), co
}
return *call;
}
-template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
typename A, typename B, typename C, typename D>
-TCall<Y,A,B,C,D> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D), const char *funcName, const char *fileName, unsigned long lineNo)
+TCall<Y,A,B,C,D> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D), const char *funcName, const char *fileName, unsigned long lineNo)
{
int funcIndex = getFunctionIndex(func);
Y (mockFuncs<Z2, Y>::*mfp)(A,B,C,D);
mfp = &mockFuncs<Z2, Y>::template expectation4<X,A,B,C,D>;
- BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
+ BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
funcIndex,
reinterpret_cast<void (base_mock::*)()>(mfp),X);
TCall<Y,A,B,C,D> *call = new TCall<Y,A,B,C,D>(expect, reinterpret_cast<base_mock *>(mck), funcIndex, lineNo, funcName, fileName);
@@ -1820,7 +1821,7 @@ TCall<Y,A,B,C,D> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D)
case Never: neverCalls.push_back(call); break;
case DontCare: optionals.push_back(call); break;
case Once:
- if (autoExpect && expectations.size() > 0)
+ if (autoExpect && expectations.size() > 0)
{
call->previousCalls.push_back(expectations.back());
}
@@ -1829,15 +1830,15 @@ TCall<Y,A,B,C,D> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D)
}
return *call;
}
-template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E>
-TCall<Y,A,B,C,D,E> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E), const char *funcName, const char *fileName, unsigned long lineNo)
+TCall<Y,A,B,C,D,E> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E), const char *funcName, const char *fileName, unsigned long lineNo)
{
int funcIndex = getFunctionIndex(func);
Y (mockFuncs<Z2, Y>::*mfp)(A,B,C,D,E);
mfp = &mockFuncs<Z2, Y>::template expectation5<X,A,B,C,D,E>;
- BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
+ BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
funcIndex,
reinterpret_cast<void (base_mock::*)()>(mfp),X);
TCall<Y,A,B,C,D,E> *call = new TCall<Y,A,B,C,D,E>(expect, reinterpret_cast<base_mock *>(mck), funcIndex, lineNo, funcName, fileName);
@@ -1846,7 +1847,7 @@ TCall<Y,A,B,C,D,E> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,
case Never: neverCalls.push_back(call); break;
case DontCare: optionals.push_back(call); break;
case Once:
- if (autoExpect && expectations.size() > 0)
+ if (autoExpect && expectations.size() > 0)
{
call->previousCalls.push_back(expectations.back());
}
@@ -1855,15 +1856,15 @@ TCall<Y,A,B,C,D,E> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,
}
return *call;
}
-template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F>
-TCall<Y,A,B,C,D,E,F> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F), const char *funcName, const char *fileName, unsigned long lineNo)
+TCall<Y,A,B,C,D,E,F> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F), const char *funcName, const char *fileName, unsigned long lineNo)
{
int funcIndex = getFunctionIndex(func);
Y (mockFuncs<Z2, Y>::*mfp)(A,B,C,D,E,F);
mfp = &mockFuncs<Z2, Y>::template expectation6<X,A,B,C,D,E,F>;
- BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
+ BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
funcIndex,
reinterpret_cast<void (base_mock::*)()>(mfp),X);
TCall<Y,A,B,C,D,E,F> *call = new TCall<Y,A,B,C,D,E,F>(expect, reinterpret_cast<base_mock *>(mck), funcIndex, lineNo, funcName, fileName);
@@ -1872,7 +1873,7 @@ TCall<Y,A,B,C,D,E,F> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,
case Never: neverCalls.push_back(call); break;
case DontCare: optionals.push_back(call); break;
case Once:
- if (autoExpect && expectations.size() > 0)
+ if (autoExpect && expectations.size() > 0)
{
call->previousCalls.push_back(expectations.back());
}
@@ -1881,15 +1882,15 @@ TCall<Y,A,B,C,D,E,F> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,
}
return *call;
}
-template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G>
-TCall<Y,A,B,C,D,E,F,G> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G), const char *funcName, const char *fileName, unsigned long lineNo)
+TCall<Y,A,B,C,D,E,F,G> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G), const char *funcName, const char *fileName, unsigned long lineNo)
{
int funcIndex = getFunctionIndex(func);
Y (mockFuncs<Z2, Y>::*mfp)(A,B,C,D,E,F,G);
mfp = &mockFuncs<Z2, Y>::template expectation7<X,A,B,C,D,E,F,G>;
- BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
+ BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
funcIndex,
reinterpret_cast<void (base_mock::*)()>(mfp),X);
TCall<Y,A,B,C,D,E,F,G> *call = new TCall<Y,A,B,C,D,E,F,G>(expect, reinterpret_cast<base_mock *>(mck), funcIndex, lineNo, funcName, fileName);
@@ -1898,7 +1899,7 @@ TCall<Y,A,B,C,D,E,F,G> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,
case Never: neverCalls.push_back(call); break;
case DontCare: optionals.push_back(call); break;
case Once:
- if (autoExpect && expectations.size() > 0)
+ if (autoExpect && expectations.size() > 0)
{
call->previousCalls.push_back(expectations.back());
}
@@ -1907,15 +1908,15 @@ TCall<Y,A,B,C,D,E,F,G> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,
}
return *call;
}
-template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H>
-TCall<Y,A,B,C,D,E,F,G,H> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H), const char *funcName, const char *fileName, unsigned long lineNo)
+TCall<Y,A,B,C,D,E,F,G,H> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H), const char *funcName, const char *fileName, unsigned long lineNo)
{
int funcIndex = getFunctionIndex(func);
Y (mockFuncs<Z2, Y>::*mfp)(A,B,C,D,E,F,G,H);
mfp = &mockFuncs<Z2, Y>::template expectation8<X,A,B,C,D,E,F,G,H>;
- BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
+ BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
funcIndex,
reinterpret_cast<void (base_mock::*)()>(mfp),X);
TCall<Y,A,B,C,D,E,F,G,H> *call = new TCall<Y,A,B,C,D,E,F,G,H>(expect, reinterpret_cast<base_mock *>(mck), funcIndex, lineNo, funcName, fileName);
@@ -1924,7 +1925,7 @@ TCall<Y,A,B,C,D,E,F,G,H> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(
case Never: neverCalls.push_back(call); break;
case DontCare: optionals.push_back(call); break;
case Once:
- if (autoExpect && expectations.size() > 0)
+ if (autoExpect && expectations.size() > 0)
{
call->previousCalls.push_back(expectations.back());
}
@@ -1933,16 +1934,16 @@ TCall<Y,A,B,C,D,E,F,G,H> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(
}
return *call;
}
-template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I>
-TCall<Y,A,B,C,D,E,F,G,H,I> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I), const char *funcName, const char *fileName, unsigned long lineNo)
+TCall<Y,A,B,C,D,E,F,G,H,I> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I), const char *funcName, const char *fileName, unsigned long lineNo)
{
int funcIndex = getFunctionIndex(func);
Y (mockFuncs<Z2, Y>::*mfp)(A,B,C,D,E,F,G,H,I);
mfp = &mockFuncs<Z2, Y>::template expectation9<X,A,B,C,D,E,F,G,H,I>;
- BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
+ BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
funcIndex,
reinterpret_cast<void (base_mock::*)()>(mfp),X);
TCall<Y,A,B,C,D,E,F,G,H,I> *call = new TCall<Y,A,B,C,D,E,F,G,H,I>(expect, reinterpret_cast<base_mock *>(mck), funcIndex, lineNo, funcName, fileName);
@@ -1951,7 +1952,7 @@ TCall<Y,A,B,C,D,E,F,G,H,I> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func
case Never: neverCalls.push_back(call); break;
case DontCare: optionals.push_back(call); break;
case Once:
- if (autoExpect && expectations.size() > 0)
+ if (autoExpect && expectations.size() > 0)
{
call->previousCalls.push_back(expectations.back());
}
@@ -1960,16 +1961,16 @@ TCall<Y,A,B,C,D,E,F,G,H,I> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func
}
return *call;
}
-template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J>
-TCall<Y,A,B,C,D,E,F,G,H,I,J> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J), const char *funcName, const char *fileName, unsigned long lineNo)
+TCall<Y,A,B,C,D,E,F,G,H,I,J> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J), const char *funcName, const char *fileName, unsigned long lineNo)
{
int funcIndex = getFunctionIndex(func);
Y (mockFuncs<Z2, Y>::*mfp)(A,B,C,D,E,F,G,H,I,J);
mfp = &mockFuncs<Z2, Y>::template expectation10<X,A,B,C,D,E,F,G,H,I,J>;
- BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
+ BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
funcIndex,
reinterpret_cast<void (base_mock::*)()>(mfp),X);
TCall<Y,A,B,C,D,E,F,G,H,I,J> *call = new TCall<Y,A,B,C,D,E,F,G,H,I,J>(expect, reinterpret_cast<base_mock *>(mck), funcIndex, lineNo, funcName, fileName);
@@ -1978,7 +1979,7 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*fu
case Never: neverCalls.push_back(call); break;
case DontCare: optionals.push_back(call); break;
case Once:
- if (autoExpect && expectations.size() > 0)
+ if (autoExpect && expectations.size() > 0)
{
call->previousCalls.push_back(expectations.back());
}
@@ -1987,16 +1988,16 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*fu
}
return *call;
}
-template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K>
-TCall<Y,A,B,C,D,E,F,G,H,I,J,K> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K), const char *funcName, const char *fileName, unsigned long lineNo)
+TCall<Y,A,B,C,D,E,F,G,H,I,J,K> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K), const char *funcName, const char *fileName, unsigned long lineNo)
{
int funcIndex = getFunctionIndex(func);
Y (mockFuncs<Z2, Y>::*mfp)(A,B,C,D,E,F,G,H,I,J,K);
mfp = &mockFuncs<Z2, Y>::template expectation11<X,A,B,C,D,E,F,G,H,I,J,K>;
- BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
+ BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
funcIndex,
reinterpret_cast<void (base_mock::*)()>(mfp),X);
TCall<Y,A,B,C,D,E,F,G,H,I,J,K> *call = new TCall<Y,A,B,C,D,E,F,G,H,I,J,K>(expect, reinterpret_cast<base_mock *>(mck), funcIndex, lineNo, funcName, fileName);
@@ -2005,7 +2006,7 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*
case Never: neverCalls.push_back(call); break;
case DontCare: optionals.push_back(call); break;
case Once:
- if (autoExpect && expectations.size() > 0)
+ if (autoExpect && expectations.size() > 0)
{
call->previousCalls.push_back(expectations.back());
}
@@ -2014,16 +2015,16 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*
}
return *call;
}
-template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L>
-TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L), const char *funcName, const char *fileName, unsigned long lineNo)
+TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L), const char *funcName, const char *fileName, unsigned long lineNo)
{
int funcIndex = getFunctionIndex(func);
Y (mockFuncs<Z2, Y>::*mfp)(A,B,C,D,E,F,G,H,I,J,K,L);
mfp = &mockFuncs<Z2, Y>::template expectation12<X,A,B,C,D,E,F,G,H,I,J,K,L>;
- BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
+ BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
funcIndex,
reinterpret_cast<void (base_mock::*)()>(mfp),X);
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L> *call = new TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L>(expect, reinterpret_cast<base_mock *>(mck), funcIndex, lineNo, funcName, fileName);
@@ -2032,7 +2033,7 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z:
case Never: neverCalls.push_back(call); break;
case DontCare: optionals.push_back(call); break;
case Once:
- if (autoExpect && expectations.size() > 0)
+ if (autoExpect && expectations.size() > 0)
{
call->previousCalls.push_back(expectations.back());
}
@@ -2041,17 +2042,17 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z:
}
return *call;
}
-template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M>
-TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M), const char *funcName, const char *fileName, unsigned long lineNo)
+TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M), const char *funcName, const char *fileName, unsigned long lineNo)
{
int funcIndex = getFunctionIndex(func);
Y (mockFuncs<Z2, Y>::*mfp)(A,B,C,D,E,F,G,H,I,J,K,L,M);
mfp = &mockFuncs<Z2, Y>::template expectation13<X,A,B,C,D,E,F,G,H,I,J,K,L,M>;
- BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
+ BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
funcIndex,
reinterpret_cast<void (base_mock::*)()>(mfp),X);
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> *call = new TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M>(expect, reinterpret_cast<base_mock *>(mck), funcIndex, lineNo, funcName, fileName);
@@ -2060,7 +2061,7 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> &MockRepository::RegisterExpect_(Z2 *mck, Y (
case Never: neverCalls.push_back(call); break;
case DontCare: optionals.push_back(call); break;
case Once:
- if (autoExpect && expectations.size() > 0)
+ if (autoExpect && expectations.size() > 0)
{
call->previousCalls.push_back(expectations.back());
}
@@ -2069,18 +2070,18 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M> &MockRepository::RegisterExpect_(Z2 *mck, Y (
}
return *call;
}
-template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M, typename N>
-TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N), const char *funcName, const char *fileName, unsigned long lineNo)
+TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N), const char *funcName, const char *fileName, unsigned long lineNo)
{
int funcIndex = getFunctionIndex(func);
Y (mockFuncs<Z2, Y>::*mfp)(A,B,C,D,E,F,G,H,I,J,K,L,M,N);
mfp = &mockFuncs<Z2, Y>::template expectation14<X,A,B,C,D,E,F,G,H,I,J,K,L,M,N>;
- BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
- funcIndex,
+ BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
+ funcIndex,
reinterpret_cast<void (base_mock::*)()>(mfp),X);
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> *call = new TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N>(expect, reinterpret_cast<base_mock *>(mck), funcIndex, lineNo, funcName, fileName);
switch(expect)
@@ -2088,7 +2089,7 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> &MockRepository::RegisterExpect_(Z2 *mck, Y
case Never: neverCalls.push_back(call); break;
case DontCare: optionals.push_back(call); break;
case Once:
- if (autoExpect && expectations.size() > 0)
+ if (autoExpect && expectations.size() > 0)
{
call->previousCalls.push_back(expectations.back());
}
@@ -2097,18 +2098,18 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N> &MockRepository::RegisterExpect_(Z2 *mck, Y
}
return *call;
}
-template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M, typename N, typename O>
-TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O), const char *funcName, const char *fileName, unsigned long lineNo)
+TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O), const char *funcName, const char *fileName, unsigned long lineNo)
{
int funcIndex = getFunctionIndex(func);
Y (mockFuncs<Z2, Y>::*mfp)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O);
mfp = &mockFuncs<Z2, Y>::template expectation15<X,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O>;
- BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
- funcIndex,
+ BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
+ funcIndex,
reinterpret_cast<void (base_mock::*)()>(mfp),X);
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> *call = new TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O>(expect, reinterpret_cast<base_mock *>(mck), funcIndex, lineNo, funcName, fileName);
switch(expect)
@@ -2116,7 +2117,7 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> &MockRepository::RegisterExpect_(Z2 *mck,
case Never: neverCalls.push_back(call); break;
case DontCare: optionals.push_back(call); break;
case Once:
- if (autoExpect && expectations.size() > 0)
+ if (autoExpect && expectations.size() > 0)
{
call->previousCalls.push_back(expectations.back());
}
@@ -2126,17 +2127,17 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O> &MockRepository::RegisterExpect_(Z2 *mck,
return *call;
}
-template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
- typename A, typename B, typename C, typename D,
+template <int X, RegistrationType expect, typename Z2, typename Y, typename Z,
+ typename A, typename B, typename C, typename D,
typename E, typename F, typename G, typename H,
typename I, typename J, typename K, typename L,
typename M, typename N, typename O, typename P>
-TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P), const char *funcName, const char *fileName, unsigned long lineNo)
+TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &MockRepository::RegisterExpect_(Z2 *mck, Y (Z::*func)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P), const char *funcName, const char *fileName, unsigned long lineNo)
{
int funcIndex = getFunctionIndex(func);
Y (mockFuncs<Z2, Y>::*mfp)(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P);
mfp = &mockFuncs<Z2, Y>::template expectation16<X,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P>;
- BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
+ BasicRegisterExpect(reinterpret_cast<mock<Z2> *>(mck),
funcIndex,
reinterpret_cast<void (base_mock::*)()>(mfp),X);
TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> *call = new TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P>(expect, reinterpret_cast<base_mock *>(mck), funcIndex, lineNo, funcName, fileName);
@@ -2145,7 +2146,7 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &MockRepository::RegisterExpect_(Z2 *mc
case Never: neverCalls.push_back(call); break;
case DontCare: optionals.push_back(call); break;
case Once:
- if (autoExpect && expectations.size() > 0)
+ if (autoExpect && expectations.size() > 0)
{
call->previousCalls.push_back(expectations.back());
}
@@ -2156,9 +2157,9 @@ TCall<Y,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P> &MockRepository::RegisterExpect_(Z2 *mc
}
template <typename Z>
-Z MockRepository::DoExpectation(base_mock *mock, int funcno, const base_tuple &tuple)
+Z MockRepository::DoExpectation(base_mock *mock, int funcno, const base_tuple &tuple)
{
- for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end(); ++i)
+ for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end(); ++i)
{
Call *call = *i;
if (call->mock == mock &&
@@ -2191,7 +2192,7 @@ Z MockRepository::DoExpectation(base_mock *mock, int funcno, const base_tuple &t
throw NoResultSetUpException(call->getArgs(), call->funcName);
}
}
- for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end(); ++i)
+ for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end(); ++i)
{
Call *call = *i;
if (call->mock == mock &&
@@ -2214,7 +2215,7 @@ Z MockRepository::DoExpectation(base_mock *mock, int funcno, const base_tuple &t
throw ExpectationException(this, call->getArgs(), call->funcName);
}
}
- for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end(); ++i)
+ for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end(); ++i)
{
Call *call = *i;
if (call->mock == mock &&
@@ -2233,35 +2234,35 @@ Z MockRepository::DoExpectation(base_mock *mock, int funcno, const base_tuple &t
if (!allSatisfy) continue;
call->satisfied = true;
-
+
if (call->eHolder)
call->eHolder->rethrow();
if (call->retVal)
return ((ReturnValueWrapper<Z> *)call->retVal)->rv;
-
+
if (call->functor != NULL)
return (*(TupleInvocable<Z> *)(call->functor))(tuple);
-
+
throw NoResultSetUpException(call->getArgs(), call->funcName);
}
}
const char *funcName = NULL;
- for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end() && !funcName; ++i)
+ for (std::list<Call *>::iterator i = expectations.begin(); i != expectations.end() && !funcName; ++i)
{
Call *call = *i;
if (call->mock == mock &&
call->funcIndex == funcno)
funcName = call->funcName;
}
- for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end() && !funcName; ++i)
+ for (std::list<Call *>::iterator i = neverCalls.begin(); i != neverCalls.end() && !funcName; ++i)
{
Call *call = *i;
if (call->mock == mock &&
call->funcIndex == funcno)
funcName = call->funcName;
}
- for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end() && !funcName; ++i)
+ for (std::list<Call *>::iterator i = optionals.begin(); i != optionals.end() && !funcName; ++i)
{
Call *call = *i;
if (call->mock == mock &&
@@ -2340,7 +2341,7 @@ inline std::ostream &operator<<(std::ostream &os, const MockRepository &repo)
return os;
}
-inline void BaseException::setException(const char *description, MockRepository *repo)
+inline void BaseException::setException(const char *description, MockRepository *repo)
{
std::stringstream text;
text << description;
@@ -2355,4 +2356,3 @@ inline void BaseException::setException(const char *description, MockRepository
#endif
#endif
-
diff --git a/3rdParty/SCons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/vc.py b/3rdParty/SCons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/vc.py
index bbdac1d..56af18a 100644
--- a/3rdParty/SCons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/vc.py
+++ b/3rdParty/SCons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/vc.py
@@ -104,7 +104,7 @@ def get_host_target(env):
# PROCESSOR_ARCHITECTURE.
if not host_platform:
host_platform = os.environ.get('PROCESSOR_ARCHITECTURE', '')
-
+
# Retain user requested TARGET_ARCH
req_target_platform = env.get('TARGET_ARCH')
debug('vc.py:get_host_target() req_target_platform:%s'%req_target_platform)
@@ -114,7 +114,7 @@ def get_host_target(env):
target_platform = req_target_platform
else:
target_platform = host_platform
-
+
try:
host = _ARCH_TO_CANONICAL[host_platform.lower()]
except KeyError, e:
@@ -128,9 +128,13 @@ def get_host_target(env):
return (host, target,req_target_platform)
-_VCVER = ["10.0", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"]
+_VCVER = ["12.0", "11.0", "10.0", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"]
_VCVER_TO_PRODUCT_DIR = {
+ '12.0': [
+ r'Microsoft\VisualStudio\12.0\Setup\VC\ProductDir'],
+ '11.0': [
+ r'Microsoft\VisualStudio\11.0\Setup\VC\ProductDir'],
'10.0': [
r'Microsoft\VisualStudio\10.0\Setup\VC\ProductDir'],
'9.0': [
@@ -148,7 +152,7 @@ _VCVER_TO_PRODUCT_DIR = {
'6.0': [
r'Microsoft\VisualStudio\6.0\Setup\Microsoft Visual C++\ProductDir']
}
-
+
def msvc_version_to_maj_min(msvc_version):
msvc_version_numeric = ''.join([x for x in msvc_version if x in string_digits + '.'])
@@ -228,7 +232,7 @@ def find_batch_file(env,msvc_version,host_arch,target_arch):
pdir = find_vc_pdir(msvc_version)
if pdir is None:
raise NoVersionFound("No version of Visual Studio found")
-
+
debug('vc.py: find_batch_file() pdir:%s'%pdir)
# filter out e.g. "Exp" from the version name
@@ -246,7 +250,7 @@ def find_batch_file(env,msvc_version,host_arch,target_arch):
if not os.path.exists(batfilename):
debug("Not found: %s" % batfilename)
batfilename = None
-
+
installed_sdks=get_installed_sdks()
for _sdk in installed_sdks:
sdk_bat_file=_sdk.get_sdk_vc_script(host_arch,target_arch)
@@ -303,7 +307,7 @@ def get_default_version(env):
msvc_version = env.get('MSVC_VERSION')
msvs_version = env.get('MSVS_VERSION')
-
+
debug('get_default_version(): msvc_version:%s msvs_version:%s'%(msvc_version,msvs_version))
if msvs_version and not msvc_version:
@@ -360,7 +364,7 @@ def msvc_find_valid_batch_script(env,version):
for tp in try_target_archs:
# Set to current arch.
env['TARGET_ARCH']=tp
-
+
debug("vc.py:msvc_find_valid_batch_script() trying target_platform:%s"%tp)
host_target = (host_platform, tp)
if not is_host_target_supported(host_target, version):
@@ -368,7 +372,7 @@ def msvc_find_valid_batch_script(env,version):
(host_target, version)
SCons.Warnings.warn(SCons.Warnings.VisualCMissingWarning, warn_msg)
arg = _HOST_TARGET_ARCH_TO_BAT_ARCH[host_target]
-
+
# Try to locate a batch file for this host/target platform combo
try:
(vc_script,sdk_script) = find_batch_file(env,version,host_platform,tp)
@@ -382,7 +386,7 @@ def msvc_find_valid_batch_script(env,version):
warn_msg = warn_msg % (version, cached_get_installed_vcs())
SCons.Warnings.warn(SCons.Warnings.VisualCMissingWarning, warn_msg)
continue
-
+
# Try to use the located batch file for this host/target platform combo
debug('vc.py:msvc_find_valid_batch_script() use_script 2 %s, args:%s\n' % (repr(vc_script), arg))
if vc_script:
@@ -401,14 +405,14 @@ def msvc_find_valid_batch_script(env,version):
elif not vc_script and not sdk_script:
debug('vc.py:msvc_find_valid_batch_script() use_script 6: Neither VC script nor SDK script found')
continue
-
+
# If we cannot find a viable installed compiler, reset the TARGET_ARCH
# To it's initial value
if not d:
env['TARGET_ARCH']=req_target_platform
-
+
return d
-
+
def msvc_setup_env(env):
debug('msvc_setup_env()')
@@ -427,12 +431,12 @@ def msvc_setup_env(env):
env['MSVS_VERSION'] = version
env['MSVS'] = {}
-
+
use_script = env.get('MSVC_USE_SCRIPT', True)
if SCons.Util.is_String(use_script):
debug('vc.py:msvc_setup_env() use_script 1 %s\n' % repr(use_script))
d = script_env(use_script)
- elif use_script:
+ elif use_script:
d = msvc_find_valid_batch_script(env,version)
debug('vc.py:msvc_setup_env() use_script 2 %s\n' % d)
if not d:
@@ -453,4 +457,3 @@ def msvc_exists(version=None):
if version is None:
return len(vcs) > 0
return version in vcs
-
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot
index 767c326..51be9ab 100644
--- a/BuildTools/SCons/SConscript.boot
+++ b/BuildTools/SCons/SConscript.boot
@@ -12,6 +12,9 @@ vars.Add('ccflags', "Extra C/C++/ObjC compiler flags")
vars.Add('cxxflags', "Extra C++ compiler flags")
vars.Add('link', "Linker")
vars.Add('linkflags', "Extra linker flags")
+vars.Add('ar', "Archiver (ar or lib)")
+if os.name == "nt":
+ vars.Add('mt', "manifest tool")
vars.Add(BoolVariable("ccache", "Use CCache", "no"))
vars.Add(EnumVariable("test", "Compile and run tests", "none", ["none", "all", "unit", "system"]))
vars.Add(BoolVariable("optimize", "Compile with optimizations turned on", "no"))
@@ -39,17 +42,30 @@ if os.name == "nt" :
if os.name == "nt" :
vars.Add(PackageVariable("bonjour", "Bonjour SDK location", "yes"))
vars.Add(PackageVariable("openssl", "OpenSSL location", "yes"))
+vars.Add("openssl_libnames", "Comma-separated openssl library names to override defaults", None)
vars.Add(BoolVariable("openssl_force_bundled", "Force use of the bundled OpenSSL", "no"))
+vars.Add("openssl_include", "Location of OpenSSL include files (if not under (openssl)/include)", None)
+vars.Add("openssl_libdir", "Location of OpenSSL library files (if not under (openssl)/lib)", None)
vars.Add(PackageVariable("hunspell", "Hunspell location", False))
vars.Add(PathVariable("boost_includedir", "Boost headers location", None, PathVariable.PathAccept))
vars.Add(PathVariable("boost_libdir", "Boost library location", None, PathVariable.PathAccept))
+vars.Add(BoolVariable("boost_bundled_enable", "Allow use of bundled Boost as last resort", "true"))
+vars.Add(PathVariable("zlib_includedir", "Zlib headers location", None, PathVariable.PathAccept))
+vars.Add(PathVariable("zlib_libdir", "Zlib library location", None, PathVariable.PathAccept))
+vars.Add(PathVariable("zlib_libfile", "Zlib library file (full path to file)", None, PathVariable.PathAccept))
+vars.Add(BoolVariable("zlib_bundled_enable", "Allow use of bundled Zlib as last resort", "true"))
+vars.Add(BoolVariable("try_gconf", "Try configuring for GConf?", "true"))
+vars.Add(BoolVariable("try_libxml", "Try configuring for libXML?", "true"))
+vars.Add(BoolVariable("try_expat", "Try configuring for expat?", "true"))
vars.Add(PathVariable("expat_includedir", "Expat headers location", None, PathVariable.PathAccept))
vars.Add(PathVariable("expat_libdir", "Expat library location", None, PathVariable.PathAccept))
-vars.Add("expat_libname", "Expat library name", "libexpat" if os.name == "nt" else "expat")
+vars.Add("expat_libname", "Expat library name", os.name == "nt" and "libexpat" or "expat")
vars.Add(PackageVariable("icu", "ICU library location", "no"))
+vars.Add(BoolVariable("libidn_bundled_enable", "Allow use of bunded Expat", "true"))
+vars.Add(BoolVariable("try_libidn", "Try configuring for LibIDN?", "true"))
vars.Add(PathVariable("libidn_includedir", "LibIDN headers location", None, PathVariable.PathAccept))
vars.Add(PathVariable("libidn_libdir", "LibIDN library location", None, PathVariable.PathAccept))
-vars.Add("libidn_libname", "LibIDN library name", "libidn" if os.name == "nt" else "idn")
+vars.Add("libidn_libname", "LibIDN library name", os.name == "nt" and "libidn" or "idn")
vars.Add(PathVariable("libminiupnpc_includedir", "LibMiniUPNPC headers location", None, PathVariable.PathAccept))
vars.Add(PathVariable("libminiupnpc_libdir", "LibMiniUPNPC library location", None, PathVariable.PathAccept))
vars.Add("libminiupnpc_libname", "LibMiniUPNPC library name", "libminiupnpc" if os.name == "nt" else "miniupnpc")
@@ -58,7 +74,7 @@ vars.Add(PathVariable("libnatpmp_libdir", "LibNATPMP library location", None, Pa
vars.Add("libnatpmp_libname", "LibNATPMP library name", "libnatpmp" if os.name == "nt" else "natpmp")
vars.Add(PathVariable("sqlite_includedir", "SQLite headers location", None, PathVariable.PathAccept))
vars.Add(PathVariable("sqlite_libdir", "SQLite library location", None, PathVariable.PathAccept))
-vars.Add("sqlite_libname", "SQLite library name", "libsqlite3" if os.name == "nt" else "sqlite3")
+vars.Add("sqlite_libname", "SQLite library name", os.name == "nt" and "libsqlite3" or "sqlite3")
vars.Add("sqlite_force_bundled", "Force use of the bundled SQLite", None)
vars.Add(PathVariable("lua_includedir", "Lua headers location", None, PathVariable.PathAccept))
vars.Add(PathVariable("lua_libdir", "Lua library location", None, PathVariable.PathAccept))
@@ -69,6 +85,7 @@ vars.Add(PathVariable("editline_includedir", "Readline headers location", None,
vars.Add(PathVariable("editline_libdir", "Readline library location", None, PathVariable.PathAccept))
vars.Add("editline_libname", "Readline library name", "libedit" if os.name == "nt" else "edit")
+vars.Add(BoolVariable("try_avahi", "Try configuring for avahi?", "true"))
vars.Add(PathVariable("avahi_includedir", "Avahi headers location", None, PathVariable.PathAccept))
vars.Add(PathVariable("avahi_libdir", "Avahi library location", None, PathVariable.PathAccept))
vars.Add(PathVariable("qt", "Qt location", "", PathVariable.PathAccept))
@@ -82,20 +99,22 @@ vars.Add(BoolVariable("experimental", "Build experimental features", "no"))
vars.Add(BoolVariable("set_iterator_debug_level", "Set _ITERATOR_DEBUG_LEVEL=0", "yes"))
vars.Add(BoolVariable("unbound", "Build bundled ldns and unbound. Use them for DNS lookup.", "no"))
+vars.Add(BoolVariable("install_git_hooks", "Install git hooks", "true"))
+
################################################################################
# Set up default build & configure environment
################################################################################
-
env_ENV = {
- 'PATH' : os.environ['PATH'],
+ 'PATH' : os.environ['PATH'],
'LD_LIBRARY_PATH' : os.environ.get("LD_LIBRARY_PATH", ""),
'TERM' : os.environ.get("TERM", ""),
}
+
if "MSVC_VERSION" in ARGUMENTS :
- env = Environment(ENV = env_ENV, variables = vars, MSVC_VERSION = ARGUMENTS["MSVC_VERSION"])
+ env = Environment(ENV = env_ENV, variables = vars, MSVC_VERSION = ARGUMENTS["MSVC_VERSION"], platform = ARGUMENTS.get("PLATFORM", None))
else :
- env = Environment(ENV = env_ENV, variables = vars)
+ env = Environment(ENV = env_ENV, variables = vars, platform = ARGUMENTS.get("PLATFORM", None))
Help(vars.GenerateHelpText(env))
@@ -124,7 +143,7 @@ if env["PLATFORM"] == "win32" :
env.Tool("WindowsBundle", toolpath = ["#/BuildTools/SCons/Tools"])
#So we don't need to escalate with UAC
if "TMP" in os.environ.keys() :
- env['ENV']['TMP'] = os.environ['TMP']
+ env['ENV']['TMP'] = os.environ['TMP']
env.Tool("SLOCCount", toolpath = ["#/BuildTools/SCons/Tools"])
# Max out the number of jobs
@@ -171,6 +190,9 @@ if "cc" in env :
env["CC"] = env["cc"]
if "cxx" in env :
env["CXX"] = env["cxx"]
+if "ar" in env :
+ env["AR"] = env["ar"]
+
if "link" in env :
env["SHLINK"] = env["link"]
env["LINK"] = env["link"]
@@ -213,13 +235,13 @@ elif env["PLATFORM"] == "win32" :
if env.get("universal", 0) :
assert(env["PLATFORM"] == "darwin")
env.Append(CCFLAGS = [
- "-isysroot", "/Developer/SDKs/MacOSX10.4u.sdk",
- "-arch", "i386",
+ "-isysroot", "/Developer/SDKs/MacOSX10.4u.sdk",
+ "-arch", "i386",
"-arch", "ppc"])
env.Append(LINKFLAGS = [
- "-mmacosx-version-min=10.4",
- "-isysroot", "/Developer/SDKs/MacOSX10.4u.sdk",
- "-arch", "i386",
+ "-mmacosx-version-min=10.4",
+ "-isysroot", "/Developer/SDKs/MacOSX10.4u.sdk",
+ "-arch", "i386",
"-arch", "ppc"])
@@ -228,20 +250,20 @@ if env.get("universal", 0) :
if env.get("mac105", 0) :
assert(env["PLATFORM"] == "darwin")
env.Append(CCFLAGS = [
- "-isysroot", "/Developer/SDKs/MacOSX10.5.sdk",
+ "-isysroot", "/Developer/SDKs/MacOSX10.5.sdk",
"-arch", "i386"])
env.Append(LINKFLAGS = [
- "-mmacosx-version-min=10.5",
- "-isysroot", "/Developer/SDKs/MacOSX10.5.sdk",
+ "-mmacosx-version-min=10.5",
+ "-isysroot", "/Developer/SDKs/MacOSX10.5.sdk",
"-arch", "i386"])
if env.get("mac106", 0) :
assert(env["PLATFORM"] == "darwin")
env.Append(CCFLAGS = [
- "-isysroot", "/Developer/SDKs/MacOSX10.6.sdk",
+ "-isysroot", "/Developer/SDKs/MacOSX10.6.sdk",
"-arch", "i386"])
env.Append(LINKFLAGS = [
- "-mmacosx-version-min=10.6",
- "-isysroot", "/Developer/SDKs/MacOSX10.6.sdk",
+ "-mmacosx-version-min=10.6",
+ "-isysroot", "/Developer/SDKs/MacOSX10.6.sdk",
"-arch", "i386"])
if not env["assertions"] :
@@ -261,6 +283,13 @@ if env["PLATFORM"] == "posix" and platform.machine() == "x86_64" :
# Warnings
if env["PLATFORM"] == "win32" :
env.Append(CXXFLAGS = ["/wd4068"])
+elif env["PLATFORM"] == "hpux" :
+ # HP-UX gives a flood of minor warnings if this is enabled
+ #env.Append(CXXFLAGS = ["+w"])
+ pass
+elif env["PLATFORM"] == "sunos" :
+ #env.Append(CXXFLAGS = ["-z verbose"])
+ pass
else :
if "clang" in env["CXX"] :
env.Append(CXXFLAGS = [
@@ -298,12 +327,22 @@ if env["PLATFORM"] == "win32" :
env.Append(CCFLAGS = ["/EHsc", "/nologo", "/Zm256"])
env.Append(LINKFLAGS = ["/INCREMENTAL:no", "/NOLOGO"])
if int(env["MSVS_VERSION"].split(".")[0]) < 10 :
- env["LINKCOM"] = [env["LINKCOM"], 'mt.exe -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;1']
- env["SHLINKCOM"] = [env["SHLINKCOM"], 'mt.exe -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;2']
+ mt = env.get('mt')
+ if not mt:
+ mt = 'mt.exe'
+ env["LINKCOM"] = [env["LINKCOM"], '%s -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;1' % mt]
+ env["SHLINKCOM"] = [env["SHLINKCOM"], '%s -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;2' % mt]
if env["PLATFORM"] == "darwin" and not env["target"] in ["iphone-device", "iphone-simulator", "xcode", "android"] :
env["PLATFORM_FLAGS"]["FRAMEWORKS"] += ["IOKit", "AppKit", "SystemConfiguration", "Security", "SecurityInterface"]
+# Required by boost headers on HP-UX
+if env["PLATFORM"] == "hpux" :
+ env.Append(CXXFLAGS = ["+hpxstd98", "-mt", "-AA"])
+ # FIXME: Need -AA for linking C++ but not C
+ #env.Append(LINKFLAGS = ["-AA"])
+
+
# Testing
env["TEST_TYPE"] = env["test"]
if "check" in ARGUMENTS :
@@ -367,7 +406,7 @@ if target in ["iphone-device", "iphone-simulator", "xcode"] :
env.Append(FRAMEWORKS = ["CoreFoundation", "Foundation", "UIKit", "CoreGraphics"])
env.Append(LINKFLAGS = env["XCODE_ARCH_FLAGS"] + ["-isysroot", "$XCODE_SDKROOT", "-L\"$XCODE_SDKROOT/usr/lib\"", "-F\"$XCODE_SDKROOT/System/Library/Frameworks\"", "-F\"$XCODE_SDKROOT/System/Library/PrivateFrameworks\""])
# Bit of a hack, because BOOST doesn't know the endianness for ARM
- env.Append(CPPDEFINES = ["_LITTLE_ENDIAN"])
+ env.Append(CPPDEFINES = ["_LITTLE_ENDIAN"])
################################################################################
# Android
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index 25a1ad3..7bda9c1 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -11,7 +11,7 @@ def SConscript(*arguments, **keywords) :
if not keywords.get("test_only", False) or env["TEST"] :
return apply(oldSConscript, arguments, keywords)
env.SConscript = SConscript
-
+
################################################################################
# Extend the default build environment (not affecting the configure env)
#
@@ -111,8 +111,27 @@ if not conf.CheckCXX() or not conf.CheckCC() :
Exit(1)
env["HAVE_ZLIB"] = True
-if conf.CheckLib("z") :
- env["ZLIB_FLAGS"] = {"LIBS": ["z"]}
+zlib_flags = {}
+zlib_okay = False
+if env.get("zlib_libdir", None) :
+ zlib_flags["LIBPATH"] = [env["zlib_libdir"]]
+ zlib_okay = True
+if env.get("zlib_includedir", None) :
+ zlib_flags["CPPPATH"] = [env["zlib_includedir"]]
+ zlib_okay = True
+if env.get("zlib_libfile", None) :
+ zlib_flags["LIBS"] = [File(env["zlib_libfile"])]
+ zlib_okay = True
+elif zlib_okay :
+ zlib_flags["LIBS"] = ["z"]
+if (not zlib_okay) and conf.CheckLib("z") :
+ zlib_flags["LIBS"] = ["z"]
+ zlib_okay = True
+if zlib_okay :
+ env["ZLIB_FLAGS"] = zlib_flags
+elif not env.get("zlib_bundled_enable", True) :
+ print "Error: Zlib not found and zlib_bundled_enable is false"
+ Exit(1)
else :
env["ZLIB_BUNDLED"] = True
@@ -132,9 +151,10 @@ if conf.CheckLib("m") :
if conf.CheckLib("c") :
env["PLATFORM_FLAGS"]["LIBS"] = env["PLATFORM_FLAGS"].get("LIBS", []) + ["c"]
-if conf.CheckLib("stdc++") :
- env["PLATFORM_FLAGS"]["LIBS"] = env["PLATFORM_FLAGS"].get("LIBS", []) + ["stdc++"]
-
+# Even if you find stdc++ on HP-UX, it is the wrong one for aCC
+if env["PLATFORM"] != "hpux" :
+ if conf.CheckLib("stdc++", language='CXX') :
+ env["PLATFORM_FLAGS"]["LIBS"] = env["PLATFORM_FLAGS"].get("LIBS", []) + ["stdc++"]
conf.Finish()
# Boost
@@ -143,7 +163,7 @@ boost_flags = {}
if env.get("boost_libdir", None) :
boost_flags["LIBPATH"] = [env["boost_libdir"]]
if env.get("boost_includedir", None) :
- if env["PLATFORM"] == "win32" :
+ if env["PLATFORM"] == "win32" or env["PLATFORM"] == "hpux" or env["PLATFORM"] == "sunos" :
boost_flags["CPPPATH"] = [env["boost_includedir"]]
else :
# Using isystem to avoid getting warnings from a system boost
@@ -151,7 +171,7 @@ if env.get("boost_includedir", None) :
boost_flags["CPPFLAGS"] = [("-isystem", env["boost_includedir"])]
boost_conf_env.MergeFlags(boost_flags)
conf = Configure(boost_conf_env)
-boostLibs = [("signals", None), ("thread", None), ("regex", None), ("program_options", None), ("filesystem", None), ("serialization", "archive/text_oarchive.hpp"), ("system", "system/system_error.hpp"), ("date_time", "date_time/date.hpp")]
+boostLibs = [("signals", None), ("system", "system/system_error.hpp"), ("thread", None), ("regex", None), ("program_options", None), ("filesystem", None), ("serialization", "archive/text_oarchive.hpp"), ("date_time", "date_time/date.hpp")]
allLibsPresent = True
libNames = []
for (lib, header) in boostLibs :
@@ -164,9 +184,9 @@ for (lib, header) in boostLibs :
break
if env["PLATFORM"] != "win32" :
libName = "boost_" + lib
- if not conf.CheckLib(libName) :
+ if not conf.CheckLib(libName, language='CXX') :
libName += "-mt"
- if not conf.CheckLib(libName) :
+ if not conf.CheckLib(libName, language='CXX') :
allLibsPresent = False
break
libNames.append(libName)
@@ -177,7 +197,10 @@ if allLibsPresent :
if not conf.CheckCXXHeader("boost/uuid/uuid.hpp") :
# FIXME: Remove this workaround when UUID is available in most distros
env["BOOST_BUNDLED_UUID_ONLY"] = True
- env["BOOST_FLAGS"]["CPPDEFINES"] = ["BOOST_SIGNALS_NO_DEPRECATION_WARNING"]
+ env["BOOST_FLAGS"]["CPPDEFINES"] = ["BOOST_SIGNALS_NO_DEPRECATION_WARNING"]
+elif not env.get("boost_bundled_enable", True) :
+ print "Error: Boost not found and boost_bundled_enable is false"
+ Exit(1)
else :
env["BOOST_BUNDLED"] = True
conf.Finish()
@@ -200,7 +223,7 @@ if env["PLATFORM"] != "win32" and env["PLATFORM"] != "darwin" :
# GConf
env["HAVE_GCONF"] = 0
-if env["PLATFORM"] != "win32" and env["PLATFORM"] != "darwin" :
+if env.get("try_gconf", True) and env["PLATFORM"] != "win32" and env["PLATFORM"] != "darwin" :
gconf_env = conf_env.Clone()
conf = Configure(gconf_env, custom_tests = {"CheckPKG": CheckPKG})
if conf.CheckPKG("gconf-2.0") :
@@ -261,13 +284,13 @@ if env["PLATFORM"] == "win32" :
# LibXML
conf = Configure(conf_env, custom_tests = {"CheckVersion": CheckVersion})
-if conf.CheckCHeader("libxml/parser.h") and conf.CheckLib("xml2") :
+if env.get("try_libxml", True) and conf.CheckCHeader("libxml/parser.h") and conf.CheckLib("xml2") :
#and conf.CheckVersion("LibXML", "2.6.23", "LIBXML_VERSION", "libxml/xmlversion.h", 20623) :
env["HAVE_LIBXML"] = 1
env["LIBXML_FLAGS"] = { "LIBS": ["xml2"] }
conf.Finish()
-if not env.get("HAVE_LIBXML", 0) :
+if env.get("try_libxml", True) and not env.get("HAVE_LIBXML", 0) :
libxml_env = conf_env.Clone()
libxml_env.Append(CPPPATH = ["/usr/include/libxml2"])
conf = Configure(libxml_env, custom_tests = {"CheckVersion": CheckVersion})
@@ -278,7 +301,7 @@ if not env.get("HAVE_LIBXML", 0) :
conf.Finish()
# Expat
-if not env.get("HAVE_LIBXML",0) :
+if env.get("try_expat", True) and not env.get("HAVE_LIBXML",0) :
expat_conf_env = conf_env.Clone()
expat_flags = {}
if env.get("expat_libdir", None) :
@@ -308,7 +331,9 @@ if not env.get("HAVE_EXPAT", 0) and not env.get("HAVE_LIBXML", 0) :
# ICU
icu_env = conf_env.Clone()
use_icu = bool(env["icu"])
-icu_prefix = env["icu"] if isinstance(env["icu"], str) else ""
+icu_prefix = ""
+if isinstance(env["icu"], str) :
+ icu_prefix = env["icu"]
icu_flags = {}
if icu_prefix :
icu_flags = { "CPPPATH": [os.path.join(icu_prefix, "include")] }
@@ -331,7 +356,7 @@ if env.get("libidn_includedir", None) :
libidn_flags["CPPPATH"] = [env["libidn_includedir"]]
libidn_conf_env.MergeFlags(libidn_flags)
conf = Configure(libidn_conf_env)
-if not env.get("HAVE_ICU") and conf.CheckCHeader("idna.h") and conf.CheckLib(env["libidn_libname"]) :
+if env.get("try_libidn", True) and not env.get("HAVE_ICU") and conf.CheckCHeader("idna.h") and conf.CheckLib(env["libidn_libname"]) :
env["HAVE_LIBIDN"] = 1
env["LIBIDN_FLAGS"] = { "LIBS": [env["libidn_libname"]] }
env["LIBIDN_FLAGS"].update(libidn_flags)
@@ -339,8 +364,12 @@ conf.Finish()
# Fallback to bundled LibIDN
if not env.get("HAVE_ICU", False) and not env.get("HAVE_LIBIDN", False) :
- env["HAVE_LIBIDN"] = 1
- env["LIBIDN_BUNDLED"] = 1
+ if env.get("libidn_bundled_enable", True) :
+ env["HAVE_LIBIDN"] = 1
+ env["LIBIDN_BUNDLED"] = 1
+ else :
+ print "Error: ICU and LIBIDN not found, and libidn_bundled_enable is false"
+ Exit(1)
# Unbound
if env["unbound"] :
@@ -459,7 +488,7 @@ if env.get("avahi_includedir", None) :
avahi_flags["CPPPATH"] = [env["avahi_includedir"]]
avahi_conf_env.MergeFlags(avahi_flags)
conf = Configure(avahi_conf_env)
-if conf.CheckCHeader("avahi-client/client.h") and conf.CheckLib("avahi-client") and conf.CheckLib("avahi-common") :
+if env.get("try_avahi", True) and conf.CheckCHeader("avahi-client/client.h") and conf.CheckLib("avahi-client") and conf.CheckLib("avahi-common") :
env["HAVE_AVAHI"] = True
env["AVAHI_FLAGS"] = { "LIBS": ["avahi-client", "avahi-common"] }
env["AVAHI_FLAGS"].update(avahi_flags)
@@ -476,11 +505,21 @@ if env.get("openssl_force_bundled", False) or env["target"] in ("iphone-device",
env["HAVE_OPENSSL"] = True
else :
use_openssl = bool(env["openssl"])
- openssl_prefix = env["openssl"] if isinstance(env["openssl"], str) else ""
+ openssl_prefix = ""
+ if isinstance(env["openssl"], str) :
+ openssl_prefix = env["openssl"]
openssl_flags = {}
if openssl_prefix :
- openssl_flags = { "CPPPATH": [os.path.join(openssl_prefix, "include")] }
- if env["PLATFORM"] == "win32" :
+ openssl_include = env.get("openssl_include", None)
+ openssl_libdir = env.get("openssl_libdir", None)
+ if openssl_include:
+ openssl_flags = {"CPPPATH":[openssl_include]}
+ else:
+ openssl_flags = { "CPPPATH": [os.path.join(openssl_prefix, "include")] }
+ if openssl_libdir:
+ openssl_flags["LIBPATH"] = [openssl_libdir]
+ env["OPENSSL_DIR"] = openssl_prefix
+ elif env["PLATFORM"] == "win32" :
openssl_flags["LIBPATH"] = [os.path.join(openssl_prefix, "lib", "VC")]
env["OPENSSL_DIR"] = openssl_prefix
else :
@@ -491,7 +530,10 @@ else :
if use_openssl and openssl_conf.CheckCHeader("openssl/ssl.h") :
env["HAVE_OPENSSL"] = 1
env["OPENSSL_FLAGS"] = openssl_flags
- if env["PLATFORM"] == "win32" :
+ openssl_libnames = env.get("openssl_libnames", None)
+ if openssl_libnames:
+ env["OPENSSL_FLAGS"]["LIBS"] = openssl_libnames.split(',')
+ elif env["PLATFORM"] == "win32" :
env["OPENSSL_FLAGS"]["LIBS"] = ["libeay32MD", "ssleay32MD"]
else:
env["OPENSSL_FLAGS"]["LIBS"] = ["ssl", "crypto"]
@@ -500,7 +542,7 @@ else :
env["OPENSSL_FLAGS"]["FRAMEWORKS"] = ["Security"]
else :
env["OPENSSL_FLAGS"] = {}
- if env["PLATFORM"] == "win32" :
+ if env["PLATFORM"] == "win32" :
env["HAVE_SCHANNEL"] = True
# If we're compiling for Windows and OpenSSL isn't being used, use Schannel
env.Append(LIBS = ["secur32"])
@@ -530,7 +572,7 @@ elif env.get("bonjour", False) :
bonjour_env = conf_env.Clone()
bonjour_conf = Configure(bonjour_env)
bonjour_flags = {}
- if env.get("bonjour") != True :
+ if env.get("bonjour") != True :
bonjour_prefix = env["bonjour"]
bonjour_flags["CPPPATH"] = [os.path.join(bonjour_prefix, "include")]
bonjour_flags["LIBPATH"] = [os.path.join(bonjour_prefix, "lib", "win32")]
@@ -572,7 +614,7 @@ if env.get("docbook_xsl") :
try:
if env.Dir("#/.git").exists() :
- if not env.GetOption("clean") :
+ if not env.GetOption("clean") and env.get("install_git_hooks", True) :
env.Install("#/.git/hooks", Glob("#/BuildTools/Git/Hooks/*"))
except TypeError:
print "You seem to be using Swift in a Git submodule. Not installing hooks."
@@ -666,6 +708,6 @@ print " Projects: " + ' '.join(env["PROJECTS"])
print ""
print " XML Parsers: " + ' '.join(parsers)
-print " TLS Support: " + ("OpenSSL" if env.get("HAVE_OPENSSL",0) else ("Schannel" if env.get("HAVE_SCHANNEL", 0) else "Disabled"))
-print " DNSSD Support: " + ("Bonjour" if env.get("HAVE_BONJOUR") else ("Avahi" if env.get("HAVE_AVAHI") else "Disabled"))
+print " TLS Support: " + (env.get("HAVE_OPENSSL",0) and "OpenSSL" or env.get("HAVE_SCHANNEL", 0) and "Schannel" or "Disabled")
+print " DNSSD Support: " + (env.get("HAVE_BONJOUR") and "Bonjour" or (env.get("HAVE_AVAHI") and "Avahi" or "Disabled"))
print
diff --git a/BuildTools/SCons/Tools/Test.py b/BuildTools/SCons/Tools/Test.py
index 95fcce9..7e4609d 100644
--- a/BuildTools/SCons/Tools/Test.py
+++ b/BuildTools/SCons/Tools/Test.py
@@ -3,13 +3,16 @@ import SCons.Util, os
def generate(env) :
def registerTest(env, target, type = "unit", is_checker = False) :
if env["TEST_TYPE"] == "all" or env["TEST_TYPE"] == type :
- cmd = target[0].abspath if SCons.Util.is_List(target) else target.abspath
+ if SCons.Util.is_List(target) :
+ cmd = target[0].abspath
+ else :
+ cmd = target.abspath
params = ""
# Special support for unittest checker
if is_checker and env.get("checker_report", False) :
params = " --xml > " + os.path.join(target[0].dir.path, "checker-report.xml")
-
+
ignore_prefix = ""
if env.get("TEST_IGNORE_RESULT", False) :
ignore_prefix = "-"
@@ -33,10 +36,10 @@ def generate(env) :
exec_name = os.path.basename(cmd)
test_env.Command("**dummy**", target, SCons.Action.Action(
["adb shell mount -o rw,remount /system",
- "adb push " + cmd + " /system/bin/" + exec_name,
+ "adb push " + cmd + " /system/bin/" + exec_name,
"adb shell SWIFT_CLIENTTEST_JID=\"" + os.getenv("SWIFT_CLIENTTEST_JID") + "\" SWIFT_CLIENTTEST_PASS=\"" + os.getenv("SWIFT_CLIENTTEST_PASS") + "\" " + env.get("TEST_RUNNER", "") + "/system/bin/" + exec_name], cmdstr = "$TESTCOMSTR"))
else :
- test_env.Command("**dummy**", target,
+ test_env.Command("**dummy**", target,
SCons.Action.Action(ignore_prefix + env.get("TEST_RUNNER", "") + cmd + " " + params, cmdstr = "$TESTCOMSTR"))
def registerScriptTests(env, scripts, name, type) :
diff --git a/BuildTools/SCons/Version.py b/BuildTools/SCons/Version.py
index f98a8b9..2f3b5a5 100644
--- a/BuildTools/SCons/Version.py
+++ b/BuildTools/SCons/Version.py
@@ -10,7 +10,7 @@ def getGitBuildVersion(root, project) :
if m :
return m.group(1) + "-dev" + m.group(2)
return None
-
+
def git(cmd, root) :
full_cmd = "git " + cmd
p = subprocess.Popen(full_cmd, cwd=root, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=(os.name != "nt"))
@@ -19,7 +19,9 @@ def git(cmd, root) :
# if error:
# print "Git error: " + error
p.stdin.close()
- return gitVersion if p.wait() == 0 else None
+ if p.wait() == 0 :
+ return gitVersion
+ return None
def getBuildVersion(root, project) :
versionFilename = os.path.join(root, "VERSION." + project)
@@ -29,7 +31,7 @@ def getBuildVersion(root, project) :
f.close()
return version
- gitVersion = getGitBuildVersion(root, project)
+ gitVersion = getGitBuildVersion(root, project)
if gitVersion :
return gitVersion
@@ -59,9 +61,8 @@ def convertToWindowsVersion(version) :
build_string = alpha_match.group(1)
if len(build_string) > 0 :
- build_match = re.match("^-dev(\d+)", build_string)
+ build_match = re.match("^-dev(\d+)", build_string)
if build_match :
patch += int(build_match.group(1))
return (major, minor, patch)
-
diff --git a/COPYING.thirdparty b/COPYING.thirdparty
index a4b505c..c2c01f7 100644
--- a/COPYING.thirdparty
+++ b/COPYING.thirdparty
@@ -128,6 +128,39 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
--- END OF SIMPLIFIED BSD LICENSE
+Solaris builds compile Swiften/Network/SolarisNetworkEnvironment.cpp
+which incorporates getifaddrs() code under the following license:
+
+--- START OF SOLARIS getifaddrs() LICENSE
+
+Copyright (c) 2006 WIDE Project. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+--- END OF SOLARIS getifaddrs() LICENSE
+
===============
Google Breakpad
@@ -403,7 +436,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
-
+
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
diff --git a/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/SConscript b/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/SConscript
index 24ebd60..5d27b70 100644
--- a/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/SConscript
+++ b/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/SConscript
@@ -21,6 +21,10 @@ cpp0x_env = example_env.Clone()
if env["PLATFORM"] == "win32" :
if int(env["MSVS_VERSION"].split(".")[0]) >= 10 :
cpp0x = True
+elif env["PLATFORM"] == "hpux" :
+ pass
+elif env["PLATFORM"] == "sunos" :
+ pass
else :
if env["CCVERSION"].split(".") >= ["4", "5", "0"] :
# Temporarily disabling c++0x mode because of problems with boost::thread
diff --git a/Documentation/SwiftenDevelopersGuide/SConscript b/Documentation/SwiftenDevelopersGuide/SConscript
index c50641f..ba0eb0b 100644
--- a/Documentation/SwiftenDevelopersGuide/SConscript
+++ b/Documentation/SwiftenDevelopersGuide/SConscript
@@ -34,9 +34,11 @@ def generateDocBookCode(env, target, source) :
line = re.sub("/\*.*\*/", "]]><co id=\"%(cobID)s\" linkends=\"%(coID)s\"/><![CDATA[" % {"cobID" : cobID, "coID" : coID}, line)
calloutLines.append("<callout arearefs=\"%(cobID)s\" id=\"%(coID)s\"><para>%(text)s</para></callout>" % {"cobID": cobID, "coID": coID, "text": m.group(1)})
newProgramLines.append(line)
- callouts = "<calloutlist>" + "\n".join(calloutLines) + "</calloutlist>" if len(calloutLines) > 0 else ""
+ callouts = ""
+ if len(calloutLines) > 0 :
+ callouts = "<calloutlist>" + "\n".join(calloutLines) + "</calloutlist>"
return ("\n".join(newProgramLines), callouts)
-
+
# Parse program
filename = source[0].abspath
filenameBase = os.path.basename(filename).replace(".cpp", "")
diff --git a/QA/Checker/SConscript b/QA/Checker/SConscript
index d180af2..b0863da 100644
--- a/QA/Checker/SConscript
+++ b/QA/Checker/SConscript
@@ -2,11 +2,11 @@ Import("env")
if env["TEST"] :
if env["SCONS_STAGE"] == "flags" :
- env["CHECKER_FLAGS"] = {
+ env["CHECKER_FLAGS"] = {
"CPPPATH" : ["#/3rdParty/HippoMocks"],
"LIBS": ["Checker"],
"LIBPATH": [Dir(".")],
- "LINKFLAGS": ["/SUBSYSTEM:CONSOLE"] if env["PLATFORM"] == "win32" else []
+ "LINKFLAGS": env["PLATFORM"] == "win32" and ["/SUBSYSTEM:CONSOLE"] or []
}
if env["SCONS_STAGE"] == "build" :
diff --git a/Slimber/SConscript b/Slimber/SConscript
index 2298b0a..ff4f57d 100644
--- a/Slimber/SConscript
+++ b/Slimber/SConscript
@@ -1,4 +1,4 @@
-import datetime
+import datetime
Import("env")
@@ -13,6 +13,10 @@ elif env["PLATFORM"] != "darwin" :
if not "Slimber" in env["PROJECTS"] and env["SCONS_STAGE"] == "flags" :
print "Bonjour missing. Not building Slimber."
+if not env.get("HAVE_QT", False) and "Slimber" in env["PROJECTS"] :
+ print "Qt missing. Not building Slimber."
+ env["PROJECTS"].remove("Slimber")
+
if "Slimber" in env["PROJECTS"] :
################################################################################
@@ -45,7 +49,7 @@ if "Slimber" in env["PROJECTS"] :
"Menulet.cpp"
])
-
+
env["SLIMBER_VERSION"] = "0.9.9." + datetime.date.today().strftime("%Y%m%d")
env.Append(UNITTEST_SOURCES = [
diff --git a/SwifTools/Application/UnixApplicationPathProvider.cpp b/SwifTools/Application/UnixApplicationPathProvider.cpp
index 784256f..6af9b24 100644
--- a/SwifTools/Application/UnixApplicationPathProvider.cpp
+++ b/SwifTools/Application/UnixApplicationPathProvider.cpp
@@ -6,6 +6,7 @@
#include <SwifTools/Application/UnixApplicationPathProvider.h>
+#include <stdlib.h>
#include <unistd.h>
#include <boost/algorithm/string.hpp>
#include <iostream>
@@ -44,8 +45,8 @@ boost::filesystem::path UnixApplicationPathProvider::getDataDir() const {
dataDir = std::string(xdgDataHome);
}
- boost::filesystem::path dataPath = (dataDir.empty() ?
- getHomeDir() / ".local" / "share"
+ boost::filesystem::path dataPath = (dataDir.empty() ?
+ getHomeDir() / ".local" / "share"
: boost::filesystem::path(dataDir)) / boost::to_lower_copy(getApplicationName());
try {
diff --git a/Swiften/Client/XMLBeautifier.h b/Swiften/Client/XMLBeautifier.h
index 44dfd20..25ecd18 100644
--- a/Swiften/Client/XMLBeautifier.h
+++ b/Swiften/Client/XMLBeautifier.h
@@ -4,8 +4,15 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+* Copyright (c) 2014 Remko Tronçon and Kevin Smith
+* Licensed under the GNU General Public License v3.
+* See Documentation/Licenses/GPLv3.txt for more information.
+*/
+
#pragma once
+#include <sstream>
#include <string>
#include <stack>
diff --git a/Swiften/EventLoop/EventLoop.h b/Swiften/EventLoop/EventLoop.h
index 587ba22..79ade49 100644
--- a/Swiften/EventLoop/EventLoop.h
+++ b/Swiften/EventLoop/EventLoop.h
@@ -7,7 +7,7 @@
#pragma once
#include <boost/function.hpp>
-#include <boost/thread/mutex.hpp>
+#include <boost/thread.hpp>
#include <list>
#include <deque>
@@ -21,7 +21,7 @@ namespace Swift {
public:
EventLoop();
virtual ~EventLoop();
-
+
void postEvent(boost::function<void ()> event, boost::shared_ptr<EventOwner> owner = boost::shared_ptr<EventOwner>());
void removeEventsFromOwner(boost::shared_ptr<EventOwner> owner);
@@ -31,7 +31,7 @@ namespace Swift {
* the event loop is residing.
*/
virtual void post(const Event& event) = 0;
-
+
void handleEvent(const Event& event);
private:
diff --git a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h
index 1bec5f7..45628e2 100644
--- a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h
+++ b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h
@@ -1,26 +1,28 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#pragma once
-#include <Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuery.h>
-#include <Swiften/LinkLocal/DNSSD/DNSSDRegisterQuery.h>
+#include <boost/numeric/conversion/cast.hpp>
+#include <boost/thread.hpp>
+
#include <Swiften/Base/ByteArray.h>
#include <Swiften/EventLoop/EventLoop.h>
-#include <boost/numeric/conversion/cast.hpp>
+#include <Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuery.h>
+#include <Swiften/LinkLocal/DNSSD/DNSSDRegisterQuery.h>
namespace Swift {
class BonjourQuerier;
class BonjourRegisterQuery : public DNSSDRegisterQuery, public BonjourQuery {
- public:
+ public:
BonjourRegisterQuery(const std::string& name, int port, const ByteArray& txtRecord, boost::shared_ptr<BonjourQuerier> querier, EventLoop* eventLoop) : BonjourQuery(querier, eventLoop) {
DNSServiceErrorType result = DNSServiceRegister(
- &sdRef, 0, 0, name.c_str(), "_presence._tcp", NULL, NULL, boost::numeric_cast<unsigned short>(port),
- boost::numeric_cast<unsigned short>(txtRecord.size()), vecptr(txtRecord),
+ &sdRef, 0, 0, name.c_str(), "_presence._tcp", NULL, NULL, boost::numeric_cast<unsigned short>(port),
+ boost::numeric_cast<unsigned short>(txtRecord.size()), vecptr(txtRecord),
&BonjourRegisterQuery::handleServiceRegisteredStatic, this);
if (result != kDNSServiceErr_NoError) {
sdRef = NULL;
diff --git a/Swiften/Network/PlatformNetworkEnvironment.h b/Swiften/Network/PlatformNetworkEnvironment.h
index c6b945e..2092bfd 100644
--- a/Swiften/Network/PlatformNetworkEnvironment.h
+++ b/Swiften/Network/PlatformNetworkEnvironment.h
@@ -18,6 +18,12 @@ namespace Swift {
namespace Swift {
typedef WindowsNetworkEnvironment PlatformNetworkEnvironment;
}
+#elif defined(SWIFTEN_PLATFORM_SOLARIS)
+#include <Swiften/Network/SolarisNetworkEnvironment.h>
+namespace Swift {
+ typedef SolarisNetworkEnvironment PlatformNetworkEnvironment;
+}
+
#else
#include <Swiften/Network/UnixNetworkEnvironment.h>
namespace Swift {
diff --git a/Swiften/Network/SConscript b/Swiften/Network/SConscript
index fcc66b4..284c1f4 100644
--- a/Swiften/Network/SConscript
+++ b/Swiften/Network/SConscript
@@ -70,6 +70,10 @@ if myenv["PLATFORM"] == "darwin" and myenv["target"] != "android":
elif myenv["PLATFORM"] == "win32" :
sourceList += [ "WindowsProxyProvider.cpp" ]
sourceList += [ "WindowsNetworkEnvironment.cpp" ]
+elif myenv["PLATFORM"] == "sunos" :
+ sourceList += [ "UnixProxyProvider.cpp" ]
+ sourceList += [ "SolarisNetworkEnvironment.cpp" ]
+ sourceList += [ "EnvironmentProxyProvider.cpp" ]
else :
sourceList += [ "UnixNetworkEnvironment.cpp" ]
sourceList += [ "UnixProxyProvider.cpp" ]
@@ -81,10 +85,10 @@ else :
objects = myenv.SwiftenObject(sourceList)
-if myenv["experimental_ft"] :
+if myenv["experimental_ft"] :
# LibNATPMP classes
if myenv.get("HAVE_LIBNATPMP", False) :
- natpmp_env = myenv.Clone()
+ natpmp_env = myenv.Clone()
natpmp_env.Append(CPPDEFINES = natpmp_env["LIBNATPMP_FLAGS"].get("INTERNAL_CPPDEFINES", []))
myenv.Append(CPPDEFINES = ["HAVE_LIBNATPMP"])
objects += natpmp_env.SwiftenObject([
diff --git a/Swiften/Network/SolarisNetworkEnvironment.cpp b/Swiften/Network/SolarisNetworkEnvironment.cpp
new file mode 100644
index 0000000..93eec32
--- /dev/null
+++ b/Swiften/Network/SolarisNetworkEnvironment.cpp
@@ -0,0 +1,292 @@
+/*
+ * Copyright (c) 2011 Tobias Markmann
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+/*
+* Copyright (c) 2013-2014 Remko Tronçon and Kevin Smith
+* Licensed under the GNU General Public License v3.
+* See Documentation/Licenses/GPLv3.txt for more information.
+*/
+
+#include <Swiften/Network/SolarisNetworkEnvironment.h>
+
+#include <string>
+#include <vector>
+#include <map>
+#include <boost/optional.hpp>
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/sockio.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <net/if.h>
+
+#include <Swiften/Base/boost_bsignals.h>
+#include <Swiften/Network/HostAddress.h>
+#include <Swiften/Network/NetworkInterface.h>
+
+/*
+ * Copyright (c) 2006 WIDE Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#undef ifa_broadaddr
+#undef ifa_dstaddr
+struct ifaddrs {
+ struct ifaddrs *ifa_next; /* Pointer to next struct */
+ char *ifa_name; /* Interface name */
+ uint64_t ifa_flags; /* Interface flags */
+ struct sockaddr *ifa_addr; /* Interface address */
+ struct sockaddr *ifa_netmask; /* Interface netmask */
+ struct sockaddr *ifa_dstaddr; /* P2P interface destination */
+};
+#define ifa_broadaddr ifa_dstaddr
+
+static int
+get_lifreq(int fd, struct lifreq **ifr_ret)
+{
+ struct lifnum lifn;
+ struct lifconf lifc;
+ struct lifreq *lifrp;
+
+ lifn.lifn_family = AF_UNSPEC;
+ lifn.lifn_flags = 0;
+ if (ioctl(fd, SIOCGLIFNUM, &lifn) == -1)
+ lifn.lifn_count = 16;
+ else
+ lifn.lifn_count += 16;
+
+ for (;;) {
+ lifc.lifc_len = lifn.lifn_count * sizeof (*lifrp);
+ lifrp = (struct lifreq *) malloc(lifc.lifc_len);
+ if (lifrp == NULL)
+ return (-1);
+
+ lifc.lifc_family = AF_UNSPEC;
+ lifc.lifc_flags = 0;
+ lifc.lifc_buf = (char *)lifrp;
+ if (ioctl(fd, SIOCGLIFCONF, &lifc) == -1) {
+ free(lifrp);
+ if (errno == EINVAL) {
+ lifn.lifn_count <<= 1;
+ continue;
+ }
+ (void) close(fd);
+ return (-1);
+ }
+ if (lifc.lifc_len < (lifn.lifn_count - 1) * sizeof (*lifrp))
+ break;
+ free(lifrp);
+ lifn.lifn_count <<= 1;
+ }
+ (void) close(fd);
+
+ *ifr_ret = lifrp;
+
+ return (lifc.lifc_len / sizeof (*lifrp));
+}
+
+static size_t
+nbytes(const struct lifreq *lifrp, int nlif, size_t socklen)
+{
+ size_t len = 0;
+ size_t slen;
+
+ while (nlif > 0) {
+ slen = strlen(lifrp->lifr_name) + 1;
+ len += sizeof (struct ifaddrs) + ((slen + 3) & ~3);
+ len += 3 * socklen;
+ lifrp++;
+ nlif--;
+ }
+ return (len);
+}
+
+static struct sockaddr *
+addrcpy(struct sockaddr_storage *addr, char **bufp)
+{
+ char *buf = *bufp;
+ size_t len;
+
+ len = addr->ss_family == AF_INET ? sizeof (struct sockaddr_in) :
+ sizeof (struct sockaddr_in6);
+ (void) memcpy(buf, addr, len);
+ *bufp = buf + len;
+ return ((struct sockaddr *)buf);
+}
+
+static int
+populate(struct ifaddrs *ifa, int fd, struct lifreq *lifrp, int nlif, int af,
+ char **bufp)
+{
+ char *buf = *bufp;
+ size_t slen;
+
+ while (nlif > 0) {
+ ifa->ifa_next = (nlif > 1) ? ifa + 1 : NULL;
+ (void) strcpy(ifa->ifa_name = buf, lifrp->lifr_name);
+ slen = strlen(lifrp->lifr_name) + 1;
+ buf += (slen + 3) & ~3;
+ if (ioctl(fd, SIOCGLIFFLAGS, lifrp) == -1)
+ ifa->ifa_flags = 0;
+ else
+ ifa->ifa_flags = lifrp->lifr_flags;
+ if (ioctl(fd, SIOCGLIFADDR, lifrp) == -1)
+ ifa->ifa_addr = NULL;
+ else
+ ifa->ifa_addr = addrcpy(&lifrp->lifr_addr, &buf);
+ if (ioctl(fd, SIOCGLIFNETMASK, lifrp) == -1)
+ ifa->ifa_netmask = NULL;
+ else
+ ifa->ifa_netmask = addrcpy(&lifrp->lifr_addr, &buf);
+ if (ifa->ifa_flags & IFF_POINTOPOINT) {
+ if (ioctl(fd, SIOCGLIFDSTADDR, lifrp) == -1)
+ ifa->ifa_dstaddr = NULL;
+ else
+ ifa->ifa_dstaddr =
+ addrcpy(&lifrp->lifr_dstaddr, &buf);
+ } else if (ifa->ifa_flags & IFF_BROADCAST) {
+ if (ioctl(fd, SIOCGLIFBRDADDR, lifrp) == -1)
+ ifa->ifa_broadaddr = NULL;
+ else
+ ifa->ifa_broadaddr =
+ addrcpy(&lifrp->lifr_broadaddr, &buf);
+ } else {
+ ifa->ifa_dstaddr = NULL;
+ }
+
+ ifa++;
+ nlif--;
+ lifrp++;
+ }
+ *bufp = buf;
+ return (0);
+}
+
+static int
+getifaddrs(struct ifaddrs **ifap)
+{
+ int fd4, fd6;
+ int nif4, nif6 = 0;
+ struct lifreq *ifr4 = NULL;
+ struct lifreq *ifr6 = NULL;
+ struct ifaddrs *ifa = NULL;
+ char *buf;
+
+ if ((fd4 = socket(AF_INET, SOCK_DGRAM, 0)) == -1)
+ return (-1);
+ if ((fd6 = socket(AF_INET6, SOCK_DGRAM, 0)) == -1 &&
+ errno != EAFNOSUPPORT) {
+ (void) close(fd4);
+ return (-1);
+ }
+
+ if ((nif4 = get_lifreq(fd4, &ifr4)) == -1 ||
+ (fd6 != -1 && (nif6 = get_lifreq(fd6, &ifr6)) == -1))
+ goto failure;
+
+ if (nif4 == 0 && nif6 == 0) {
+ *ifap = NULL;
+ return (0);
+ }
+
+ ifa = (struct ifaddrs *) malloc(nbytes(ifr4, nif4, sizeof (struct sockaddr_in)) +
+ nbytes(ifr6, nif6, sizeof (struct sockaddr_in6)));
+ if (ifa == NULL)
+ goto failure;
+
+ buf = (char *)(ifa + nif4 + nif6);
+
+ if (populate(ifa, fd4, ifr4, nif4, AF_INET, &buf) == -1)
+ goto failure;
+ if (nif4 > 0 && nif6 > 0)
+ ifa[nif4 - 1].ifa_next = ifa + nif4;
+ if (populate(ifa + nif4, fd6, ifr6, nif6, AF_INET6, &buf) == -1)
+ goto failure;
+
+ return (0);
+
+failure:
+ free(ifa);
+ (void) close(fd4);
+ if (fd6 != -1)
+ (void) close(fd6);
+ free(ifr4);
+ free(ifr6);
+ return (-1);
+}
+
+static void
+freeifaddrs(struct ifaddrs *ifa)
+{
+ free(ifa);
+}
+
+/* End WIDE Project code */
+
+namespace Swift {
+
+std::vector<NetworkInterface> SolarisNetworkEnvironment::getNetworkInterfaces() const {
+ std::map<std::string, NetworkInterface> interfaces;
+
+ ifaddrs* addrs = 0;
+ int ret = getifaddrs(&addrs);
+ if (ret != 0) {
+ return std::vector<NetworkInterface>();
+ }
+
+ for (ifaddrs* a = addrs; a != 0; a = a->ifa_next) {
+ std::string name(a->ifa_name);
+ boost::optional<HostAddress> address;
+ if (a->ifa_addr->sa_family == PF_INET) {
+ sockaddr_in* sa = reinterpret_cast<sockaddr_in*>(a->ifa_addr);
+ address = HostAddress(reinterpret_cast<const unsigned char*>(&(sa->sin_addr)), 4);
+ }
+ else if (a->ifa_addr->sa_family == PF_INET6) {
+ sockaddr_in6* sa = reinterpret_cast<sockaddr_in6*>(a->ifa_addr);
+ address = HostAddress(reinterpret_cast<const unsigned char*>(&(sa->sin6_addr)), 16);
+ }
+ if (address) {
+ std::map<std::string, NetworkInterface>::iterator i = interfaces.insert(std::make_pair(name, NetworkInterface(name, a->ifa_flags & IFF_LOOPBACK))).first;
+ i->second.addAddress(*address);
+ }
+ }
+
+ freeifaddrs(addrs);
+
+ std::vector<NetworkInterface> result;
+ for (std::map<std::string,NetworkInterface>::const_iterator i = interfaces.begin(); i != interfaces.end(); ++i) {
+ result.push_back(i->second);
+ }
+ return result;
+}
+
+}
diff --git a/Swiften/Network/SolarisNetworkEnvironment.h b/Swiften/Network/SolarisNetworkEnvironment.h
new file mode 100644
index 0000000..7481ff4
--- /dev/null
+++ b/Swiften/Network/SolarisNetworkEnvironment.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2011 Tobias Markmann
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+/*
+* Copyright (c) 2013-2014 Remko Tronçon and Kevin Smith
+* Licensed under the GNU General Public License v3.
+* See Documentation/Licenses/GPLv3.txt for more information.
+*/
+
+#pragma once
+
+#include <vector>
+
+#include <Swiften/Base/boost_bsignals.h>
+
+#include <Swiften/Network/NetworkEnvironment.h>
+#include <Swiften/Network/NetworkInterface.h>
+
+namespace Swift {
+
+ class SolarisNetworkEnvironment : public NetworkEnvironment {
+ public:
+ std::vector<NetworkInterface> getNetworkInterfaces() const;
+ };
+
+}
diff --git a/Swiften/Parser/PayloadParserFactoryCollection.cpp b/Swiften/Parser/PayloadParserFactoryCollection.cpp
index e3efc3d..269ac3d 100644
--- a/Swiften/Parser/PayloadParserFactoryCollection.cpp
+++ b/Swiften/Parser/PayloadParserFactoryCollection.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -20,7 +20,7 @@ void PayloadParserFactoryCollection::addFactory(PayloadParserFactory* factory) {
}
void PayloadParserFactoryCollection::removeFactory(PayloadParserFactory* factory) {
- factories_.erase(remove(factories_.begin(), factories_.end(), factory), factories_.end());
+ factories_.erase(std::remove(factories_.begin(), factories_.end(), factory), factories_.end());
}
void PayloadParserFactoryCollection::setDefaultFactory(PayloadParserFactory* factory) {
@@ -29,7 +29,7 @@ void PayloadParserFactoryCollection::setDefaultFactory(PayloadParserFactory* fac
PayloadParserFactory* PayloadParserFactoryCollection::getPayloadParserFactory(const std::string& element, const std::string& ns, const AttributeMap& attributes) {
std::vector<PayloadParserFactory*>::reverse_iterator i = std::find_if(
- factories_.rbegin(), factories_.rend(),
+ factories_.rbegin(), factories_.rend(),
boost::bind(&PayloadParserFactory::canParse, _1, element, ns, attributes));
return (i != factories_.rend() ? *i : defaultFactory_);
}
diff --git a/Swiften/Roster/XMPPRosterImpl.h b/Swiften/Roster/XMPPRosterImpl.h
index 8c8cf3e..96da1f3 100644
--- a/Swiften/Roster/XMPPRosterImpl.h
+++ b/Swiften/Roster/XMPPRosterImpl.h
@@ -17,7 +17,7 @@ namespace Swift {
public:
XMPPRosterImpl();
- void addContact(const JID& jid, const std::string& name, const std::vector<std::string>& groups, const RosterItemPayload::Subscription subscription);
+ void addContact(const JID& jid, const std::string& name, const std::vector<std::string>& groups, RosterItemPayload::Subscription subscription);
void removeContact(const JID& jid);
void clear();
diff --git a/Swiften/Serializer/PayloadSerializerCollection.cpp b/Swiften/Serializer/PayloadSerializerCollection.cpp
index ab2b4f4..0db89a9 100644
--- a/Swiften/Serializer/PayloadSerializerCollection.cpp
+++ b/Swiften/Serializer/PayloadSerializerCollection.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -20,12 +20,12 @@ void PayloadSerializerCollection::addSerializer(PayloadSerializer* serializer) {
}
void PayloadSerializerCollection::removeSerializer(PayloadSerializer* serializer) {
- serializers_.erase(remove(serializers_.begin(), serializers_.end(), serializer), serializers_.end());
+ serializers_.erase(std::remove(serializers_.begin(), serializers_.end(), serializer), serializers_.end());
}
PayloadSerializer* PayloadSerializerCollection::getPayloadSerializer(boost::shared_ptr<Payload> payload) const {
std::vector<PayloadSerializer*>::const_iterator i = std::find_if(
- serializers_.begin(), serializers_.end(),
+ serializers_.begin(), serializers_.end(),
boost::bind(&PayloadSerializer::canSerialize, _1, payload));
return (i != serializers_.end() ? *i : NULL);
}
diff --git a/Swiften/Session/BasicSessionStream.cpp b/Swiften/Session/BasicSessionStream.cpp
index 7aaa5c2..5b4b7d5 100644
--- a/Swiften/Session/BasicSessionStream.cpp
+++ b/Swiften/Session/BasicSessionStream.cpp
@@ -21,17 +21,17 @@
namespace Swift {
BasicSessionStream::BasicSessionStream(
- StreamType streamType,
- boost::shared_ptr<Connection> connection,
- PayloadParserFactoryCollection* payloadParserFactories,
- PayloadSerializerCollection* payloadSerializers,
- TLSContextFactory* tlsContextFactory,
+ StreamType streamType,
+ boost::shared_ptr<Connection> connection,
+ PayloadParserFactoryCollection* payloadParserFactories,
+ PayloadSerializerCollection* payloadSerializers,
+ TLSContextFactory* tlsContextFactory,
TimerFactory* timerFactory,
XMLParserFactory* xmlParserFactory) :
- available(false),
- connection(connection),
- tlsContextFactory(tlsContextFactory),
- timerFactory(timerFactory),
+ available(false),
+ connection(connection),
+ tlsContextFactory(tlsContextFactory),
+ timerFactory(timerFactory),
compressionLayer(NULL),
tlsLayer(NULL),
whitespacePingLayer(NULL) {
@@ -54,7 +54,7 @@ BasicSessionStream::~BasicSessionStream() {
delete compressionLayer;
if (tlsLayer) {
- tlsLayer->onError.disconnect(boost::bind(&BasicSessionStream::handleTLSError, this));
+ tlsLayer->onError.disconnect(boost::bind(&BasicSessionStream::handleTLSError, this, _1));
tlsLayer->onConnected.disconnect(boost::bind(&BasicSessionStream::handleTLSConnected, this));
delete tlsLayer;
}