Commit abe0aa6c authored by mbriand's avatar mbriand

release2.3

parent 5330a01c
# Doxyfile 1.3.8
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "ubpt transfert"
PROJECT_NUMBER = 2.0.0
OUTPUT_DIRECTORY = doc/api
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = YES
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = YES
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 4
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = YES
OPTIMIZE_OUTPUT_JAVA = NO
SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = NO
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = YES
HIDE_UNDOC_MEMBERS = YES
HIDE_UNDOC_CLASSES = YES
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = NO
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = src \
include
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.idl \
*.odl \
*.cs \
*.php \
*.php3 \
*.inc \
*.m \
*.mm
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = NO
REFERENCES_RELATION = NO
VERBATIM_HEADERS = NO
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = YES
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
MAX_DOT_GRAPH_DEPTH = 1000
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
Requiments:
Qt4
libcurl
Build:
qmake
make compiler_uic_make_all
make
/*
UBPT Transfert 2
Copyright (C) 2005 Julien Etelain. Tous droits réservés..
Copyright (C) 2011 Mathieu Briand.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef ADDDIALOG_H
#define ADDDIALOG_H
#include "ui_add.h"
#include "protocol.h"
class MainWindow;
class contextTreeItem;
class addDialog : public QDialog
{
Q_OBJECT
public:
addDialog( MainWindow *win, QWidget *parent = 0);
public slots:
void on_cancelButton_clicked();
void selectFileName();
void selectDirName();
void currentItemChange ( QTreeWidgetItem * current, QTreeWidgetItem * previous );
void enqueueRequested();
void enableClubComboBox(int state);
void enableUserLineEdit(int state);
private:
Ui::addDialog ui;
UbptSession *session;
void initLists();
MainWindow *mainwin;
void processCtx ( contextTreeItem *item, UbptContext *ctx );
};
class contextTreeItem : public QTreeWidgetItem
{
public:
contextTreeItem( QTreeWidgetItem * parent, UbptContext *pCtx );
contextTreeItem( QTreeWidget * parent, UbptContext *pCtx );
UbptContext *Ctx;
};
#endif
/*
UBPT Transfert 2
Copyright (C) 2005 Julien Etelain. Tous droits réservés.. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef CONNECTDIALOG_H
#define CONNECTDIALOG_H
#include "ui_connect.h"
#include "protocol.h"
class connectDialog : public QDialog
{
Q_OBJECT
public:
connectDialog( UbptSession *targetSession, QWidget *parent = 0);
void enableMode(int mode);
void connectToServer( QString Url );
public slots:
void on_okButton_clicked();
void on_cancelButton_clicked();
void connectCurrent(int index=0);
private:
Ui::connectDialog ui;
UbptSession *session;
int connectToUBPT();
};
#endif
\ No newline at end of file
/*
UBPT Transfert 2
Copyright (C) 2005 Julien Etelain. Tous droits réservés..
Copyright (C) 2011 Mathieu Briand.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "ui_main.h"
#include <QTime>
#include <QDomDocument>
#include "protocol.h"
#include "uploadthread.h"
typedef struct transfertItem
{
public:
QString name;
QString fileName;
QString contextName;
int contextId;
int rights;
QString group;
int photographerUserId;
QString club;
QString licence;
QString comment;
enum itemType { Photo, Video };
itemType type;
} transfertItem;
class transfertTreeItem : public QTreeWidgetItem
{
public:
transfertTreeItem( QString Name, QString FileName, QString ContextName, int ContextId,int Rights, QString Group, int photographerUserId, QString Club, QString Licence, QString comment, QTreeWidget *parent, transfertItem::itemType t = transfertItem::Photo );
transfertTreeItem( transfertItem transfert, QTreeWidget *parent );
transfertItem transfert;
enum transfertState { ToDo, Encoding, Transfert, Sucess, Error };
transfertState state;
int UBPTError;
};
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
UbptSession session;
void switchMode ( int Mode );
void addFileToQueue ( const QString & name, const QString & fileName, const QString & contextName, int contextId, int rights, const QString & group, int photographerUserId, QString club, QString licence, QString comment );
void addVideoFileToQueue ( const QString & name, const QString & fileName, const QString & contextName, int contextId, int rights, const QString & group, int photographerUserId, QString club, QString licence, QString comment );
Ui::MainWindow ui;
protected:
void closeEvent(QCloseEvent *event);
public slots:
void about();
void openAdd();
void openConnect();
void processPhotos();
void stopPhotos();
void uploaded(transfertTreeItem *Item);
void progress(transfertTreeItem *Item, int precent);
void resetStatesAndRemoveDone();
void removeAll();
void removeSelection();
private:
void createActions();
void createMenus();
void createToolBars();
void writeList();
void readList();
void readElement( const QDomElement &element );
QAction *aboutAct;
QAction *exitAct;
QAction *connectAct;
QAction *addAct;
QAction *processAct;
QAction *stopAct;
QAction *cleanupResetAct;
QAction *removeAllAct;
QAction *removeSelectionAct;
QMenu *fileMenu;
QMenu *photosMenu;
QMenu *helpMenu;
QToolBar *fileToolBar;
QToolBar *photosToolBar;
QTreeWidgetItem *rootItem;
void uploadItem (transfertTreeItem *Item );
void nextItem ();
bool stop;
QTime listTime;
QTime itemTime;
int itemsDone;
void refreshRemaingInfo ();
int countRemainingItems ();
UploadThread upthread;
};
#define MODE_CONNECT 0
#define MODE_SELECT 1
#define MODE_TRANSFERT 2
#endif
/*
UBPT Transfert 2
Copyright (C) 2005,2006 Julien Etelain. Tous droits réservés..
Copyright (C) 2011 Mathieu Briand.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/**
@addtogroup ubptprococol
@{
*/
/**
@file
*/
#ifndef PROTOCOL_H
#define PROTOCOL_H
#include<QStringList>
#include<QMap>
#include <curl/curl.h>
/* In recent version of libcurl, this include doesn't exist anymore, uncomment if it breaks build for you
* #include <curl/types.h>
*/
#include <curl/easy.h>
/**
UBPT Context
*/
class UbptContext
{
public:
QString Name;
int Id;
int IdParent;
QString Group;
int Rights;
};
/**
UBPT Session
*/
class UbptSession
{
public:
UbptSession();
~UbptSession();
QString Name;
QString Message;
QString Url;
int userId;
QStringList Domains;
QList<UbptContext*> Contexts;
QStringList UserGroups;
QMap<QString, int> Clubs;
QMap<QString, int> Licences;
int ConnectToServer ( QString url );
int OpenSession ( QString userName, QString passWord, int domain );
int FetchUserGroups();
int FetchClubs();
int FetchLicences();
int FetchContexts();
int UploadImage ( int contextId, int rights, QString group, int photographerUserId, int clubId, int licenceId, QString comment, QString file );
int UploadVideoFlv ( int contextId, int rights, QString group, int photographerUserId, int clubId, int licenceId, QString comment, QString fileImage, QString fileVideo );
int SetProgress( curl_progress_callback func, void *clientp );
private:
CURL *curl;
QString sessionId;
int connected;
char *_url;
};
#define ERR_UBPT_NONE 0
// Errors in use of functions : please respect order and check return codes
#define ERR_UBPT_NOTCONNECTED -4
#define ERR_UBPT_SESSIONREQUIRED -3
#define ERR_UBPT_INIT -2
#define ERR_SYSTEMERROR -5
// Error in connectivity
#define ERR_UBPT_NOCONNECTION -1
// Other errors
#define ERR_UBPT_USERNAMEORPASSWORD 10
#define ERR_UBPT_NEEDTOUPDATE 11
#define ERR_UBPT_INVALIDIMAGEFILE 3
#define ERR_UBPT_MYSQLERROR 2
#define ERR_UBPT_UNKNOWNCONTEXT 8
#define ERR_UBPT_FORBIDDEN 9
#define ERR_UBPT_UPLOADERROR 1
#define ERR_UBPT_VIDEOTRANSCODE -10
#define ERR_UBPT_VIDEOSHOT -11
#endif
/**
@}
*/
#ifndef UPLOADTHREAD_H
#define UPLOADTHREAD_H
#include <QMutex>
#include <QSize>
#include <QThread>
#include <QWaitCondition>
#include"protocol.h"
class transfertTreeItem;
class UploadThread : public QThread
{
Q_OBJECT
public:
UploadThread(QObject *parent = 0);
void upload(transfertTreeItem *Item);
void progress_callback(double dltotal,double dlnow,double ultotal,double ulnow);
UbptSession *session;
signals:
void uploaded(transfertTreeItem *Item);
void progress(transfertTreeItem *Item, int precent);
protected:
void run();
private:
QMutex mutex;
QWaitCondition condition;
transfertTreeItem *item;
transfertTreeItem *current;
};
#endif
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="0.9">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIconFile</key>
<string>@ICON@</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleGetInfoString</key>
<string>UBPT Transfert 2.1.0 beta, © 2005 Julien Etelain</string>
<key>CFBundleSignature</key>
<string>ttxt</string>
<key>CFBundleExecutable</key>
<string>@EXECUTABLE@</string>
<key>NOTE</key>
<string>UBPT Transfert for AE UTBM</string>
</dict>
</plist>
<RCC>
<qresource prefix="/images" >
<file>clean.png</file>
<file>icon.png</file>
<file>image.png</file>
<file>play.png</file>
<file>stop.png</file>
<file>world.png</file>
</qresource>
<qresource prefix="/translations" >
<file>ubpttr_fr.qm</file>
</qresource>
</RCC>
This diff is collapsed.
This diff is collapsed.
/*
UBPT Transfert 2
Copyright (C) 2005 Julien Etelain. Tous droits réservés..
Copyright (C) 2011 Mathieu Briand.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License