#include <OTPartyAccount.hpp>
|
EXPORT void | RegisterForExecution (OTScript &theScript) |
|
OTParty * | GetParty () const |
|
void | SetParty (OTParty &theOwnerParty) |
|
EXPORT const OTString & | GetName () const |
|
const OTString & | GetAgentName () const |
|
const OTString & | GetAcctID () const |
|
const OTString & | GetAssetTypeID () const |
|
void | SetAgentName (const OTString &strAgentName) |
|
void | SetAcctID (const OTString &strAccountID) |
|
EXPORT OTAgent * | GetAuthorizedAgent () |
|
OTAccount * | LoadAccount (OTPseudonym &theSignerNym, const OTString &strServerID) |
|
bool | IsAccount (OTAccount &theAccount) |
|
bool | IsAccountByID (const OTIdentifier &theAcctID) const |
|
bool | VerifyOwnership () const |
|
bool | VerifyAgency () |
|
int64_t | GetClosingTransNo () const |
|
void | SetClosingTransNo (int64_t lTransNo) |
|
bool | Compare (const OTPartyAccount &rhs) const |
|
bool | DropFinalReceiptToInbox (mapOfNyms *pNymMap, const OTString &strServerID, OTPseudonym &theServerNym, OTSmartContract &theSmartContract, const int64_t &lNewTransactionNumber, const OTString &strOrigCronItem, OTString *pstrNote=nullptr, OTString *pstrAttachment=nullptr) |
|
| OTPartyAccount () |
|
| OTPartyAccount (std::string str_account_name, const OTString &strAgentName, OTAccount &theAccount, int64_t lClosingTransNo) |
|
| OTPartyAccount (const OTString &strName, const OTString &strAgentName, const OTString &strAcctID, const OTString &strAssetTypeID, int64_t lClosingTransNo) |
|
virtual | ~OTPartyAccount () |
|
void | Serialize (OTString &strAppend, bool bCalculatingID=false, bool bSpecifyAssetID=false) const |
|
void | ClearTemporaryPointers () |
|
Definition at line 185 of file OTPartyAccount.hpp.
opentxs::OTPartyAccount::OTPartyAccount |
( |
| ) |
|
Definition at line 153 of file OTPartyAccount.cpp.
154 : m_pForParty(
nullptr)
155 , m_pAccount(
nullptr)
156 , m_lClosingTransNo(0)
opentxs::OTPartyAccount::OTPartyAccount |
( |
std::string |
str_account_name, |
|
|
const OTString & |
strAgentName, |
|
|
OTAccount & |
theAccount, |
|
|
int64_t |
lClosingTransNo |
|
) |
| |
Definition at line 164 of file OTPartyAccount.cpp.
167 : m_pForParty(
nullptr)
169 m_pAccount(&theAccount)
170 , m_lClosingTransNo(lClosingTransNo)
171 , m_strName(str_account_name.c_str())
172 , m_strAcctID(theAccount.GetRealAccountID())
173 , m_strAssetTypeID(theAccount.GetAssetTypeID())
174 , m_strAgentName(strAgentName)
opentxs::OTPartyAccount::OTPartyAccount |
( |
const OTString & |
strName, |
|
|
const OTString & |
strAgentName, |
|
|
const OTString & |
strAcctID, |
|
|
const OTString & |
strAssetTypeID, |
|
|
int64_t |
lClosingTransNo |
|
) |
| |
Definition at line 178 of file OTPartyAccount.cpp.
183 : m_pForParty(
nullptr)
186 , m_lClosingTransNo(lClosingTransNo)
188 , m_strAcctID(strAcctID)
189 , m_strAssetTypeID(strAssetTypeID)
190 , m_strAgentName(strAgentName)
opentxs::OTPartyAccount::~OTPartyAccount |
( |
| ) |
|
|
virtual |
void opentxs::OTPartyAccount::ClearTemporaryPointers |
( |
| ) |
|
|
inline |
bool opentxs::OTPartyAccount::Compare |
( |
const OTPartyAccount & |
rhs | ) |
const |
Definition at line 464 of file OTPartyAccount.cpp.
467 otOut <<
"OTPartyAccount::Compare: Names don't match: " <<
GetName()
468 <<
" / " << rhs.GetName() <<
" \n";
474 otOut <<
"OTPartyAccount::Compare: Closing transaction numbers don't "
475 "match: " <<
GetName() <<
" \n";
481 otOut <<
"OTPartyAccount::Compare: Asset account numbers don't match "
483 <<
" / " << rhs.GetAcctID() <<
" ) \n";
489 otOut <<
"OTPartyAccount::Compare: Agent names don't match for party "
491 << rhs.GetAgentName() <<
" ) \n";
497 otOut <<
"OTPartyAccount::Compare: Asset Type IDs don't exist, or "
499 << rhs.GetAssetTypeID() <<
" ) for party's account: " <<
GetName()
EXPORT const OTString & GetName() const
OTLOG_IMPORT OTLogStream otOut
EXPORT bool Compare(const char *compare) const
bool Compare(const OTPartyAccount &rhs) const
const OTString & GetAgentName() const
const OTString & GetAcctID() const
const OTString & GetAssetTypeID() const
EXPORT bool Exists(std::string strFolder, std::string oneStr="", std::string twoStr="", std::string threeStr="")
int64_t GetClosingTransNo() const
Definition at line 345 of file OTPartyAccount.cpp.
351 const char* szFunc =
"OTPartyAccount::DropFinalReceiptToInbox";
353 if (
nullptr == m_pForParty) {
354 otErr << szFunc <<
": nullptr m_pForParty.\n";
357 else if (!m_strAcctID.
Exists()) {
358 otErr << szFunc <<
": Empty Acct ID.\n";
361 else if (!m_strAgentName.
Exists()) {
362 otErr << szFunc <<
": No agent named for this account.\n";
369 const std::string str_agent_name(m_strAgentName.
Get());
371 OTAgent* pAgent = m_pForParty->
GetAgent(str_agent_name);
373 if (
nullptr == pAgent)
374 otErr << szFunc <<
": named agent wasn't found on party.\n";
376 const OTIdentifier theAccountID(m_strAcctID);
378 return pAgent->DropFinalReceiptToInbox(
379 pNymMap, strServerID, theServerNym, theSmartContract,
381 lNewTransactionNumber, m_lClosingTransNo,
382 strOrigCronItem, pstrNote, pstrAttachment);
EXPORT OTAgent * GetAgent(const std::string &str_agent_name) const
EXPORT bool Exists() const
EXPORT const char * Get() const
OTLOG_IMPORT OTLogStream otErr
const OTString& opentxs::OTPartyAccount::GetAcctID |
( |
| ) |
const |
|
inline |
const OTString& opentxs::OTPartyAccount::GetAgentName |
( |
| ) |
const |
|
inline |
const OTString& opentxs::OTPartyAccount::GetAssetTypeID |
( |
| ) |
const |
|
inline |
OTAgent * opentxs::OTPartyAccount::GetAuthorizedAgent |
( |
| ) |
|
Definition at line 198 of file OTPartyAccount.cpp.
202 if (!m_strAgentName.
Exists()) {
203 otErr <<
"OTPartyAccount::GetAuthorizedAgent: Error: Authorized agent "
204 "name (for this account) is blank!\n";
208 const std::string str_agent_name = m_strAgentName.
Get();
210 OTAgent* pAgent = m_pForParty->
GetAgent(str_agent_name);
EXPORT OTAgent * GetAgent(const std::string &str_agent_name) const
EXPORT bool Exists() const
EXPORT const char * Get() const
OTLOG_IMPORT OTLogStream otErr
int64_t opentxs::OTPartyAccount::GetClosingTransNo |
( |
| ) |
const |
|
inline |
EXPORT const OTString& opentxs::OTPartyAccount::GetName |
( |
| ) |
const |
|
inline |
OTParty* opentxs::OTPartyAccount::GetParty |
( |
| ) |
const |
|
inline |
bool opentxs::OTPartyAccount::IsAccount |
( |
OTAccount & |
theAccount | ) |
|
Definition at line 255 of file OTPartyAccount.cpp.
257 if (!m_strAcctID.
Exists()) {
258 otErr <<
"OTPartyAccount::IsAccount: Error: Empty m_strAcctID.\n";
262 if (!m_strAssetTypeID.
Exists()) {
263 otErr <<
"OTPartyAccount::IsAccount: Error: Empty m_strAssetTypeID.\n";
267 const OTIdentifier theAcctID(m_strAcctID);
268 if (!(theAccount.GetRealAccountID() == theAcctID)) {
269 OTString strRHS(theAccount.GetRealAccountID());
270 otLog4 <<
"OTPartyAccount::IsAccount: Account IDs don't match: "
271 << m_strAcctID <<
" / " << strRHS
277 const OTIdentifier theAssetTypeID(m_strAssetTypeID);
278 if (!(theAccount.GetAssetTypeID() == theAssetTypeID)) {
279 OTString strRHS(theAccount.GetAssetTypeID());
280 otOut <<
"OTPartyAccount::IsAccount: Asset Type IDs don't match ( "
281 << m_strAssetTypeID <<
" / " << strRHS
282 <<
" ) for Acct ID: " << m_strAcctID <<
" \n";
286 m_pAccount = &theAccount;
OTLOG_IMPORT OTLogStream otLog4
OTLOG_IMPORT OTLogStream otOut
EXPORT bool Exists() const
OTLOG_IMPORT OTLogStream otErr
bool opentxs::OTPartyAccount::IsAccountByID |
( |
const OTIdentifier & |
theAcctID | ) |
const |
Definition at line 230 of file OTPartyAccount.cpp.
232 if (!m_strAcctID.
Exists()) {
236 if (!m_strAssetTypeID.
Exists()) {
240 const OTIdentifier theMemberAcctID(m_strAcctID);
241 if (!(theAcctID == theMemberAcctID)) {
242 OTString strRHS(theAcctID);
243 otLog4 <<
"OTPartyAccount::IsAccountByID: Account IDs don't match: "
244 << m_strAcctID <<
" / " << strRHS <<
" \n";
OTLOG_IMPORT OTLogStream otLog4
EXPORT bool Exists() const
Definition at line 394 of file OTPartyAccount.cpp.
397 if (!m_strAcctID.
Exists()) {
398 otOut <<
"OTPartyAccount::LoadAccount: Bad: Acct ID is blank for "
399 "account: " << m_strName <<
" \n";
403 const OTIdentifier theAcctID(m_strAcctID), theServerID(strServerID);
405 OTAccount* pAccount =
408 if (
nullptr == pAccount) {
409 otOut <<
"OTPartyAccount::LoadAccount: Failed trying to load account: "
410 << m_strName <<
", with AcctID: " << m_strAcctID <<
" \n";
415 else if (!pAccount->VerifyAccount(theSignerNym)) {
417 <<
"OTPartyAccount::LoadAccount: Failed trying to verify account: "
418 << m_strName <<
", with AcctID: " << m_strAcctID <<
" \n";
OTLOG_IMPORT OTLogStream otOut
EXPORT bool Exists() const
bool IsAccount(OTAccount &theAccount)
static EXPORT OTAccount * LoadExistingAccount(const OTIdentifier &accountId, const OTIdentifier &serverId)
void opentxs::OTPartyAccount::RegisterForExecution |
( |
OTScript & |
theScript | ) |
|
Definition at line 457 of file OTPartyAccount.cpp.
459 const std::string str_acct_name = m_strName.
Get();
460 theScript.AddAccount(str_acct_name, *
this);
EXPORT const char * Get() const
void opentxs::OTPartyAccount::Serialize |
( |
OTString & |
strAppend, |
|
|
bool |
bCalculatingID = false , |
|
|
bool |
bSpecifyAssetID = false |
|
) |
| const |
Definition at line 442 of file OTPartyAccount.cpp.
445 strAppend.Concatenate(
446 "<assetAccount\n name=\"%s\"\n"
448 " assetTypeID=\"%s\"\n"
449 " agentName=\"%s\"\n"
450 " closingTransNo=\"%lld\" />\n\n",
451 m_strName.
Get(), bCalculatingID ?
"" : m_strAcctID.
Get(),
452 (bCalculatingID && !bSpecifyAssetID) ?
"" : m_strAssetTypeID.
Get(),
453 bCalculatingID ?
"" : m_strAgentName.
Get(),
454 bCalculatingID ? 0 : m_lClosingTransNo);
EXPORT const char * Get() const
void opentxs::OTPartyAccount::SetAcctID |
( |
const OTString & |
strAccountID | ) |
|
|
inline |
void opentxs::OTPartyAccount::SetAgentName |
( |
const OTString & |
strAgentName | ) |
|
|
inline |
void opentxs::OTPartyAccount::SetClosingTransNo |
( |
int64_t |
lTransNo | ) |
|
|
inline |
void opentxs::OTPartyAccount::SetParty |
( |
OTParty & |
theOwnerParty | ) |
|
bool opentxs::OTPartyAccount::VerifyAgency |
( |
| ) |
|
Definition at line 317 of file OTPartyAccount.cpp.
319 if (
nullptr == m_pAccount) {
320 otErr <<
"OTPartyAccount::VerifyAgency: Error: nullptr pointer to "
321 "account. (This function expects account to already be "
328 if (
nullptr == pAgent) {
330 <<
"OTPartyAccount::VerifyAgency: Unable to find authorized agent ("
335 if (!pAgent->VerifyAgencyOfAccount(*m_pAccount)) {
337 <<
" doesn't verify as ACTUALLY having rights over account "
EXPORT const OTString & GetName() const
OTLOG_IMPORT OTLogStream otOut
EXPORT OTAgent * GetAuthorizedAgent()
const OTString & GetAgentName() const
OTLOG_IMPORT OTLogStream otErr
const OTString & GetAcctID() const
bool opentxs::OTPartyAccount::VerifyOwnership |
( |
| ) |
const |
Definition at line 292 of file OTPartyAccount.cpp.
294 if (
nullptr == m_pForParty) {
295 otErr <<
"OTPartyAccount::VerifyOwnership: Error: nullptr pointer to "
299 if (
nullptr == m_pAccount) {
300 otErr <<
"OTPartyAccount::VerifyOwnership: Error: nullptr pointer to "
301 "account. (This function expects account to already be "
307 otOut <<
"OTPartyAccount::VerifyOwnership: Party %s doesn't verify as "
308 "the ACTUAL owner of account: " << m_strName <<
" \n";
OTLOG_IMPORT OTLogStream otOut
bool VerifyOwnershipOfAccount(const OTAccount &theAccount) const
OTLOG_IMPORT OTLogStream otErr
The documentation for this class was generated from the following files: