~ubuntu-branches/ubuntu/natty/libofx/natty

« back to all changes in this revision

Viewing changes to doc/html/fx-0_87_80_2lib_2context_8cpp-source.html

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Bushnell, BSG
  • Date: 2005-11-29 00:12:00 UTC
  • mfrom: (1.2.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051129001200-aplj8zbj80f68xby
Tags: 1:0.8.0-9
Generate autotools using Debian libtool (rerun libtoolize --copy
--force, aclocal-1.9, autoconf). (Closes: #341190)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
 
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
 
<title>LibOFX: context.cpp Source File</title>
4
 
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
 
</head><body>
6
 
<!-- Generated by Doxygen 1.3.7 -->
7
 
<div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
8
 
<h1>context.cpp</h1><pre class="fragment"><div>00001 
9
 
00005 <span class="comment">/***************************************************************************</span>
10
 
00006 <span class="comment"> *                                                                         *</span>
11
 
00007 <span class="comment"> *   This program is free software; you can redistribute it and/or modify  *</span>
12
 
00008 <span class="comment"> *   it under the terms of the GNU General Public License as published by  *</span>
13
 
00009 <span class="comment"> *   the Free Software Foundation; either version 2 of the License, or     *</span>
14
 
00010 <span class="comment"> *   (at your option) any later version.                                   *</span>
15
 
00011 <span class="comment"> *                                                                         *</span>
16
 
00012 <span class="comment"> ***************************************************************************/</span>
17
 
00013 <span class="preprocessor">#include &lt;config.h&gt;</span>
18
 
00014 <span class="preprocessor">#include "context.hh"</span>
19
 
00015 
20
 
00016 <span class="keyword">using</span> <span class="keyword">namespace </span>std;
21
 
00017 
22
 
00018 
23
 
00019 
24
 
00020 LibofxContext::LibofxContext()
25
 
00021   :_current_file_type(<a class="code" href="inc_2libofx_8h.html#a90a35">OFX</a>)
26
 
00022   ,_statusCallback(0)
27
 
00023   ,_accountCallback(0)
28
 
00024   ,_securityCallback(0)
29
 
00025   ,_transactionCallback(0)
30
 
00026   ,_statementCallback(0)
31
 
00027   ,_statementData(0)
32
 
00028   ,_accountData(0)
33
 
00029   ,_transactionData(0)
34
 
00030   ,_securityData(0)
35
 
00031   ,_statusData(0)
36
 
00032 {
37
 
00033 
38
 
00034 }
39
 
00035 
40
 
00036 
41
 
00037 
42
 
00038 LibofxContext::~LibofxContext(){
43
 
00039 }
44
 
00040 
45
 
00041 
46
 
00042 
47
 
00043 <a class="code" href="inc_2libofx_8h.html#a90">LibofxFileFormat</a> LibofxContext::currentFileType()<span class="keyword"> const</span>{
48
 
00044   <span class="keywordflow">return</span> _current_file_type;
49
 
00045 }
50
 
00046 
51
 
00047 
52
 
00048 
53
 
00049 <span class="keywordtype">void</span> LibofxContext::setCurrentFileType(LibofxFileFormat t) {
54
 
00050   _current_file_type=t;
55
 
00051 }
56
 
00052 
57
 
00053 
58
 
00054 
59
 
00055 <span class="keywordtype">int</span> LibofxContext::statementCallback(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structOfxStatementData.html">OfxStatementData</a> data){
60
 
00056   <span class="keywordflow">if</span> (_statementCallback)
61
 
00057     <span class="keywordflow">return</span> _statementCallback(data, _statementData);
62
 
00058   <span class="keywordflow">return</span> 0;
63
 
00059 }
64
 
00060 
65
 
00061 
66
 
00062 
67
 
00063 <span class="keywordtype">int</span> LibofxContext::accountCallback(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structOfxAccountData.html">OfxAccountData</a> data){
68
 
00064   <span class="keywordflow">if</span> (_accountCallback)
69
 
00065     <span class="keywordflow">return</span> _accountCallback(data, _accountData);
70
 
00066   <span class="keywordflow">return</span> 0;
71
 
00067 }
72
 
00068 
73
 
00069 
74
 
00070 
75
 
00071 <span class="keywordtype">int</span> LibofxContext::transactionCallback(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structOfxTransactionData.html">OfxTransactionData</a> data){
76
 
00072   <span class="keywordflow">if</span> (_transactionCallback)
77
 
00073     <span class="keywordflow">return</span> _transactionCallback(data, _transactionData);
78
 
00074   <span class="keywordflow">return</span> 0;
79
 
00075 }
80
 
00076 
81
 
00077 
82
 
00078 
83
 
00079 <span class="keywordtype">int</span> LibofxContext::securityCallback(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structOfxSecurityData.html">OfxSecurityData</a> data) {
84
 
00080   <span class="keywordflow">if</span> (_securityCallback)
85
 
00081     <span class="keywordflow">return</span> _securityCallback(data, _securityData);
86
 
00082   <span class="keywordflow">return</span> 0;
87
 
00083 }
88
 
00084 
89
 
00085 
90
 
00086 
91
 
00087 <span class="keywordtype">int</span> LibofxContext::statusCallback(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structOfxStatusData.html">OfxStatusData</a> data) {
92
 
00088   <span class="keywordflow">if</span> (_statusCallback)
93
 
00089     <span class="keywordflow">return</span> _statusCallback(data, _statusData);
94
 
00090   <span class="keywordflow">return</span> 0;
95
 
00091 }
96
 
00092 
97
 
00093 
98
 
00094 <span class="keywordtype">void</span> LibofxContext::setStatusCallback(LibofxProcStatusCallback cb,
99
 
00095                                       <span class="keywordtype">void</span> *user_data){
100
 
00096   _statusCallback=cb;
101
 
00097   _statusData=user_data;
102
 
00098 }
103
 
00099 
104
 
00100 
105
 
00101 
106
 
00102 <span class="keywordtype">void</span> LibofxContext::setAccountCallback(LibofxProcAccountCallback cb,
107
 
00103                                        <span class="keywordtype">void</span> *user_data){
108
 
00104   _accountCallback=cb;
109
 
00105   _accountData=user_data;
110
 
00106 }
111
 
00107 
112
 
00108 
113
 
00109 
114
 
00110 <span class="keywordtype">void</span> LibofxContext::setSecurityCallback(LibofxProcSecurityCallback cb,
115
 
00111                                         <span class="keywordtype">void</span> *user_data){
116
 
00112   _securityCallback=cb;
117
 
00113   _securityData=user_data;
118
 
00114 }
119
 
00115 
120
 
00116 
121
 
00117 
122
 
00118 <span class="keywordtype">void</span> LibofxContext::setTransactionCallback(LibofxProcTransactionCallback cb,
123
 
00119                                            <span class="keywordtype">void</span> *user_data){
124
 
00120   _transactionCallback=cb;
125
 
00121   _transactionData=user_data;
126
 
00122 }
127
 
00123 
128
 
00124 
129
 
00125 
130
 
00126 <span class="keywordtype">void</span> LibofxContext::setStatementCallback(LibofxProcStatementCallback cb,
131
 
00127                                          <span class="keywordtype">void</span> *user_data){
132
 
00128   _statementCallback=cb;
133
 
00129   _statementData=user_data;
134
 
00130 }
135
 
00131 
136
 
00132 
137
 
00133 
138
 
00134 
139
 
00135 
140
 
00136 
141
 
00137 
142
 
00140 CFCT LibofxContextPtr <a class="code" href="inc_2libofx_8h.html#a79">libofx_get_new_context</a>(){
143
 
00141   <span class="keywordflow">return</span> <span class="keyword">new</span> LibofxContext();
144
 
00142 }
145
 
00143 
146
 
00144 CFCT <span class="keywordtype">int</span> <a class="code" href="inc_2libofx_8h.html#a80">libofx_free_context</a>( LibofxContextPtr libofx_context_param){
147
 
00145   <span class="keyword">delete</span> (LibofxContext *)libofx_context_param;
148
 
00146   <span class="keywordflow">return</span> 0;
149
 
00147 }
150
 
00148 
151
 
00149 
152
 
00150 
153
 
00151 
154
 
00152 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
155
 
00153   <span class="keywordtype">void</span> <a class="code" href="inc_2libofx_8h.html#a84">ofx_set_status_cb</a>(LibofxContextPtr ctx,
156
 
00154                          LibofxProcStatusCallback cb,
157
 
00155                          <span class="keywordtype">void</span> *user_data){
158
 
00156     ((LibofxContext*)ctx)-&gt;setStatusCallback(cb, user_data);
159
 
00157   }
160
 
00158 
161
 
00159 
162
 
00160   <span class="keywordtype">void</span> <a class="code" href="inc_2libofx_8h.html#a85">ofx_set_account_cb</a>(LibofxContextPtr ctx,
163
 
00161                           LibofxProcAccountCallback cb,
164
 
00162                           <span class="keywordtype">void</span> *user_data){
165
 
00163     ((LibofxContext*)ctx)-&gt;setAccountCallback(cb, user_data);
166
 
00164   }
167
 
00165 
168
 
00166 
169
 
00167 
170
 
00168   <span class="keywordtype">void</span> <a class="code" href="inc_2libofx_8h.html#a86">ofx_set_security_cb</a>(LibofxContextPtr ctx,
171
 
00169                            LibofxProcSecurityCallback cb,
172
 
00170                            <span class="keywordtype">void</span> *user_data){
173
 
00171     ((LibofxContext*)ctx)-&gt;setSecurityCallback(cb, user_data);
174
 
00172   }
175
 
00173 
176
 
00174 
177
 
00175 
178
 
00176   <span class="keywordtype">void</span> <a class="code" href="inc_2libofx_8h.html#a87">ofx_set_transaction_cb</a>(LibofxContextPtr ctx,
179
 
00177                               LibofxProcTransactionCallback cb,
180
 
00178                               <span class="keywordtype">void</span> *user_data){
181
 
00179     ((LibofxContext*)ctx)-&gt;setTransactionCallback(cb, user_data);
182
 
00180   }
183
 
00181 
184
 
00182 
185
 
00183 
186
 
00184   <span class="keywordtype">void</span> <a class="code" href="inc_2libofx_8h.html#a88">ofx_set_statement_cb</a>(LibofxContextPtr ctx,
187
 
00185                             LibofxProcStatementCallback cb,
188
 
00186                             <span class="keywordtype">void</span> *user_data){
189
 
00187     ((LibofxContext*)ctx)-&gt;setStatementCallback(cb, user_data);
190
 
00188   }
191
 
00189 
192
 
00190 
193
 
00191 
194
 
00192 
195
 
00193 }
196
 
00194 
197
 
00195 
198
 
00196 
199
 
00197 
200
 
00198 
201
 
00199 
202
 
00200 
203
 
00201 
204
 
00202 
205
 
00203 
206
 
</div></pre><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 8 20:34:47 2004 for LibOFX by
207
 
<a href="http://www.doxygen.org/index.html">
208
 
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address>
209
 
</body>
210
 
</html>