vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / media / media-add-ons / tone_producer_demo / ToneProducerAddOn.h
blobfca9aa2c2060c3944297a7cb3274d00d61347c46
1 /* Written by Eric Moon, from the Cortex Source code archive.
2 * Distributed under the terms of the Be Sample Code License
3 */
5 // ToneProducerAddOn.h
6 // e.moon 4jun99
7 //
8 // PURPOSE
9 // Quickie AddOn class for the ToneProducer node.
12 #ifndef __ToneProducerAddOn_H__
13 #define __ToneProducerAddOn_H__
15 #include <MediaAddOn.h>
17 // -------------------------------------------------------- //
19 class ToneProducerAddOn :
20 public BMediaAddOn {
21 typedef BMediaAddOn _inherited;
23 public: // ctor/dtor
24 virtual ~ToneProducerAddOn();
25 explicit ToneProducerAddOn(image_id image);
27 public: // BMediaAddOn impl
28 virtual status_t InitCheck(
29 const char** out_failure_text);
30 virtual int32 CountFlavors();
31 virtual status_t GetFlavorAt(
32 int32 n,
33 const flavor_info ** out_info);
34 virtual BMediaNode * InstantiateNodeFor(
35 const flavor_info * info,
36 BMessage * config,
37 status_t * out_error);
38 virtual status_t GetConfigurationFor(
39 BMediaNode * your_node,
40 BMessage * into_message);
42 virtual bool WantsAutoStart() { return false; }
43 virtual status_t AutoStart(
44 int in_count,
45 BMediaNode ** out_node,
46 int32 * out_internal_id,
47 bool * out_has_more) { return B_OK; }
50 #endif /*__ToneProducerAddOn_H__*/