Open-Transactions  0.93.0-ge03d287
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OTItem.hpp
Go to the documentation of this file.
1 /************************************************************
2  *
3  * OTItem.hpp
4  *
5  */
6 
7 /************************************************************
8  -----BEGIN PGP SIGNED MESSAGE-----
9  Hash: SHA1
10 
11  * OPEN TRANSACTIONS
12  *
13  * Financial Cryptography and Digital Cash
14  * Library, Protocol, API, Server, CLI, GUI
15  *
16  * -- Anonymous Numbered Accounts.
17  * -- Untraceable Digital Cash.
18  * -- Triple-Signed Receipts.
19  * -- Cheques, Vouchers, Transfers, Inboxes.
20  * -- Basket Currencies, Markets, Payment Plans.
21  * -- Signed, XML, Ricardian-style Contracts.
22  * -- Scripted smart contracts.
23  *
24  * Copyright (C) 2010-2013 by "Fellow Traveler" (A pseudonym)
25  *
26  * EMAIL:
28  *
29  * BITCOIN: 1NtTPVVjDsUfDWybS4BwvHpG2pdS9RnYyQ
30  *
31  * KEY FINGERPRINT (PGP Key in license file):
32  * 9DD5 90EB 9292 4B48 0484 7910 0308 00ED F951 BB8E
33  *
34  * OFFICIAL PROJECT WIKI(s):
35  * https://github.com/FellowTraveler/Moneychanger
36  * https://github.com/FellowTraveler/Open-Transactions/wiki
37  *
38  * WEBSITE:
39  * http://www.OpenTransactions.org/
40  *
41  * Components and licensing:
42  * -- Moneychanger..A Java client GUI.....LICENSE:.....GPLv3
43  * -- otlib.........A class library.......LICENSE:...LAGPLv3
44  * -- otapi.........A client API..........LICENSE:...LAGPLv3
45  * -- opentxs/ot....Command-line client...LICENSE:...LAGPLv3
46  * -- otserver......Server Application....LICENSE:....AGPLv3
47  * Github.com/FellowTraveler/Open-Transactions/wiki/Components
48  *
49  * All of the above OT components were designed and written by
50  * Fellow Traveler, with the exception of Moneychanger, which
51  * was contracted out to Vicky C ([email protected]).
52  * The open-source community has since actively contributed.
53  *
54  * -----------------------------------------------------
55  *
56  * LICENSE:
57  * This program is free software: you can redistribute it
58  * and/or modify it under the terms of the GNU Affero
59  * General Public License as published by the Free Software
60  * Foundation, either version 3 of the License, or (at your
61  * option) any later version.
62  *
63  * ADDITIONAL PERMISSION under the GNU Affero GPL version 3
64  * section 7: (This paragraph applies only to the LAGPLv3
65  * components listed above.) If you modify this Program, or
66  * any covered work, by linking or combining it with other
67  * code, such other code is not for that reason alone subject
68  * to any of the requirements of the GNU Affero GPL version 3.
69  * (==> This means if you are only using the OT API, then you
70  * don't have to open-source your code--only your changes to
71  * Open-Transactions itself must be open source. Similar to
72  * LGPLv3, except it applies to software-as-a-service, not
73  * just to distributing binaries.)
74  *
75  * Extra WAIVER for OpenSSL, Lucre, and all other libraries
76  * used by Open Transactions: This program is released under
77  * the AGPL with the additional exemption that compiling,
78  * linking, and/or using OpenSSL is allowed. The same is true
79  * for any other open source libraries included in this
80  * project: complete waiver from the AGPL is hereby granted to
81  * compile, link, and/or use them with Open-Transactions,
82  * according to their own terms, as long as the rest of the
83  * Open-Transactions terms remain respected, with regard to
84  * the Open-Transactions code itself.
85  *
86  * Lucre License:
87  * This code is also "dual-license", meaning that Ben Lau-
88  * rie's license must also be included and respected, since
89  * the code for Lucre is also included with Open Transactions.
90  * See Open-Transactions/src/otlib/lucre/LUCRE_LICENSE.txt
91  * The Laurie requirements are light, but if there is any
92  * problem with his license, simply remove the Lucre code.
93  * Although there are no other blind token algorithms in Open
94  * Transactions (yet. credlib is coming), the other functions
95  * will continue to operate.
96  * See Lucre on Github: https://github.com/benlaurie/lucre
97  * -----------------------------------------------------
98  * You should have received a copy of the GNU Affero General
99  * Public License along with this program. If not, see:
100  * http://www.gnu.org/licenses/
101  *
102  * If you would like to use this software outside of the free
103  * software license, please contact FellowTraveler.
104  * (Unfortunately many will run anonymously and untraceably,
105  * so who could really stop them?)
106  *
107  * DISCLAIMER:
108  * This program is distributed in the hope that it will be
109  * useful, but WITHOUT ANY WARRANTY; without even the implied
110  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
111  * PURPOSE. See the GNU Affero General Public License for
112  * more details.
113 
114  -----BEGIN PGP SIGNATURE-----
115  Version: GnuPG v1.4.9 (Darwin)
116 
117  iQIcBAEBAgAGBQJRSsfJAAoJEAMIAO35UbuOQT8P/RJbka8etf7wbxdHQNAY+2cC
118  vDf8J3X8VI+pwMqv6wgTVy17venMZJa4I4ikXD/MRyWV1XbTG0mBXk/7AZk7Rexk
119  KTvL/U1kWiez6+8XXLye+k2JNM6v7eej8xMrqEcO0ZArh/DsLoIn1y8p8qjBI7+m
120  aE7lhstDiD0z8mwRRLKFLN2IH5rAFaZZUvj5ERJaoYUKdn4c+RcQVei2YOl4T0FU
121  LWND3YLoH8naqJXkaOKEN4UfJINCwxhe5Ke9wyfLWLUO7NamRkWD2T7CJ0xocnD1
122  sjAzlVGNgaFDRflfIF4QhBx1Ddl6wwhJfw+d08bjqblSq8aXDkmFA7HeunSFKkdn
123  oIEOEgyj+veuOMRJC5pnBJ9vV+7qRdDKQWaCKotynt4sWJDGQ9kWGWm74SsNaduN
124  TPMyr9kNmGsfR69Q2Zq/FLcLX/j8ESxU+HYUB4vaARw2xEOu2xwDDv6jt0j3Vqsg
125  x7rWv4S/Eh18FDNDkVRChiNoOIilLYLL6c38uMf1pnItBuxP3uhgY6COm59kVaRh
126  nyGTYCDYD2TK+fI9o89F1297uDCwEJ62U0Q7iTDp5QuXCoxkPfv8/kX6lS6T3y9G
127  M9mqIoLbIQ1EDntFv7/t6fUTS2+46uCrdZWbQ5RjYXdrzjij02nDmJAm2BngnZvd
128  kamH0Y/n11lCvo1oQxM+
129  =uSzz
130  -----END PGP SIGNATURE-----
131  **************************************************************/
132 
133 #ifndef OPENTXS_CORE_OTITEM_HPP
134 #define OPENTXS_CORE_OTITEM_HPP
135 
136 #include "OTTransactionType.hpp"
137 
138 namespace opentxs
139 {
140 
141 class OTAccount;
142 class OTItem;
143 class OTLedger;
144 class OTPseudonym;
146 
147 typedef std::list<OTItem*> listOfItems;
148 
149 // Item as in "Transaction Item"
150 // An OTLedger contains a list of transactions (pending transactions, inbox or
151 // outbox.)
152 // Each transaction has a list of items that make up that transaction.
153 // I think that the Item ID shall be the order in which the items are meant to
154 // be processed.
155 // Items are like tracks on a CD. It is assumed there will be several of them,
156 // they
157 // come in packs. You normally would deal with the transaction as a single
158 // entity,
159 // not the item. A transaction contains a list of items.
160 class OTItem : public OTTransactionType
161 {
162 private: // Private prevents erroneous use by other classes.
163  typedef OTTransactionType ot_super;
164 
166  OTString strInput);
167 
168 public:
169  enum itemType {
170  // TRANSFER
171  transfer, // this item is an outgoing transfer, probably part of an
172  // outoing transaction.
173  atTransfer, // Server reply.
174 
175  // NYMBOX RESOLUTION
176  acceptTransaction, // this item is a client-side acceptance of a
177  // transaction number (a blank) in my Nymbox
179  acceptMessage, // this item is a client-side acceptance of a message in
180  // my Nymbox
182  acceptNotice, // this item is a client-side acceptance of a server
183  // notification in my Nymbox
185 
186  // INBOX RESOLUTION
187  acceptPending, // this item is a client-side acceptance of a pending
188  // transfer
190  rejectPending, // this item is a client-side rejection of a pending
191  // transfer
193 
194  // RECEIPT ACKNOWLEDGMENT / DISPUTE
195  acceptCronReceipt, // this item is a client-side acceptance of a cron
196  // receipt in his inbox.
197  atAcceptCronReceipt, // this item is a server reply to that acceptance.
198  acceptItemReceipt, // this item is a client-side acceptance of an item
199  // receipt in his inbox.
200  atAcceptItemReceipt, // this item is a server reply to that acceptance.
201  disputeCronReceipt, // this item is a client dispute of a cron receipt
202  // in his inbox.
203  atDisputeCronReceipt, // Server reply to dispute message.
204  disputeItemReceipt, // this item is a client dispute of an item receipt
205  // in his inbox.
206  atDisputeItemReceipt, // Server reply to dispute message.
207 
208  // Sometimes the attachment will be an OTItem, and sometimes it will be
209  // an OTPaymentPlan or OTTrade. These different types above help the
210  // code to differentiate.
211  acceptFinalReceipt, // this item is a client-side acceptance of a final
212  // receipt in his inbox. (All related receipts must
213  // also be closed!)
214  atAcceptFinalReceipt, // server reply
215  acceptBasketReceipt, // this item is a client-side acceptance of a
216  // basket receipt in his inbox.
217  atAcceptBasketReceipt, // server reply
218  disputeFinalReceipt, // this item is a client-side rejection of a final
219  // receipt in his inbox. (All related receipts must
220  // also be closed!)
221  atDisputeFinalReceipt, // server reply
222  disputeBasketReceipt, // this item is a client-side rejection of a
223  // basket receipt in his inbox.
224  atDisputeBasketReceipt, // server reply
225 
226  // FEEs
227  serverfee, // this item is a fee from the transaction server (per
228  // contract)
230  issuerfee, // this item is a fee from the issuer (per contract)
232  // INFO (BALANCE, HASH, etc) these are still all messages with replies.
233  balanceStatement, // this item is a statement of balance. (For asset
234  // account.)
236  transactionStatement, // this item is a transaction statement. (For Nym
237  // -- which numbers are assigned to him.)
239  // CASH WITHDRAWAL / DEPOSIT
240  withdrawal, // this item is a cash withdrawal (of chaumian blinded
241  // tokens)
243  deposit, // this item is a cash deposit (of a purse containing blinded
244  // tokens.)
246  // CHEQUES AND VOUCHERS
247  withdrawVoucher, // this item is a request to purchase a voucher (a
248  // cashier's cheque)
250  depositCheque, // this item is a request to deposit a cheque
251  atDepositCheque, // this item is a server response to that request.
252  // PAYING DIVIDEND ON SHARES OF STOCK
253  payDividend, // this item is a request to pay a dividend.
254  atPayDividend, // the server reply to that request.
255  // TRADING ON MARKETS
256  marketOffer, // this item is an offer to be put on a market.
257  atMarketOffer, // server reply or updated notification regarding a
258  // market offer.
259  // PAYMENT PLANS
260  paymentPlan, // this item is a new payment plan
261  atPaymentPlan, // server reply or updated notification regarding a
262  // payment plan.
263  // SMART CONTRACTS
264  smartContract, // this item is a new smart contract
265  atSmartContract, // server reply or updated notification regarding a
266  // smart contract.
267  // CANCELLING: Market Offers and Payment Plans.
268  cancelCronItem, // this item is intended to cancel a market offer or
269  // payment plan.
270  atCancelCronItem, // reply from the server regarding said cancellation.
271  // EXCHANGE IN/OUT OF A BASKET CURRENCY
272  exchangeBasket, // this item is an exchange in/out of a basket currency.
273  atExchangeBasket, // reply from the server regarding said exchange.
274  // Now these three receipts have a dual use: as the receipts in the
275  // inbox, and also
276  // as the representation for transactions in the inbox report (for
277  // balance statements.)
278  // Actually chequeReceipt is ONLY used for inbox report, and otherwise
279  // is not actually
280  // needed for real cheque receipts. marketReceipt and paymentReceipt
281  // are used as real
282  // receipts, and also in inbox reports to represent transaction items in
283  // an inbox.
284  chequeReceipt, // Currently don't create an OTItem for cheque receipt in
285  // inbox. Not needed.
286  // I also don't create one for the transfer receipt, currently.
287  // (Although near the top, I do have item types to go in a processInbox
288  // message and
289  // clear those transaction types out of my inbox.)
290  voucherReceipt, // Newest addition. This is so users can close a
291  // transaction number used on a voucher.
292  marketReceipt, // server receipt dropped into inbox as result of market
293  // trading.
294  paymentReceipt, // server receipt dropped into an inbox as result of
295  // payment occuring.
296  transferReceipt, // server receipt dropped into an inbox as result of
297  // transfer being accepted.
298  finalReceipt, // server receipt dropped into inbox / nymbox as result of
299  // cron item expiring or being canceled.
300  basketReceipt, // server receipt dropped into inbox as result of a
301  // basket exchange.
302  replyNotice, // server notice of a reply that nym should have already
303  // received as a response to a request.
304  // (Some are so important, a copy of the server reply is dropped to your
305  // nymbox, to make SURE you got it and processed it.)
306  successNotice, // server notice dropped into nymbox as result of a
307  // transaction# being successfully signed out.
308  notice, // server notice dropped into nymbox as result of a smart
309  // contract processing.
310  // Also could be used for ballots / elections, corporate meetings /
311  // minutes, etc.
312  // finalReceipt is also basically a notice (in the Nymbox, anyway) but
313  // it still is
314  // information that you have to act on as soon as you receive it,
315  // whereas THIS kind
316  // of notice isn't so hardcore. It's more laid-back.
317  error_state // error state versus error status
318  };
319 
320  // FOR EXAMPLE: A client may send a TRANSFER request, setting type to
321  // Transfer and status to Request.
322  // The server may respond with type atTransfer and status
323  // Acknowledgment.
324  // Make sense?
325 
326  enum itemStatus {
327  request, // This item is a request from the client
328  acknowledgement, // This item is an acknowledgment from the server. (The
329  // server has signed it.)
330  rejection, // This item represents a rejection of the request by the
331  // server. (Server will not sign it.)
332  error_status // error status versus error state
333  };
334 
335 protected:
336  // There is the OTTransaction transfer, which is a transaction type, and
337  // there is also
338  // the OTItem transfer, which is an item type. They are related. Every
339  // transaction has
340  // a list of items, and these perform the transaction. A transaction trying
341  // to TRANSFER
342  // would have these items: transfer, serverfee, balance, and possibly
343  // outboxhash.
344 
345  OTItem(); // <============================= Here for now, if I can get away
346  // with it.
347 
348  // return -1 if error, 0 if nothing, and 1 if the node was processed.
349  virtual int32_t ProcessXMLNode(irr::io::IrrXMLReader*& xml);
350  virtual void UpdateContents(); // Before transmission or serialization, this
351  // is where the ledger saves its contents
352  OTIdentifier m_AcctToID; // DESTINATION ACCOUNT for transfers. NOT the
353  // account holder.
354  int64_t m_lAmount; // For balance, or fee, etc. Only an item can actually
355  // have an amount. (Or a "TO" account.)
356  listOfItems m_listItems; // Sometimes an item needs to have a list of yet
357  // more items. Like balance statements have a list
358  // of inbox items. (Just the relevant data, not all
359  // the attachments and everything.)
360  itemType m_Type; // the item type. Could be a transfer, a fee, a balance or
361  // client accept/rejecting an item
362  itemStatus m_Status; // request, acknowledgment, or rejection.
363  int64_t m_lNewOutboxTransNum; // Used for balance agreement. The user puts
364  // transaction "1" in his outbox when doing a
365  // transfer, since he has no idea
366  // what # will actually be issued on the server side after he sends his
367  // message. Let's say the server issues # 34, and
368  // puts that in the outbox. It thus sets this member to 34, and it is
369  // understood that 1 in the client request corresponds
370  // to 34 on this member variable in the reply. Only one transfer can be
371  // done at a time. In cases where verifying a balance
372  // receipt and you come across transaction #1 in the outbox, simply look up
373  // this variable on the server's portion of the reply
374  // and then look up that number instead.
375 
376  int64_t m_lClosingTransactionNo; // Used in balance agreement (to represent
377  // an inbox item)
378 public:
379  // For "OTItem::acceptTransaction" -- the blank contains a list of blank
380  // numbers,
381  // therefore the "accept" must contain the same list. Otherwise you haven't
382  // signed off!!
383  //
384  //
385  EXPORT bool AddBlankNumbersToItem(const OTNumList& theAddition);
386  int64_t GetClosingNum() const;
387  void SetClosingNum(int64_t lClosingNum);
388  EXPORT virtual int64_t GetNumberOfOrigin();
389  EXPORT virtual void CalculateNumberOfOrigin();
390  // used for looping through the items in a few places.
392  {
393  return m_listItems;
394  }
395  OTItem* GetItem(int32_t nIndex); // While processing an item, you may wish
396  // to query it for sub-items of a certain
397  // type.
398  OTItem* GetItemByTransactionNum(int64_t lTransactionNumber); // While
399  // processing
400  // an item, you
401  // may
402  // wish to query it for sub-items
404  int64_t lReferenceNumber); // The final receipt item MAY be
405  // present, and co-relates to others
406  // that share its "in reference to"
407  // value. (Others such as
408  // marketReceipts and paymentReceipts.)
409  int32_t GetItemCountInRefTo(int64_t lReference); // Count the number
410  // of items that are
411  // IN REFERENCE TO
412  // some transaction#.
413  inline int32_t GetItemCount() const
414  {
415  return static_cast<int32_t>(m_listItems.size());
416  }
417  void AddItem(OTItem& theItem); // You have to allocate the item on the heap
418  // and then pass it in as a reference.
419  // OTItem will take care of it from there and will delete it in destructor.
420  void ReleaseItems();
421  void Release_Item();
422  virtual void Release();
423  // the "From" accountID and the ServerID are now in the parent class. (2 of
424  // each.)
425 
426  inline void SetNewOutboxTransNum(int64_t lTransNum)
427  {
428  m_lNewOutboxTransNum = lTransNum;
429  }
430  inline int64_t GetNewOutboxTransNum() const
431  {
432  return m_lNewOutboxTransNum;
433  } // See above comment in protected section.
434  OTASCIIArmor m_ascNote; // a text field for the user. Cron may also store
435  // receipt data here. Also inbox reports go here for
436  // balance agreement
437  OTASCIIArmor m_ascAttachment; // the digital cash token is sent here,
438  // signed, and returned here. (or purse of
439  // tokens.)
440  // As well as a cheque, or a voucher, or a server update on a market offer,
441  // or a nym full of transactions for balance agreement.
442  // Call this on the server side, on a balanceStatement item, to verify
443  // whether the wallet side set it up correctly (and thus it's okay to sign
444  // and return with acknowledgement.)
445  EXPORT bool VerifyBalanceStatement(
446  int64_t lActualAdjustment, OTPseudonym& THE_NYM, OTLedger& THE_INBOX,
447  OTLedger& THE_OUTBOX, const OTAccount& THE_ACCOUNT,
448  OTTransaction& TARGET_TRANSACTION,
449  int64_t lOutboxTrnsNum = 0); // Used in special case of transfers (the
450  // user
451  // didn't know the outbox trans# when constructing
452  // the original request.) Unused when 0.
453  // server-side
454  EXPORT bool VerifyTransactionStatement(
455  OTPseudonym& THE_NYM, OTTransaction& TARGET_TRANSACTION,
456  bool bIsRealTransaction = true); // We use this when the
457  // trans# is 0 (like when
458  // processing Nymbox.)
460  {
461  return m_Status;
462  }
463  inline void SetStatus(const OTItem::itemStatus& theVal)
464  {
465  m_Status = theVal;
466  }
467  inline OTItem::itemType GetType() const
468  {
469  return m_Type;
470  }
471  inline void SetType(OTItem::itemType theType)
472  {
473  m_Type = theType;
474  }
475  inline int64_t GetAmount() const
476  {
477  return m_lAmount;
478  }
479  inline void SetAmount(int64_t lAmount)
480  {
481  m_lAmount = lAmount;
482  }
483  EXPORT void GetNote(OTString& theStr) const;
484  EXPORT void SetNote(const OTString& theStr);
485  EXPORT void GetAttachment(OTString& theStr) const;
486  EXPORT void SetAttachment(const OTString& theStr);
487  inline const OTIdentifier& GetDestinationAcctID() const
488  {
489  return m_AcctToID;
490  }
491  inline void SetDestinationAcctID(const OTIdentifier& theID)
492  {
493  m_AcctToID = theID;
494  }
495  EXPORT static OTItem* CreateItemFromString(const OTString& strItem,
496  const OTIdentifier& theServerID,
497  int64_t lTransactionNumber);
498 
499  EXPORT static OTItem* CreateItemFromTransaction(
500  const OTTransaction& theOwner, OTItem::itemType theType,
501  const OTIdentifier* pDestinationAcctID = nullptr);
502  EXPORT static void GetStringFromType(OTItem::itemType theType,
503  OTString& strType);
504  inline void GetTypeString(OTString& strType) const
505  {
506  GetStringFromType(GetType(), strType);
507  }
508  OTItem(const OTIdentifier& theUserID,
509  const OTItem& theOwner); // From owner we can get acct ID, server ID,
510  // and transaction Num
511  OTItem(const OTIdentifier& theUserID,
512  const OTTransaction& theOwner); // From owner we can get acct ID,
513  // server ID, and transaction Num
514  OTItem(const OTIdentifier& theUserID, const OTTransaction& theOwner,
515  OTItem::itemType theType,
516  const OTIdentifier* pDestinationAcctID = nullptr);
517 
518  virtual ~OTItem();
519  // OTItem& operator=(const OTItem& rhs);
520  void InitItem();
521 
522  // virtual bool SaveContractWallet(FILE* fl);
523  virtual bool SaveContractWallet(std::ofstream& ofs) const;
524 };
525 
526 } // namespace opentxs
527 
528 #endif // OPENTXS_CORE_OTITEM_HPP
void AddItem(OTItem &theItem)
Definition: OTItem.cpp:1052
void SetAmount(int64_t lAmount)
Definition: OTItem.hpp:479
OTIdentifier m_AcctToID
Definition: OTItem.hpp:352
virtual void Release()
Definition: OTItem.cpp:1612
int64_t m_lAmount
Definition: OTItem.hpp:354
virtual bool SaveContractWallet(std::ofstream &ofs) const
Definition: OTItem.cpp:2397
static EXPORT OTItem * CreateItemFromString(const OTString &strItem, const OTIdentifier &theServerID, int64_t lTransactionNumber)
Definition: OTItem.cpp:1473
OTItem * GetItem(int32_t nIndex)
Definition: OTItem.cpp:1059
void ReleaseItems()
Definition: OTItem.cpp:1629
EXPORT void GetAttachment(OTString &theStr) const
Definition: OTItem.cpp:1397
EXPORT bool VerifyTransactionStatement(OTPseudonym &THE_NYM, OTTransaction &TARGET_TRANSACTION, bool bIsRealTransaction=true)
Definition: OTItem.cpp:181
listOfItems & GetItemList()
Definition: OTItem.hpp:391
void InitItem()
Definition: OTItem.cpp:1516
static EXPORT OTTransactionType * TransactionFactory(OTString strInput)
EXPORT bool AddBlankNumbersToItem(const OTNumList &theAddition)
Definition: OTItem.cpp:1125
EXPORT bool VerifyBalanceStatement(int64_t lActualAdjustment, OTPseudonym &THE_NYM, OTLedger &THE_INBOX, OTLedger &THE_OUTBOX, const OTAccount &THE_ACCOUNT, OTTransaction &TARGET_TRANSACTION, int64_t lOutboxTrnsNum=0)
Definition: OTItem.cpp:358
int64_t GetNewOutboxTransNum() const
Definition: OTItem.hpp:430
EXPORT void GetNote(OTString &theStr) const
Definition: OTItem.cpp:1430
EXPORT void SetAttachment(const OTString &theStr)
Definition: OTItem.cpp:1402
virtual ~OTItem()
Definition: OTItem.cpp:1607
OTItem * GetFinalReceiptItemByReferenceNum(int64_t lReferenceNumber)
Definition: OTItem.cpp:1110
static EXPORT OTItem * CreateItemFromTransaction(const OTTransaction &theOwner, OTItem::itemType theType, const OTIdentifier *pDestinationAcctID=nullptr)
Definition: OTItem.cpp:1451
OTItem * GetItemByTransactionNum(int64_t lTransactionNumber)
Definition: OTItem.cpp:1076
listOfItems m_listItems
Definition: OTItem.hpp:356
int64_t GetClosingNum() const
Definition: OTItem.cpp:2012
void SetStatus(const OTItem::itemStatus &theVal)
Definition: OTItem.hpp:463
void SetDestinationAcctID(const OTIdentifier &theID)
Definition: OTItem.hpp:491
virtual EXPORT void CalculateNumberOfOrigin()
Definition: OTItem.cpp:1180
void SetNewOutboxTransNum(int64_t lTransNum)
Definition: OTItem.hpp:426
int64_t m_lNewOutboxTransNum
Definition: OTItem.hpp:363
void SetClosingNum(int64_t lClosingNum)
Definition: OTItem.cpp:2017
int64_t GetAmount() const
Definition: OTItem.hpp:475
const OTIdentifier & GetDestinationAcctID() const
Definition: OTItem.hpp:487
void Release_Item()
Definition: OTItem.cpp:1619
std::list< OTItem * > listOfItems
Definition: OTItem.hpp:145
itemStatus m_Status
Definition: OTItem.hpp:362
EXPORT void SetNote(const OTString &theStr)
Definition: OTItem.cpp:1413
OTItem::itemStatus GetStatus() const
Definition: OTItem.hpp:459
int32_t GetItemCountInRefTo(int64_t lReference)
Definition: OTItem.cpp:1092
virtual void UpdateContents()
Definition: OTItem.cpp:2251
int32_t GetItemCount() const
Definition: OTItem.hpp:413
OTASCIIArmor m_ascAttachment
Definition: OTItem.hpp:437
static EXPORT void GetStringFromType(OTItem::itemType theType, OTString &strType)
Definition: OTItem.cpp:2022
OTItem::itemType GetType() const
Definition: OTItem.hpp:467
int64_t m_lClosingTransactionNo
Definition: OTItem.hpp:376
void GetTypeString(OTString &strType) const
Definition: OTItem.hpp:504
void SetType(OTItem::itemType theType)
Definition: OTItem.hpp:471
virtual EXPORT int64_t GetNumberOfOrigin()
Definition: OTItem.cpp:1132
itemType m_Type
Definition: OTItem.hpp:360
virtual int32_t ProcessXMLNode(irr::io::IrrXMLReader *&xml)
Definition: OTItem.cpp:1803
OTASCIIArmor m_ascNote
Definition: OTItem.hpp:434