NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
DOXYGEN
shared_data.c File Reference

Data shared between Index, Pager and Sidebar. More...

#include "config.h"
#include <stdbool.h>
#include "mutt/lib.h"
#include "email/lib.h"
#include "core/lib.h"
#include "shared_data.h"
#include "lib.h"
#include "context.h"
#include "mutt_globals.h"
+ Include dependency graph for shared_data.c:

Go to the source code of this file.

Functions

static int index_shared_context_observer (struct NotifyCallback *nc)
 Notification that the Context has changed - Implements observer_t. More...
 
static int index_shared_account_observer (struct NotifyCallback *nc)
 Notification that an Account has changed - Implements observer_t. More...
 
static int index_shared_mailbox_observer (struct NotifyCallback *nc)
 Notification that a Mailbox has changed - Implements observer_t. More...
 
static int index_shared_email_observer (struct NotifyCallback *nc)
 Notification that an Email has changed - Implements observer_t. More...
 
void index_shared_data_set_context (struct IndexSharedData *shared, struct Context *ctx)
 Set the Context for the Index and friends. More...
 
void index_shared_data_set_email (struct IndexSharedData *shared, struct Email *e)
 Set the current Email for the Index and friends. More...
 
bool index_shared_data_is_cur_email (const struct IndexSharedData *shared, const struct Email *e)
 Check whether an email is the currently selected Email. More...
 
void index_shared_data_free (struct MuttWindow *win, void **ptr)
 Free Index Data. More...
 
struct IndexSharedDataindex_shared_data_new (void)
 Create new Index Data. More...
 

Detailed Description

Data shared between Index, Pager and Sidebar.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file shared_data.c.

Function Documentation

◆ index_shared_context_observer()

static int index_shared_context_observer ( struct NotifyCallback nc)
static

Notification that the Context has changed - Implements observer_t.

Definition at line 42 of file shared_data.c.

43 {
44  if ((nc->event_type != NT_CONTEXT) || !nc->global_data || !nc->event_data)
45  return -1;
46 
47  struct EventContext *ev_c = nc->event_data;
48  if (nc->event_subtype == NT_CONTEXT_ADD)
49  return 0;
50 
51  struct IndexSharedData *shared = nc->global_data;
52  if (ev_c->ctx != shared->ctx)
53  return 0;
54 
56  shared->ctx = NULL;
57 
58  // Relay the message
59  mutt_debug(LL_NOTIFY, "NT_INDEX_CONTEXT\n");
60  notify_send(shared->notify, NT_INDEX, NT_INDEX_CONTEXT, shared);
61  return 0;
62 }
#define NT_INDEX_CONTEXT
Context has changed.
Definition: lib.h:63
struct Context * ctx
The Context this Event relates to.
Definition: context.h:70
Log of notifications.
Definition: logging.h:45
Data shared between Index, Pager and Sidebar.
Definition: shared_data.h:36
struct Notify * notify
Notifications: NotifyIndex, IndexSharedData.
Definition: shared_data.h:44
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
Definition: observer.h:43
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
Definition: observer.h:42
Index data has changed, NotifyIndex, IndexSharedData.
Definition: notify_type.h:47
void * global_data
Data from notify_observer_add()
Definition: observer.h:45
struct Context * ctx
Current Mailbox view.
Definition: shared_data.h:39
The Context has been opened.
Definition: context.h:60
The Context is about to be destroyed.
Definition: context.h:61
#define mutt_debug(LEVEL,...)
Definition: logging.h:85
void * event_data
Data from notify_send()
Definition: observer.h:44
Context has changed, NotifyContext, EventContext.
Definition: notify_type.h:43
An Event that happened to an Context.
Definition: context.h:68
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
Definition: notify.c:171
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ index_shared_account_observer()

static int index_shared_account_observer ( struct NotifyCallback nc)
static

Notification that an Account has changed - Implements observer_t.

Definition at line 67 of file shared_data.c.

