Skip to content

Commit

Permalink
Merge branch 'develop' of /var/lib/git/opentxs into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueWall committed Sep 2, 2014
2 parents b8005cc + 1819662 commit 40b0973
Show file tree
Hide file tree
Showing 158 changed files with 1,465 additions and 2,294 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ endif()

if(BUILD_SHARED_LIBS)
# Windows would complain about unknown flag -fPIC
if(NOT MSVC)
if(NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
endif()
endif()
Expand Down
4 changes: 2 additions & 2 deletions Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -735,10 +735,10 @@ WARN_LOGFILE =

INPUT = README.md \
deps/lucre/include/lucre \
include/opentxs/api \
include/opentxs/client \
include/opentxs/extensions \
include/opentxs/core \
src/api \
src/client \
src/extensions \
src/core \
src/opentxs
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Open-Transactions Library Project

[![Build Status](https://travis-ci.org/Open-Transactions/opentxs.svg?branch=develop)](https://travis-ci.org/Open-Transactions/opentxs)[![Stories in Ready](https://badge.waffle.io/open-transactions/opentxs.svg?label=ready&title=Ready)](http://waffle.io/open-transactions/opentxs)
[![Build Status](https://travis-ci.org/Open-Transactions/opentxs.svg?branch=develop)](https://travis-ci.org/Open-Transactions/opentxs)[![Stories in Ready](https://badge.waffle.io/open-transactions/opentxs.svg?label=ready&title=Ready)](http://waffle.io/open-transactions/opentxs)[![tip for next commit](https://tip4commit.com/projects/915.svg)](https://tip4commit.com/github/Open-Transactions/opentxs)


The Open-Transactions project is a collaborative effort to develop
Expand Down
2 changes: 1 addition & 1 deletion deps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/lucre/include/lucre/)

if(WIN32)
# suppress sscanf/sprintf being unsafe warnings
add_Definitions("/wd4996")
add_definitions("/wd4996")

add_library(lucre
STATIC
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/************************************************************************************
/************************************************************
*
* main.h
* Helpers.hpp
*
*/

Expand Down Expand Up @@ -130,7 +130,26 @@
-----END PGP SIGNATURE-----
**************************************************************/

#ifndef __MAIN_HPP__
#define __MAIN_HPP__
#ifndef OPENTXS_CLIENT_HELPERS_HPP
#define OPENTXS_CLIENT_HELPERS_HPP

#include <cstdint>

namespace opentxs
{

class OTLedger;
class OTPseudonym;
class OTPayment;

// Caller is responsible to delete.
// returns financial instrument by index. (Cheque, Purse, etc.)
EXPORT OTPayment* GetInstrument(OTPseudonym& theNym, const int32_t& nIndex,
OTLedger& ledger);

EXPORT int32_t
GetOutpaymentsIndexByTransNum(OTPseudonym& nym, const int64_t lTransNum);

} // namespace opentxs

#endif // __MAIN_HPP__
#endif // OPENTXS_CLIENT_HELPERS_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ kamH0Y/n11lCvo1oQxM+
#ifndef __Mock_OTAPI_Exec_H__
#define __Mock_OTAPI_Exec_H__

#include "gmock/gmock.h"
#include "opentxs/client/OTAPI_Exec.hpp"

#include "OTAPI_Exec.hpp"
#include <gmock/gmock.h>

namespace opentxs
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
#ifndef __OT_API_HPP__
#define __OT_API_HPP__

#include <opentxs/core/util/Common.hpp>
#include "opentxs/core/util/Common.hpp"

namespace opentxs
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
#ifndef __OT_API_EXEC_HPP__
#define __OT_API_EXEC_HPP__

#include <opentxs/core/util/Common.hpp>
#include "opentxs/core/util/Common.hpp"

namespace opentxs
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@
#ifndef __OT_CLIENT_HPP__
#define __OT_CLIENT_HPP__

#include "OTMessageBuffer.hpp"
#include "OTMessageOutbuffer.hpp"
#include "opentxs/core/OTMessageBuffer.hpp"
#include "opentxs/core/OTMessageOutbuffer.hpp"

namespace opentxs
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
#ifndef __OT_ME_CPP_HPP__
#define __OT_ME_CPP_HPP__

#include <opentxs/core/util/Common.hpp>
#include "opentxs/core/util/Common.hpp"

namespace opentxs
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
#ifndef __OT_RECORD_HPP__
#define __OT_RECORD_HPP__

#include <opentxs/core/util/Common.hpp>
#include "opentxs/core/util/Common.hpp"

namespace opentxs
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
#ifndef __OT_RECORD_LIST__
#define __OT_RECORD_LIST__

#include <opentxs/api/OTRecord.hpp>
#include "opentxs/client/OTRecord.hpp"

#include <list>
#include <map>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
#ifndef __OT_SERVER_CONNECTION_HPP__
#define __OT_SERVER_CONNECTION_HPP__

#include <OTMessageBuffer.hpp>
#include "opentxs/core/OTMessageBuffer.hpp"

namespace opentxs
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
#ifndef __OT_WALLET_HPP__
#define __OT_WALLET_HPP__

#include "OTString.hpp"
#include "opentxs/core/OTString.hpp"

#include <map>
#include <memory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
#ifndef __OT_ME_HPP__
#define __OT_ME_HPP__

#include <opentxs/core/util/Common.hpp>
#include "opentxs/core/util/Common.hpp"

namespace opentxs
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
#ifndef __OPEN_TRANSACTIONS_HPP__
#define __OPEN_TRANSACTIONS_HPP__

#include <opentxs/core/util/Common.hpp>
#include "opentxs/core/util/Common.hpp"

#ifndef SWIG
#ifndef NOT_SWIG
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef _H_OT_COMMANDS_OT
#define _H_OT_COMMANDS_OT

#include <opentxs/core/OTStorage.hpp>
#include <opentxs/core/util/Common.hpp>
#include "opentxs/core/OTStorage.hpp"
#include "opentxs/core/util/Common.hpp"

#include <map>
#include <vector>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
#ifndef __OT_MADE_EASY_OT_HPP__
#define __OT_MADE_EASY_OT_HPP__

#include <opentxs/core/util/Common.hpp>
#include "opentxs/core/util/Common.hpp"

#include <vector>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,9 @@
#ifndef __OT_OTAPI_OT_HPP__
#define __OT_OTAPI_OT_HPP__

#include "OTAPI.hpp"
#include "OT_ME.hpp"

#include <OTStorage.hpp>
#include "opentxs/client/OTAPI.hpp"
#include "opentxs/client/OT_ME.hpp"
#include "opentxs/core/OTStorage.hpp"

#ifndef OT_USE_CXX11
#include <cstdlib>
Expand Down Expand Up @@ -178,19 +177,19 @@ inline int64_t to_long(const string& strValue)
#else
inline string to_string(const int32_t nValue)
{
return OTAPI_Wrap::LongToString(nValue);
return opentxs::OTAPI_Wrap::LongToString(nValue);
}
inline string to_string(const int64_t nValue)
{
return OTAPI_Wrap::LongToString(nValue);
return opentxs::OTAPI_Wrap::LongToString(nValue);
}
inline int32_t to_int(const string& strValue)
{
return static_cast<int32_t>(std::atoi(strValue.c_str()));
}
inline int64_t to_long(const string& strValue)
{
return OTAPI_Wrap::StringToLong(strValue);
return opentxs::OTAPI_Wrap::StringToLong(strValue);
}
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
#ifndef __OT_UTILITY_OT_HPP__
#define __OT_UTILITY_OT_HPP__

#include <opentxs/core/util/Common.hpp>
#include "opentxs/core/util/Common.hpp"

#include <array>

Expand Down
2 changes: 1 addition & 1 deletion include/opentxs/core/InstantiateContract.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "OTMessage.hpp"
#include "OTPaymentPlan.hpp"
#include "OTServerContract.hpp"
#include "OTSignedFile.hpp"
#include "crypto/OTSignedFile.hpp"
#include "script/OTSmartContract.hpp"
#include "trade/OTOffer.hpp"
#include "trade/OTTrade.hpp"
Expand Down
7 changes: 4 additions & 3 deletions include/opentxs/core/OTContract.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,9 @@ class OTContract
// On success, bool is returned, and strFirstLine contains the first line
// from strOutput.
//
static bool DearmorAndTrim(const OTString& strInput, OTString& strOutput,
OTString& strFirstLine);
EXPORT static bool DearmorAndTrim(const OTString& strInput,
OTString& strOutput,
OTString& strFirstLine);

// The Method "RewriteContract" calls this. I put the meat into a static
// method so I could use it from outside OTContract as well.
Expand Down Expand Up @@ -410,7 +411,7 @@ class OTContract
// Separating these into two steps allows us to load contracts
// from other sources besides files.

bool SaveToContractFolder(); // data_folder/contracts/Contract-ID
EXPORT bool SaveToContractFolder(); // data_folder/contracts/Contract-ID

EXPORT bool SaveContractRaw(OTString& strOutput) const; // Saves the raw
// (pre-existing)
Expand Down
14 changes: 1 addition & 13 deletions include/opentxs/core/OTLedger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ class OTAccount;
class OTCheque;
class OTIdentifier;
class OTItem;
class OTPayment;
class OTPseudonym;
class OTString;

Expand Down Expand Up @@ -252,11 +251,6 @@ class OTLedger : public OTTransactionType
EXPORT OTTransaction* GetTransaction(int64_t lTransactionNum);
EXPORT OTTransaction* GetTransactionByIndex(int32_t nIndex);
EXPORT OTTransaction* GetFinalReceipt(int64_t lReferenceNum);
EXPORT OTTransaction* GetPaymentReceipt(int64_t lReferenceNum,
OTPayment** ppPaymentOut =
nullptr); // CALLER RESPONSIBLE
// TO
// DELETE.
EXPORT OTTransaction* GetTransferReceipt(int64_t lNumberOfOrigin);
EXPORT OTTransaction* GetChequeReceipt(const int64_t lChequeNum,
OTCheque** ppChequeOut =
Expand All @@ -266,13 +260,7 @@ class OTLedger : public OTTransactionType
EXPORT int32_t
GetTransactionIndex(int64_t lTransactionNum); // if not found, returns -1
EXPORT OTTransaction* GetReplyNotice(const int64_t& lRequestNum);
// Caller is responsible to delete.
//
EXPORT OTPayment* GetInstrument(OTPseudonym& theNym,
const int32_t& nIndex); // returns financial
// instrument by
// index. (Cheque,
// Purse, etc.)

// This calls OTTransactionType::VerifyAccount(), which calls
// VerifyContractID() as well as VerifySignature().
//
Expand Down
2 changes: 1 addition & 1 deletion include/opentxs/core/OTMessage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
#ifndef __OT_MESSAGE_HPP__
#define __OT_MESSAGE_HPP__

#include "OTASCIIArmor.hpp"
#include "crypto/OTASCIIArmor.hpp"
#include "OTContract.hpp"
#include "OTNumList.hpp"

Expand Down
5 changes: 1 addition & 4 deletions include/opentxs/core/OTPseudonym.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
#ifndef __OT_PSEUDONYM_HPP__
#define __OT_PSEUDONYM_HPP__

#include "OTASCIIArmor.hpp"
#include "crypto/OTASCIIArmor.hpp"
#include "OTIdentifier.hpp"

#include <deque>
Expand Down Expand Up @@ -1055,9 +1055,6 @@ class OTPseudonym

EXPORT void ClearOutpayments(); // called by the destructor. (Not intended
// to erase messages from local storage.)
EXPORT int32_t
GetOutpaymentsIndexByTransNum(const int64_t lTransNum); // Returns -1 on
// failure.
void ClearCredentials();
void ClearAll();
EXPORT void DisplayStatistics(OTString& strOutput);
Expand Down

0 comments on commit 40b0973

Please sign in to comment.