mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-09 21:49:48 -05:00
Add OSX souces, courtesy of RokuMike
This commit is contained in:
61
osx/FireflyPrefs/English.lproj/FireflyPrefsPref.nib/classes.nib
generated
Normal file
61
osx/FireflyPrefs/English.lproj/FireflyPrefsPref.nib/classes.nib
generated
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
IBClasses = (
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
CLASS = NSPreferencePane;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
"_firstKeyView" = id;
|
||||
"_initialKeyView" = id;
|
||||
"_lastKeyView" = id;
|
||||
"_window" = id;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
ACTIONS = {
|
||||
applyNowButtonClicked = id;
|
||||
browseButtonClicked = id;
|
||||
helperMenuCheckboxClicked = id;
|
||||
logoButtonClicked = id;
|
||||
myAction = id;
|
||||
passwordChanged = id;
|
||||
portChanged = id;
|
||||
portPopupChanged = id;
|
||||
pwCheckBoxChanged = id;
|
||||
serverStartOptionChanged = id;
|
||||
shareNameChanged = id;
|
||||
startStopButtonClicked = id;
|
||||
webPageButtonClicked = id;
|
||||
};
|
||||
CLASS = OrgFireflyMediaServerPrefs;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
applyNowButton = NSButton;
|
||||
browseButton = NSButton;
|
||||
helperMenuCheckbox = NSButton;
|
||||
libraryField = NSTextField;
|
||||
libraryIcon = NSImageView;
|
||||
logTextView = NSTextView;
|
||||
mainTabView = NSTabView;
|
||||
myOutlet = id;
|
||||
nameField = NSTextField;
|
||||
panelVersionText = NSTextField;
|
||||
passwordCheckbox = NSButton;
|
||||
passwordField = NSTextField;
|
||||
portField = NSTextField;
|
||||
portPopup = NSPopUpButton;
|
||||
progressSpinner = NSProgressIndicator;
|
||||
serverStartOptions = NSPopUpButton;
|
||||
serverVersionText = NSTextField;
|
||||
startStopButton = NSButton;
|
||||
statusText = NSTextField;
|
||||
webPageButton = NSButton;
|
||||
webPageInfoText = NSTextField;
|
||||
};
|
||||
SUPERCLASS = NSPreferencePane;
|
||||
},
|
||||
{CLASS = TextFormatter; LANGUAGE = ObjC; SUPERCLASS = NSFormatter; }
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
||||
20
osx/FireflyPrefs/English.lproj/FireflyPrefsPref.nib/info.nib
generated
Normal file
20
osx/FireflyPrefs/English.lproj/FireflyPrefsPref.nib/info.nib
generated
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>41 85 481 349 0 0 1440 878 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>446.1</string>
|
||||
<key>IBLockedTabItems</key>
|
||||
<array>
|
||||
<integer>99</integer>
|
||||
</array>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>12</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8J135</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
osx/FireflyPrefs/English.lproj/FireflyPrefsPref.nib/keyedobjects.nib
generated
Normal file
BIN
osx/FireflyPrefs/English.lproj/FireflyPrefsPref.nib/keyedobjects.nib
generated
Normal file
Binary file not shown.
61
osx/FireflyPrefs/English.lproj/FireflyPrefsPref~.nib/classes.nib
generated
Normal file
61
osx/FireflyPrefs/English.lproj/FireflyPrefsPref~.nib/classes.nib
generated
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
IBClasses = (
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
CLASS = NSPreferencePane;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
"_firstKeyView" = id;
|
||||
"_initialKeyView" = id;
|
||||
"_lastKeyView" = id;
|
||||
"_window" = id;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{
|
||||
ACTIONS = {
|
||||
applyNowButtonClicked = id;
|
||||
browseButtonClicked = id;
|
||||
helperMenuCheckboxClicked = id;
|
||||
logoButtonClicked = id;
|
||||
myAction = id;
|
||||
passwordChanged = id;
|
||||
portChanged = id;
|
||||
portPopupChanged = id;
|
||||
pwCheckBoxChanged = id;
|
||||
serverStartOptionChanged = id;
|
||||
shareNameChanged = id;
|
||||
startStopButtonClicked = id;
|
||||
webPageButtonClicked = id;
|
||||
};
|
||||
CLASS = OrgFireflyMediaServerPrefs;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
applyNowButton = NSButton;
|
||||
browseButton = NSButton;
|
||||
helperMenuCheckbox = NSButton;
|
||||
libraryField = NSTextField;
|
||||
libraryIcon = NSImageView;
|
||||
logTextView = NSTextView;
|
||||
mainTabView = NSTabView;
|
||||
myOutlet = id;
|
||||
nameField = NSTextField;
|
||||
panelVersionText = NSTextField;
|
||||
passwordCheckbox = NSButton;
|
||||
passwordField = NSTextField;
|
||||
portField = NSTextField;
|
||||
portPopup = NSPopUpButton;
|
||||
progressSpinner = NSProgressIndicator;
|
||||
serverStartOptions = NSPopUpButton;
|
||||
serverVersionText = NSTextField;
|
||||
startStopButton = NSButton;
|
||||
statusText = NSTextField;
|
||||
webPageButton = NSButton;
|
||||
webPageInfoText = NSTextField;
|
||||
};
|
||||
SUPERCLASS = NSPreferencePane;
|
||||
},
|
||||
{CLASS = TextFormatter; LANGUAGE = ObjC; SUPERCLASS = NSFormatter; }
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
||||
20
osx/FireflyPrefs/English.lproj/FireflyPrefsPref~.nib/info.nib
generated
Normal file
20
osx/FireflyPrefs/English.lproj/FireflyPrefsPref~.nib/info.nib
generated
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>41 85 481 349 0 0 1440 878 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>446.1</string>
|
||||
<key>IBLockedTabItems</key>
|
||||
<array>
|
||||
<integer>99</integer>
|
||||
</array>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>12</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8J135</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
osx/FireflyPrefs/English.lproj/FireflyPrefsPref~.nib/keyedobjects.nib
generated
Normal file
BIN
osx/FireflyPrefs/English.lproj/FireflyPrefsPref~.nib/keyedobjects.nib
generated
Normal file
Binary file not shown.
BIN
osx/FireflyPrefs/English.lproj/InfoPlist.strings
Normal file
BIN
osx/FireflyPrefs/English.lproj/InfoPlist.strings
Normal file
Binary file not shown.
229
osx/FireflyPrefs/FireflyCommon.h
Normal file
229
osx/FireflyPrefs/FireflyCommon.h
Normal file
@@ -0,0 +1,229 @@
|
||||
/*
|
||||
* FireflyCommonConstants.h
|
||||
*
|
||||
* Created by Mike Kobb on 7/12/06.
|
||||
* Copyright 2006 Roku LLC. All rights reserved.
|
||||
*
|
||||
* This file contains common constants and types needed by both the
|
||||
* prefs pane and helper apps.
|
||||
*/
|
||||
|
||||
#ifndef __ORG_FIREFLYMEDIASERVER_FIREFLY_COMMON_H
|
||||
#define __ORG_FIREFLYMEDIASERVER_FIREFLY_COMMON_H
|
||||
|
||||
#include <sys/sysctl.h> // used by GetProcesses
|
||||
|
||||
#define FIREFLY_SERVER_NAME "firefly"
|
||||
#define FIREFLY_DIR_NAME "Firefly"
|
||||
#define FIREFLY_CONF_NAME "firefly.conf"
|
||||
|
||||
#define FF_PREFS_DOMAIN "org.fireflymediaserver.firefly"
|
||||
#define FF_PREFS_LAUNCH_AT_LOGIN "org.fireflymediaserver.launchAtLogin"
|
||||
#define FF_PREFS_SHOW_MENU_EXTRA "org.fireflymediaserver.showMenuExtra"
|
||||
|
||||
// Define this to enable certain debug output
|
||||
//#define FIREFLY_DEBUG
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kFireflyStartInvalid = 0,
|
||||
kFireflyStartSuccess = 1,
|
||||
kFireflyStartFail = 2
|
||||
} FireflyStartResult;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kFireflyStopInvalid = 0,
|
||||
kFireflyStopSuccess = 1,
|
||||
kFireflyStopFail = 2
|
||||
} FireflyStopResult;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kFireflyRestartInvalid = 0,
|
||||
kFireflyRestartSuccess = 1,
|
||||
kFireflyRestartFail = 2
|
||||
} FireflyRestartResult;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kFireflyRescanInvalid = 0,
|
||||
kFireflyRescanSuccess = 1,
|
||||
kFireflyRescanFail = 2
|
||||
} FireflyRescanResult;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kFireflyStatusInvalid,
|
||||
kFireflyStatusStopped,
|
||||
kFireflyStatusStarting,
|
||||
kFireflyStatusActive,
|
||||
kFireflyStatusScanning,
|
||||
kFireflyStatusStopping,
|
||||
kFireflyStatusRestarting,
|
||||
kFireflyStatusStartFailed,
|
||||
kFireflyStatusCrashed
|
||||
} FireflyServerStatus;
|
||||
|
||||
static NSString*
|
||||
StringForFireflyStatus( FireflyServerStatus inStatus )
|
||||
{
|
||||
NSString *retVal = nil;
|
||||
switch( inStatus )
|
||||
{
|
||||
case kFireflyStatusStopped:
|
||||
retVal = NSLocalizedString( @"Firefly is not running",
|
||||
@"Status message for Firefly" );
|
||||
break;
|
||||
|
||||
case kFireflyStatusStarting:
|
||||
retVal = NSLocalizedString( @"Firefly is starting",
|
||||
@"Status message for Firefly" );
|
||||
break;
|
||||
|
||||
case kFireflyStatusActive:
|
||||
retVal = NSLocalizedString( @"Firefly is running",
|
||||
@"Status message for Firefly" );
|
||||
break;
|
||||
|
||||
case kFireflyStatusScanning:
|
||||
retVal = NSLocalizedString( @"Firefly is scanning the library",
|
||||
@"Status message for Firefly" );
|
||||
break;
|
||||
|
||||
case kFireflyStatusStopping:
|
||||
retVal = NSLocalizedString( @"Firefly is stopping",
|
||||
@"Status message for Firefly" );
|
||||
break;
|
||||
|
||||
case kFireflyStatusRestarting:
|
||||
retVal = NSLocalizedString( @"Firefly is restarting",
|
||||
@"Status message for Firefly" );
|
||||
break;
|
||||
|
||||
case kFireflyStatusStartFailed:
|
||||
retVal = NSLocalizedString( @"Firefly failed to start",
|
||||
@"Status message for Firefly" );
|
||||
break;
|
||||
|
||||
case kFireflyStatusCrashed:
|
||||
retVal = NSLocalizedString( @"Firefly stopped unexpectedly",
|
||||
@"Status message for Firefly" );
|
||||
break;
|
||||
|
||||
case kFireflyStatusInvalid:
|
||||
default:
|
||||
retVal = NSLocalizedString( @"Firefly status is unknown",
|
||||
@"Status message for Firefly" );
|
||||
break;
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
// Process management the Unix way -- Finding if the server is already
|
||||
// running, or finding a specific process
|
||||
// ===========================================================================
|
||||
|
||||
// This just makes syntax more convenient (don't have to say 'struct' everyplace)
|
||||
typedef struct kinfo_proc kinfo_proc;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// GetProcesses
|
||||
//
|
||||
// Static utility function allocates and returns an array of kinfo_proc
|
||||
// structures representing the currently-running processes on the machine.
|
||||
// The calling function is responsible for disposing the returned pointer
|
||||
// with free()
|
||||
//
|
||||
// Because Firefly runs as a BSD daemon, the Process Manager is not useful
|
||||
// in finding it. Instead, we have to talk to the BSD layer. This code
|
||||
// was provided by Apple in a tech note.
|
||||
// ------------------------------------------------------------------------
|
||||
static void
|
||||
GetProcesses( kinfo_proc **outResult, size_t *outLength)
|
||||
{
|
||||
int err;
|
||||
kinfo_proc * result;
|
||||
BOOL done;
|
||||
static const int name[] = { CTL_KERN, KERN_PROC, KERN_PROC_ALL, 0 };
|
||||
// Declaring name as const requires us to cast it when passing it to
|
||||
// sysctl because the prototype doesn't include the const modifier.
|
||||
// (That's the Apple comment, but they don't say *why* they made it const...)
|
||||
size_t length;
|
||||
|
||||
// We call sysctl with result == NULL and length == 0.
|
||||
// That will succeed, and set length to the appropriate length.
|
||||
// We then allocate a buffer of that size and call sysctl again
|
||||
// with that buffer. If that succeeds, we're done. If that fails
|
||||
// with ENOMEM, we have to throw away our buffer and loop. Note
|
||||
// that the loop causes use to call sysctl with NULL again; this
|
||||
// is necessary because the ENOMEM failure case sets length to
|
||||
// the amount of data returned, not the amount of data that
|
||||
// could have been returned.
|
||||
|
||||
result = NULL;
|
||||
done = NO;
|
||||
do
|
||||
{
|
||||
// Call sysctl with a NULL buffer.
|
||||
length = 0;
|
||||
err = sysctl( (int *) name, (sizeof(name) / sizeof(*name)) - 1,
|
||||
NULL, &length,
|
||||
NULL, 0);
|
||||
if (err == -1)
|
||||
err = errno;
|
||||
|
||||
// Allocate an appropriately sized buffer based on the results
|
||||
// from the previous call.
|
||||
if (err == 0)
|
||||
{
|
||||
result = malloc(length);
|
||||
if (result == NULL)
|
||||
err = ENOMEM;
|
||||
}
|
||||
|
||||
// Call sysctl again with the new buffer. If we get an ENOMEM
|
||||
// error, toss away our buffer and start again.
|
||||
if (err == 0)
|
||||
{
|
||||
err = sysctl( (int *) name, (sizeof(name) / sizeof(*name)) - 1,
|
||||
result, &length,
|
||||
NULL, 0);
|
||||
if (err == -1)
|
||||
err = errno;
|
||||
if (err == 0)
|
||||
done = YES;
|
||||
else if (err == ENOMEM)
|
||||
{
|
||||
free(result);
|
||||
result = NULL;
|
||||
err = 0;
|
||||
}
|
||||
}
|
||||
} while (err == 0 && !done);
|
||||
|
||||
// Clean up and establish post conditions.
|
||||
if( err != 0 )
|
||||
{
|
||||
if( result != NULL)
|
||||
free(result);
|
||||
*outResult = NULL;
|
||||
*outLength = 0;
|
||||
}
|
||||
|
||||
if( err == 0 )
|
||||
{
|
||||
*outResult = result;
|
||||
*outLength = length;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// __ORG_FIREFLYMEDIASERVER_FIREFLY_COMMON_H
|
||||
#endif
|
||||
|
||||
BIN
osx/FireflyPrefs/FireflyLogo.png
Normal file
BIN
osx/FireflyPrefs/FireflyLogo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
346
osx/FireflyPrefs/FireflyPrefs.xcodeproj/project.pbxproj
Normal file
346
osx/FireflyPrefs/FireflyPrefs.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,346 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 42;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1061CA7B0A23A648002E88E0 /* OrgFireflyMediaServerPrefs.h in Headers */ = {isa = PBXBuildFile; fileRef = 1061CA790A23A648002E88E0 /* OrgFireflyMediaServerPrefs.h */; };
|
||||
1061CB530A266BAE002E88E0 /* FireflyLogo.png in Resources */ = {isa = PBXBuildFile; fileRef = 1061CB520A266BAE002E88E0 /* FireflyLogo.png */; };
|
||||
1062C6FB0A7554840003FC27 /* FireflyCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 1062C6FA0A7554840003FC27 /* FireflyCommon.h */; };
|
||||
1098819D0A704B3200F53ED9 /* firefly.conf in Resources */ = {isa = PBXBuildFile; fileRef = 1098819C0A704B3200F53ED9 /* firefly.conf */; };
|
||||
10B4B4030A34E3A9008238B7 /* OrgFireflyMediaServerPrefs.m in Sources */ = {isa = PBXBuildFile; fileRef = 10B4B4020A34E3A9008238B7 /* OrgFireflyMediaServerPrefs.m */; };
|
||||
10C78FE00A637CA900732D76 /* FireflyPrefsProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 10C78FDF0A637CA900732D76 /* FireflyPrefsProtocol.h */; };
|
||||
10C7930B0A660CCA00732D76 /* Firefly Helper.app in Resources */ = {isa = PBXBuildFile; fileRef = 10C792B50A660CC900732D76 /* Firefly Helper.app */; };
|
||||
8D202CEA0486D31800D8A456 /* FireflyPrefs_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 32DBCFA20370C41700C91783 /* FireflyPrefs_Prefix.pch */; };
|
||||
8D202CED0486D31800D8A456 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
|
||||
8D202CEE0486D31800D8A456 /* FireflyPrefsPref.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F506C040013D9D8001CA16C8 /* FireflyPrefsPref.tiff */; };
|
||||
8D202CEF0486D31800D8A456 /* FireflyPrefsPref.nib in Resources */ = {isa = PBXBuildFile; fileRef = F506C042013D9D8C01CA16C8 /* FireflyPrefsPref.nib */; };
|
||||
8D202CF30486D31800D8A456 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; };
|
||||
8D202CF40486D31800D8A456 /* PreferencePanes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F506C035013D953901CA16C8 /* PreferencePanes.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
||||
089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
|
||||
1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
||||
1061CA790A23A648002E88E0 /* OrgFireflyMediaServerPrefs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = OrgFireflyMediaServerPrefs.h; sourceTree = "<group>"; };
|
||||
1061CB520A266BAE002E88E0 /* FireflyLogo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = FireflyLogo.png; sourceTree = "<group>"; };
|
||||
1062C6FA0A7554840003FC27 /* FireflyCommon.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FireflyCommon.h; sourceTree = "<group>"; };
|
||||
1098819C0A704B3200F53ED9 /* firefly.conf */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = firefly.conf; sourceTree = "<group>"; };
|
||||
10B4B4020A34E3A9008238B7 /* OrgFireflyMediaServerPrefs.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = OrgFireflyMediaServerPrefs.m; sourceTree = "<group>"; };
|
||||
10C78FDF0A637CA900732D76 /* FireflyPrefsProtocol.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = FireflyPrefsProtocol.h; path = ../FireflyPrefsProtocol.h; sourceTree = "<group>"; };
|
||||
10C792B50A660CC900732D76 /* Firefly Helper.app */ = {isa = PBXFileReference; lastKnownFileType = wrapper.application; path = "Firefly Helper.app"; sourceTree = "<group>"; };
|
||||
32DBCFA20370C41700C91783 /* FireflyPrefs_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FireflyPrefs_Prefix.pch; sourceTree = "<group>"; };
|
||||
8D202CF70486D31800D8A456 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
8D202CF80486D31800D8A456 /* Firefly.prefPane */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Firefly.prefPane; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
F506C035013D953901CA16C8 /* PreferencePanes.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PreferencePanes.framework; path = /System/Library/Frameworks/PreferencePanes.framework; sourceTree = "<absolute>"; };
|
||||
F506C040013D9D8001CA16C8 /* FireflyPrefsPref.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = FireflyPrefsPref.tiff; sourceTree = "<group>"; };
|
||||
F506C043013D9D8C01CA16C8 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/FireflyPrefsPref.nib; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8D202CF20486D31800D8A456 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D202CF30486D31800D8A456 /* Cocoa.framework in Frameworks */,
|
||||
8D202CF40486D31800D8A456 /* PreferencePanes.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
089C166AFE841209C02AAC07 /* FireflyPrefs */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB77AFFE84173DC02AAC07 /* Classes */,
|
||||
32DBCFA10370C40200C91783 /* Other Sources */,
|
||||
089C167CFE841241C02AAC07 /* Resources */,
|
||||
089C1671FE841209C02AAC07 /* Frameworks and Libraries */,
|
||||
19C28FB8FE9D52D311CA2CBB /* Products */,
|
||||
);
|
||||
name = FireflyPrefs;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
089C1671FE841209C02AAC07 /* Frameworks and Libraries */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */,
|
||||
1058C7AEFEA557BF11CA2CBB /* Other Frameworks */,
|
||||
);
|
||||
name = "Frameworks and Libraries";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
089C167CFE841241C02AAC07 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
10C792B50A660CC900732D76 /* Firefly Helper.app */,
|
||||
1098819C0A704B3200F53ED9 /* firefly.conf */,
|
||||
8D202CF70486D31800D8A456 /* Info.plist */,
|
||||
089C167DFE841241C02AAC07 /* InfoPlist.strings */,
|
||||
F506C040013D9D8001CA16C8 /* FireflyPrefsPref.tiff */,
|
||||
F506C042013D9D8C01CA16C8 /* FireflyPrefsPref.nib */,
|
||||
1061CB520A266BAE002E88E0 /* FireflyLogo.png */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB77AFFE84173DC02AAC07 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1062C6FA0A7554840003FC27 /* FireflyCommon.h */,
|
||||
10C78FDF0A637CA900732D76 /* FireflyPrefsProtocol.h */,
|
||||
10B4B4020A34E3A9008238B7 /* OrgFireflyMediaServerPrefs.m */,
|
||||
1061CA790A23A648002E88E0 /* OrgFireflyMediaServerPrefs.h */,
|
||||
);
|
||||
name = Classes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */,
|
||||
F506C035013D953901CA16C8 /* PreferencePanes.framework */,
|
||||
);
|
||||
name = "Linked Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7AEFEA557BF11CA2CBB /* Other Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
089C1672FE841209C02AAC07 /* Foundation.framework */,
|
||||
089C167FFE841241C02AAC07 /* AppKit.framework */,
|
||||
);
|
||||
name = "Other Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FB8FE9D52D311CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D202CF80486D31800D8A456 /* Firefly.prefPane */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
32DBCFA10370C40200C91783 /* Other Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
32DBCFA20370C41700C91783 /* FireflyPrefs_Prefix.pch */,
|
||||
);
|
||||
name = "Other Sources";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
8D202CE90486D31800D8A456 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D202CEA0486D31800D8A456 /* FireflyPrefs_Prefix.pch in Headers */,
|
||||
1061CA7B0A23A648002E88E0 /* OrgFireflyMediaServerPrefs.h in Headers */,
|
||||
10C78FE00A637CA900732D76 /* FireflyPrefsProtocol.h in Headers */,
|
||||
1062C6FB0A7554840003FC27 /* FireflyCommon.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8D202CE80486D31800D8A456 /* Firefly */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1DBD214808BA80EA00186707 /* Build configuration list for PBXNativeTarget "Firefly" */;
|
||||
buildPhases = (
|
||||
8D202CE90486D31800D8A456 /* Headers */,
|
||||
8D202CEC0486D31800D8A456 /* Resources */,
|
||||
8D202CF00486D31800D8A456 /* Sources */,
|
||||
8D202CF20486D31800D8A456 /* Frameworks */,
|
||||
8D202CF50486D31800D8A456 /* Rez */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Firefly;
|
||||
productInstallPath = "$(HOME)/Library/PreferencePanes";
|
||||
productName = FireflyPrefs;
|
||||
productReference = 8D202CF80486D31800D8A456 /* Firefly.prefPane */;
|
||||
productType = "com.apple.product-type.bundle";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
089C1669FE841209C02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 1DBD214C08BA80EA00186707 /* Build configuration list for PBXProject "FireflyPrefs" */;
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 089C166AFE841209C02AAC07 /* FireflyPrefs */;
|
||||
projectDirPath = "";
|
||||
targets = (
|
||||
8D202CE80486D31800D8A456 /* Firefly */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
8D202CEC0486D31800D8A456 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D202CED0486D31800D8A456 /* InfoPlist.strings in Resources */,
|
||||
8D202CEE0486D31800D8A456 /* FireflyPrefsPref.tiff in Resources */,
|
||||
8D202CEF0486D31800D8A456 /* FireflyPrefsPref.nib in Resources */,
|
||||
1061CB530A266BAE002E88E0 /* FireflyLogo.png in Resources */,
|
||||
10C7930B0A660CCA00732D76 /* Firefly Helper.app in Resources */,
|
||||
1098819D0A704B3200F53ED9 /* firefly.conf in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXRezBuildPhase section */
|
||||
8D202CF50486D31800D8A456 /* Rez */ = {
|
||||
isa = PBXRezBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXRezBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D202CF00486D31800D8A456 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
10B4B4030A34E3A9008238B7 /* OrgFireflyMediaServerPrefs.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
089C167DFE841241C02AAC07 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
089C167EFE841241C02AAC07 /* English */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F506C042013D9D8C01CA16C8 /* FireflyPrefsPref.nib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
F506C043013D9D8C01CA16C8 /* English */,
|
||||
);
|
||||
name = FireflyPrefsPref.nib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1DBD214908BA80EA00186707 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = FireflyPrefs_Prefix.pch;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Library/PreferencePanes";
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.3;
|
||||
PRODUCT_NAME = Firefly;
|
||||
WRAPPER_EXTENSION = prefPane;
|
||||
ZERO_LINK = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DBD214A08BA80EA00186707 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = (
|
||||
ppc,
|
||||
i386,
|
||||
);
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = FireflyPrefs_Prefix.pch;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Library/PreferencePanes";
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.3;
|
||||
PRODUCT_NAME = Firefly;
|
||||
SDKROOT_ppc = /Developer/SDKs/MacOSX10.3.9.sdk;
|
||||
WRAPPER_EXTENSION = prefPane;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1DBD214D08BA80EA00186707 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_VERSION_i386 = 4.0;
|
||||
GCC_VERSION_ppc = 3.3;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
GENERATE_PKGINFO_FILE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.2;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
SDKROOT_ppc = /Developer/SDKs/MacOSX10.3.9.sdk;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1DBD214E08BA80EA00186707 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_VERSION_i386 = 4.0;
|
||||
GCC_VERSION_ppc = 3.3;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
GENERATE_PKGINFO_FILE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.2;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
SDKROOT_ppc = /Developer/SDKs/MacOSX10.2.8.sdk;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1DBD214808BA80EA00186707 /* Build configuration list for PBXNativeTarget "Firefly" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DBD214908BA80EA00186707 /* Debug */,
|
||||
1DBD214A08BA80EA00186707 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1DBD214C08BA80EA00186707 /* Build configuration list for PBXProject "FireflyPrefs" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1DBD214D08BA80EA00186707 /* Debug */,
|
||||
1DBD214E08BA80EA00186707 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 089C1669FE841209C02AAC07 /* Project object */;
|
||||
}
|
||||
BIN
osx/FireflyPrefs/FireflyPrefsPref.tiff
Normal file
BIN
osx/FireflyPrefs/FireflyPrefsPref.tiff
Normal file
Binary file not shown.
8
osx/FireflyPrefs/FireflyPrefs_Prefix.pch
Normal file
8
osx/FireflyPrefs/FireflyPrefs_Prefix.pch
Normal file
@@ -0,0 +1,8 @@
|
||||
//
|
||||
// Prefix header for all source files of the 'FireflyPrefs' target in the 'FireflyPrefs' project.
|
||||
//
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AppKit/AppKit.h>
|
||||
#endif
|
||||
36
osx/FireflyPrefs/Info.plist
Normal file
36
osx/FireflyPrefs/Info.plist
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.fireflymediaserver.prefpanel</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>102</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0b3</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>© 2006 Roku LLC</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>FireflyPrefsPref</string>
|
||||
<key>NSPrefPaneIconFile</key>
|
||||
<string>FireflyPrefsPref.tiff</string>
|
||||
<key>NSPrefPaneIconLabel</key>
|
||||
<string>Firefly</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>OrgFireflyMediaServerPrefs</string>
|
||||
</dict>
|
||||
</plist>
|
||||
158
osx/FireflyPrefs/OrgFireflyMediaServerPrefs.h
Normal file
158
osx/FireflyPrefs/OrgFireflyMediaServerPrefs.h
Normal file
@@ -0,0 +1,158 @@
|
||||
/* OrgFireflyMediaServerPrefs */
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <PreferencePanes/NSPreferencePane.h>
|
||||
#import <CoreFoundation/CoreFoundation.h>
|
||||
#import "../FireflyPrefsProtocol.h"
|
||||
|
||||
@interface OrgFireflyMediaServerPrefs : NSPreferencePane < FireflyPrefsClientProtocol >
|
||||
{
|
||||
IBOutlet NSButton *browseButton;
|
||||
IBOutlet NSTextField *libraryField;
|
||||
IBOutlet NSImageView *libraryIcon;
|
||||
IBOutlet NSTextField *nameField;
|
||||
IBOutlet NSButton *passwordCheckbox;
|
||||
IBOutlet NSButton *helperMenuCheckbox;
|
||||
IBOutlet NSTextField *passwordField;
|
||||
IBOutlet NSTextField *portField;
|
||||
IBOutlet NSPopUpButton *portPopup;
|
||||
IBOutlet NSPopUpButton *serverStartOptions;
|
||||
IBOutlet NSTextField *panelVersionText;
|
||||
IBOutlet NSTextField *serverVersionText;
|
||||
IBOutlet NSButton *startStopButton;
|
||||
IBOutlet NSTextField *statusText;
|
||||
IBOutlet NSButton *webPageButton;
|
||||
IBOutlet NSTextField *webPageInfoText;
|
||||
IBOutlet NSTabView *mainTabView;
|
||||
IBOutlet NSButton *applyNowButton;
|
||||
IBOutlet NSProgressIndicator *progressSpinner;
|
||||
IBOutlet NSTextView *logTextView;
|
||||
IBOutlet NSScrollView *logTextScroller;
|
||||
|
||||
CFStringRef appID;
|
||||
NSMutableString *ourHostName;
|
||||
NSMutableString *fireflyFolderPath;
|
||||
NSMutableString *fireflyHelperPath;
|
||||
NSMutableString *serverURL;
|
||||
NSMutableString *logFilePath;
|
||||
NSMutableString *playlistPath;
|
||||
NSString *userName;
|
||||
|
||||
// Handling of the config file
|
||||
NSMutableString *configFilePath;
|
||||
BOOL configAppearsValid;
|
||||
NSMutableString *configError;
|
||||
NSMutableArray *configFileStrings;
|
||||
unsigned long idxOfServerName;
|
||||
unsigned long idxOfPassword;
|
||||
unsigned long idxOfPort;
|
||||
unsigned long idxOfLibraryPath;
|
||||
unsigned long idxOfNextSection;
|
||||
unsigned long idxOfDbPath;
|
||||
unsigned long idxOfLogPath;
|
||||
unsigned long idxOfPlaylistPath;
|
||||
|
||||
// Track whether we need to save
|
||||
BOOL bConfigNeedsSaving;
|
||||
|
||||
// The actual preferences we manage with this GUI
|
||||
NSMutableString *serverName;
|
||||
NSMutableString *serverPassword;
|
||||
NSMutableString *libraryPath;
|
||||
unsigned short serverPort; // 0 means automatic
|
||||
BOOL bStartServerOnLogin;
|
||||
BOOL bShowHelperMenu;
|
||||
|
||||
// Timer mechanism for setting up IPC
|
||||
int ipcTries;
|
||||
NSTimer *ipcTimer;
|
||||
|
||||
// Interprocess communication with Firefly Helper
|
||||
id serverProxy;
|
||||
NSProtocolChecker *protocolChecker;
|
||||
int clientIdent;
|
||||
|
||||
// Log view updating
|
||||
NSTimer *logTimer;
|
||||
NSDate *logDate;
|
||||
}
|
||||
|
||||
- (IBAction)browseButtonClicked:(id)sender;
|
||||
- (IBAction)passwordChanged:(id)sender;
|
||||
- (IBAction)shareNameChanged:(id)sender;
|
||||
- (IBAction)portPopupChanged:(id)sender;
|
||||
- (IBAction)portChanged:(id)sender;
|
||||
- (IBAction)pwCheckBoxChanged:(id)sender;
|
||||
- (IBAction)serverStartOptionChanged:(id)sender;
|
||||
- (IBAction)startStopButtonClicked:(id)sender;
|
||||
- (IBAction)webPageButtonClicked:(id)sender;
|
||||
- (IBAction)applyNowButtonClicked:(id)sender;
|
||||
- (IBAction)helperMenuCheckboxClicked:(id)sender;
|
||||
|
||||
// Overrides of NSPreferencePane methods
|
||||
- (void)willSelect;
|
||||
- (void)didSelect;
|
||||
- (NSPreferencePaneUnselectReply)shouldUnselect;
|
||||
- (void)willUnselect;
|
||||
|
||||
// Checking the validity of the Firefly installation.
|
||||
- (BOOL)validateInstall;
|
||||
|
||||
// Tracking the need to save the config
|
||||
- (void)setConfigNeedsSaving:(BOOL)needsSaving;
|
||||
|
||||
// UI utility functions
|
||||
- (void)disableAllControls;
|
||||
- (void)updateServerStatus:(FireflyServerStatus) status;
|
||||
- (void)setIconForPath;
|
||||
|
||||
// Functions for loading and saving our configuration, as well as
|
||||
// reading and writing the config file.
|
||||
- (BOOL)loadSettings;
|
||||
- (BOOL)saveSettings;
|
||||
- (BOOL)updateLoginItem;
|
||||
- (void)readSettingsForHelper:(BOOL*)outHelper andServer:(BOOL*)outServer;
|
||||
- (BOOL)readConfigFromPath:(NSString*)path;
|
||||
- (BOOL)writeConfigToPath:(NSString*)path;
|
||||
- (BOOL)createDefaultConfigFile;
|
||||
- (NSString *)readValueFromBuf:(char*)buf startingAt:(int)idx unescapeCommas:(BOOL) bUnescapeCommas;
|
||||
- (void)setDefaultValues;
|
||||
|
||||
// Finding or launching the helper
|
||||
- (BOOL)helperIsRunning;
|
||||
- (void)launchHelperIfNeeded;
|
||||
|
||||
// Validation of user entries
|
||||
- (BOOL)control:(NSControl *)control isValidObject:(id) obj;
|
||||
- (BOOL)currentTabIsValid;
|
||||
- (void)alertForControl:(NSControl *)control;
|
||||
|
||||
// Alert delegate method(s)
|
||||
- (void)alertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo;
|
||||
- (void)applySheetDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo;
|
||||
|
||||
// Tab view delegate method(s)
|
||||
- (BOOL)tabView:(NSTabView *)tabView shouldSelectTabViewItem:(NSTabViewItem *)tabViewItem;
|
||||
|
||||
// Browse panel delegate method(s)
|
||||
- (void)browsePanelEnded:(NSOpenPanel *)panel returnCode:(int)panelResult contextInfo:(void *)contextInfo;
|
||||
|
||||
// Methods for dealing with the IPC proxy
|
||||
- (BOOL)makeProxyConnection;
|
||||
- (BOOL)checkProxyConnection;
|
||||
- (void)proxyTimerFired:(NSTimer *) timer;
|
||||
- (FireflyStartResult)startFirefly;
|
||||
- (FireflyStopResult)stopFirefly;
|
||||
- (FireflyRestartResult)restartFirefly;
|
||||
- (FireflyRescanResult)rescanLibrary;
|
||||
- (FireflyServerStatus)fireflyStatus;
|
||||
- (BOOL)fireflyIsRunning;
|
||||
- (NSString*)fireflyVersion;
|
||||
- (NSString*)fireflyConfigURL;
|
||||
- (void)showHelperMenu:(BOOL)bShowMenu;
|
||||
|
||||
// Log view stuff
|
||||
- (void)updateLogTextView;
|
||||
- (void)logTimerFired:(NSTimer *) timer;
|
||||
|
||||
@end
|
||||
2268
osx/FireflyPrefs/OrgFireflyMediaServerPrefs.m
Normal file
2268
osx/FireflyPrefs/OrgFireflyMediaServerPrefs.m
Normal file
File diff suppressed because it is too large
Load Diff
351
osx/FireflyPrefs/firefly.conf
Normal file
351
osx/FireflyPrefs/firefly.conf
Normal file
@@ -0,0 +1,351 @@
|
||||
# $Id: mt-daapd.conf.templ 1000 2006-05-01 08:07:56Z rpedde $
|
||||
#
|
||||
# This is the mt-daapd config file.
|
||||
#
|
||||
# If you have problems or questions with the format of this file,
|
||||
# direct your questions to rpedde@users.sourceforge.net.
|
||||
#
|
||||
# You can also check the website at http://mt-daapd.sourceforge.net,
|
||||
# as there is a growing documentation library there, peer-supported
|
||||
# forums and possibly more.
|
||||
#
|
||||
|
||||
[general]
|
||||
|
||||
#
|
||||
# web_root (required)
|
||||
#
|
||||
# Location of the admin web pages.
|
||||
#
|
||||
# If you installed from .RPM, .deb, or tarball with --prefix=/usr, then
|
||||
# this is correct.
|
||||
#
|
||||
# If you installed from tarball without --prefix=/usr, then the correct
|
||||
# path is probably /usr/local/share/mt-daapd/admin-root.
|
||||
#
|
||||
# In the default Mac install, this is a relative path, compared to the server
|
||||
|
||||
web_root = admin-root
|
||||
|
||||
#
|
||||
# port (required)
|
||||
#
|
||||
# What port to listen on. Leave blank to auto-assign. If the port is
|
||||
# specified, and that port is already taken, the server will not start.
|
||||
#
|
||||
|
||||
port =
|
||||
|
||||
#
|
||||
# admin_pw (required)
|
||||
#
|
||||
# This is the password to the administrative pages. If blank, access
|
||||
# will only be possible from the local host.
|
||||
#
|
||||
# In the default Mac install, this is left blank so that only local
|
||||
# host control is allowed
|
||||
|
||||
admin_pw =
|
||||
|
||||
|
||||
#
|
||||
# db_type (required)
|
||||
#
|
||||
# This is what kind of backend database to store the song
|
||||
# info in. Valid choices are "sqlite" and "sqlite3".
|
||||
#
|
||||
|
||||
db_type = sqlite
|
||||
|
||||
#
|
||||
# db_parms
|
||||
#
|
||||
# This is any extra information the db needs to connect.
|
||||
# in the case of sqlite and sqlite3, this is the name
|
||||
# of the directory to store the database in
|
||||
#
|
||||
# If you installed from RPM or .deb, this path likely already
|
||||
# exists. If not, then you must create it. The directory itself
|
||||
# must be writable by the "runas" user.
|
||||
#
|
||||
# On the Mac, this lives in the Application Support folder, in our
|
||||
# Firefly folder.
|
||||
#
|
||||
|
||||
db_parms =
|
||||
|
||||
#
|
||||
# mp3_dir (required)
|
||||
#
|
||||
# Location of the mp3 files to share. Note that because the
|
||||
# files are stored in the database by inode, these must be
|
||||
# in the same physical filesystem.
|
||||
#
|
||||
|
||||
mp3_dir =
|
||||
|
||||
#
|
||||
# servername (required)
|
||||
#
|
||||
# This is both the name of the server as advertised
|
||||
# via rendezvous, and the name of the database
|
||||
# exported via DAAP. Also know as "What shows up in iTunes".
|
||||
#
|
||||
|
||||
servername =
|
||||
|
||||
#
|
||||
# runas (required)
|
||||
#
|
||||
# This is the user to drop privs to if running as
|
||||
# root. If mt-daapd is not started as root, this
|
||||
# configuration option is ignored. Notice that this
|
||||
# must be specified whether the server is running
|
||||
# as root or not.
|
||||
#
|
||||
# This is also ignored on Windows.
|
||||
#
|
||||
|
||||
runas = nobody
|
||||
|
||||
#
|
||||
# playlist (optional)
|
||||
#
|
||||
# This is the location of a playlist file.
|
||||
# This is for Apple-style "Smart Playlists"
|
||||
# See the mt-daapd.playlist file in the
|
||||
# contrib directory for syntax and examples
|
||||
#
|
||||
# This doesn't control static playlists... these
|
||||
# are controlled with the "process_m3u" directive
|
||||
# below.
|
||||
#
|
||||
#
|
||||
# On the Mac, this lives in our Firefly folder in Application Support
|
||||
|
||||
playlist =
|
||||
|
||||
#
|
||||
# password (optional)
|
||||
#
|
||||
# This is the password required to listen to MP3 files
|
||||
# i.e. the password that iTunes prompts for
|
||||
#
|
||||
|
||||
password =
|
||||
|
||||
#
|
||||
# extensions (optional)
|
||||
#
|
||||
# These are the file extensions that the daap server will
|
||||
# try to index and serve. By default, it only indexes and
|
||||
# serves .mp3 files. It can also server .m4a and .m4p files,
|
||||
# and just about any other files, really. Unfortunately, while
|
||||
# it can *attempt* to serve other files (.ogg?), iTunes won't
|
||||
# play them. Perhaps this would be useful on Linux with
|
||||
# Rhythmbox, once it understands daap. (hurry up!)
|
||||
#
|
||||
# Failing that, one can use server-side conversion to transcode
|
||||
# non-standard (.ogg, .flac) music to wav on the server side.
|
||||
# See the ssc_* options below.
|
||||
#
|
||||
# To be able to index .ogg files, you'll need to have configured
|
||||
# with --enable-oggvorbis. For .flac, --enable-flac, for .mpc,
|
||||
# --enable-musepack.
|
||||
#
|
||||
|
||||
extensions = .mp3,.m4a,.m4p,.aiff
|
||||
|
||||
#
|
||||
# ssc_codectypes (optional)
|
||||
#
|
||||
# List of codectypes for files that the daap server should
|
||||
# perform internal format conversion and present to clients
|
||||
# as WAV files. The file extensions that these codectypes correspond
|
||||
# to must also be present in 'extensions'
|
||||
# configuration value, or files are not probed in the first
|
||||
# place.
|
||||
#
|
||||
# Valid codectypes:
|
||||
#
|
||||
# mp4a - for AAC (.aac, .mp4, .m4a, .m4p)
|
||||
# mpeg - for mp3
|
||||
# wav - for wav
|
||||
# wma - for wma
|
||||
# ogg - for ogg
|
||||
# flac - for flac (.flac, .fla)
|
||||
# mpc for musepack (.mpc, .mpp, .mp+)
|
||||
# alac for alac (.m4a)
|
||||
#
|
||||
# NOTE: 1.0b3 of the Mac server does not have support for transcoding
|
||||
# Ogg and FLAC. Stay tuned
|
||||
|
||||
ssc_codectypes = alac
|
||||
|
||||
#
|
||||
# ssc_prog (optional)
|
||||
#
|
||||
# Program that is used in server side format conversion.
|
||||
# Program must accept following command line syntax:
|
||||
# ssc_prog filename offset length ...
|
||||
# Parameter filename is the real name of the file that is
|
||||
# to be converted and streamed, offset is number of bytes
|
||||
# that are skipped from the beginning of the _output_ file
|
||||
# before streaming is started, length is length of the song
|
||||
# in seconds (or zero). All other possible arguments must
|
||||
# be ignored. The resulting wav file (or the rest of
|
||||
# the file after initial seek) is written to the standard
|
||||
# output by the ssc_prog program. This is typically
|
||||
# a script that is a front end for different conversion tools
|
||||
# handling different formats.
|
||||
#
|
||||
# On the Mac, this is a relative path by default
|
||||
|
||||
ssc_prog = ./mt-daapd-ssc.sh
|
||||
|
||||
#
|
||||
# logfile (optional)
|
||||
#
|
||||
# This is the file to log to. If this is not configured,
|
||||
# then it will log to the syslog.
|
||||
#
|
||||
# Not that the -d <level> switch will control the log verbosity.
|
||||
# By default, it runs at log level 1. Log level 9 will churn
|
||||
# out scads of useless debugging information. Values in between
|
||||
# will vary the amount of logging you get.
|
||||
#
|
||||
# On the Mac, this lives in our Firefly folder in Application Support
|
||||
|
||||
logfile =
|
||||
|
||||
#
|
||||
# truncate (optional)
|
||||
#
|
||||
# If logging is configured and this flag is enabled, the
|
||||
# server will truncate the log file each time it starts.
|
||||
# This is a good idea for both disk space and readability.
|
||||
#
|
||||
|
||||
truncate = 1
|
||||
|
||||
#
|
||||
# art_filename (optional)
|
||||
#
|
||||
# There is experimental support thanks to Hiren Joshi
|
||||
# (hirenj@mooh.org) for dynamically adding art to the id3v2
|
||||
# header as it is streamed (!!). If you were using a music system
|
||||
# like zina or andromeda, for example, with cover art called
|
||||
# "_folderOpenImage.jpg", you could use the parameter
|
||||
# art_file _folderOpenImage.jpg and if the file _folderOpenImage.jpg
|
||||
# was located in the same folder as the .mp3 file, it would appear
|
||||
# in iTunes. Cool, eh?
|
||||
#
|
||||
|
||||
#art_filename = _folderOpenImage.jpg
|
||||
|
||||
#
|
||||
# rescan_interval
|
||||
#
|
||||
# How often to check the file system to see if any mp3 files
|
||||
# have been added or removed.
|
||||
#
|
||||
# if not specified, the default is 0, which disables background scanning.
|
||||
#
|
||||
# If background rescanning is disabled, a scan can still be forced from the
|
||||
# "status" page of the administrative web interface
|
||||
#
|
||||
# Setting a rescan_interval lower than the time it takes to rescan
|
||||
# won't hurt anything, it will just waste CPU, and make connect times
|
||||
# to the daap server longer.
|
||||
#
|
||||
#
|
||||
|
||||
rescan_interval = 300
|
||||
|
||||
# always_scan
|
||||
#
|
||||
# The default behavior is not not do background rescans of the
|
||||
# filesystem unless there are clients connected. The thought is to
|
||||
# allow the drives to spin down unless they are in use. This might be
|
||||
# of more importance in IDE drives that aren't designed to be run
|
||||
# 24x7. Forcing a scan through the web interface will always work
|
||||
# though, even if no users are connected.
|
||||
|
||||
# always_scan = 0
|
||||
|
||||
#
|
||||
# process_m3u
|
||||
#
|
||||
# By default m3u processing is turned off, since most m3u files
|
||||
# sitting around in peoples mp3 directories have bad paths, and
|
||||
# I hear about it. :)
|
||||
#
|
||||
# If you are sure your m3u files have good paths (i.e. unixly pathed,
|
||||
# with relative paths relative to the directory the m3u is in), then
|
||||
# you can turn on m3u processing by setting this directive to 1.
|
||||
#
|
||||
# I'm not sure "unixly" is a word, but you get the idea.
|
||||
#
|
||||
# On the Mac, process_m3u needs to be on in order to scan the iTunes
|
||||
# database for playlists, so this is on in the default Mac install.
|
||||
|
||||
process_m3u = 1
|
||||
|
||||
#
|
||||
# scan_type
|
||||
#
|
||||
#
|
||||
# This sets how aggressively mp3 files should be scanned to determine
|
||||
# file length. There are three values:
|
||||
#
|
||||
# 0 (Normal)
|
||||
# Just scan the first mp3 frame to try and calculate size. This will
|
||||
# be accurate for most files, but VBR files without an Xing tag will
|
||||
# probably have wildly inaccurate file times. This is the default.
|
||||
#
|
||||
# 1 (Aggressive)
|
||||
# This checks the bitrates of 10 frames in the middle of the song.
|
||||
# This will still be inaccurate for VBR files without an Xing tag,
|
||||
# but they probably won't be quite as inaccurate as 0. This takes
|
||||
# more time, obviously, although the time hit will only happen the
|
||||
# first time you scan a particular file.
|
||||
#
|
||||
# 2 (Painfully aggressive)
|
||||
# This walks through the entire song, counting the number of frames.
|
||||
# This should result in accurate song times, but will take the most
|
||||
# time. Again, this will only have to be incurred the first time
|
||||
# the file is indexed.
|
||||
#
|
||||
|
||||
scan_type = 2
|
||||
|
||||
#
|
||||
# compress
|
||||
#
|
||||
# Whether to use gzip content-encoding when transferring playlists etc.
|
||||
# This was contributed as a patch by Ciamac Moallemi just prior to the 0.2.1
|
||||
# release, and as such, hasn't gotten as much testing as other features.
|
||||
#
|
||||
# This feature should substantially speed up transfers of large databases
|
||||
# and playlists.
|
||||
#
|
||||
# It will eventually default to 1, but currently it defaults to 0.
|
||||
#
|
||||
|
||||
#compress = 0
|
||||
|
||||
[scan]
|
||||
|
||||
#
|
||||
# correct_order
|
||||
#
|
||||
# When set to 1, ensures that items in a playlist are returned in the
|
||||
# order in which they are set in the playlist. On platforms with
|
||||
# limited memory, this may impose an unacceptable performance penalty,
|
||||
# but on a PC or Mac, it's fine.
|
||||
#
|
||||
correct_order = 1
|
||||
|
||||
[plugins]
|
||||
plugin_dir = plugins
|
||||
plugins = ssc-script.so,rsp.so
|
||||
16
osx/FireflyPrefs/version.plist
Normal file
16
osx/FireflyPrefs/version.plist
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildVersion</key>
|
||||
<string>54</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>ProjectName</key>
|
||||
<string>PreferencePaneTemplate</string>
|
||||
<key>SourceVersion</key>
|
||||
<string>120000</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in New Issue
Block a user