2010-09-20 19:44:17 -05:00
|
|
|
//
|
|
|
|
// MGMThemeManager.h
|
|
|
|
// VoiceBase
|
|
|
|
//
|
|
|
|
// Created by Mr. Gecko on 8/23/10.
|
2011-03-07 19:02:53 -06:00
|
|
|
// Copyright (c) 2011 Mr. Gecko's Media (James Coleman). http://mrgeckosmedia.com/
|
|
|
|
//
|
|
|
|
// Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
|
|
// with or without fee is hereby granted, provided that the above copyright notice
|
|
|
|
// and this permission notice appear in all copies.
|
|
|
|
//
|
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
|
|
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
|
|
// FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT,
|
|
|
|
// OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
|
|
// DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
|
|
|
// ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
2010-09-20 19:44:17 -05:00
|
|
|
//
|
|
|
|
|
2011-03-21 07:43:56 -05:00
|
|
|
#import <Foundation/Foundation.h>
|
2010-09-20 19:44:17 -05:00
|
|
|
|
|
|
|
#define MGMThemeManagerDebug 0
|
|
|
|
|
2010-09-24 12:46:38 -05:00
|
|
|
@class MGMSound;
|
|
|
|
|
2010-09-20 19:44:17 -05:00
|
|
|
extern NSString * const MGMTThemeChangedNotification;
|
|
|
|
extern NSString * const MGMTUpdatedSMSThemeNotification;
|
|
|
|
|
|
|
|
extern NSString * const MGMTCurrentThemeName;
|
|
|
|
extern NSString * const MGMTCurrentThemePath;
|
|
|
|
extern NSString * const MGMTCurrentThemeVariant;
|
|
|
|
extern NSString * const MGMTShowHeader;
|
|
|
|
extern NSString * const MGMTShowFooter;
|
2011-03-21 07:43:56 -05:00
|
|
|
extern NSString * const MGMTShowIcons;
|
|
|
|
extern NSString * const MGMTFontName;
|
|
|
|
extern NSString * const MGMTFontSize;
|
2010-09-20 19:44:17 -05:00
|
|
|
extern NSString * const MGMTInfoPlist;
|
|
|
|
|
|
|
|
extern NSString * const MGMTThemePath;
|
|
|
|
extern NSString * const MGMTVariantFolder;
|
|
|
|
extern NSString * const MGMTVariants;
|
|
|
|
extern NSString * const MGMTSounds;
|
|
|
|
extern NSString * const MGMTName;
|
|
|
|
extern NSString * const MGMTFolder;
|
|
|
|
extern NSString * const MGMTFile;
|
|
|
|
extern NSString * const MGMTRebuild;
|
|
|
|
extern NSString * const MGMTIncomingIcon;
|
|
|
|
extern NSString * const MGMTOutgoingIcon;
|
|
|
|
extern NSString * const MGMTDate;
|
|
|
|
extern NSString * const MGMTAuthor;
|
|
|
|
extern NSString * const MGMTSite;
|
|
|
|
|
|
|
|
extern NSString * const MGMTUserNumber;
|
|
|
|
extern NSString * const MGMTInName;
|
|
|
|
extern NSString * const MGMTInNumber;
|
|
|
|
extern NSString * const MGMTPhoto;
|
|
|
|
|
2011-03-21 07:43:56 -05:00
|
|
|
extern NSString * const MGMTCOutgoing;
|
|
|
|
extern NSString * const MGMTCIncoming;
|
|
|
|
extern NSString * const MGMTCNext;
|
|
|
|
extern NSString * const MGMTCMessage;
|
|
|
|
extern NSString * const MGMTCHideIcons;
|
|
|
|
|
2010-09-20 19:44:17 -05:00
|
|
|
extern NSString * const MGMTSoundChangedNotification;
|
|
|
|
|
|
|
|
extern NSString * const MGMTCallSoundsFolder;
|
|
|
|
extern NSString * const MGMTSoundsFolder;
|
|
|
|
extern NSString * const MGMTSDefaultPath;
|
|
|
|
extern NSString * const MGMTSDefaultSMSMessageName;
|
|
|
|
extern NSString * const MGMTSDefaultVoicemailName;
|
|
|
|
extern NSString * const MGMTNoSound;
|
|
|
|
extern NSString * const MGMTSFolderName;
|
|
|
|
extern NSString * const MGMTSPath;
|
|
|
|
extern NSString * const MGMTSName;
|
|
|
|
extern NSString * const MGMTSSMSMessage;
|
|
|
|
extern NSString * const MGMTSVoicemail;
|
|
|
|
extern NSString * const MGMTSSIPRingtone;
|
|
|
|
extern NSString * const MGMTSSIPHoldMusic;
|
|
|
|
extern NSString * const MGMTSSIPConnected;
|
|
|
|
extern NSString * const MGMTSSIPDisconnected;
|
|
|
|
extern NSString * const MGMTSSIPSound1;
|
|
|
|
extern NSString * const MGMTSSIPSound2;
|
|
|
|
extern NSString * const MGMTSSIPSound3;
|
|
|
|
extern NSString * const MGMTSSIPSound4;
|
|
|
|
extern NSString * const MGMTSSIPSound5;
|
|
|
|
|
|
|
|
extern NSString * const MGMTThemeExt;
|
|
|
|
extern NSString * const MGMTSoundExt;
|
|
|
|
extern NSString * const MGMAiffExt;
|
|
|
|
extern NSString * const MGMAifExt;
|
|
|
|
extern NSString * const MGMMP3Ext;
|
|
|
|
extern NSString * const MGMWavExt;
|
|
|
|
extern NSString * const MGMAuExt;
|
|
|
|
extern NSString * const MGMM4AExt;
|
2011-02-22 12:00:36 -06:00
|
|
|
extern NSString * const MGMCAFExt;
|
2010-09-20 19:44:17 -05:00
|
|
|
|
|
|
|
@interface MGMThemeManager : NSObject {
|
|
|
|
NSMutableDictionary *currentTheme;
|
|
|
|
BOOL shouldPostNotification;
|
|
|
|
}
|
|
|
|
- (void)registerDefaults;
|
|
|
|
- (NSString *)soundsFolderPath;
|
|
|
|
- (NSDictionary *)sounds;
|
|
|
|
- (NSString *)currentSoundPath:(NSString *)theSoundName;
|
|
|
|
- (NSString *)nameOfSound:(NSString *)theSoundName;
|
|
|
|
- (BOOL)setSound:(NSString *)theSoundName withPath:(NSString *)thePath;
|
2010-09-24 12:46:38 -05:00
|
|
|
- (MGMSound *)playSound:(NSString *)theSoundName;
|
2010-09-20 19:44:17 -05:00
|
|
|
|
|
|
|
- (NSString *)themesFolderPath;
|
|
|
|
- (BOOL)setupCurrentTheme;
|
|
|
|
- (NSString *)currentThemePath;
|
|
|
|
- (NSString *)currentThemeVariantPath;
|
|
|
|
|
|
|
|
- (NSArray *)themes;
|
|
|
|
- (NSDictionary *)theme;
|
|
|
|
- (BOOL)setTheme:(NSDictionary *)theTheme;
|
|
|
|
- (NSDictionary *)variant;
|
|
|
|
- (void)setVariant:(NSString *)theVariant;
|
|
|
|
|
|
|
|
- (BOOL)hasCustomIncomingIcon;
|
|
|
|
- (NSString *)incomingIconPath;
|
|
|
|
- (NSString *)outgoingIconPath;
|
|
|
|
|
2011-03-21 07:43:56 -05:00
|
|
|
- (NSString *)htmlTextFromMessage:(NSDictionary *)theMessage;
|
2010-09-20 19:44:17 -05:00
|
|
|
- (NSString *)replace:(NSString *)theHTML messageInfo:(NSDictionary *)theMessageInfo;
|
|
|
|
- (NSString *)replace:(NSString *)theHTML message:(NSDictionary *)theMessage;
|
|
|
|
- (NSString *)buildHTMLWithMessages:(NSArray *)theMessages messageInfo:(NSDictionary *)theMessageInfo;
|
|
|
|
@end
|