* More header cleanup, continuing korli's work.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36206 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2010-04-13 09:48:02 +00:00
parent 2d4ce06468
commit f46308c92a
21 changed files with 623 additions and 769 deletions
+8 -7
View File
@@ -1,10 +1,12 @@
/* /*
** Copyright 2002-04, Thomas Kurschel. All rights reserved. * Copyright 2002-2004, Thomas Kurschel. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _SCSI_BUS_RAW_DRIVER_H
#define _SCSI_BUS_RAW_DRIVER_H
/*
Part of Open SCSI bus manager /*! Part of Open SCSI bus manager
Devfs entry for raw bus access. Devfs entry for raw bus access.
@@ -13,11 +15,10 @@
be retrieved from. be retrieved from.
*/ */
#ifndef _SCSI_BUS_RAW_DRIVER_H
#define _SCSI_BUS_RAW_DRIVER_H
#include <Drivers.h> #include <Drivers.h>
// we start with +300 to not collide with any other SCSI opcode defined // we start with +300 to not collide with any other SCSI opcode defined
// in scsiprobe_driver.h or scsi.h; // in scsiprobe_driver.h or scsi.h;
// all ioctl calls return the subsystem status (see SCSI.h) // all ioctl calls return the subsystem status (see SCSI.h)
@@ -26,4 +27,4 @@ enum {
B_SCSI_BUS_RAW_PATH_INQUIRY B_SCSI_BUS_RAW_PATH_INQUIRY
}; };
#endif #endif /* _SCSI_BUS_RAW_DRIVER_H */
+3 -3
View File
@@ -1,6 +1,6 @@
/* File System and Drivers select support /*
** * Copyright 2004-2010, Haiku, Inc. All Rights Reserved.
** Distributed under the terms of the Haiku License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _DRIVERS_SELECT_H #ifndef _DRIVERS_SELECT_H
#define _DRIVERS_SELECT_H #define _DRIVERS_SELECT_H
+7 -6
View File
@@ -1,10 +1,12 @@
/* /*
** Copyright 2002/03, Thomas Kurschel. All rights reserved. * Copyright 2002-2003, Thomas Kurschel. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _ISA2_H
#define _ISA2_H
/*
ISA bus manager /*! ISA bus manager
This is an improper name - this bus manager uses the PnP manager to This is an improper name - this bus manager uses the PnP manager to
load device drivers, but calling it ISA PnP manager would be wrong as load device drivers, but calling it ISA PnP manager would be wrong as
@@ -24,12 +26,11 @@
meanwhile. meanwhile.
*/ */
#ifndef _ISA2_H
#define _ISA2_H
#include <device_manager.h> #include <device_manager.h>
#include <ISA.h> #include <ISA.h>
// maximum size of one dma transfer // maximum size of one dma transfer
// (in bytes for 8 bit transfer, in words for 16 bit transfer) // (in bytes for 8 bit transfer, in words for 16 bit transfer)
#define B_MAX_ISA_DMA_COUNT 0x10000 #define B_MAX_ISA_DMA_COUNT 0x10000
+7 -6
View File
@@ -1,10 +1,12 @@
/* /*
** Copyright 2002/03, Thomas Kurschel. All rights reserved. * Copyright 2002-2003, Thomas Kurschel. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#ifndef __LOCKED_POOL_H__
#define __LOCKED_POOL_H__
/*
Paging-safe allocation of locked memory. /*! Paging-safe allocation of locked memory.
Library for managing temporary, locked memory with the condition of Library for managing temporary, locked memory with the condition of
not calling any function during allocation that can lead to paging. not calling any function during allocation that can lead to paging.
@@ -28,11 +30,10 @@
pool is allocated. pool is allocated.
*/ */
#ifndef __LOCKED_POOL_H__
#define __LOCKED_POOL_H__
#include <device_manager.h> #include <device_manager.h>
typedef struct locked_pool *locked_pool_cookie; typedef struct locked_pool *locked_pool_cookie;
typedef status_t (*locked_pool_add_hook)(void *block, void *arg); typedef status_t (*locked_pool_add_hook)(void *block, void *arg);
+42 -57
View File
@@ -1,34 +1,17 @@
//------------------------------------------------------------------------------ /*
// Copyright (c) 2001-2002, OpenBeOS * Copyright 2001-2002, Haiku Inc. All Rights Reserved.
// * Distributed under the terms of the MIT License.
// Permission is hereby granted, free of charge, to any person obtaining a *
// copy of this software and associated documentation files (the "Software"), * Author:
// to deal in the Software without restriction, including without limitation * Christopher ML Zumwalt May ([email protected])
// the rights to use, copy, modify, merge, publish, distribute, sublicense, */
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// File Name: FileGameSound.h
// Author: Christopher ML Zumwalt May ([email protected])
// Description: BFileGameSound is a class that streams data out of a file.
//------------------------------------------------------------------------------
#ifndef _FILEGAMESOUND_H #ifndef _FILEGAMESOUND_H
#define _FILEGAMESOUND_H #define _FILEGAMESOUND_H
#include <StreamingGameSound.h> #include <StreamingGameSound.h>
struct entry_ref; struct entry_ref;
struct _gs_media_tracker; struct _gs_media_tracker;
struct _gs_ramp; struct _gs_ramp;
@@ -49,13 +32,13 @@ public:
virtual status_t StartPlaying(); virtual status_t StartPlaying();
virtual status_t StopPlaying(); virtual status_t StopPlaying();
status_t Preload(); // if you have stopped and want to start quickly again status_t Preload();
// if you have stopped and want to start quickly again
virtual void FillBuffer(void * inBuffer, virtual void FillBuffer(void* buffer, size_t byteCount);
size_t inByteCount);
virtual status_t Perform(int32 selector, void* data); virtual status_t Perform(int32 selector, void* data);
virtual status_t SetPaused(bool isPaused, virtual status_t SetPaused(bool isPaused, bigtime_t rampTime);
bigtime_t rampTime);
enum { enum {
B_NOT_PAUSED, B_NOT_PAUSED,
B_PAUSE_IN_PROGRESS, B_PAUSE_IN_PROGRESS,
@@ -64,39 +47,18 @@ public:
int32 IsPaused(); int32 IsPaused();
private: private:
_gs_media_tracker * fAudioStream; BFileGameSound();
BFileGameSound(const BFileGameSound& other);
bool fStopping; BFileGameSound& operator=(const BFileGameSound& other);
bool fLooping; // not implemented
char fReserved;
char * fBuffer;
size_t fFrameSize;
size_t fBufferSize;
size_t fPlayPosition;
thread_id fReadThread;
port_id fPort;
_gs_ramp * fPausing;
bool fPaused;
float fPauseGain;
status_t Init(const entry_ref* file); status_t Init(const entry_ref* file);
bool Load(); bool Load();
bool Read(void* buffer, size_t bytes); bool Read(void* buffer, size_t bytes);
/* leave these declarations private unless you plan on actually implementing and using them. */ status_t _Reserved_BFileGameSound_0(int32 arg, ...);
BFileGameSound(); // SetPaused(bool paused, bigtime_t ramp);
BFileGameSound(const BFileGameSound&);
BFileGameSound& operator=(const BFileGameSound&);
/* fbc data and virtuals */
uint32 _reserved_BFileGameSound_[9];
status_t _Reserved_BFileGameSound_0(int32 arg, ...); /* SetPaused(bool paused, bigtime_t ramp); */
virtual status_t _Reserved_BFileGameSound_1(int32 arg, ...); virtual status_t _Reserved_BFileGameSound_1(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_2(int32 arg, ...); virtual status_t _Reserved_BFileGameSound_2(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_3(int32 arg, ...); virtual status_t _Reserved_BFileGameSound_3(int32 arg, ...);
@@ -120,6 +82,29 @@ virtual status_t _Reserved_BFileGameSound_20(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_21(int32 arg, ...); virtual status_t _Reserved_BFileGameSound_21(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_22(int32 arg, ...); virtual status_t _Reserved_BFileGameSound_22(int32 arg, ...);
virtual status_t _Reserved_BFileGameSound_23(int32 arg, ...); virtual status_t _Reserved_BFileGameSound_23(int32 arg, ...);
private:
_gs_media_tracker* fAudioStream;
bool fStopping;
bool fLooping;
char fReserved;
char* fBuffer;
size_t fFrameSize;
size_t fBufferSize;
size_t fPlayPosition;
thread_id fReadThread;
port_id fPort;
_gs_ramp* fPausing;
bool fPaused;
float fPauseGain;
uint32 _reserved[9];
}; };
#endif // _FILEGAMESOUND_H #endif // _FILEGAMESOUND_H
+35 -66
View File
@@ -1,50 +1,23 @@
//------------------------------------------------------------------------------ /*
// Copyright (c) 2001-2002, OpenBeOS * Copyright 2001-2002, Haiku Inc. All Rights Reserved.
// * Distributed under the terms of the MIT License.
// Permission is hereby granted, free of charge, to any person obtaining a *
// copy of this software and associated documentation files (the "Software"), * Author:
// to deal in the Software without restriction, including without limitation * Christopher ML Zumwalt May ([email protected])
// the rights to use, copy, modify, merge, publish, distribute, sublicense, */
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// File Name: GameSound.h
// Author: Christopher ML Zumwalt May ([email protected])
// Description: Base class for play sounds using the game kit
//------------------------------------------------------------------------------
#ifndef _GAMESOUND_H #ifndef _GAMESOUND_H
#define _GAMESOUND_H #define _GAMESOUND_H
// Standard Includes -----------------------------------------------------------
// System Includes -------------------------------------------------------------
#include <GameSoundDefs.h> #include <GameSoundDefs.h>
#include <new> #include <new>
// Project Includes ------------------------------------------------------------
// Local Includes --------------------------------------------------------------
// Local Defines ---------------------------------------------------------------
// Globals ---------------------------------------------------------------------
class BGameSoundDevice; class BGameSoundDevice;
// BGameSound class -------------------------------------------------------------
class BGameSound class BGameSound {
{
public: public:
BGameSound(BGameSoundDevice* device = NULL); BGameSound(BGameSoundDevice* device = NULL);
virtual ~BGameSound(); virtual ~BGameSound();
@@ -55,63 +28,51 @@ public:
// BGameSound attributes // BGameSound attributes
BGameSoundDevice* Device() const; BGameSoundDevice* Device() const;
gs_id ID() const; gs_id ID() const;
const gs_audio_format & Format() const; // only valid after Init() const gs_audio_format& Format() const;
// only valid after Init()
// Playing sounds // Playing sounds
virtual status_t StartPlaying(); virtual status_t StartPlaying();
virtual bool IsPlaying(); virtual bool IsPlaying();
virtual status_t StopPlaying(); virtual status_t StopPlaying();
// Modifing the playback // Modifing the playback
status_t SetGain(float gain, status_t SetGain(float gain, bigtime_t duration = 0);
bigtime_t duration = 0); // ramp duration in seconds // ramp duration in seconds
status_t SetPan(float pan, status_t SetPan(float pan, bigtime_t duration = 0);
bigtime_t duration = 0); // ramp duration in seconds // ramp duration in seconds
float Gain(); float Gain();
float Pan(); float Pan();
virtual status_t SetAttributes(gs_attribute * inAttributes, virtual status_t SetAttributes(gs_attribute* attributes,
size_t inAttributeCount); size_t attributeCount);
virtual status_t GetAttributes(gs_attribute * outAttributes, virtual status_t GetAttributes(gs_attribute* attributes,
size_t inAttributeCount); size_t attributeCount);
void* operator new(size_t size); void* operator new(size_t size);
void* operator new(size_t size, void* operator new(size_t size,
const std::nothrow_t&) throw(); const std::nothrow_t&) throw();
void operator delete(void* ptr); void operator delete(void* ptr);
#if !__MWERKS__
// there's a bug in MWCC under R4.1 and earlier
void operator delete(void* ptr, void operator delete(void* ptr,
const std::nothrow_t&) throw(); const std::nothrow_t&) throw();
#endif
static status_t SetMemoryPoolSize(size_t in_poolSize); static status_t SetMemoryPoolSize(size_t poolSize);
static status_t LockMemoryPool(bool in_lockInCore); static status_t LockMemoryPool(bool lockInCore);
static int32 SetMaxSoundCount(int32 in_maxCount); static int32 SetMaxSoundCount(int32 maxCount);
virtual status_t Perform(int32 selector, void* data); virtual status_t Perform(int32 selector, void* data);
protected:
status_t SetInitError(status_t in_initError); protected:
status_t SetInitError(status_t initError);
status_t Init(gs_id handle); status_t Init(gs_id handle);
BGameSound(const BGameSound& other); BGameSound(const BGameSound& other);
BGameSound& operator=(const BGameSound& other); BGameSound& operator=(const BGameSound& other);
private: private:
BGameSoundDevice* fDevice;
status_t fInitError;
gs_audio_format fFormat;
gs_id fSound;
/* leave these declarations private unless you plan on actually implementing and using them. */
BGameSound(); BGameSound();
// not implemented
/* fbc data and virtuals */
uint32 _reserved_BGameSound_[16];
virtual status_t _Reserved_BGameSound_0(int32 arg, ...); virtual status_t _Reserved_BGameSound_0(int32 arg, ...);
virtual status_t _Reserved_BGameSound_1(int32 arg, ...); virtual status_t _Reserved_BGameSound_1(int32 arg, ...);
@@ -162,6 +123,14 @@ virtual status_t _Reserved_BGameSound_45(int32 arg, ...);
virtual status_t _Reserved_BGameSound_46(int32 arg, ...); virtual status_t _Reserved_BGameSound_46(int32 arg, ...);
virtual status_t _Reserved_BGameSound_47(int32 arg, ...); virtual status_t _Reserved_BGameSound_47(int32 arg, ...);
private:
BGameSoundDevice* fDevice;
status_t fInitError;
gs_audio_format fFormat;
gs_id fSound;
uint32 _reserved[16];
}; };
+31 -47
View File
@@ -1,34 +1,17 @@
//------------------------------------------------------------------------------ /*
// Copyright (c) 2001-2002, OpenBeOS * Copyright 2001-2002, Haiku Inc. All Rights Reserved.
// * Distributed under the terms of the MIT License.
// Permission is hereby granted, free of charge, to any person obtaining a *
// copy of this software and associated documentation files (the "Software"), * Author:
// to deal in the Software without restriction, including without limitation * Christopher ML Zumwalt May ([email protected])
// the rights to use, copy, modify, merge, publish, distribute, sublicense, */
// and/or sell copies of the Software, and to permit persons to whom the #ifndef _GAME_SOUND_DEFS_H
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// File Name: GameSound.cpp
// Author: Christopher ML Zumwalt May ([email protected])
// Description: Declarations for game sounds
//------------------------------------------------------------------------------
#if !defined(_GAME_SOUND_DEFS_H)
#define _GAME_SOUND_DEFS_H #define _GAME_SOUND_DEFS_H
#include <SupportDefs.h> #include <SupportDefs.h>
typedef int32 gs_id; typedef int32 gs_id;
#define B_GS_CUR_API_VERSION B_BEOS_VERSION #define B_GS_CUR_API_VERSION B_BEOS_VERSION
@@ -41,8 +24,7 @@ typedef int32 gs_id;
#define B_GS_MAIN_SOUND ((gs_id)-2) #define B_GS_MAIN_SOUND ((gs_id)-2)
enum //fixme renumber to real error messages enum {
{
B_GS_BAD_HANDLE = -99999, B_GS_BAD_HANDLE = -99999,
B_GS_NO_SOUNDS, B_GS_NO_SOUNDS,
B_GS_NO_HARDWARE, B_GS_NO_HARDWARE,
@@ -51,25 +33,25 @@ enum //fixme renumber to real error messages
}; };
struct gs_audio_format struct gs_audio_format {
{ /* same as media_raw_audio_format */ // same as media_raw_audio_format
enum format { /* for "format" */ enum format { // for "format"
B_GS_U8 = 0x11, /* 128 == mid, 1 == bottom, 255 == top */ B_GS_U8 = 0x11, // 128 == mid, 1 == bottom, 255 == top
B_GS_S16 = 0x2, /* 0 == mid, -32767 == bottom, +32767 == top */ B_GS_S16 = 0x2, // 0 == mid, -32767 == bottom, +32767 == top
B_GS_F = 0x24, /* 0 == mid, -1.0 == bottom, 1.0 == top */ B_GS_F = 0x24, // 0 == mid, -1.0 == bottom, 1.0 == top
B_GS_S32 = 0x4 /* 0 == mid, 0x80000001 == bottom, 0x7fffffff == top */ B_GS_S32 = 0x4 // 0 == mid, 0x80000001 == bottom,
// 0x7fffffff == top
}; };
float frame_rate; float frame_rate;
uint32 channel_count; /* 1 or 2, mostly */ uint32 channel_count; // 1 or 2, mostly
uint32 format; /* for compressed formats, go to media_encoded_audio_format */ uint32 format; // for compressed formats, go to
uint32 byte_order; /* 2 for little endian, 1 for big endian */ // media_encoded_audio_format
size_t buffer_size; /* size of each buffer -- NOT GUARANTEED */ uint32 byte_order; // 2 for little endian, 1 for big endian
size_t buffer_size; // size of each buffer -- NOT GUARANTEED
}; };
// enum gs_attributes {
enum gs_attributes
{
B_GS_NO_ATTRIBUTE = 0, // when there is no attribute B_GS_NO_ATTRIBUTE = 0, // when there is no attribute
B_GS_MAIN_GAIN = 1, // 0 == 0 dB, -6.0 == -6 dB (gs_id ignored) B_GS_MAIN_GAIN = 1, // 0 == 0 dB, -6.0 == -6 dB (gs_id ignored)
B_GS_CD_THROUGH_GAIN, // 0 == 0 dB, -12.0 == -12 dB (gs_id ignored) B_GS_CD_THROUGH_GAIN, // 0 == 0 dB, -12.0 == -12 dB (gs_id ignored)
@@ -81,15 +63,17 @@ enum gs_attributes
B_GS_FIRST_PRIVATE_ATTRIBUTE = 90000, B_GS_FIRST_PRIVATE_ATTRIBUTE = 90000,
B_GS_FIRST_USER_ATTRIBUTE = 100000 B_GS_FIRST_USER_ATTRIBUTE = 100000
}; };
struct gs_attribute
{
struct gs_attribute {
int32 attribute; // which attribute int32 attribute; // which attribute
bigtime_t duration; // how long of time to ramp over for the change bigtime_t duration; // how long of time to ramp over for the change
float value; // where the value stops changing float value; // where the value stops changing
uint32 flags; // whatever flags are for the attribute uint32 flags; // whatever flags are for the attribute
}; };
struct gs_attribute_info
{
struct gs_attribute_info {
int32 attribute; int32 attribute;
float granularity; float granularity;
float minimum; float minimum;
+36 -59
View File
@@ -1,37 +1,18 @@
//------------------------------------------------------------------------------ /*
// Copyright (c) 2001-2002, OpenBeOS * Copyright 2001-2002, Haiku Inc. All Rights Reserved.
// * Distributed under the terms of the MIT License.
// Permission is hereby granted, free of charge, to any person obtaining a *
// copy of this software and associated documentation files (the "Software"), * Author:
// to deal in the Software without restriction, including without limitation * Christopher ML Zumwalt May ([email protected])
// the rights to use, copy, modify, merge, publish, distribute, sublicense, */
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// File Name: FileGameSound.h
// Author: Christopher ML Zumwalt May ([email protected])
// Description: BFileGameSound is a class that streams data out of a file.
//------------------------------------------------------------------------------
#ifndef _PUSHGAMESOUND_H #ifndef _PUSHGAMESOUND_H
#define _PUSHGAMESOUND_H #define _PUSHGAMESOUND_H
#include <StreamingGameSound.h> #include <StreamingGameSound.h>
class BPushGameSound : public BStreamingGameSound class BPushGameSound : public BStreamingGameSound {
{
public: public:
BPushGameSound(size_t inBufferFrameCount, BPushGameSound(size_t inBufferFrameCount,
const gs_audio_format* format, const gs_audio_format* format,
@@ -46,12 +27,11 @@ public:
lock_ok_frames_dropped // you may have missed some buffers lock_ok_frames_dropped // you may have missed some buffers
}; };
virtual lock_status LockNextPage(void ** out_pagePtr, virtual lock_status LockNextPage(void** _pagePtr,
size_t * out_pageSize); size_t* _pageSize);
virtual status_t UnlockPage(void * in_pagePtr); virtual status_t UnlockPage(void* pagePtr);
virtual lock_status LockForCyclic(void ** out_basePtr, virtual lock_status LockForCyclic(void** _basePtr, size_t* _size);
size_t * out_size);
virtual status_t UnlockCyclic(); virtual status_t UnlockCyclic();
virtual size_t CurrentPosition(); virtual size_t CurrentPosition();
@@ -60,44 +40,27 @@ public:
virtual status_t Perform(int32 selector, void* data); virtual status_t Perform(int32 selector, void* data);
protected: protected:
BPushGameSound(BGameSoundDevice* device); BPushGameSound(BGameSoundDevice* device);
virtual status_t SetParameters(size_t inBufferFrameCount, virtual status_t SetParameters(size_t bufferFrameCount,
const gs_audio_format* format, const gs_audio_format* format,
size_t inBufferCount); size_t bufferCount);
virtual status_t SetStreamHook(void (*hook)(void * inCookie, void * inBuffer, size_t inByteCount, BStreamingGameSound * me), virtual status_t SetStreamHook(void (*hook)(void* inCookie,
void* buffer, size_t byteCount,
BStreamingGameSound* me),
void* cookie); void* cookie);
virtual void FillBuffer(void * inBuffer, virtual void FillBuffer(void* buffer, size_t byteCount);
size_t inByteCount);
private: private:
/* leave these declarations private unless you plan on actually implementing and using them. */
BPushGameSound(); BPushGameSound();
BPushGameSound(const BPushGameSound&); BPushGameSound(const BPushGameSound& other);
BPushGameSound& operator=(const BPushGameSound&); BPushGameSound& operator=(const BPushGameSound& other);
// not implemented
bool BytesReady(size_t* bytes); bool BytesReady(size_t* bytes);
sem_id fLock;
BList * fPageLocked;
size_t fLockPos;
size_t fPlayPos;
char * fBuffer;
size_t fPageSize;
int32 fPageCount;
size_t fBufferSize;
/* fbc data and virtuals */
uint32 _reserved_BPushGameSound_[12];
virtual status_t _Reserved_BPushGameSound_0(int32 arg, ...); virtual status_t _Reserved_BPushGameSound_0(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_1(int32 arg, ...); virtual status_t _Reserved_BPushGameSound_1(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_2(int32 arg, ...); virtual status_t _Reserved_BPushGameSound_2(int32 arg, ...);
@@ -123,6 +86,20 @@ virtual status_t _Reserved_BPushGameSound_21(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_22(int32 arg, ...); virtual status_t _Reserved_BPushGameSound_22(int32 arg, ...);
virtual status_t _Reserved_BPushGameSound_23(int32 arg, ...); virtual status_t _Reserved_BPushGameSound_23(int32 arg, ...);
private:
sem_id fLock;
BList* fPageLocked;
size_t fLockPos;
size_t fPlayPos;
char* fBuffer;
size_t fPageSize;
int32 fPageCount;
size_t fBufferSize;
uint32 _reserved[12];
}; };
#endif // _PUSH_GAME_SOUND_H #endif // _PUSH_GAME_SOUND_H
+13 -15
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2001-2008, Haiku Inc. All Rights Reserved. * Copyright 2001-2010, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _SIMPLEGAMESOUND_H #ifndef _SIMPLEGAMESOUND_H
@@ -15,12 +15,12 @@ struct entry_ref;
class BSimpleGameSound : public BGameSound { class BSimpleGameSound : public BGameSound {
public: public:
BSimpleGameSound(const entry_ref * inFile, BSimpleGameSound(const entry_ref* file,
BGameSoundDevice* device = NULL); BGameSoundDevice* device = NULL);
BSimpleGameSound(const char * inFile, BSimpleGameSound(const char* file,
BGameSoundDevice* device = NULL); BGameSoundDevice* device = NULL);
BSimpleGameSound(const void * inData, BSimpleGameSound(const void* data,
size_t inFrameCount, size_t frameCount,
const gs_audio_format* format, const gs_audio_format* format,
BGameSoundDevice* device = NULL); BGameSoundDevice* device = NULL);
BSimpleGameSound(const BSimpleGameSound& other); BSimpleGameSound(const BSimpleGameSound& other);
@@ -35,17 +35,13 @@ public:
bool IsLooping() const; bool IsLooping() const;
private: private:
status_t Init(const entry_ref * inFile);
status_t Init(const void* inData, int64 inFrameCount,
const gs_audio_format* format);
/* leave these declarations private unless you plan on actually implementing and using them. */
BSimpleGameSound(); BSimpleGameSound();
BSimpleGameSound& operator=(const BSimpleGameSound&); BSimpleGameSound& operator=(const BSimpleGameSound& other);
// not implemented
/* fbc data and virtuals */ status_t Init(const entry_ref* file);
status_t Init(const void* data, int64 frameCount,
uint32 _reserved_BSimpleGameSound_[12]; const gs_audio_format* format);
virtual status_t _Reserved_BSimpleGameSound_0(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_0(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_1(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_1(int32 arg, ...);
@@ -72,7 +68,9 @@ public:
virtual status_t _Reserved_BSimpleGameSound_22(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_22(int32 arg, ...);
virtual status_t _Reserved_BSimpleGameSound_23(int32 arg, ...); virtual status_t _Reserved_BSimpleGameSound_23(int32 arg, ...);
private:
uint32 _reserved[12];
}; };
#endif // _SIMPLE_GAME_SOUND_H
#endif // _SIMPLE_GAME_SOUND_H
+30 -61
View File
@@ -1,96 +1,57 @@
//------------------------------------------------------------------------------ /*
// Copyright (c) 2001-2002, OpenBeOS * Copyright 2001-2002, Haiku Inc. All Rights Reserved.
// * Distributed under the terms of the MIT License.
// Permission is hereby granted, free of charge, to any person obtaining a *
// copy of this software and associated documentation files (the "Software"), * Author:
// to deal in the Software without restriction, including without limitation * Christopher ML Zumwalt May ([email protected])
// the rights to use, copy, modify, merge, publish, distribute, sublicense, */
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// File Name: StreamingGameSound.h
// Author: Christopher ML Zumwalt May ([email protected])
// Description: BStreamingGameSound is a class for all kinds of streaming
// (data not known beforehand) game sounds.
//------------------------------------------------------------------------------
#ifndef _STREAMINGGAMESOUND_H #ifndef _STREAMINGGAMESOUND_H
#define _STREAMINGGAMESOUND_H #define _STREAMINGGAMESOUND_H
// Standard Includes -----------------------------------------------------------
// System Includes -------------------------------------------------------------
#include <SupportDefs.h> #include <SupportDefs.h>
#include <GameSound.h> #include <GameSound.h>
#include <Locker.h> #include <Locker.h>
// Project Includes ------------------------------------------------------------
// Local Includes -------------------------------------------------------------- class BStreamingGameSound : public BGameSound {
// Local Defines ---------------------------------------------------------------
// Globals ---------------------------------------------------------------------
class BStreamingGameSound : public BGameSound
{
public: public:
BStreamingGameSound(size_t inBufferFrameCount, BStreamingGameSound(size_t bufferFrameCount,
const gs_audio_format* format, const gs_audio_format* format,
size_t inBufferCount = 2, size_t bufferCount = 2,
BGameSoundDevice* device = NULL); BGameSoundDevice* device = NULL);
virtual ~BStreamingGameSound(); virtual ~BStreamingGameSound();
virtual BGameSound* Clone() const; virtual BGameSound* Clone() const;
virtual status_t SetStreamHook(void (*hook)(void * inCookie, void * inBuffer, size_t inByteCount, BStreamingGameSound * me), virtual status_t SetStreamHook(void (*hook)(void* cookie,
void* buffer, size_t byteCount,
BStreamingGameSound* me),
void* cookie); void* cookie);
virtual void FillBuffer(void * inBuffer, virtual void FillBuffer(void* buffer, size_t byteCount);
size_t inByteCount);
virtual status_t SetAttributes(gs_attribute * inAttributes, virtual status_t SetAttributes(gs_attribute* attributes,
size_t inAttributeCount); size_t attributeCount);
virtual status_t Perform(int32 selector, void* data); virtual status_t Perform(int32 selector, void* data);
protected: protected:
BStreamingGameSound(BGameSoundDevice* device); BStreamingGameSound(BGameSoundDevice* device);
virtual status_t SetParameters(size_t inBufferFrameCount, virtual status_t SetParameters(size_t bufferFrameCount,
const gs_audio_format* format, const gs_audio_format* format,
size_t inBufferCount); size_t bufferCount);
bool Lock(); bool Lock();
void Unlock(); void Unlock();
private: private:
void (*fStreamHook)(void * cookie, void * buffer, size_t bytes, BStreamingGameSound * sound);
void * fStreamCookie;
BLocker fLock;
/* leave these declarations private unless you plan on actually implementing and using them. */
BStreamingGameSound(); BStreamingGameSound();
BStreamingGameSound(const BStreamingGameSound&); BStreamingGameSound(
BStreamingGameSound& operator=(const BStreamingGameSound&); const BStreamingGameSound& other);
BStreamingGameSound& operator=(const BStreamingGameSound& other);
/* fbc data and virtuals */ // not implemented
uint32 _reserved_BStreamingGameSound_[12];
virtual status_t _Reserved_BStreamingGameSound_0(int32 arg,...); virtual status_t _Reserved_BStreamingGameSound_0(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_1(int32 arg,...); virtual status_t _Reserved_BStreamingGameSound_1(int32 arg,...);
@@ -117,6 +78,14 @@ virtual status_t _Reserved_BStreamingGameSound_21(int32 arg, ...);
virtual status_t _Reserved_BStreamingGameSound_22(int32 arg,...); virtual status_t _Reserved_BStreamingGameSound_22(int32 arg,...);
virtual status_t _Reserved_BStreamingGameSound_23(int32 arg,...); virtual status_t _Reserved_BStreamingGameSound_23(int32 arg,...);
private:
void (*fStreamHook)(void* cookie, void* buffer,
size_t bytes, BStreamingGameSound* sound);
void* fStreamCookie;
BLocker fLock;
uint32 _reserved[12];
}; };
#endif // _STREAMING_GAME_SOUND_H #endif // _STREAMING_GAME_SOUND_H
+13 -25
View File
@@ -1,43 +1,35 @@
//---------------------------------------------------------------------- /*
// This software is part of the OpenBeOS distribution and is covered * Copyright 2001-2010, Haiku Inc.
// by the OpenBeOS license. * Distributed under the terms of the MIT License.
//---------------------------------------------------------------------
/*!
\file EntryList.h
BEntryList interface declaration.
*/ */
#ifndef _ENTRY_LIST_H #ifndef _ENTRY_LIST_H
#define _ENTRY_LIST_H #define _ENTRY_LIST_H
#include <dirent.h> #include <dirent.h>
#include <SupportDefs.h> #include <SupportDefs.h>
#ifdef USE_OPENBEOS_NAMESPACE
namespace OpenBeOS {
#endif
// Forward declarations
class BEntry; class BEntry;
struct entry_ref; struct entry_ref;
//! Interface for iterating through a list of filesystem entries
/*! Defines a general interface for iterating through a list of entries (i.e.
files in a folder
@author <a href='mailto:[email protected]'>Tyler Dauwalder</a> /*! Interface for iterating through a list of filesystem entries
@author Be Inc. Defines a general interface for iterating through a list of entries (i.e.
@version 0.0.0 files in a folder
*/ */
class BEntryList { class BEntryList {
public: public:
BEntryList(); BEntryList();
virtual ~BEntryList(); virtual ~BEntryList();
virtual status_t GetNextEntry(BEntry *entry, bool traverse = false) = 0; virtual status_t GetNextEntry(BEntry* entry,
bool traverse = false) = 0;
virtual status_t GetNextRef(entry_ref* ref) = 0; virtual status_t GetNextRef(entry_ref* ref) = 0;
virtual int32 GetNextDirents(struct dirent *buf, size_t length, virtual int32 GetNextDirents(struct dirent* direntBuffer,
int32 count = INT_MAX) = 0; size_t bufferSize,
int32 maxEntries = INT_MAX) = 0;
virtual status_t Rewind() = 0; virtual status_t Rewind() = 0;
virtual int32 CountEntries() = 0; virtual int32 CountEntries() = 0;
@@ -50,12 +42,8 @@ private:
virtual void _ReservedEntryList6(); virtual void _ReservedEntryList6();
virtual void _ReservedEntryList7(); virtual void _ReservedEntryList7();
virtual void _ReservedEntryList8(); virtual void _ReservedEntryList8();
}; };
#ifdef USE_OPENBEOS_NAMESPACE
}; // namespace OpenBeOS
#endif
#endif // _ENTRY_LIST_H #endif // _ENTRY_LIST_H
+28 -40
View File
@@ -1,43 +1,31 @@
/* /*
* Copyright 2002-2006, Haiku, Inc. All Rights Reserved. * Copyright 2002-2010, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _NODE_INFO_H #ifndef _NODE_INFO_H
#define _NODE_INFO_H #define _NODE_INFO_H
#ifndef _BE_BUILD_H
#include <BeBuild.h>
#endif
#include <SupportDefs.h>
#include <Mime.h>
#include <Message.h>
#include <File.h>
#include <Entry.h>
#ifdef USE_OPENBEOS_NAMESPACE #include <BeBuild.h>
namespace OpenBeOS { #include <Entry.h>
#endif // USE_OPENBEOS_NAMESPACE #include <File.h>
#include <Message.h>
#include <Mime.h>
#include <SupportDefs.h>
class BBitmap; class BBitmap;
class BResources; class BResources;
//! BNodeInfo provides file type information /*! \brief BNodeInfo provides file type information
/*! BNodeInfo provides a nice wrapper to all sorts of usefull meta data. BNodeInfo provides a nice wrapper to all sorts of usefull meta data.
Like it's mime type, the files icon and the application which will load Like it's mime type, the files icon and the application which will load
the file. the file.
\see <a href="http://www.opensource.org/licenses/mit-license.html">MIT</a>
\author <a href='mailto:[email protected]'>Ingo Weinhold</a>
\author <a href="mailto:[email protected]"> Michael Lloyd Lee </a>
\author Be Inc
\version 0
*/ */
class BNodeInfo { class BNodeInfo {
public: public:
BNodeInfo(); BNodeInfo();
BNodeInfo(BNode* node); BNodeInfo(BNode* node);
virtual ~BNodeInfo(); virtual ~BNodeInfo();
@@ -47,9 +35,12 @@ public:
virtual status_t GetType(char* type) const; virtual status_t GetType(char* type) const;
virtual status_t SetType(const char* type); virtual status_t SetType(const char* type);
virtual status_t GetIcon(BBitmap *icon, icon_size k = B_LARGE_ICON) const; virtual status_t GetIcon(BBitmap* icon,
virtual status_t SetIcon(const BBitmap *icon, icon_size k = B_LARGE_ICON); icon_size size = B_LARGE_ICON) const;
status_t GetIcon(uint8** data, size_t* size, type_code* type) const; virtual status_t SetIcon(const BBitmap* icon,
icon_size size = B_LARGE_ICON);
status_t GetIcon(uint8** data, size_t* size,
type_code* type) const;
status_t SetIcon(const uint8* data, size_t size); status_t SetIcon(const uint8* data, size_t size);
status_t GetPreferredApp(char* signature, status_t GetPreferredApp(char* signature,
@@ -60,29 +51,26 @@ public:
status_t SetAppHint(const entry_ref* ref); status_t SetAppHint(const entry_ref* ref);
status_t GetTrackerIcon(BBitmap* icon, status_t GetTrackerIcon(BBitmap* icon,
icon_size k = B_LARGE_ICON) const; icon_size size = B_LARGE_ICON) const;
static status_t GetTrackerIcon(const entry_ref* ref, static status_t GetTrackerIcon(const entry_ref* ref,
BBitmap* icon, BBitmap* icon,
icon_size k = B_LARGE_ICON); icon_size size = B_LARGE_ICON);
private: private:
friend class BAppFileInfo; friend class BAppFileInfo;
virtual void _ReservedNodeInfo1(); //< FBC virtual void _ReservedNodeInfo1();
virtual void _ReservedNodeInfo2(); //< FBC virtual void _ReservedNodeInfo2();
virtual void _ReservedNodeInfo3(); //< FBC virtual void _ReservedNodeInfo3();
BNodeInfo &operator=(const BNodeInfo &); BNodeInfo &operator=(const BNodeInfo& other);
BNodeInfo(const BNodeInfo &); BNodeInfo(const BNodeInfo& other);
// not implemented
BNode *fNode; //< The Node in question private:
uint32 _reserved[2]; //< FBC BNode* fNode;
status_t fCStatus; //< The status to return from InitCheck uint32 _reserved[2];
status_t fCStatus;
}; };
#ifdef USE_OPENBEOS_NAMESPACE
}
#endif // USE_OPENBEOS_NAMESPACE
#endif // _NODE_INFO_H #endif // _NODE_INFO_H
+26 -32
View File
@@ -1,31 +1,23 @@
//---------------------------------------------------------------------- /*
// This software is part of the OpenBeOS distribution and is covered * Copyright 2001-2010, Haiku Inc.
// by the OpenBeOS license. * Distributed under the terms of the MIT License.
//---------------------------------------------------------------------
/*!
\file ResourceStrings.h
BResourceStrings interface declaration.
*/ */
#ifndef _RESOURCE_STRINGS_H #ifndef _RESOURCE_STRINGS_H
#define _RESOURCE_STRINGS_H #define _RESOURCE_STRINGS_H
#include <Entry.h> #include <Entry.h>
#include <Locker.h> #include <Locker.h>
class BResources; class BResources;
class BString; class BString;
/*!
\class BResourceStrings /*! \brief Simple class to access the string resources in a file.
\brief Simple class to access the string resources in a file.
A BResourceStrings object reads the string type resources from a given A BResourceStrings object reads the string type resources from a given
resource file and provides fast read only access to them. resource file and provides fast read only access to them.
\author <a href='mailto:[email protected]'>Ingo Weinhold</a>
\version 0.0.0
*/ */
class BResourceStrings { class BResourceStrings {
public: public:
@@ -40,7 +32,6 @@ public:
virtual status_t SetStringFile(const entry_ref* ref); virtual status_t SetStringFile(const entry_ref* ref);
status_t GetStringFile(entry_ref* outRef); status_t GetStringFile(entry_ref* outRef);
public:
enum { enum {
RESOURCE_TYPE = 'CSTR' RESOURCE_TYPE = 'CSTR'
}; };
@@ -49,7 +40,9 @@ protected:
struct _string_id_hash { struct _string_id_hash {
_string_id_hash(); _string_id_hash();
~_string_id_hash(); ~_string_id_hash();
void assign_string(const char* str, bool makeCopy); void assign_string(const char* str, bool makeCopy);
_string_id_hash* next; _string_id_hash* next;
int32 id; int32 id;
char* data; char* data;
@@ -58,6 +51,22 @@ protected:
uint32 _reserved2; uint32 _reserved2;
}; };
private:
void _Cleanup();
void _MakeEmpty();
status_t _Rehash(int32 newSize);
_string_id_hash* _AddString(char* str, int32 id,
bool wasMalloced);
virtual _string_id_hash* _FindString(int32 id);
virtual status_t _Reserved_ResourceStrings_0(void*);
virtual status_t _Reserved_ResourceStrings_1(void*);
virtual status_t _Reserved_ResourceStrings_2(void*);
virtual status_t _Reserved_ResourceStrings_3(void*);
virtual status_t _Reserved_ResourceStrings_4(void*);
virtual status_t _Reserved_ResourceStrings_5(void*);
protected: protected:
BLocker _string_lock; BLocker _string_lock;
status_t _init_error; status_t _init_error;
@@ -69,24 +78,9 @@ private:
int32 fHashTableSize; int32 fHashTableSize;
int32 fStringCount; int32 fStringCount;
uint32 _reserved[16]; // FBC uint32 _reserved[16]; // FBC
private:
void _Cleanup();
void _MakeEmpty();
status_t _Rehash(int32 newSize);
_string_id_hash *_AddString(char *str, int32 id, bool wasMalloced);
virtual _string_id_hash *_FindString(int32 id);
// FBC
virtual status_t _Reserved_ResourceStrings_0(void *);
virtual status_t _Reserved_ResourceStrings_1(void *);
virtual status_t _Reserved_ResourceStrings_2(void *);
virtual status_t _Reserved_ResourceStrings_3(void *);
virtual status_t _Reserved_ResourceStrings_4(void *);
virtual status_t _Reserved_ResourceStrings_5(void *);
}; };
#endif // _RESOURCE_STRINGS_H #endif // _RESOURCE_STRINGS_H
+8 -18
View File
@@ -1,29 +1,20 @@
// ---------------------------------------------------------------------- /*
// This software is part of the OpenBeOS distribution and is covered * Copyright 2002-2010, Haiku, Inc. All Rights Reserved.
// by the OpenBeOS license. * Distributed under the terms of the MIT License.
//
// File Name: VolumeRoster.h
//
// Description: BVolumeRoster class
// ----------------------------------------------------------------------
/*!
\file VolumeRoster.h
BVolumeRoster interface declarations.
*/ */
#ifndef _VOLUME_ROSTER_H #ifndef _VOLUME_ROSTER_H
#define _VOLUME_ROSTER_H #define _VOLUME_ROSTER_H
#include <Application.h> #include <Application.h>
#include <SupportDefs.h> #include <SupportDefs.h>
#include <Volume.h> #include <Volume.h>
#ifdef USE_OPENBEOS_NAMESPACE
namespace OpenBeOS {
#endif
class BVolume; class BVolume;
class BMessenger; class BMessenger;
class BVolumeRoster { class BVolumeRoster {
public: public:
BVolumeRoster(); BVolumeRoster();
@@ -34,7 +25,8 @@ public:
status_t GetBootVolume(BVolume* volume); status_t GetBootVolume(BVolume* volume);
status_t StartWatching(BMessenger messenger = be_app_messenger); status_t StartWatching(
BMessenger messenger = be_app_messenger);
void StopWatching(); void StopWatching();
BMessenger Messenger() const; BMessenger Messenger() const;
@@ -42,13 +34,11 @@ private:
virtual void _SeveredVRoster1(); virtual void _SeveredVRoster1();
virtual void _SeveredVRoster2(); virtual void _SeveredVRoster2();
private:
int32 fCookie; int32 fCookie;
BMessenger* fTarget; BMessenger* fTarget;
uint32 _reserved[3]; uint32 _reserved[3];
}; };
#ifdef USE_OPENBEOS_NAMESPACE
}
#endif
#endif // _VOLUME_ROSTER_H #endif // _VOLUME_ROSTER_H
+4 -2
View File
@@ -1,6 +1,6 @@
/* /*
* Copyright 2004, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the Haiku License. * Distributed under the terms of the MIT License.
*/ */
#ifndef __FORK_H__ #ifndef __FORK_H__
#define __FORK_H__ #define __FORK_H__
@@ -14,10 +14,12 @@ extern "C" {
#endif #endif
extern status_t __init_fork(void); extern status_t __init_fork(void);
extern status_t __register_atfork(void( *prepare)( void), void( *parent)( void), void( *child)( void)); extern status_t __register_atfork(void(*prepare)(void), void(*parent)(void),
void(*child)(void));
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* __FORK_H__ */ #endif /* __FORK_H__ */
+1 -1
View File
@@ -1,6 +1,6 @@
/* /*
* Copyright 2003, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2003, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _UNICODE_PROPERTIES_H_ #ifndef _UNICODE_PROPERTIES_H_
#define _UNICODE_PROPERTIES_H_ #define _UNICODE_PROPERTIES_H_
+1 -1
View File
@@ -1,5 +1,5 @@
/* /*
* Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _NL_TYPES_H_ #ifndef _NL_TYPES_H_
#define _NL_TYPES_H_ #define _NL_TYPES_H_
+7 -4
View File
@@ -1,6 +1,6 @@
/* /*
* Copyright 2004, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#ifndef META_FORMAT_H #ifndef META_FORMAT_H
#define META_FORMAT_H #define META_FORMAT_H
@@ -19,7 +19,8 @@ namespace media {
struct meta_format { struct meta_format {
meta_format(); meta_format();
meta_format(const media_format_description &description, const media_format &format, int32 id); meta_format(const media_format_description &description,
const media_format &format, int32 id);
meta_format(const media_format_description &description); meta_format(const media_format_description &description);
meta_format(const meta_format &other); meta_format(const meta_format &other);
@@ -32,8 +33,10 @@ struct meta_format {
int32 id; int32 id;
}; };
typedef status_t (*_MakeFormatHookFunc)(const media_format_description *descriptions, typedef status_t (*_MakeFormatHookFunc)(
int32 descriptionsCount, media_format *format, uint32 flags); const media_format_description *descriptions, int32 descriptionsCount,
media_format *format, uint32 flags);
extern _MakeFormatHookFunc _gMakeFormatHook; extern _MakeFormatHookFunc _gMakeFormatHook;
} // namespace media } // namespace media
+1 -1
View File
@@ -1,6 +1,6 @@
/* /*
* Copyright 2004, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _MIME_TYPES_H #ifndef _MIME_TYPES_H
#define _MIME_TYPES_H #define _MIME_TYPES_H
+3 -1
View File
@@ -1,10 +1,11 @@
/* /*
* Copyright 2004, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the Haiku License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _KERNEL_REAL_TIME_DATA_H #ifndef _KERNEL_REAL_TIME_DATA_H
#define _KERNEL_REAL_TIME_DATA_H #define _KERNEL_REAL_TIME_DATA_H
#include <StorageDefs.h> #include <StorageDefs.h>
#include <SupportDefs.h> #include <SupportDefs.h>
@@ -15,4 +16,5 @@ struct real_time_data {
struct arch_real_time_data arch_data; struct arch_real_time_data arch_data;
}; };
#endif /* _KERNEL_REAL_TIME_DATA_H */ #endif /* _KERNEL_REAL_TIME_DATA_H */
@@ -1,14 +1,16 @@
/* /*
* Copyright 2004, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
* Distributed under the terms of the Haiku License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _SYSTEM_SYSCALL_PROCESS_INFO_H #ifndef _SYSTEM_SYSCALL_PROCESS_INFO_H
#define _SYSTEM_SYSCALL_PROCESS_INFO_H #define _SYSTEM_SYSCALL_PROCESS_INFO_H
enum which_process_info { enum which_process_info {
SESSION_ID = 1, SESSION_ID = 1,
GROUP_ID, GROUP_ID,
PARENT_ID, PARENT_ID,
}; };
#endif /* _SYSTEM_SYSCALL_PROCESS_INFO_H */ #endif /* _SYSTEM_SYSCALL_PROCESS_INFO_H */