68 {
69  if ((nc->event_type != NT_ACCOUNT) || !nc->global_data || !nc->event_data)
70  return -1;
71 
72  struct EventAccount *ev_a = nc->event_data;
73  if (nc->event_subtype == NT_ACCOUNT_ADD)
74  return 0;
75 
76  struct IndexSharedData *shared = nc->global_data;
77  if (ev_a->account != shared->account)
78  return 0;
79 
81  shared->account = NULL;
82 
83  // Relay the message
84  mutt_debug(LL_NOTIFY, "NT_INDEX_ACCOUNT\n");
85  notify_send(shared->notify, NT_INDEX, NT_INDEX_ACCOUNT, shared);
86  return 0;
87 }
Log of notifications.
Definition: logging.h:45
#define NT_INDEX_ACCOUNT
Account has changed.
Definition: lib.h:62
Data shared between Index, Pager and Sidebar.
Definition: shared_data.h:36
An Event that happened to an Account.
Definition: account.h:78
struct Notify * notify
Notifications: NotifyIndex, IndexSharedData.
Definition: shared_data.h:44
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
Definition: observer.h:43
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
Definition: observer.h:42
Index data has changed, NotifyIndex, IndexSharedData.
Definition: notify_type.h:47
void * global_data
Data from notify_observer_add()
Definition: observer.h:45
Account has changed, NotifyAccount, EventAccount.
Definition: notify_type.h:34
#define mutt_debug(LEVEL,...)
Definition: logging.h:85
void * event_data
Data from notify_send()
Definition: observer.h:44
struct Account * account
Current Account.
Definition: shared_data.h:40
Account has been added.
Definition: account.h:69
Account is about to be deleted.
Definition: account.h:70
struct Account * account
The Account this Event relates to.
Definition: account.h:80
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
Definition: notify.c:171
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ index_shared_mailbox_observer()

static int index_shared_mailbox_observer ( struct NotifyCallback nc)
static

Notification that a Mailbox has changed - Implements observer_t.

Definition at line 92 of file shared_data.c.

93 {
94  if ((nc->event_type != NT_MAILBOX) || !nc->global_data || !nc->event_data)
95  return -1;
96 
97  struct EventMailbox *ev_m = nc->event_data;
98  if (nc->event_subtype == NT_MAILBOX_ADD)
99  return 0;
100 
101  struct IndexSharedData *shared = nc->global_data;
102  if (ev_m->mailbox != shared->mailbox)
103  return 0;
104 
105  if (nc->event_subtype == NT_MAILBOX_DELETE)
106  shared->mailbox = NULL;
107 
108  // Relay the message
109  mutt_debug(LL_NOTIFY, "NT_INDEX_MAILBOX\n");
110  notify_send(shared->notify, NT_INDEX, NT_INDEX_MAILBOX, shared);
111  return 0;
112 }
Mailbox is about to be deleted.
Definition: mailbox.h:174
Log of notifications.
Definition: logging.h:45
struct Mailbox * mailbox
The Mailbox this Event relates to.
Definition: mailbox.h:192
Data shared between Index, Pager and Sidebar.
Definition: shared_data.h:36
#define NT_INDEX_MAILBOX
Mailbox has changed.
Definition: lib.h:64
An Event that happened to a Mailbox.
Definition: mailbox.h:190
struct Notify * notify
Notifications: NotifyIndex, IndexSharedData.
Definition: shared_data.h:44
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
Definition: observer.h:43
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
Definition: observer.h:42
Index data has changed, NotifyIndex, IndexSharedData.
Definition: notify_type.h:47
Mailbox has been added.
Definition: mailbox.h:173
void * global_data
Data from notify_observer_add()
Definition: observer.h:45
#define mutt_debug(LEVEL,...)
Definition: logging.h:85
void * event_data
Data from notify_send()
Definition: observer.h:44
Mailbox has changed, NotifyMailbox, EventMailbox.
Definition: notify_type.h:48
struct Mailbox * mailbox
Current Mailbox.
Definition: shared_data.h:41
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
Definition: notify.c:171
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ index_shared_email_observer()

static int index_shared_email_observer ( struct NotifyCallback nc)
static

Notification that an Email has changed - Implements observer_t.

Definition at line 117 of file shared_data.c.

