mirror of https://github.com/oxen-io/session-ios
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			80 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			C
		
	
		
		
			
		
	
	
			80 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			C
		
	
| 
											8 years ago
										 | //
 | ||
| 
											7 years ago
										 | //  Copyright (c) 2019 Open Whisper Systems. All rights reserved.
 | ||
| 
											8 years ago
										 | //
 | ||
|  | 
 | ||
| 
											8 years ago
										 | #import <AudioToolbox/AudioServices.h>
 | ||
| 
											5 years ago
										 | #import <Foundation/Foundation.h>
 | ||
|  | #import "OWSAudioPlayer.h"
 | ||
| 
											8 years ago
										 | 
 | ||
| 
											8 years ago
										 | NS_ASSUME_NONNULL_BEGIN | ||
|  | 
 | ||
| 
											8 years ago
										 | typedef NS_ENUM(NSUInteger, OWSSound) { | ||
|  |     OWSSound_Default = 0, | ||
| 
											8 years ago
										 | 
 | ||
| 
											8 years ago
										 |     // Notification Sounds
 | ||
|  |     OWSSound_Aurora, | ||
|  |     OWSSound_Bamboo, | ||
|  |     OWSSound_Chord, | ||
|  |     OWSSound_Circles, | ||
|  |     OWSSound_Complete, | ||
|  |     OWSSound_Hello, | ||
|  |     OWSSound_Input, | ||
|  |     OWSSound_Keys, | ||
|  |     OWSSound_Note, | ||
|  |     OWSSound_Popcorn, | ||
|  |     OWSSound_Pulse, | ||
|  |     OWSSound_Synth, | ||
| 
											8 years ago
										 |     OWSSound_SignalClassic, | ||
| 
											8 years ago
										 | 
 | ||
| 
											8 years ago
										 |     // Ringtone Sounds
 | ||
|  |     OWSSound_Opening, | ||
| 
											8 years ago
										 | 
 | ||
| 
											8 years ago
										 |     // Calls
 | ||
|  |     OWSSound_CallConnecting, | ||
|  |     OWSSound_CallOutboundRinging, | ||
|  |     OWSSound_CallBusy, | ||
|  |     OWSSound_CallFailure, | ||
| 
											8 years ago
										 | 
 | ||
|  |     // Other
 | ||
| 
											8 years ago
										 |     OWSSound_MessageSent, | ||
| 
											8 years ago
										 |     OWSSound_None, | ||
| 
											8 years ago
										 |     OWSSound_DefaultiOSIncomingRingtone = OWSSound_Opening, | ||
| 
											8 years ago
										 | }; | ||
|  | 
 | ||
| 
											8 years ago
										 | @class OWSAudioPlayer; | ||
| 
											7 years ago
										 | @class OWSPrimaryStorage; | ||
| 
											8 years ago
										 | @class TSThread; | ||
| 
											8 years ago
										 | @class YapDatabaseReadWriteTransaction; | ||
| 
											8 years ago
										 | 
 | ||
|  | @interface OWSSounds : NSObject | ||
|  | 
 | ||
|  | - (instancetype)init NS_UNAVAILABLE; | ||
|  | 
 | ||
| 
											7 years ago
										 | - (instancetype)initWithPrimaryStorage:(OWSPrimaryStorage *)primaryStorage NS_DESIGNATED_INITIALIZER; | ||
|  | 
 | ||
| 
											8 years ago
										 | + (NSString *)displayNameForSound:(OWSSound)sound; | ||
|  | 
 | ||
| 
											8 years ago
										 | + (nullable NSString *)filenameForSound:(OWSSound)sound; | ||
| 
											7 years ago
										 | + (nullable NSString *)filenameForSound:(OWSSound)sound quiet:(BOOL)quiet; | ||
| 
											8 years ago
										 | 
 | ||
|  | #pragma mark - Notifications
 | ||
|  | 
 | ||
|  | + (NSArray<NSNumber *> *)allNotificationSounds; | ||
|  | 
 | ||
|  | + (OWSSound)globalNotificationSound; | ||
|  | + (void)setGlobalNotificationSound:(OWSSound)sound; | ||
| 
											8 years ago
										 | + (void)setGlobalNotificationSound:(OWSSound)sound transaction:(YapDatabaseReadWriteTransaction *)transaction; | ||
| 
											8 years ago
										 | 
 | ||
|  | + (OWSSound)notificationSoundForThread:(TSThread *)thread; | ||
| 
											8 years ago
										 | + (SystemSoundID)systemSoundIDForSound:(OWSSound)sound quiet:(BOOL)quiet; | ||
| 
											8 years ago
										 | + (void)setNotificationSound:(OWSSound)sound forThread:(TSThread *)thread; | ||
|  | 
 | ||
| 
											8 years ago
										 | #pragma mark - AudioPlayer
 | ||
| 
											8 years ago
										 | 
 | ||
| 
											7 years ago
										 | + (nullable OWSAudioPlayer *)audioPlayerForSound:(OWSSound)sound | ||
|  |                                    audioBehavior:(OWSAudioBehavior)audioBehavior; | ||
| 
											8 years ago
										 | 
 | ||
| 
											8 years ago
										 | @end | ||
|  | 
 | ||
|  | NS_ASSUME_NONNULL_END |