├── images
└── bitcoin.png
├── ZeroReserve_images.qrc
├── Router.cpp
├── RemotePaymentDialog.h
├── NewWallet.h
├── PeerAddressDialog.cpp
├── PeerAddressDialog.h
├── README.md
├── ZrDummyBitcoin.h
├── TmLocalCohorte.h
├── dbconfig.h
├── TraceRouter.cpp
├── TmLocalCoordinator.h
├── paymentdialog.h
├── frienddetailsdialog.h
├── RemotePaymentRequestDialog.h
├── TmRemoteCoordinator.h
├── TraceRouter.h
├── TmRemoteCohorte.h
├── ZeroReserveConfig.ui
├── dbconfig.cpp
├── Credit.h
├── ZrDummyBitcoin.cpp
├── BitcoinAddressList.h
├── NewWallet.cpp
├── ZeroReserveDialog.h
├── ZrSatoshiBitcoin.h
├── ZeroReservePlugin.h
├── RemotePaymentDialog.cpp
├── Credit.cpp
├── p3ZeroReserverRS.h
├── Router.h
├── TransactionManager.h
├── MyOrders.h
├── ZrLibBitcoin.h
├── paymentdialog.cpp
├── frienddetailsdialog.cpp
├── ZRBitcoin.h
├── ZeroReserve.pro
├── PeerAddressDialog.ui
├── ZrSatoshiBitcoin.cpp
├── NewWallet.ui
├── TmLocalCoordinator.cpp
├── BitcoinAddressList.cpp
├── RemotePaymentRequestDialog.ui
├── zrtypes.h
├── RemotePaymentDialog.ui
├── TmLocalCohorte.cpp
├── RemotePaymentRequestDialog.cpp
├── TmRemoteCoordinator.cpp
├── TransactionManager.cpp
├── Payment.h
├── Currency.h
├── zrdb.h
├── paymentdialog.ui
├── frienddetailsdialog.ui
├── OrderBook.h
├── Payment.cpp
├── ZeroReservePlugin.cpp
├── RSZRRemoteItems.h
├── RSZeroReserveItems.h
├── COPYING
├── TmRemoteCohorte.cpp
├── OrderBook.cpp
└── p3ZeroReserveRS.cpp
/images/bitcoin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chozabu/ZeroReserve/master/images/bitcoin.png
--------------------------------------------------------------------------------
/ZeroReserve_images.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | images/bitcoin.png
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Router.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | This file is part of the Zero Reserve Plugin for Retroshare.
3 |
4 | Zero Reserve is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Lesser General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | Zero Reserve is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU Lesser General Public License for more details.
13 |
14 | You should have received a copy of the GNU Lesser General Public License
15 | along with Zero Reserve. If not, see .
16 | */
17 |
18 | #include "Router.h"
19 | #include "TraceRouter.h"
20 |
21 | Router * Router::instance = 0;
22 |
23 |
24 |
25 | Router * Router::Instance()
26 | {
27 | if( !Router::instance ) {
28 | Router::instance = new TraceRouter();
29 | }
30 | return instance;
31 | }
32 |
--------------------------------------------------------------------------------
/RemotePaymentDialog.h:
--------------------------------------------------------------------------------
1 | /*
2 | This file is part of the Zero Reserve Plugin for Retroshare.
3 |
4 | Zero Reserve is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Lesser General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | Zero Reserve is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU Lesser General Public License for more details.
13 |
14 | You should have received a copy of the GNU Lesser General Public License
15 | along with Zero Reserve. If not, see .
16 | */
17 |
18 | #ifndef REMOTEPAYMENTDIALOG_H
19 | #define REMOTEPAYMENTDIALOG_H
20 |
21 | #include
22 |
23 | namespace Ui {
24 | class RemotePaymentDialog;
25 | }
26 |
27 | class RemotePaymentDialog : public QDialog
28 | {
29 | Q_OBJECT
30 |
31 | public:
32 | explicit RemotePaymentDialog(QWidget *parent = 0);
33 | ~RemotePaymentDialog();
34 |
35 | private slots:
36 | void payTo();
37 | void loadPayment(QString address);
38 |
39 | private:
40 | Ui::RemotePaymentDialog *ui;
41 | };
42 |
43 | #endif // REMOTEPAYMENTDIALOG_H
44 |
--------------------------------------------------------------------------------
/NewWallet.h:
--------------------------------------------------------------------------------
1 | /*
2 | This file is part of the Zero Reserve Plugin for Retroshare.
3 |
4 | Zero Reserve is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Lesser General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | Zero Reserve is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU Lesser General Public License for more details.
13 |
14 | You should have received a copy of the GNU Lesser General Public License
15 | along with Zero Reserve. If not, see .
16 | */
17 |
18 |
19 | #ifndef NEWWALLET_H
20 | #define NEWWALLET_H
21 |
22 | #include "ZRBitcoin.h"
23 |
24 | #include
25 |
26 | namespace Ui {
27 | class NewWallet;
28 | }
29 |
30 | class NewWallet : public QDialog
31 | {
32 | Q_OBJECT
33 |
34 | public:
35 |
36 | explicit NewWallet(QWidget *parent = 0);
37 | ~NewWallet();
38 |
39 | QString m_seed;
40 | ZR::MyWallet::WalletType m_walletType;
41 |
42 | private slots:
43 | void wallet();
44 | void makeSeed( bool enabled );
45 |
46 |
47 | private:
48 | Ui::NewWallet *ui;
49 | };
50 |
51 | #endif // NEWWALLET_H
52 |
--------------------------------------------------------------------------------
/PeerAddressDialog.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | This file is part of the Zero Reserve Plugin for Retroshare.
3 |
4 | Zero Reserve is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Lesser General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | Zero Reserve is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU Lesser General Public License for more details.
13 |
14 | You should have received a copy of the GNU Lesser General Public License
15 | along with Zero Reserve. If not, see .
16 | */
17 |
18 | #include "PeerAddressDialog.h"
19 | #include "ui_PeerAddressDialog.h"
20 |
21 | PeerAddressDialog::PeerAddressDialog(QWidget *parent) :
22 | QDialog(parent),
23 | ui(new Ui::PeerAddressDialog)
24 | {
25 | ui->setupUi(this);
26 | connect( ui->buttonBox, SIGNAL(accepted()), this, SLOT( setPeerAddress() ) );
27 | }
28 |
29 | PeerAddressDialog::~PeerAddressDialog()
30 | {
31 | delete ui;
32 | }
33 |
34 |
35 | void PeerAddressDialog::setPeerAddress()
36 | {
37 | m_nick = ui->NickName->text().toStdString();
38 | m_address = ui->peerAddress->text().toStdString();
39 | }
40 |
--------------------------------------------------------------------------------
/PeerAddressDialog.h:
--------------------------------------------------------------------------------
1 | /*
2 | This file is part of the Zero Reserve Plugin for Retroshare.
3 |
4 | Zero Reserve is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Lesser General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | Zero Reserve is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU Lesser General Public License for more details.
13 |
14 | You should have received a copy of the GNU Lesser General Public License
15 | along with Zero Reserve. If not, see .
16 | */
17 |
18 |
19 | #ifndef PEERADDRESSDIALOG_H
20 | #define PEERADDRESSDIALOG_H
21 |
22 | #include "zrtypes.h"
23 |
24 | #include
25 |
26 | namespace Ui {
27 | class PeerAddressDialog;
28 | }
29 |
30 | class PeerAddressDialog : public QDialog
31 | {
32 | Q_OBJECT
33 |
34 | public:
35 | explicit PeerAddressDialog(QWidget *parent = 0);
36 | ~PeerAddressDialog();
37 |
38 |
39 | private slots:
40 | void setPeerAddress();
41 |
42 | public:
43 | Ui::PeerAddressDialog *ui;
44 |
45 | ZR::BitcoinAddress m_address;
46 | std::string m_nick;
47 | };
48 |
49 | #endif // PEERADDRESSDIALOG_H
50 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ZeroReserve
2 | ===========
3 |
4 | Friend 2 Friend Payment and Bitcoin exchange
5 |
6 | Prerequisite for building is a successful RetroShare build and sqlite3 and libnmcrpc
7 | RetroShare is available from http://retroshare.sourceforge.net/
8 | sqlite3 is probably part of your Linux distribution. If you are on Windows,
9 | get it from http://www.sqlite.org/
10 |
11 | Get libnmcrpc directly from git:
12 | ```
13 | $ git clone git@gitorious.org:libnmcrpc/libnmcrpc.git
14 | ```
15 |
16 | Then configure with :
17 | ```
18 | $ autogen.sh
19 | $ ./configure
20 | ```
21 |
22 | To build, checkout the sources to the plugins directory of Retroshare and build with:
23 | ```
24 | $ qmake && make clean && make
25 | ```
26 |
27 | To install on Windows, drop the resulting DLL into the
28 | %APPDATA%\Retroshare\extensions directory.
29 |
30 | To install on Linux or MacOS, drop the resulting shared object into
31 | ~/.retroshare/extensions
32 |
33 | Running ZeroReserve requires a running Satoshi Client first:
34 | ```
35 | $ ./bitcoind
36 | or
37 | $ ./bitcoin-qt -server # that shows the GUI
38 |
39 | ```
40 | This is an example bitcoin.conf with all entries required:
41 | ```
42 | testnet=1
43 | rpcuser=anu
44 | rpcpassword=mysupersecretpassword
45 | rpcport=18332
46 | ```
47 |
48 |
49 | This is experimental software. Use at your own risk. At this stage, leave TestNet
50 | on. Don't enable real currencies.
51 |
52 | Building and running on MacOS may or may not work at this point.
53 |
--------------------------------------------------------------------------------
/ZrDummyBitcoin.h:
--------------------------------------------------------------------------------
1 | /*
2 | This file is part of the Zero Reserve Plugin for Retroshare.
3 |
4 | Zero Reserve is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Lesser General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | Zero Reserve is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU Lesser General Public License for more details.
13 |
14 | You should have received a copy of the GNU Lesser General Public License
15 | along with Zero Reserve. If not, see .
16 | */
17 |
18 |
19 |
20 | #ifndef ZRDUMMYBITCOIN_H
21 | #define ZRDUMMYBITCOIN_H
22 |
23 | #include "zrtypes.h"
24 | #include "ZRBitcoin.h"
25 |
26 |
27 | class ZrDummyBitcoin : public ZR::Bitcoin
28 | {
29 | public:
30 | ZrDummyBitcoin();
31 |
32 | virtual ZR::RetVal start();
33 | virtual ZR::RetVal stop();
34 | virtual ZR::RetVal commit();
35 | virtual ZR::ZR_Number getBalance();
36 | virtual ZR::MyWallet * mkWallet( ZR::MyWallet::WalletType wType );
37 | virtual void send( const std::string & dest, const ZR::ZR_Number & amount );
38 | virtual void loadWallets( std::vector< ZR::MyWallet *> & wallets );
39 | };
40 |
41 | #endif // ZRDUMMYBITCOIN_H
42 |
--------------------------------------------------------------------------------
/TmLocalCohorte.h:
--------------------------------------------------------------------------------
1 | /*
2 | This file is part of the Zero Reserve Plugin for Retroshare.
3 |
4 | Zero Reserve is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Lesser General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | Zero Reserve is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU Lesser General Public License for more details.
13 |
14 | You should have received a copy of the GNU Lesser General Public License
15 | along with Zero Reserve. If not, see .
16 | */
17 |
18 |
19 | #ifndef TMLOCALCOHORTE_H
20 | #define TMLOCALCOHORTE_H
21 |
22 | #include "zrtypes.h"
23 | #include "TransactionManager.h"
24 |
25 | class RsZeroReserveInitTxItem;
26 | class Payment;
27 |
28 | class TmLocalCohorte : public TransactionManager
29 | {
30 | public:
31 | TmLocalCohorte( const ZR::TransactionId & txId );
32 | virtual ~TmLocalCohorte();
33 |
34 | virtual ZR::RetVal init();
35 |
36 | protected:
37 | virtual ZR::RetVal processItem( RsZeroReserveTxItem * item );
38 | virtual ZR::RetVal abortTx( RsZeroReserveTxItem * item );
39 |
40 | virtual void rollback();
41 |
42 | private:
43 | Payment * m_payment;
44 | };
45 |
46 | #endif // TMLOCALCOHORTE_H
47 |
--------------------------------------------------------------------------------
/dbconfig.h:
--------------------------------------------------------------------------------
1 | /*
2 | This file is part of the Zero Reserve Plugin for Retroshare.
3 |
4 | Zero Reserve is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Lesser General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | Zero Reserve is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU Lesser General Public License for more details.
13 |
14 | You should have received a copy of the GNU Lesser General Public License
15 | along with Zero Reserve. If not, see .
16 | */
17 |
18 | #ifndef DBCONFIG_H
19 | #define DBCONFIG_H
20 |
21 | #include "ui_ZeroReserveConfig.h"
22 |
23 | #include "retroshare-gui/configpage.h"
24 |
25 |
26 | class DBConfig : public ConfigPage
27 | {
28 | Q_OBJECT
29 | public:
30 | DBConfig( QWidget * parent = 0, Qt::WFlags flags = 0 );
31 |
32 | virtual bool save(QString &errmsg);
33 | virtual void load();
34 |
35 | virtual QPixmap iconPixmap() const { return QPixmap(":/images/bitcoin.png") ; }
36 | virtual QString pageName() const { return "Zero Reserve"; }
37 | virtual QString helpText() const { return ""; }
38 |
39 |
40 | private slots:
41 | void editTxLog();
42 |
43 | private:
44 | Ui::DBConfig ui;
45 | };
46 |
47 | #endif // DBCONFIG_H
48 |
--------------------------------------------------------------------------------
/TraceRouter.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | This file is part of the Zero Reserve Plugin for Retroshare.
3 |
4 | Zero Reserve is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Lesser General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | Zero Reserve is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU Lesser General Public License for more details.
13 |
14 | You should have received a copy of the GNU Lesser General Public License
15 | along with Zero Reserve. If not, see .
16 | */
17 |
18 | #include "TraceRouter.h"
19 |
20 | TraceRouter::TraceRouter()
21 | {
22 | }
23 |
24 | void TraceRouter::addRoute( const ZR::VirtualAddress &dest, const std::string & gateway )
25 | {
26 | routingTable[ dest ] = gateway;
27 | }
28 |
29 |
30 | const std::string TraceRouter::nextHop( const ZR::VirtualAddress &dest )
31 | {
32 | RoutingTable::const_iterator it = routingTable.find( dest );
33 | if( it != routingTable.end() ){
34 | return (*it).second;
35 | }
36 |
37 | return std::string();
38 | }
39 |
40 | bool TraceRouter::hasRoute( const ZR::VirtualAddress & dest )
41 | {
42 | if( routingTable.find( dest ) == routingTable.end() ){
43 | return false;
44 | }
45 | return true;
46 | }
47 |
--------------------------------------------------------------------------------
/TmLocalCoordinator.h:
--------------------------------------------------------------------------------
1 | /*
2 | This file is part of the Zero Reserve Plugin for Retroshare.
3 |
4 | Zero Reserve is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Lesser General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | Zero Reserve is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU Lesser General Public License for more details.
13 |
14 | You should have received a copy of the GNU Lesser General Public License
15 | along with Zero Reserve. If not, see .
16 | */
17 |
18 | #ifndef TMLOCALCOORDINATOR_H
19 | #define TMLOCALCOORDINATOR_H
20 |
21 | #include "TransactionManager.h"
22 |
23 | class Payment;
24 |
25 | class TmLocalCoordinator : public TransactionManager
26 | {
27 | public:
28 | TmLocalCoordinator( Payment * payment );
29 | virtual ~TmLocalCoordinator();
30 |
31 | virtual ZR::RetVal init();
32 |
33 | protected:
34 | virtual ZR::RetVal processItem( RsZeroReserveTxItem * item );
35 | virtual ZR::RetVal abortTx( RsZeroReserveTxItem * item );
36 |
37 | virtual void rollback();
38 |
39 | static const ZR::TransactionId mkId();
40 |
41 | private:
42 | Payment * m_payment;
43 |
44 | static unsigned int sequence;
45 | };
46 |
47 | #endif // TMLOCALCOORDINATOR_H
48 |
--------------------------------------------------------------------------------
/paymentdialog.h:
--------------------------------------------------------------------------------
1 | /*
2 | This file is part of the Zero Reserve Plugin for Retroshare.
3 |
4 | Zero Reserve is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Lesser General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | Zero Reserve is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU Lesser General Public License for more details.
13 |
14 | You should have received a copy of the GNU Lesser General Public License
15 | along with Zero Reserve. If not, see .
16 | */
17 |
18 | #ifndef PAYMENTDIALOG_H
19 | #define PAYMENTDIALOG_H
20 |
21 | #include "zrtypes.h"
22 |
23 | #include
24 | #include
25 |
26 | #include
27 |
28 | namespace Ui {
29 | class PaymentDialog;
30 | }
31 |
32 | class PaymentDialog : public QDialog
33 | {
34 | Q_OBJECT
35 |
36 | public:
37 | explicit PaymentDialog( const std::string & payee, QWidget *parent = 0 );
38 | ~PaymentDialog();
39 |
40 | private slots:
41 | void payTo();
42 | void loadAvailableFunds( QString arg = "" );
43 |
44 | private:
45 | ZR::ZR_Number availableFunds();
46 |
47 | Ui::PaymentDialog *ui;
48 | const std::string m_payee;
49 | };
50 |
51 | #endif // PAYMENTDIALOG_H
52 |
--------------------------------------------------------------------------------
/frienddetailsdialog.h:
--------------------------------------------------------------------------------
1 | /*
2 | This file is part of the Zero Reserve Plugin for Retroshare.
3 |
4 | Zero Reserve is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Lesser General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | Zero Reserve is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU Lesser General Public License for more details.
13 |
14 | You should have received a copy of the GNU Lesser General Public License
15 | along with Zero Reserve. If not, see .
16 | */
17 |
18 | #ifndef FRIENDDETAILSDIALOG_H
19 | #define FRIENDDETAILSDIALOG_H
20 |
21 | #include
22 | #include
23 | #include
24 |
25 | namespace Ui {
26 | class FriendDetailsDialog;
27 | }
28 |
29 | class FriendDetailsDialog : public QDialog
30 | {
31 | Q_OBJECT
32 |
33 | public:
34 | explicit FriendDetailsDialog( const std::string & id, QWidget *parent = 0, const std::string & name = "Error. No id selected!" );
35 | ~FriendDetailsDialog();
36 |
37 | private:
38 | Ui::FriendDetailsDialog *ui;
39 | std::string m_id;
40 |
41 | protected slots:
42 | void editFriend();
43 | void loadPeer( QString currency = "" );
44 | };
45 |
46 | #endif // FRIENDDETAILSDIALOG_H
47 |
--------------------------------------------------------------------------------
/RemotePaymentRequestDialog.h:
--------------------------------------------------------------------------------
1 | /*
2 | This file is part of the Zero Reserve Plugin for Retroshare.
3 |
4 | Zero Reserve is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Lesser General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | Zero Reserve is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU Lesser General Public License for more details.
13 |
14 | You should have received a copy of the GNU Lesser General Public License
15 | along with Zero Reserve. If not, see .
16 | */
17 |
18 | #ifndef REMOTEPAYMENTREQUESTDIALOG_H
19 | #define REMOTEPAYMENTREQUESTDIALOG_H
20 |
21 | #include
22 |
23 | namespace Ui {
24 | class RemotePaymentRequestDialog;
25 | }
26 |
27 | class RemotePaymentRequestDialog : public QDialog
28 | {
29 | Q_OBJECT
30 |
31 | public:
32 | explicit RemotePaymentRequestDialog(QWidget *parent = 0);
33 | ~RemotePaymentRequestDialog();
34 |
35 | private slots:
36 | void currencySelected( QString currency );
37 | void amountEntered(QString amount );
38 | void sendRequest();
39 |
40 | private:
41 | QString getPayAddress( QString amount, QString currency );
42 |
43 | private:
44 | Ui::RemotePaymentRequestDialog *ui;
45 | };
46 |
47 | #endif // REMOTEPAYMENTREQUESTDIALOG_H
48 |
--------------------------------------------------------------------------------
/TmRemoteCoordinator.h:
--------------------------------------------------------------------------------
1 | /*
2 | This file is part of the Zero Reserve Plugin for Retroshare.
3 |
4 | Zero Reserve is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Lesser General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | Zero Reserve is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU Lesser General Public License for more details.
13 |
14 | You should have received a copy of the GNU Lesser General Public License
15 | along with Zero Reserve. If not, see .
16 | */
17 |
18 | #ifndef TMREMOTECOORDINATOR_H
19 | #define TMREMOTECOORDINATOR_H
20 |
21 | #include "TransactionManager.h"
22 | #include "zrtypes.h"
23 |
24 | class Payment;
25 |
26 |
27 | class TmRemoteCoordinator : public TransactionManager
28 | {
29 | TmRemoteCoordinator();
30 | public:
31 | TmRemoteCoordinator(const ZR::VirtualAddress &addr, Payment * payment, const std::string &myId);
32 | virtual ~TmRemoteCoordinator();
33 |
34 | virtual ZR::RetVal init();
35 | virtual ZR::RetVal processItem( RSZRRemoteTxItem * item );
36 | virtual ZR::RetVal abortTx( RSZRRemoteTxItem * item );
37 |
38 | virtual void rollback();
39 |
40 | private:
41 | ZR::VirtualAddress m_Destination;
42 | Payment * m_Payment;
43 | std::string m_myId;
44 | };
45 |
46 | #endif // TMREMOTECOORDINATOR_H
47 |
--------------------------------------------------------------------------------
/TraceRouter.h:
--------------------------------------------------------------------------------
1 | /*
2 | This file is part of the Zero Reserve Plugin for Retroshare.
3 |
4 | Zero Reserve is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU Lesser General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | Zero Reserve is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU Lesser General Public License for more details.
13 |
14 | You should have received a copy of the GNU Lesser General Public License
15 | along with Zero Reserve. If not, see .
16 | */
17 |
18 | #ifndef TRACEROUTER_H
19 | #define TRACEROUTER_H
20 |
21 | #include "Router.h"
22 | #include "zrtypes.h"
23 |
24 | #include
25 | #include