118 {
119  if ((nc->event_type != NT_EMAIL) || !nc->global_data || !nc->event_data)
120  return -1;
121 
122  struct EventEmail *ev_e = nc->event_data;
123  if (nc->event_subtype == NT_EMAIL_ADD)
124  return 0;
125 
126  struct IndexSharedData *shared = nc->global_data;
127  bool match = false;
128  for (int i = 0; i < ev_e->num_emails; i++)
129  {
130  if (ev_e->emails[i] == shared->email)
131  {
132  match = true;
133  break;
134  }
135  }
136 
137  if (!match)
138  return 0;
139 
140  if (nc->event_subtype == NT_EMAIL_DELETE)
141  shared->email = NULL;
142 
143  // Relay the message
144  mutt_debug(LL_NOTIFY, "NT_INDEX_EMAIL: %p\n", shared->email);
145  notify_send(shared->notify, NT_INDEX, NT_INDEX_EMAIL, shared);
146  return 0;
147 }
An Event that happened to an Email.
Definition: email.h:155
Log of notifications.
Definition: logging.h:45
struct Email * email
Currently selected Email.
Definition: shared_data.h:42
#define NT_INDEX_EMAIL
Email has changed.
Definition: lib.h:65
Data shared between Index, Pager and Sidebar.
Definition: shared_data.h:36
struct Email ** emails
Definition: email.h:158
struct Notify * notify
Notifications: NotifyIndex, IndexSharedData.
Definition: shared_data.h:44
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
Definition: observer.h:43
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
Definition: observer.h:42
Email is about to be deleted.
Definition: email.h:147
int num_emails
Definition: email.h:157
Index data has changed, NotifyIndex, IndexSharedData.
Definition: notify_type.h:47
Email has been added.
Definition: email.h:146
void * global_data
Data from notify_observer_add()
Definition: observer.h:45
#define mutt_debug(LEVEL,...)
Definition: logging.h:85
void * event_data
Data from notify_send()
Definition: observer.h:44
Email has changed, NotifyEmail, EventEmail.
Definition: notify_type.h:44
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
Definition: notify.c:171
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ index_shared_data_set_context()

void index_shared_data_set_context ( struct IndexSharedData shared,
struct Context ctx 
)

Set the Context for the Index and friends.

Parameters
sharedShared Index data
ctxNew Context, may be NULL

Definition at line 154 of file shared_data.c.

155 {
156  if (!shared)
157  return;
158 
159  NotifyIndex subtype = NT_INDEX_NO_FLAGS;
160 
161  if (shared->ctx != ctx)
162  {
163  if (shared->ctx)
165 
166  shared->ctx = ctx;
167  subtype |= NT_INDEX_CONTEXT;
168 
169  if (ctx)
171 
172  Context = ctx;
173  }
174 
175  struct Mailbox *m = ctx_mailbox(ctx);
176  if (shared->mailbox != m)
177  {
178  if (shared->mailbox)
180 
181  shared->mailbox = m;
182  shared->email = NULL;
183  shared->email_seq = 0;
184  subtype |= NT_INDEX_MAILBOX | NT_INDEX_EMAIL;
185 
186  if (m)
188  }
189 
190  struct Account *a = m ? m->account : NULL;
191  if (shared->account != a)
192  {
193  if (shared->account)
195 
196  shared->account = a;
197  subtype |= NT_INDEX_ACCOUNT;
198 
199  if (a)
201  }
202 
203  struct ConfigSubset *sub = NeoMutt->sub;
204 #if 0
205  if (m)
206  sub = m->sub;
207  else if (a)
208  sub = a->sub;
209 #endif
210  if (shared->sub != sub)
211  {
212  shared->sub = sub;
213  subtype |= NT_INDEX_SUBSET;
214  }
215 
216  if (subtype != NT_INDEX_NO_FLAGS)
217  {
218  mutt_debug(LL_NOTIFY, "NT_INDEX: %p\n", shared);
219  notify_send(shared->notify, NT_INDEX, subtype, shared);
220  }
221 }
The "current" mailbox.
Definition: context.h:37
#define NT_INDEX_SUBSET
Config Subset has changed.
Definition: lib.h:61
#define NT_INDEX_CONTEXT
Context has changed.
Definition: lib.h:63
size_t email_seq
Sequence number of the current email.
Definition: shared_data.h:43
static int index_shared_mailbox_observer(struct NotifyCallback *nc)
Notification that a Mailbox has changed - Implements observer_t.
Definition: shared_data.c:92
struct Mailbox * ctx_mailbox(struct Context *ctx)
wrapper to get the mailbox in a Context, or NULL
Definition: context.c:444
Log of notifications.
Definition: logging.h:45
struct Email * email
Currently selected Email.
Definition: shared_data.h:42
#define NT_INDEX_EMAIL
Email has changed.
Definition: lib.h:65
struct ConfigSubset * sub
Config set to use.
Definition: shared_data.h:38
struct Notify * notify
Notifications: NotifyAccount, EventAccount.
Definition: account.h:42
uint8_t NotifyIndex
Flags, e.g. NT_INDEX_ACCOUNT.
Definition: lib.h:55
A group of associated Mailboxes.
Definition: account.h:36
#define NT_INDEX_ACCOUNT
Account has changed.
Definition: lib.h:62
#define NT_INDEX_MAILBOX
Mailbox has changed.
Definition: lib.h:64
Container for Accounts, Notifications.
Definition: neomutt.h:36
struct Notify * notify
Notifications: NotifyIndex, IndexSharedData.
Definition: shared_data.h:44
Index data has changed, NotifyIndex, IndexSharedData.
Definition: notify_type.h:47
struct Notify * notify
Notifications: NotifyContext, EventContext.
Definition: context.h:50
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
Definition: notify.c:189
struct Context * ctx
Current Mailbox view.
Definition: shared_data.h:39
A set of inherited config items.
Definition: subset.h:46
A mailbox.
Definition: mailbox.h:81
struct ConfigSubset * sub
Inherited config items.
Definition: mailbox.h:86
static int index_shared_context_observer(struct NotifyCallback *nc)
Notification that the Context has changed - Implements observer_t.
Definition: shared_data.c:42
Account has changed, NotifyAccount, EventAccount.
Definition: notify_type.h:34
#define mutt_debug(LEVEL,...)
Definition: logging.h:85
static int index_shared_account_observer(struct NotifyCallback *nc)
Notification that an Account has changed - Implements observer_t.
Definition: shared_data.c:67
#define NT_INDEX_NO_FLAGS
No flags are set.
Definition: lib.h:58
Context has changed, NotifyContext, EventContext.
Definition: notify_type.h:43
struct Account * account
Account that owns this Mailbox.
Definition: mailbox.h:131
Mailbox has changed, NotifyMailbox, EventMailbox.
Definition: notify_type.h:48
struct ConfigSubset * sub
Inherited config items.
Definition: account.h:40
struct Account * account
Current Account.
Definition: shared_data.h:40
bool notify_observer_remove(struct Notify *notify, observer_t callback, void *global_data)
Remove an observer from an object.
Definition: notify.c:228
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:39
struct Notify * notify
Notifications: NotifyMailbox, EventMailbox.
Definition: mailbox.h:148
struct Mailbox * mailbox
Current Mailbox.
Definition: shared_data.h:41
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
Definition: notify.c:171
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ index_shared_data_set_email()

