changed comment style
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2863 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,9 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* @file MidiConsumer.cpp
|
* Copyright (c) 2002-2003 Matthijs Hollemans
|
||||||
*
|
|
||||||
* Implementation of the BMidiConsumer class.
|
|
||||||
*
|
|
||||||
* @author Matthijs Hollemans
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* @file MidiEndpoint.cpp
|
* Copyright (c) 2002-2003 Matthijs Hollemans
|
||||||
*
|
|
||||||
* Implementation of the BMidiEndpoint class.
|
|
||||||
*
|
|
||||||
* @author Matthijs Hollemans
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* @file MidiLocalConsumer.cpp
|
* Copyright (c) 2002-2003 Matthijs Hollemans
|
||||||
*
|
|
||||||
* Implementation of the BMidiLocalConsumer class.
|
|
||||||
*
|
|
||||||
* @author Matthijs Hollemans
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* @file MidiLocalProducer.cpp
|
* Copyright (c) 2002-2003 Matthijs Hollemans
|
||||||
*
|
|
||||||
* Implementation of the BMidiLocalProducer class.
|
|
||||||
*
|
|
||||||
* @author Matthijs Hollemans
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* @file MidiProducer.cpp
|
* Copyright (c) 2002-2003 Matthijs Hollemans
|
||||||
*
|
|
||||||
* Implementation of the BMidiProducer class.
|
|
||||||
*
|
|
||||||
* @author Matthijs Hollemans
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* @file MidiRoster.cpp
|
* Copyright (c) 2002-2003 Matthijs Hollemans
|
||||||
*
|
|
||||||
* Implementation of the BMidiRoster class.
|
|
||||||
*
|
|
||||||
* @author Matthijs Hollemans
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
@@ -18,22 +14,20 @@
|
|||||||
// For backwards compatibility's sake, we export those symbols
|
// For backwards compatibility's sake, we export those symbols
|
||||||
// as well, even though we do not use them for anything.
|
// as well, even though we do not use them for anything.
|
||||||
|
|
||||||
/** Not used. For backwards compatibility only. */
|
// Not used. For backwards compatibility only.
|
||||||
int32 midi_debug_level = 0;
|
int32 midi_debug_level = 0;
|
||||||
|
|
||||||
/** Not used. For backwards compatibility only. */
|
// Not used. For backwards compatibility only.
|
||||||
int32 midi_dispatcher_priority = B_REAL_TIME_PRIORITY;
|
int32 midi_dispatcher_priority = B_REAL_TIME_PRIORITY;
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
// The one and only BMidiRoster instance, which is created
|
||||||
* The one and only BMidiRoster instance, which is created
|
// the first time the client app calls MidiRoster(). It is
|
||||||
* the first time the client app calls MidiRoster(). It is
|
// destroyed by the BMidiRosterKiller when the app quits.
|
||||||
* destroyed by the BMidiRosterKiller when the app quits.
|
|
||||||
*/
|
|
||||||
static BMidiRoster* roster = NULL;
|
static BMidiRoster* roster = NULL;
|
||||||
|
|
||||||
/** Destroys the BMidiRoster instance when the app quits. */
|
// Destroys the BMidiRoster instance when the app quits.
|
||||||
static class BMidiRosterKiller
|
static class BMidiRosterKiller
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* @file MidiRosterLooper.cpp
|
* Copyright (c) 2002-2003 Matthijs Hollemans
|
||||||
*
|
|
||||||
* Implementation of the BMidiRosterLooper class.
|
|
||||||
*
|
|
||||||
* @author Matthijs Hollemans
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* @file MidiRosterLooper.h
|
* Copyright (c) 2002-2003 Matthijs Hollemans
|
||||||
*
|
|
||||||
* @author Matthijs Hollemans
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MIDI_ROSTER_LOOPER_H
|
#ifndef MIDI_ROSTER_LOOPER_H
|
||||||
@@ -12,10 +10,8 @@
|
|||||||
|
|
||||||
class BMidiRoster;
|
class BMidiRoster;
|
||||||
|
|
||||||
/**
|
// Receives messages from the midi_server on behalf of the
|
||||||
* Receives messages from the midi_server on behalf of the
|
// BMidiRoster. Also keeps track of the list of endpoints.
|
||||||
* BMidiRoster. Also keeps track of the list of endpoints.
|
|
||||||
*/
|
|
||||||
class BMidiRosterLooper : public BLooper
|
class BMidiRosterLooper : public BLooper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -23,38 +19,32 @@ public:
|
|||||||
BMidiRosterLooper();
|
BMidiRosterLooper();
|
||||||
virtual ~BMidiRosterLooper();
|
virtual ~BMidiRosterLooper();
|
||||||
|
|
||||||
/** Starts up the looper. */
|
// Starts up the looper.
|
||||||
bool Init(BMidiRoster* roster);
|
bool Init(BMidiRoster* roster);
|
||||||
|
|
||||||
/** Does the work for BMidiRoster::NextEndpoint(). */
|
// Does the work for BMidiRoster::NextEndpoint().
|
||||||
BMidiEndpoint* NextEndpoint(int32* id);
|
BMidiEndpoint* NextEndpoint(int32* id);
|
||||||
|
|
||||||
/** Finds an endpoint in our list of endpoints. */
|
// Finds an endpoint in our list of endpoints.
|
||||||
BMidiEndpoint* FindEndpoint(int32 id);
|
BMidiEndpoint* FindEndpoint(int32 id);
|
||||||
|
|
||||||
/** Adds an endpoint to our list. */
|
// Adds an endpoint to our list.
|
||||||
void AddEndpoint(BMidiEndpoint* endp);
|
void AddEndpoint(BMidiEndpoint* endp);
|
||||||
|
|
||||||
/**
|
// Removes an endpoint from our list. Throws away
|
||||||
* Removes an endpoint from our list. Throws away
|
// any connections that this endpoint is part of.
|
||||||
* any connections that this endpoint is part of.
|
|
||||||
*/
|
|
||||||
void RemoveEndpoint(BMidiEndpoint* endp);
|
void RemoveEndpoint(BMidiEndpoint* endp);
|
||||||
|
|
||||||
/**
|
// Invoked when the client app wants to be kept informed
|
||||||
* Invoked when the client app wants to be kept informed
|
// about changes in the roster. From now on, we will send
|
||||||
* about changes in the roster. From now on, we will send
|
// the messenger B_MIDI_EVENT notifications when something
|
||||||
* the messenger B_MIDI_EVENT notifications when something
|
// interesting happens. But first, we send a whole bunch
|
||||||
* interesting happens. But first, we send a whole bunch
|
// of notifications about the registered remote endpoints,
|
||||||
* of notifications about the registered remote endpoints,
|
// and the connections between them.
|
||||||
* and the connections between them.
|
|
||||||
*/
|
|
||||||
void StartWatching(const BMessenger* watcher);
|
void StartWatching(const BMessenger* watcher);
|
||||||
|
|
||||||
/**
|
// From now on, we will no longer send notifications to
|
||||||
* From now on, we will no longer send notifications to
|
// the client when something interesting happens.
|
||||||
* the client when something interesting happens.
|
|
||||||
*/
|
|
||||||
void StopWatching();
|
void StopWatching();
|
||||||
|
|
||||||
virtual void MessageReceived(BMessage* msg);
|
virtual void MessageReceived(BMessage* msg);
|
||||||
@@ -77,46 +67,34 @@ private:
|
|||||||
void ChangeProperties(BMessage* msg, BMidiEndpoint* endp);
|
void ChangeProperties(BMessage* msg, BMidiEndpoint* endp);
|
||||||
void ChangeLatency(BMessage* msg, BMidiEndpoint* endp);
|
void ChangeLatency(BMessage* msg, BMidiEndpoint* endp);
|
||||||
|
|
||||||
/**
|
// Removes the consumer from the list of connections of
|
||||||
* Removes the consumer from the list of connections of
|
// all the producers it is connected to. Also sends out
|
||||||
* all the producers it is connected to. Also sends out
|
// B_MIDI_EVENT "disconnected" notifications if the
|
||||||
* B_MIDI_EVENT "disconnected" notifications if the
|
// consumer is remote and the client is watching.
|
||||||
* consumer is remote and the client is watching.
|
|
||||||
*/
|
|
||||||
void DisconnectDeadConsumer(BMidiConsumer* cons);
|
void DisconnectDeadConsumer(BMidiConsumer* cons);
|
||||||
|
|
||||||
/**
|
// Sends out B_MIDI_EVENT "disconnected" notifications
|
||||||
* Sends out B_MIDI_EVENT "disconnected" notifications
|
// if the producer is remote and the client is watching.
|
||||||
* if the producer is remote and the client is watching.
|
|
||||||
*/
|
|
||||||
void DisconnectDeadProducer(BMidiProducer* prod);
|
void DisconnectDeadProducer(BMidiProducer* prod);
|
||||||
|
|
||||||
/**
|
// Sends B_MIDI_EVENT notifications for all registered
|
||||||
* Sends B_MIDI_EVENT notifications for all registered
|
// remote endpoints to the watcher. Used when the client
|
||||||
* remote endpoints to the watcher. Used when the client
|
// calls StartWatching().
|
||||||
* calls StartWatching().
|
|
||||||
*/
|
|
||||||
void AllEndpoints();
|
void AllEndpoints();
|
||||||
|
|
||||||
/**
|
// Sends B_MIDI_EVENT notifications for the connections
|
||||||
* Sends B_MIDI_EVENT notifications for the connections
|
// between all registered remote endpoints to the watcher.
|
||||||
* between all registered remote endpoints to the watcher.
|
// Used when the client calls StartWatching().
|
||||||
* Used when the client calls StartWatching().
|
|
||||||
*/
|
|
||||||
void AllConnections();
|
void AllConnections();
|
||||||
|
|
||||||
/**
|
// Sends a B_MIDI_EVENT notification to the watcher
|
||||||
* Sends a B_MIDI_EVENT notification to the watcher
|
// when another application changes the attributes
|
||||||
* when another application changes the attributes
|
// of one of its endpoints.
|
||||||
* of one of its endpoints.
|
|
||||||
*/
|
|
||||||
void ChangeEvent(BMessage* msg, BMidiEndpoint* endp);
|
void ChangeEvent(BMessage* msg, BMidiEndpoint* endp);
|
||||||
|
|
||||||
/**
|
// Sends a B_MIDI_EVENT notification to the watcher
|
||||||
* Sends a B_MIDI_EVENT notification to the watcher
|
// when another application connects or disconnects
|
||||||
* when another application connects or disconnects
|
// the two endpoints.
|
||||||
* the two endpoints.
|
|
||||||
*/
|
|
||||||
void ConnectionEvent(
|
void ConnectionEvent(
|
||||||
BMidiProducer* prod, BMidiConsumer* cons, bool mustConnect);
|
BMidiProducer* prod, BMidiConsumer* cons, bool mustConnect);
|
||||||
|
|
||||||
@@ -125,16 +103,14 @@ private:
|
|||||||
|
|
||||||
BMidiRoster* roster;
|
BMidiRoster* roster;
|
||||||
|
|
||||||
/**
|
// Makes sure BMidiRoster::MidiRoster() does not return
|
||||||
* Makes sure BMidiRoster::MidiRoster() does not return
|
// until confirmation from the midi_server is received.
|
||||||
* until confirmation from the midi_server is received.
|
|
||||||
*/
|
|
||||||
sem_id initLock;
|
sem_id initLock;
|
||||||
|
|
||||||
/** The object we send B_MIDI_EVENT notifications to. */
|
// The object we send B_MIDI_EVENT notifications to.
|
||||||
BMessenger* watcher;
|
BMessenger* watcher;
|
||||||
|
|
||||||
/** All the endpoints in the system, local and remote. */
|
// All the endpoints in the system, local and remote.
|
||||||
BList endpoints;
|
BList endpoints;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|||||||
Reference in New Issue
Block a user