added photo comment serialisation and addition

reimplemented getmsgrelatedinfo and getmsginfo as previous was incorrectly done, rstokenservice for msgs buggy now
updated test, commiting to transfer work to windows

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5576 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2012-09-20 17:18:26 +00:00
parent 33d001898f
commit 2e3e5b4ee4
12 changed files with 689 additions and 129 deletions

View file

@ -827,7 +827,7 @@ bool GenExchangeTester::testSpecificMsgMetaRetrieval()
return ok;
}
bool GenExchangeTester::testRelatedMsgIdRetrieval_Parents()
bool GenExchangeTester::testMsgIdRetrieval_OptParents()
{
// start up
setUp();
@ -884,7 +884,7 @@ bool GenExchangeTester::testRelatedMsgIdRetrieval_Parents()
opts.mReqType = GXS_REQUEST_TYPE_MSG_IDS;
opts.mOptions = RS_TOKREQOPT_MSG_THREAD;
mTokenService->requestMsgRelatedInfo(token, 0, opts, req);
mTokenService->requestMsgInfo(token, 0, opts, req);
pollForToken(token, opts);
@ -925,7 +925,7 @@ bool GenExchangeTester::testRelatedMsgIdRetrieval_Parents()
}
bool GenExchangeTester::testRelatedMsgIdRetrieval_OrigMsgId()
bool GenExchangeTester::testMsgIdRetrieval_OptOrigMsgId()
{
// start up
setUp();
@ -981,7 +981,7 @@ bool GenExchangeTester::testRelatedMsgIdRetrieval_OrigMsgId()
opts.mReqType = GXS_REQUEST_TYPE_MSG_IDS;
opts.mOptions = RS_TOKREQOPT_MSG_ORIGMSG;
mTokenService->requestMsgRelatedInfo(token, 0, opts, req);
mTokenService->requestMsgInfo(token, 0, opts, req);
pollForToken(token, opts);
@ -1022,7 +1022,7 @@ bool GenExchangeTester::testRelatedMsgIdRetrieval_OrigMsgId()
}
bool GenExchangeTester::testRelatedMsgIdRetrieval_Latest()
bool GenExchangeTester::testMsgIdRetrieval_OptLatest()
{
// testing for latest, create msg which are origMsgIds then
@ -1189,7 +1189,7 @@ bool GenExchangeTester::testRelatedMsgIdRetrieval_Latest()
opts.mReqType = GXS_REQUEST_TYPE_MSG_IDS;
opts.mOptions = RS_TOKREQOPT_MSG_LATEST;
mTokenService->requestMsgRelatedInfo(token, 0, opts, req);
mTokenService->requestMsgInfo(token, 0, opts, req);
pollForToken(token, opts);

View file

@ -27,9 +27,9 @@ public:
bool testMsgSubmissionRetrieval();
bool testMsgIdRetrieval();
bool testRelatedMsgIdRetrieval_Parents();
bool testRelatedMsgIdRetrieval_OrigMsgId();
bool testRelatedMsgIdRetrieval_Latest();
bool testMsgIdRetrieval_OptParents();
bool testMsgIdRetrieval_OptOrigMsgId();
bool testMsgIdRetrieval_OptLatest();
bool testSpecificMsgMetaRetrieval();
bool testGrpSubmissionRetrieval();

View file

@ -0,0 +1,123 @@
#-------------------------------------------------
#
# Project created by QtCreator 2012-05-06T09:19:26
#
#-------------------------------------------------
#
QT += core network
QT -= gui
CONFIG += gen_exchange_target #dstore_target
dstore_target {
TARGET = rs_dstore_test
}
gen_exchange_target {
TARGET = gen_exchange_test
}
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
CONFIG += debug
debug {
# DEFINES *= DEBUG
# DEFINES *= OPENDHT_DEBUG DHT_DEBUG CONN_DEBUG DEBUG_UDP_SORTER P3DISC_DEBUG DEBUG_UDP_LAYER FT_DEBUG EXTADDRSEARCH_DEBUG
# DEFINES *= CONTROL_DEBUG FT_DEBUG DEBUG_FTCHUNK P3TURTLE_DEBUG
# DEFINES *= P3TURTLE_DEBUG
# DEFINES *= NET_DEBUG
# DEFINES *= DISTRIB_DEBUG
# DEFINES *= P3TURTLE_DEBUG FT_DEBUG DEBUG_FTCHUNK MPLEX_DEBUG
# DEFINES *= STATUS_DEBUG SERV_DEBUG RSSERIAL_DEBUG #CONN_DEBUG
QMAKE_CXXFLAGS -= -O2 -fomit-frame-pointer
QMAKE_CXXFLAGS *= -g -fno-omit-frame-pointer
}
################################# Linux ##########################################
# Put lib dir in QMAKE_LFLAGS so it appears before -L/usr/lib
linux-* {
#CONFIG += version_detail_bash_script
QMAKE_CXXFLAGS *= -D_FILE_OFFSET_BITS=64
system(which gpgme-config >/dev/null 2>&1) {
INCLUDEPATH += $$system(gpgme-config --cflags | sed -e "s/-I//g")
} else {
message(Could not find gpgme-config on your system, assuming gpgme.h is in /usr/include)
}
PRE_TARGETDEPS *= ../../lib/libretroshare.a
LIBS += ../../lib/libretroshare.a
LIBS += ../../../../libbitdht/src/lib/libbitdht.a
LIBS += ../../../../openpgpsdk/src/lib/libops.a
LIBS += -lssl -lgpgme -lupnp -lixml -lgnome-keyring -lsqlite3 -lbz2
LIBS *= -rdynamic -frtti
DEFINES *= HAVE_XSS # for idle time, libx screensaver extensions
DEFINES *= UBUNTU
}
linux-g++ {
OBJECTS_DIR = temp/linux-g++/obj
}
linux-g++-64 {
OBJECTS_DIR = temp/linux-g++-64/obj
}
version_detail_bash_script {
DEFINES += ADD_LIBRETROSHARE_VERSION_INFO
QMAKE_EXTRA_TARGETS += write_version_detail
PRE_TARGETDEPS = write_version_detail
write_version_detail.commands = ./version_detail.sh
}
install_rs {
INSTALLS += binary_rs
binary_rs.path = $$(PREFIX)/usr/bin
binary_rs.files = ./RetroShare
}
dstore_target {
SOURCES += \
support.cc \
rsdataservice_test.cc \
data_support.cc
HEADERS += support.h \
rsdataservice_test.h \
data_support.h
}
gen_exchange_target {
SOURCES += \
support.cc \
genexchangetester.cpp \
genexchangetestservice.cpp \
rsdummyservices.cc \
rsgenexchange_test.cc
HEADERS += support.h \
rsdataservice_test.h \
rsdummyservices.h \
data_support.h
}
INCLUDEPATH += ../../

View file

@ -15,17 +15,17 @@ int main()
GenExchangeTester tester;
CHECK(tester.testMsgSubmissionRetrieval()); REPORT("testMsgSubmissionRetrieval()");
CHECK(tester.testSpecificMsgMetaRetrieval()); REPORT("testSpecificMsgMetaRetrieval()");
CHECK(tester.testMsgIdRetrieval()); REPORT("tester.testMsgIdRetrieval()");
CHECK(tester.testRelatedMsgIdRetrieval_Parents()); REPORT("tester.testRelatedMsgIdRetrieval_Parents()");
CHECK(tester.testRelatedMsgIdRetrieval_OrigMsgId()); REPORT("tester.testRelatedMsgIdRetrieval_OrigMsgId()");
CHECK(tester.testRelatedMsgIdRetrieval_Latest()); REPORT("tester.testRelatedMsgIdRetrieval_Latest()");
CHECK(tester.testMsgMetaModRequest()); REPORT("tester.testMsgMetaModRequest()");
// CHECK(tester.testSpecificMsgMetaRetrieval()); REPORT("testSpecificMsgMetaRetrieval()");
// CHECK(tester.testMsgIdRetrieval()); REPORT("tester.testMsgIdRetrieval()");
// CHECK(tester.testMsgIdRetrieval_OptParents()); REPORT("tester.testRelatedMsgIdRetrieval_Parents()");
// CHECK(tester.testMsgIdRetrieval_OptOrigMsgId()); REPORT("tester.testRelatedMsgIdRetrieval_OrigMsgId()");
// CHECK(tester.testMsgIdRetrieval_OptLatest()); REPORT("tester.testRelatedMsgIdRetrieval_Latest()");
// CHECK(tester.testMsgMetaModRequest()); REPORT("tester.testMsgMetaModRequest()");
CHECK(tester.testGrpSubmissionRetrieval()); REPORT("tester.testGrpSubmissionRetrieval()");
CHECK(tester.testGrpMetaRetrieval()); REPORT("tester.testGrpMetaRetrieval()");
CHECK(tester.testGrpIdRetrieval()); REPORT("tester.testGrpIdRetrieval()");
CHECK(tester.testGrpMetaModRequest()); REPORT("tester.testGrpMetaModRequest()");
// CHECK(tester.testGrpSubmissionRetrieval()); REPORT("tester.testGrpSubmissionRetrieval()");
// CHECK(tester.testGrpMetaRetrieval()); REPORT("tester.testGrpMetaRetrieval()");
// CHECK(tester.testGrpIdRetrieval()); REPORT("tester.testGrpIdRetrieval()");
// CHECK(tester.testGrpMetaModRequest()); REPORT("tester.testGrpMetaModRequest()");
FINALREPORT("RsGenExchangeTest");