Added message validation, not enabled at the moment

as msg sync seems to have stopped working. will fix (qos priority change?).
Added validated field to msg meta
Removed serviceString from msg transport.
Added grp flag setting to album create to test msg validation


git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5800 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2012-11-10 23:42:38 +00:00
parent eeb96c5e62
commit c9831b7bea
14 changed files with 427 additions and 107 deletions

View file

@ -4,6 +4,7 @@
#include "ui_AlbumCreateDialog.h"
#include "util/misc.h"
#include "gxs/rsgxsflags.h"
AlbumCreateDialog::AlbumCreateDialog(TokenQueue *photoQueue, RsPhotoV2 *rs_photo, QWidget *parent):
QDialog(parent),
@ -20,6 +21,10 @@ AlbumCreateDialog::~AlbumCreateDialog()
delete ui;
}
#define PUBLIC_INDEX 0
#define RESTRICTED_INDEX 1
#define PRIVATE_INDEX 2
void AlbumCreateDialog::publishAlbum()
{
// get fields for album to publish, publish and then exit dialog
@ -33,6 +38,22 @@ void AlbumCreateDialog::publishAlbum()
album.mPhotographer = ui->lineEdit_Photographer->text().toStdString();
getAlbumThumbnail(album.mThumbnail);
int currIndex = ui->privacyComboBox->currentIndex();
switch(currIndex)
{
case PUBLIC_INDEX:
album.mMeta.mGroupFlags |= GXS_SERV::FLAG_PRIVACY_PUBLIC;
break;
case RESTRICTED_INDEX:
album.mMeta.mGroupFlags |= GXS_SERV::FLAG_PRIVACY_RESTRICTED;
break;
case PRIVATE_INDEX:
album.mMeta.mGroupFlags |= GXS_SERV::FLAG_PRIVACY_PRIVATE;
break;
}
uint32_t token;
mRsPhoto->submitAlbumDetails(token, album);
mPhotoQueue->queueRequest(token, TOKENREQ_GROUPINFO, RS_TOKREQ_ANSTYPE_ACK, 0);

View file

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>465</width>
<height>356</height>
<height>365</height>
</rect>
</property>
<property name="windowTitle">
@ -198,7 +198,7 @@ border-radius: 10px;
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QComboBox" name="comboBox_3">
<widget class="QComboBox" name="privacyComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -210,11 +210,6 @@ border-radius: 10px;
<string>Public</string>
</property>
</item>
<item>
<property name="text">
<string>All Friends</string>
</property>
</item>
<item>
<property name="text">
<string>Restricted</string>