void index_shared_data_set_email ( struct IndexSharedData shared,
struct Email e 
)

Set the current Email for the Index and friends.

Parameters
sharedShared Index data
eCurrent Email, may be NULL

Definition at line 228 of file shared_data.c.

229 {
230  if (!shared)
231  return;
232 
233  size_t seq = e ? e->sequence : 0;
234  if ((shared->email != e) || (shared->email_seq != seq))
235  {
236  if (shared->email)
238 
239  shared->email = e;
240  shared->email_seq = seq;
241 
242  if (e)
244 
245  mutt_debug(LL_NOTIFY, "NT_INDEX_EMAIL: %p\n", shared->email);
246  notify_send(shared->notify, NT_INDEX, NT_INDEX_EMAIL, shared);
247  }
248 }
size_t email_seq
Sequence number of the current email.
Definition: shared_data.h:43
Log of notifications.
Definition: logging.h:45
struct Email * email
Currently selected Email.
Definition: shared_data.h:42
#define NT_INDEX_EMAIL
Email has changed.
Definition: lib.h:65
static int index_shared_email_observer(struct NotifyCallback *nc)
Notification that an Email has changed - Implements observer_t.
Definition: shared_data.c:117
struct Notify * notify
Notifications: NotifyIndex, IndexSharedData.
Definition: shared_data.h:44
Index data has changed, NotifyIndex, IndexSharedData.
Definition: notify_type.h:47
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
Definition: notify.c:189
size_t sequence
Sequence number assigned on creation.
Definition: email.h:99
#define mutt_debug(LEVEL,...)
Definition: logging.h:85
struct Notify * notify
Notifications: NotifyEmail, EventEmail.
Definition: email.h:123
Email has changed, NotifyEmail, EventEmail.
Definition: notify_type.h:44
bool notify_observer_remove(struct Notify *notify, observer_t callback, void *global_data)
Remove an observer from an object.
Definition: notify.c:228
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
Definition: notify.c:171
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ index_shared_data_is_cur_email()

bool index_shared_data_is_cur_email ( const struct IndexSharedData shared,
const struct Email e 
)

Check whether an email is the currently selected Email.

Parameters
sharedShared Index data
eEmail to check
Return values
truee is current
falsee is not current

Definition at line 257 of file shared_data.c.

259 {
260  if (!shared)
261  return false;
262 
263  return shared->email_seq == e->sequence;
264 }
size_t email_seq
Sequence number of the current email.
Definition: shared_data.h:43
size_t sequence
Sequence number assigned on creation.
Definition: email.h:99
+ Here is the caller graph for this function:

