diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2011-07-30 04:34:09 +0400 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2011-07-30 04:34:09 +0400 |
commit | ece344bfcd2c43cfd0e5e2a2f1291ba8e969141e (patch) | |
tree | 8a0c349fe26ecfb965dd96250d1197a4ad3c0b24 /src/MumbleKit | |
parent | 1947ec2ba171c07c45c4830aa24fdbe45abf2ac4 (diff) |
Don't expose ivars in class @interfaces in public headers.
Diffstat (limited to 'src/MumbleKit')
-rw-r--r-- | src/MumbleKit/MKAudio.h | 7 | ||||
-rw-r--r-- | src/MumbleKit/MKAudioInput.h | 43 | ||||
-rw-r--r-- | src/MumbleKit/MKAudioOutput.h | 14 | ||||
-rw-r--r-- | src/MumbleKit/MKAudioOutputSpeech.h | 32 | ||||
-rw-r--r-- | src/MumbleKit/MKAudioOutputUser.h | 9 | ||||
-rw-r--r-- | src/MumbleKit/MKCertificate.h | 14 | ||||
-rw-r--r-- | src/MumbleKit/MKChannel.h | 13 | ||||
-rw-r--r-- | src/MumbleKit/MKConnection.h | 39 | ||||
-rw-r--r-- | src/MumbleKit/MKConnectionController.h | 4 | ||||
-rw-r--r-- | src/MumbleKit/MKCryptState.h | 5 | ||||
-rw-r--r-- | src/MumbleKit/MKPacketDataStream.h | 10 | ||||
-rw-r--r-- | src/MumbleKit/MKReadWriteLock.h | 4 | ||||
-rw-r--r-- | src/MumbleKit/MKServerModel.h | 9 | ||||
-rw-r--r-- | src/MumbleKit/MKServerPinger.h | 6 | ||||
-rw-r--r-- | src/MumbleKit/MKUser.h | 22 |
15 files changed, 16 insertions, 215 deletions
diff --git a/src/MumbleKit/MKAudio.h b/src/MumbleKit/MKAudio.h index c62030e..38bbafc 100644 --- a/src/MumbleKit/MKAudio.h +++ b/src/MumbleKit/MKAudio.h @@ -58,12 +58,7 @@ typedef struct _MKAudioBenchmark { signed long avgPreprocessorRuntime; } MKAudioBenchmark; -@interface MKAudio : NSObject { - MKAudioInput *_audioInput; - MKAudioOutput *_audioOutput; - MKAudioSettings _audioSettings; - BOOL _running; -} +@interface MKAudio : NSObject + (MKAudio *) sharedAudio; diff --git a/src/MumbleKit/MKAudioInput.h b/src/MumbleKit/MKAudioInput.h index b6cec70..a959fa1 100644 --- a/src/MumbleKit/MKAudioInput.h +++ b/src/MumbleKit/MKAudioInput.h @@ -34,47 +34,7 @@ #import <AudioUnit/AUComponent.h> #import <AudioToolbox/AudioToolbox.h> -struct MKAudioInputPrivate; - -@interface MKAudioInput : NSObject { - @private - struct MKAudioInputPrivate *_private; - - @public - AudioUnit audioUnit; - AudioBufferList buflist; - int micSampleSize; - int numMicChannels; - - @protected - MKAudioSettings _settings; - - int frameSize; - int micFrequency; - int sampleRate; - - int micFilled; - int micLength; - BOOL previousVoice; - int bitrate; - int frameCounter; - - BOOL doResetPreprocessor; - - short *psMic; - short *psOut; - - MKUDPMessageType udpMessageType; - NSMutableArray *frameList; - - MKCodecFormat _codecFormat; - BOOL _doTransmit; - BOOL _forceTransmit; - BOOL _lastTransmit; - - signed long _preprocRunningAvg; - signed long _preprocAvgItems; -} +@interface MKAudioInput : NSObject - (id) initWithSettings:(MKAudioSettings *)settings; - (void) dealloc; @@ -94,5 +54,4 @@ struct MKAudioInputPrivate; - (signed long) preprocessorAvgRuntime; - @end diff --git a/src/MumbleKit/MKAudioOutput.h b/src/MumbleKit/MKAudioOutput.h index 281a0f7..8a474a1 100644 --- a/src/MumbleKit/MKAudioOutput.h +++ b/src/MumbleKit/MKAudioOutput.h @@ -41,19 +41,7 @@ @class MKUser; -@interface MKAudioOutput : NSObject { - MKAudioSettings _settings; - - AudioUnit audioUnit; - int sampleSize; - int frameSize; - int mixerFrequency; - int numChannels; - float *speakerVolume; - - MKReadWriteLock *outputLock; - NSMutableDictionary *outputs; -} +@interface MKAudioOutput : NSObject - (id) initWithSettings:(MKAudioSettings *)settings; - (void) dealloc; diff --git a/src/MumbleKit/MKAudioOutputSpeech.h b/src/MumbleKit/MKAudioOutputSpeech.h index ca5408c..3c335c1 100644 --- a/src/MumbleKit/MKAudioOutputSpeech.h +++ b/src/MumbleKit/MKAudioOutputSpeech.h @@ -36,37 +36,7 @@ struct MKAudioOutputSpeechPrivate; -@interface MKAudioOutputSpeech : MKAudioOutputUser { - @private - struct MKAudioOutputSpeechPrivate *_private; - - @protected - MKUDPMessageType messageType; - NSUInteger bufferOffset; - NSUInteger bufferFilled; - NSUInteger outputSize; - NSUInteger lastConsume; - NSUInteger frameSize; - BOOL lastAlive; - BOOL hasTerminator; - - float *fadeIn; - float *fadeOut; - - NSInteger missCount; - NSInteger missedFrames; - - NSMutableArray *frames; - unsigned char flags; - - NSUInteger _userSession; - float powerMin, powerMax; - float averageAvailable; - - MKTalkState _talkState; - - pthread_mutex_t jitterMutex; -} +@interface MKAudioOutputSpeech : MKAudioOutputUser - (id) initWithSession:(NSUInteger)session sampleRate:(NSUInteger)freq messageType:(MKMessageType)type; - (void) dealloc; diff --git a/src/MumbleKit/MKAudioOutputUser.h b/src/MumbleKit/MKAudioOutputUser.h index 376a222..60a9baf 100644 --- a/src/MumbleKit/MKAudioOutputUser.h +++ b/src/MumbleKit/MKAudioOutputUser.h @@ -32,13 +32,7 @@ #import <MumbleKit/MKUser.h> #import <MumbleKit/MKAudioOutputUser.h> -@interface MKAudioOutputUser : NSObject { - NSString *name; - NSUInteger bufferSize; - float *buffer; - float *volume; - float pos[3]; -} +@interface MKAudioOutputUser : NSObject - (id) init; - (void) dealloc; @@ -47,7 +41,6 @@ - (float *) buffer; - (NSUInteger) bufferLength; - - (BOOL) needSamples:(NSUInteger)nsamples; - (void) resizeBuffer:(NSUInteger)newSize; diff --git a/src/MumbleKit/MKCertificate.h b/src/MumbleKit/MKCertificate.h index e793159..2eb2607 100644 --- a/src/MumbleKit/MKCertificate.h +++ b/src/MumbleKit/MKCertificate.h @@ -34,19 +34,7 @@ #define MKCertificateItemOrganization @"O" #define MKCertificateItemSerialNumber @"serialNumber" -@interface MKCertificate : NSObject { - NSData *_derCert; - NSData *_derPrivKey; - - NSDictionary *_subjectDict; - NSDictionary *_issuerDict; - - NSDate *_notAfterDate; - NSDate *_notBeforeDate; - - NSMutableArray *_emailAddresses; - NSMutableArray *_dnsEntries; -} +@interface MKCertificate : NSObject + (MKCertificate *) certificateWithCertificate:(NSData *)cert privateKey:(NSData *)privkey; + (MKCertificate *) selfSignedCertificateWithName:(NSString *)name email:(NSString *)email; diff --git a/src/MumbleKit/MKChannel.h b/src/MumbleKit/MKChannel.h index a7b19be..922969a 100644 --- a/src/MumbleKit/MKChannel.h +++ b/src/MumbleKit/MKChannel.h @@ -32,18 +32,7 @@ @class MKUser; -@interface MKChannel : MKServerModelObject { - MKChannel *_parent; - NSUInteger _channelId; - NSString *_channelName; - BOOL _temporary; - NSInteger _position; - NSMutableArray *_channels; - NSMutableArray *_users; - NSMutableArray *_linked; - NSData *_channelDescriptionHash; - NSString *_channelDescription; -} +@interface MKChannel : MKServerModelObject - (id) init; - (void) dealloc; diff --git a/src/MumbleKit/MKConnection.h b/src/MumbleKit/MKConnection.h index e723e3a..1fa36f3 100644 --- a/src/MumbleKit/MKConnection.h +++ b/src/MumbleKit/MKConnection.h @@ -111,44 +111,7 @@ typedef enum { - (void) connection:(MKConnection *)conn handlePermissionQueryMessage: /* MPPermissionQuery */ (id)msg; @end -@interface MKConnection : NSThread <NSStreamDelegate> { - MKCryptState *_crypt; - - MKMessageType packetType; - int packetLength; - int packetBufferOffset; - NSMutableData *packetBuffer; - NSString *_hostname; - NSUInteger _port; - BOOL _keepRunning; - BOOL _reconnect; - - BOOL _forceTCP; - BOOL _udpAvailable; - unsigned long _connTime; - NSTimer *_pingTimer; - NSOutputStream *_outputStream; - NSInputStream *_inputStream; - BOOL _connectionEstablished; - BOOL _ignoreSSLVerification; - id _msgHandler; - id _delegate; - int _socket; - CFSocketRef _udpSock; - SecIdentityRef _clientIdentity; - - // Codec info - NSInteger _alphaCodec; - NSInteger _betaCodec; - BOOL _preferAlpha; - - // Server info. - NSString *_serverVersion; - NSString *_serverRelease; - NSString *_serverOSName; - NSString *_serverOSVersion; - NSMutableArray *_peerCertificates; -} +@interface MKConnection : NSThread <NSStreamDelegate> - (id) init; - (void) dealloc; diff --git a/src/MumbleKit/MKConnectionController.h b/src/MumbleKit/MKConnectionController.h index 3742ed4..694f6d0 100644 --- a/src/MumbleKit/MKConnectionController.h +++ b/src/MumbleKit/MKConnectionController.h @@ -30,9 +30,7 @@ #import <MumbleKit/MKConnection.h> -@interface MKConnectionController : NSObject { - NSMutableArray *_openConnections; -} +@interface MKConnectionController : NSObject + (MKConnectionController *) sharedController; diff --git a/src/MumbleKit/MKCryptState.h b/src/MumbleKit/MKCryptState.h index 31c6f27..d66e848 100644 --- a/src/MumbleKit/MKCryptState.h +++ b/src/MumbleKit/MKCryptState.h @@ -30,10 +30,7 @@ struct MKCryptStatePrivate; -@interface MKCryptState : NSObject { - @private - struct MKCryptStatePrivate *_priv; -} +@interface MKCryptState : NSObject - (id) init; - (void) dealloc; diff --git a/src/MumbleKit/MKPacketDataStream.h b/src/MumbleKit/MKPacketDataStream.h index aad085e..8c0112e 100644 --- a/src/MumbleKit/MKPacketDataStream.h +++ b/src/MumbleKit/MKPacketDataStream.h @@ -34,15 +34,7 @@ typedef union _float32u { float f; } float32u; -@interface MKPacketDataStream : NSObject { - NSMutableData *mutableData; - NSData *immutableData; - unsigned char *data; - NSUInteger maxSize; - NSUInteger offset; - NSUInteger overshoot; - BOOL ok; -} +@interface MKPacketDataStream : NSObject - (id) initWithData:(NSData *)data; - (id) initWithMutableData:(NSMutableData *)data; diff --git a/src/MumbleKit/MKReadWriteLock.h b/src/MumbleKit/MKReadWriteLock.h index d316d65..ed1c2ab 100644 --- a/src/MumbleKit/MKReadWriteLock.h +++ b/src/MumbleKit/MKReadWriteLock.h @@ -30,9 +30,7 @@ #include <pthread.h> -@interface MKReadWriteLock : NSObject { - pthread_rwlock_t rwlock; -} +@interface MKReadWriteLock : NSObject - (id) init; - (void) dealloc; diff --git a/src/MumbleKit/MKServerModel.h b/src/MumbleKit/MKServerModel.h index b023b26..9463710 100644 --- a/src/MumbleKit/MKServerModel.h +++ b/src/MumbleKit/MKServerModel.h @@ -91,14 +91,7 @@ - (void) serverModel:(MKServerModel *)model linksChangedForChannel:(MKChannel *)chan; @end -@interface MKServerModel : NSObject <MKMessageHandler> { - MKConnection *_connection; - MKChannel *_rootChannel; - MKUser *_connectedUser; - NSMutableDictionary *_userMap; - NSMutableDictionary *_channelMap; - MulticastDelegate<MKServerModelDelegate> *_delegate; -} +@interface MKServerModel : NSObject <MKMessageHandler> - (id) initWithConnection:(MKConnection *)conn; - (void) dealloc; diff --git a/src/MumbleKit/MKServerPinger.h b/src/MumbleKit/MKServerPinger.h index 708edce..543a93b 100644 --- a/src/MumbleKit/MKServerPinger.h +++ b/src/MumbleKit/MKServerPinger.h @@ -40,14 +40,12 @@ typedef struct _MKServerPingerResult { - (void) serverPingerResult:(MKServerPingerResult *)result; @end -@interface MKServerPinger : NSObject { - NSData *_address; - id<MKServerPingerDelegate> _delegate; -} +@interface MKServerPinger : NSObject - (id) initWithHostname:(NSString *)hostname port:(NSString *)port; - (void) dealloc; - (id<MKServerPingerDelegate>)delegate; - (void) setDelegate:(id<MKServerPingerDelegate>)delegate; + @end diff --git a/src/MumbleKit/MKUser.h b/src/MumbleKit/MKUser.h index b5b1f8f..d3ebf84 100644 --- a/src/MumbleKit/MKUser.h +++ b/src/MumbleKit/MKUser.h @@ -39,27 +39,7 @@ typedef enum { @class MKChannel; -@interface MKUser : MKServerModelObject { - BOOL _muted; - BOOL _deafened; - BOOL _suppressed; - BOOL _localMuted; - BOOL _selfMuted; - BOOL _selfDeafened; - BOOL _friend; - BOOL _prioritySpeaker; - BOOL _recording; - MKTalkState _talkState; - NSUInteger _session; - NSInteger _userId; - NSString *_userHash; - NSString *_username; - MKChannel *_channel; - NSString *_comment; - NSData *_commentHash; - NSData *_texture; - NSData *_textureHash; -} +@interface MKUser : MKServerModelObject - (id) init; - (void) dealloc; |