133 #ifndef OPENTXS_CORE_SCRIPT_OTPARTY_HPP
134 #define OPENTXS_CORE_SCRIPT_OTPARTY_HPP
136 #include "../OTString.hpp"
145 class OTPartyAccount;
152 typedef std::map<std::string, OTPseudonym*>
mapOfNyms;
180 std::string* m_pstr_party_name;
184 std::string m_str_owner_id;
185 std::string m_str_authorizing_agent;
193 int64_t m_lOpeningTransNo;
211 EXPORT
OTParty(
const char* szName,
bool bIsOwnerNym,
const char* szOwnerID,
212 const char* szAuthAgent,
bool bCreateAgent =
false);
213 EXPORT
OTParty(std::string str_PartyName,
216 std::string str_agent_name,
OTAccount* pAccount =
nullptr,
217 const std::string* pstr_account_name =
nullptr,
218 int64_t lClosingTransNo = 0);
222 bool Compare(
const OTParty& rhs)
const;
224 bool bSpecifyAssetID =
false,
225 bool bSpecifyParties =
false)
const;
264 const int64_t& lNewTransactionNumber,
267 OTString* pstrAttachment =
nullptr);
270 const int64_t& lNewTransactionNumber,
281 return m_pOwnerAgreement;
285 m_pOwnerAgreement = &theOwner;
289 m_strMySignedCopy = strMyCopy;
293 return m_strMySignedCopy;
297 return m_lOpeningTransNo;
301 m_lOpeningTransNo = theNumber;
309 EXPORT std::string
GetPartyName(
bool* pBoolSuccess =
nullptr)
311 bool SetPartyName(
const std::string& str_party_name_input);
322 std::string
GetNymID(
bool* pBoolSuccess =
nullptr)
const;
326 std::string
GetEntityID(
bool* pBoolSuccess =
nullptr)
const;
333 EXPORT std::string
GetPartyID(
bool* pBoolSuccess =
nullptr)
const;
349 return static_cast<int32_t
>(m_mapAgents.size());
355 return m_str_authorizing_agent;
359 m_str_authorizing_agent = str_agent_name;
365 OTAgent** ppAgent =
nullptr)
const;
370 OTAgent** ppAgent =
nullptr)
const;
372 OTAgent** ppAgent =
nullptr)
const;
396 int64_t lClosingTransNo);
398 OTAccount& theAccount, int64_t lClosingTransNo);
402 return static_cast<int32_t
>(m_mapPartyAccounts.size());
407 const std::string& str_acct_name)
const;
410 const std::string& str_agent_name);
423 bool bBurnTransNo =
false);
452 #endif // OPENTXS_CORE_SCRIPT_OTPARTY_HPP
std::string GetNymID(bool *pBoolSuccess=nullptr) const
bool HasAgentByNymID(const OTIdentifier &theNymID, OTAgent **ppAgent=nullptr) const
bool DropFinalReceiptToNymboxes(const int64_t &lNewTransactionNumber, const OTString &strOrigCronItem, OTString *pstrNote=nullptr, OTString *pstrAttachment=nullptr, OTPseudonym *pActualNym=nullptr)
bool LoadAndVerifyAgentNyms(OTPseudonym &theServerNym, mapOfNyms &map_Nyms_Already_Loaded, mapOfNyms &map_NewlyLoaded)
bool HasTransactionNum(const int64_t &lInput) const
bool SignContract(OTContract &theInput) const
EXPORT OTAgent * GetAgentByIndex(int32_t nIndex) const
bool AddAgent(OTAgent &theAgent)
bool VerifyAccountsWithTheirAgents(OTPseudonym &theSignerNym, const OTString &strServerID, bool bBurnTransNo=false)
EXPORT std::string GetPartyName(bool *pBoolSuccess=nullptr) const
bool LoadAndVerifyAssetAccounts(OTPseudonym &theServerNym, const OTString &strServerID, mapOfAccounts &map_Accts_Already_Loaded, mapOfAccounts &map_NewlyLoaded)
EXPORT OTAgent * GetAgent(const std::string &str_agent_name) const
std::map< std::string, OTPartyAccount * > mapOfPartyAccounts
void SetOwnerAgreement(OTScriptable &theOwner)
void ClearTemporaryPointers()
bool ReserveTransNumsForConfirm(const OTString &strServerID)
bool SendNoticeToParty(bool bSuccessMsg, OTPseudonym &theServerNym, const OTIdentifier &theServerID, const int64_t &lNewTransactionNumber, const OTString &strReference, OTString *pstrNote=nullptr, OTString *pstrAttachment=nullptr, OTPseudonym *pActualNym=nullptr)
void SetAuthorizingAgentName(std::string str_agent_name)
void CloseoutOpeningNumber(const OTString &strServerID, bool bSave=false, OTPseudonym *pSignerNym=nullptr)
std::map< std::string, OTPseudonym * > mapOfNyms
bool VerifyOwnershipOfAccount(const OTAccount &theAccount) const
int32_t GetAgentCount() const
int64_t GetClosingTransNo(std::string str_for_acct_name) const
bool AddAccount(OTPartyAccount &thePartyAcct)
void HarvestOpeningNumber(const OTString &strServerID)
std::string GetEntityID(bool *pBoolSuccess=nullptr) const
void RegisterAccountsForExecution(OTScript &theScript)
void HarvestClosingNumbers(const OTString &strServerID, bool bSave=false, OTPseudonym *pSignerNym=nullptr)
bool HasAccount(OTAccount &theAccount, OTPartyAccount **ppPartyAccount=nullptr) const
void SetMySignedCopy(const OTString &strMyCopy)
bool Compare(const OTParty &rhs) const
std::map< std::string, OTAgent * > mapOfAgents
OTPseudonym * LoadAuthorizingAgentNym(OTPseudonym &theSignerNym, OTAgent **ppAgent=nullptr)
bool SetPartyName(const std::string &str_party_name_input)
std::map< std::string, OTAccount * > mapOfAccounts
bool HasAuthorizingAgentByNymID(const OTIdentifier &theNymID, OTAgent **ppAgent=nullptr) const
bool HasAgent(OTPseudonym &theNym, OTAgent **ppAgent=nullptr) const
EXPORT OTPartyAccount * GetAccountByID(const OTIdentifier &theAcctID) const
bool HasAccountByID(const OTIdentifier &theAcctID, OTPartyAccount **ppPartyAccount=nullptr) const
EXPORT std::string GetPartyID(bool *pBoolSuccess=nullptr) const
bool DropFinalReceiptToInboxes(mapOfNyms *pNymMap, const OTString &strServerID, OTPseudonym &theServerNym, const int64_t &lNewTransactionNumber, const OTString &strOrigCronItem, OTString *pstrNote=nullptr, OTString *pstrAttachment=nullptr)
EXPORT OTPartyAccount * GetAccountByAgent(const std::string &str_agent_name)
const std::string & GetAuthorizingAgentName() const
EXPORT OTPartyAccount * GetAccount(const std::string &str_acct_name) const
void Serialize(OTString &strAppend, bool bCalculatingID=false, bool bSpecifyAssetID=false, bool bSpecifyParties=false) const
const OTString & GetMySignedCopy()
int32_t GetAccountCount() const
int64_t GetOpeningTransNo() const
EXPORT bool CopyAcctsToConfirmingParty(OTParty &theParty) const
void HarvestAllTransactionNumbers(const OTString &strServerID)
bool HasActiveAgent() const
void SetOpeningTransNo(const int64_t &theNumber)
EXPORT OTPartyAccount * GetAccountByIndex(int32_t nIndex)
OTScriptable * GetOwnerAgreement()
void GetAllTransactionNumbers(OTNumList &numlistOutput) const
bool HasAuthorizingAgent(OTPseudonym &theNym, OTAgent **ppAgent=nullptr) const
void RetrieveNymPointers(mapOfNyms &map_Nyms_Already_Loaded)