◆ index_shared_data_free()

void index_shared_data_free ( struct MuttWindow win,
void **  ptr 
)

Free Index Data.

Parameters
winWindow
ptrIndex Data to free

Only notify is owned by IndexSharedData and should be freed.

Definition at line 273 of file shared_data.c.

274 {
275  if (!ptr || !*ptr)
276  return;
277 
278  struct IndexSharedData *shared = *ptr;
279 
280  mutt_debug(LL_NOTIFY, "NT_INDEX_DELETE: %p\n", shared);
281  notify_send(shared->notify, NT_INDEX, NT_INDEX_DELETE, shared);
282  notify_free(&shared->notify);
283 
284  if (shared->account)
286  if (shared->ctx)
288  if (shared->mailbox)
290  if (shared->email)
292 
293  FREE(ptr);
294 }
static int index_shared_mailbox_observer(struct NotifyCallback *nc)
Notification that a Mailbox has changed - Implements observer_t.
Definition: shared_data.c:92
Log of notifications.
Definition: logging.h:45
struct Email * email
Currently selected Email.
Definition: shared_data.h:42
void notify_free(struct Notify **ptr)
Free a notification handler.
Definition: notify.c:73
static int index_shared_email_observer(struct NotifyCallback *nc)
Notification that an Email has changed - Implements observer_t.
Definition: shared_data.c:117
struct Notify * notify
Notifications: NotifyAccount, EventAccount.
Definition: account.h:42
Data shared between Index, Pager and Sidebar.
Definition: shared_data.h:36
struct Notify * notify
Notifications: NotifyIndex, IndexSharedData.
Definition: shared_data.h:44
Index data has changed, NotifyIndex, IndexSharedData.
Definition: notify_type.h:47
struct Notify * notify
Notifications: NotifyContext, EventContext.
Definition: context.h:50
#define NT_INDEX_DELETE
Index Shared Data is about to be freed.
Definition: lib.h:60
struct Context * ctx
Current Mailbox view.
Definition: shared_data.h:39
static int index_shared_context_observer(struct NotifyCallback *nc)
Notification that the Context has changed - Implements observer_t.
Definition: shared_data.c:42
#define mutt_debug(LEVEL,...)
Definition: logging.h:85
static int index_shared_account_observer(struct NotifyCallback *nc)
Notification that an Account has changed - Implements observer_t.
Definition: shared_data.c:67
struct Notify * notify
Notifications: NotifyEmail, EventEmail.
Definition: email.h:123
#define FREE(x)
Definition: memory.h:40
struct Account * account
Current Account.
Definition: shared_data.h:40
bool notify_observer_remove(struct Notify *notify, observer_t callback, void *global_data)
Remove an observer from an object.
Definition: notify.c:228
struct Notify * notify
Notifications: NotifyMailbox, EventMailbox.
Definition: mailbox.h:148
struct Mailbox * mailbox
Current Mailbox.
Definition: shared_data.h:41
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
Definition: notify.c:171
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ index_shared_data_new()

struct IndexSharedData* index_shared_data_new ( void  )

Create new Index Data.

Return values
ptrNew IndexSharedData

Definition at line 300 of file shared_data.c.

301 {
302  struct IndexSharedData *shared = mutt_mem_calloc(1, sizeof(struct IndexSharedData));
303 
304  shared->notify = notify_new();
305  shared->sub = NeoMutt->sub;
306 
307  mutt_debug(LL_NOTIFY, "NT_INDEX_ADD: %p\n", shared);
308  notify_send(shared->notify, NT_INDEX, NT_INDEX_ADD, shared);
309 
310  return shared;
311 }
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:50
Log of notifications.
Definition: logging.h:45
struct ConfigSubset * sub
Config set to use.
Definition: shared_data.h:38
Data shared between Index, Pager and Sidebar.
Definition: shared_data.h:36
Container for Accounts, Notifications.
Definition: neomutt.h:36
struct Notify * notify
Notifications: NotifyIndex, IndexSharedData.
Definition: shared_data.h:44
Index data has changed, NotifyIndex, IndexSharedData.
Definition: notify_type.h:47
struct Notify * notify_new(void)
Create a new notifications handler.
Definition: notify.c:60
#define NT_INDEX_ADD
New Index Shared Data has been created.
Definition: lib.h:59
#define mutt_debug(LEVEL,...)
Definition: logging.h:85
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:39
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
Definition: notify.c:171
+ Here is the call graph for this function:
+ Here is the caller graph for this function: