Ben Chan | 6e72692 | 2011-06-28 15:54:32 -0700 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Ben Chan | 89cf29e | 2011-08-10 13:11:05 -0700 | [diff] [blame^] | 5 | #ifndef CROS_DISKS_SESSION_MANAGER_OBSERVER_INTERFACE_H_ |
| 6 | #define CROS_DISKS_SESSION_MANAGER_OBSERVER_INTERFACE_H_ |
Ben Chan | 6e72692 | 2011-06-28 15:54:32 -0700 | [diff] [blame] | 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | namespace cros_disks { |
| 11 | |
| 12 | // An interface class for observing events from the session manager. |
| 13 | // A derived class of this class should override the event methods |
| 14 | // that it would like to observe. |
Ben Chan | 89cf29e | 2011-08-10 13:11:05 -0700 | [diff] [blame^] | 15 | class SessionManagerObserverInterface { |
Ben Chan | 6e72692 | 2011-06-28 15:54:32 -0700 | [diff] [blame] | 16 | public: |
Ben Chan | 89cf29e | 2011-08-10 13:11:05 -0700 | [diff] [blame^] | 17 | virtual ~SessionManagerObserverInterface() {} |
Ben Chan | 6e72692 | 2011-06-28 15:54:32 -0700 | [diff] [blame] | 18 | |
| 19 | // This method is called when a session has started. |
| 20 | virtual void OnSessionStarted(const std::string& user) = 0; |
| 21 | |
| 22 | // This method is called when a session has stopped. |
| 23 | virtual void OnSessionStopped(const std::string& user) = 0; |
| 24 | }; |
| 25 | |
| 26 | } // namespace cros_disks |
| 27 | |
Ben Chan | 89cf29e | 2011-08-10 13:11:05 -0700 | [diff] [blame^] | 28 | #endif // CROS_DISKS_SESSION_MANAGER_OBSERVER_INTERFACE_H_ |