1mail::account::updateNomtaiifly:(:3axc)count Native API rmeafielr:e:naccecount::updateNotify(3x)
2
3
4

NAME

6       mail::account::updateNotify - Request notification of folder updates
7

SYNOPSIS

9       #include <libmail/mail.H>
10
11
12       class myCallback : public mail::callback {
13       public:
14           void success(std::string msg);
15           void fail(std::string msg);
16       };
17
18       mail::account *account;
19
20
21
22       account->updateNotify (bool enableDisable, myCallback &callback);
23

USAGE

25       If supported by the mail server, this function requests that the appli‐
26       cation be notified immediately if another application makes any changes
27       to the currently open folder.  This includes:
28
29       · New mail delivered to the folder.
30
31       · Existing messages removed from the folder.
32
33       · Changes to the messages' flags.
34
35       These  events  are  normally reported by invoking the newMessages, mes‐
36       sagesRemoved, and messageChanged method of  the  mail::callback::folder
37       object that was passed to mail::folder::open(3x).
38
39       These  callback  function  normally are not generated immediately after
40       the corresponding events occur.  Changes to the folder's  contents  are
41       usually  checked  only when the next request is processed; additionally
42       many mail servers do not even do that, and only check for changes  when
43       the  mail  clients  explicitly  asks  the  server to check for new mail
44       (mail::account::checkNewMail(3x)) or to update  the  permanent  message
45       status  (  mail::account::removeMessages(3x)  or mail::account::update‐
46       FolderIndexInfo(3x)).
47
48       This method requests the server to notify the  application  immediately
49       when  another application changes the folder (the enableDisable parame‐
50       ter is true), or to stop notifying the  application  (enableDisable  is
51       false).
52
53              Note:
54
55              This  method  only works with IMAP mail accounts on IMAP servers
56              that support the IMAP IDLE extension, as described by RFC  2177.
57              This  method  has no effect with IMAP servers that do not imple‐
58              ment the IDLE extension, or other mail accounts.
59
60              This method is also implemented for local mail in  maildirs,  on
61              systems running the SGI File Access Monitor.  This method has no
62              effect on mbox mail folders, or on systems without the FAM  dae‐
63              mon.
64
65       The  immediate  update notification mode is enabled until it is explic‐
66       itly disabled.  When the  immediate  update  notification  mode  is  in
67       effect  with  an  IMAP  IDLE-capable server, any other request silently
68       terminates the IDLE mode, performs the request, and reenters IDLE mode.
69
70       This method is a no-op if the account does not support the update noti‐
71       fication  mode, and callback's success method is quietly invoked, with‐
72       out any further processing.  When enableDisable is  true,  the  success
73       method is invoked when the IMAP server acknowledges that it entered the
74       IDLE mode, or when monitoring begins  on  the  currently  open  maildir
75       folder.   When  enableDisable  is  false, the success method is invoked
76       when the IMAP server acknowledges the completion of the  IDLE  command,
77       and  immediate  update notification mode stops (or after maildor folder
78       monitoring stops).
79
80              Note: When enableDisable is set to false, it is  still  possible
81              that   some  mail::callback::folder  callback  methods  will  be
82              invoked before success.  This occurs when the server was in  the
83              process  of  reporting  folder  changes  just  before the client
84              requested the termination of immediate update notification.
85

RETURN CODES

87       The application must wait until callback's success or  fail  method  is
88       invoked.   The  success  method is invoked when this request is succes‐
89       fully processed.  The fail method is invoked if this request cannot  be
90       processed.   The application must not destroy callback until either the
91       success or fail method is invoked.
92
93              Note: callback's fail method may be  invoked  even  after  other
94              callback  methods were invoked.  This indicates that the request
95              was partially completed before the error was encountered.
96

SEE ALSO

98       mail::account::checkNewMail(3x),     mail::account::removeMessages(3x),
99       mail::account::updateFolderIndexInfo(3x), RFC 2177.
100
101
102
103                                 10 April 2006 mail::account::updateNotify(3x)
Impressum