OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // This class listens for notifications from the talk service, and signals when | 5 // This class listens for notifications from the talk service, and signals when |
6 // they arrive. It checks all incoming stanza's to see if they look like | 6 // they arrive. It checks all incoming stanza's to see if they look like |
7 // notifications, and filters out those which are not valid. | 7 // notifications, and filters out those which are not valid. |
8 // | 8 // |
9 // The task is deleted automatically by the buzz::XmppClient. This occurs in the | 9 // The task is deleted automatically by the buzz::XmppClient. This occurs in the |
10 // destructor of TaskRunner, which is a superclass of buzz::XmppClient. | 10 // destructor of TaskRunner, which is a superclass of buzz::XmppClient. |
11 | 11 |
12 #ifndef CHROME_COMMON_NET_NOTIFIER_LISTENER_LISTEN_TASK_H_ | 12 #ifndef JINGLE_NOTIFIER_LISTENER_LISTEN_TASK_H_ |
13 #define CHROME_COMMON_NET_NOTIFIER_LISTENER_LISTEN_TASK_H_ | 13 #define JINGLE_NOTIFIER_LISTENER_LISTEN_TASK_H_ |
14 | 14 |
15 #include "chrome/common/net/notifier/listener/notification_defines.h" | 15 #include "jingle/notifier/listener/notification_defines.h" |
16 #include "talk/xmpp/xmpptask.h" | 16 #include "talk/xmpp/xmpptask.h" |
17 | 17 |
18 namespace buzz { | 18 namespace buzz { |
19 class XmlElement; | 19 class XmlElement; |
20 class Jid; | 20 class Jid; |
21 } | 21 } |
22 | 22 |
23 namespace notifier { | 23 namespace notifier { |
24 | 24 |
25 class ListenTask : public buzz::XmppTask { | 25 class ListenTask : public buzz::XmppTask { |
(...skipping 13 matching lines...) Expand all Loading... |
39 private: | 39 private: |
40 // Decide whether a notification should start a sync. We only validate that | 40 // Decide whether a notification should start a sync. We only validate that |
41 // this notification came from our own Jid(). | 41 // this notification came from our own Jid(). |
42 bool IsValidNotification(const buzz::XmlElement* stanza); | 42 bool IsValidNotification(const buzz::XmlElement* stanza); |
43 | 43 |
44 DISALLOW_COPY_AND_ASSIGN(ListenTask); | 44 DISALLOW_COPY_AND_ASSIGN(ListenTask); |
45 }; | 45 }; |
46 | 46 |
47 } // namespace notifier | 47 } // namespace notifier |
48 | 48 |
49 #endif // CHROME_COMMON_NET_NOTIFIER_LISTENER_LISTEN_TASK_H_ | 49 #endif // JINGLE_NOTIFIER_LISTENER_LISTEN_TASK_H_ |
OLD | NEW |