Henrik Kjellander | ff761fb | 2015-11-04 08:31:52 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #ifndef MODULES_MEDIA_FILE_MEDIA_FILE_DEFINES_H_ |
| 12 | #define MODULES_MEDIA_FILE_MEDIA_FILE_DEFINES_H_ |
Henrik Kjellander | ff761fb | 2015-11-04 08:31:52 +0100 | [diff] [blame] | 13 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 14 | #include "modules/include/module_common_types.h" |
Mirko Bonadei | 7120742 | 2017-09-15 13:58:09 +0200 | [diff] [blame^] | 15 | #include "typedefs.h" // NOLINT(build/include) |
Henrik Kjellander | ff761fb | 2015-11-04 08:31:52 +0100 | [diff] [blame] | 16 | |
| 17 | namespace webrtc { |
| 18 | // Callback class for the MediaFile class. |
| 19 | class FileCallback |
| 20 | { |
| 21 | public: |
| 22 | virtual ~FileCallback(){} |
| 23 | |
| 24 | // This function is called by MediaFile when a file has been playing for |
| 25 | // durationMs ms. id is the identifier for the MediaFile instance calling |
| 26 | // the callback. |
| 27 | virtual void PlayNotification(const int32_t id, |
| 28 | const uint32_t durationMs) = 0; |
| 29 | |
| 30 | // This function is called by MediaFile when a file has been recording for |
| 31 | // durationMs ms. id is the identifier for the MediaFile instance calling |
| 32 | // the callback. |
| 33 | virtual void RecordNotification(const int32_t id, |
| 34 | const uint32_t durationMs) = 0; |
| 35 | |
| 36 | // This function is called by MediaFile when a file has been stopped |
| 37 | // playing. id is the identifier for the MediaFile instance calling the |
| 38 | // callback. |
| 39 | virtual void PlayFileEnded(const int32_t id) = 0; |
| 40 | |
| 41 | // This function is called by MediaFile when a file has been stopped |
| 42 | // recording. id is the identifier for the MediaFile instance calling the |
| 43 | // callback. |
| 44 | virtual void RecordFileEnded(const int32_t id) = 0; |
| 45 | |
| 46 | protected: |
| 47 | FileCallback() {} |
| 48 | }; |
| 49 | } // namespace webrtc |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 50 | #endif // MODULES_MEDIA_FILE_MEDIA_FILE_DEFINES_H_ |