Added Cathage for UnrarKit and UnzipKit
Not using them yet. Also removed Growl fully
This commit is contained in:
parent
0cffe85ce5
commit
c8eca51309
|
@ -0,0 +1,2 @@
|
|||
github "abbeycode/UnrarKit"
|
||||
github "abbeycode/UnzipKit"
|
|
@ -1 +0,0 @@
|
|||
Versions/Current/Growl
|
|
@ -1 +0,0 @@
|
|||
Versions/Current/Headers
|
|
@ -1 +0,0 @@
|
|||
Versions/Current/Resources
|
Binary file not shown.
|
@ -1,6 +0,0 @@
|
|||
#include <Growl/GrowlDefines.h>
|
||||
|
||||
#ifdef __OBJC__
|
||||
# include <Growl/GrowlApplicationBridge.h>
|
||||
#endif
|
||||
#include <Growl/GrowlApplicationBridge-Carbon.h>
|
|
@ -1,780 +0,0 @@
|
|||
//
|
||||
// GrowlApplicationBridge-Carbon.h
|
||||
// Growl
|
||||
//
|
||||
// Created by Mac-arena the Bored Zo on Wed Jun 18 2004.
|
||||
// Based on GrowlApplicationBridge.h by Evan Schoenberg.
|
||||
// This source code is in the public domain. You may freely link it into any
|
||||
// program.
|
||||
//
|
||||
|
||||
#ifndef _GROWLAPPLICATIONBRIDGE_CARBON_H_
|
||||
#define _GROWLAPPLICATIONBRIDGE_CARBON_H_
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <Carbon/Carbon.h>
|
||||
|
||||
#ifndef GROWL_EXPORT
|
||||
#define GROWL_EXPORT __attribute__((visibility("default"))) DEPRECATED_ATTRIBUTE
|
||||
#endif
|
||||
|
||||
/*! @header GrowlApplicationBridge-Carbon.h
|
||||
* @abstract Declares an API that Carbon applications can use to interact with Growl.
|
||||
* @discussion GrowlApplicationBridge uses a delegate to provide information //XXX
|
||||
* to Growl (such as your application's name and what notifications it may
|
||||
* post) and to provide information to your application (such as that Growl
|
||||
* is listening for notifications or that a notification has been clicked).
|
||||
*
|
||||
* You can set the Growldelegate with Growl_SetDelegate and find out the
|
||||
* current delegate with Growl_GetDelegate. See struct Growl_Delegate for more
|
||||
* information about the delegate.
|
||||
*/
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/*! @struct Growl_Delegate
|
||||
* @abstract Delegate to supply GrowlApplicationBridge with information and respond to events.
|
||||
* @discussion The Growl delegate provides your interface to
|
||||
* GrowlApplicationBridge. When GrowlApplicationBridge needs information about
|
||||
* your application, it looks for it in the delegate; when Growl or the user
|
||||
* does something that you might be interested in, GrowlApplicationBridge
|
||||
* looks for a callback in the delegate and calls it if present
|
||||
* (meaning, if it is not <code>NULL</code>).
|
||||
* XXX on all of that
|
||||
* @field size The size of the delegate structure.
|
||||
* @field applicationName The name of your application.
|
||||
* @field registrationDictionary A dictionary describing your application and the notifications it can send out.
|
||||
* @field applicationIconData Your application's icon.
|
||||
* @field growlInstallationWindowTitle The title of the installation window.
|
||||
* @field growlInstallationInformation Text to display in the installation window.
|
||||
* @field growlUpdateWindowTitle The title of the update window.
|
||||
* @field growlUpdateInformation Text to display in the update window.
|
||||
* @field referenceCount A count of owners of the delegate.
|
||||
* @field retain Called when GrowlApplicationBridge receives this delegate.
|
||||
* @field release Called when GrowlApplicationBridge no longer needs this delegate.
|
||||
* @field growlIsReady Called when GrowlHelperApp is listening for notifications.
|
||||
* @field growlNotificationWasClicked Called when a Growl notification is clicked.
|
||||
* @field growlNotificationTimedOut Called when a Growl notification timed out.
|
||||
*/
|
||||
struct Growl_Delegate {
|
||||
/* @discussion This should be sizeof(struct Growl_Delegate).
|
||||
*/
|
||||
size_t size;
|
||||
|
||||
/*All of these attributes are optional.
|
||||
*Optional attributes can be NULL; required attributes that
|
||||
* are NULL cause setting the Growl delegate to fail.
|
||||
*XXX - move optional/required status into the discussion for each field
|
||||
*/
|
||||
|
||||
/* This name is used both internally and in the Growl preferences.
|
||||
*
|
||||
* This should remain stable between different versions and incarnations of
|
||||
* your application.
|
||||
* For example, "SurfWriter" is a good app name, whereas "SurfWriter 2.0" and
|
||||
* "SurfWriter Lite" are not.
|
||||
*
|
||||
* This can be <code>NULL</code> if it is provided elsewhere, namely in an
|
||||
* auto-discoverable plist file in your app bundle
|
||||
* (XXX refer to more information on that) or in registrationDictionary.
|
||||
*/
|
||||
CFStringRef applicationName;
|
||||
|
||||
/*
|
||||
* Must contain at least these keys:
|
||||
* GROWL_NOTIFICATIONS_ALL (CFArray):
|
||||
* Contains the names of all notifications your application may post.
|
||||
*
|
||||
* Can also contain these keys:
|
||||
* GROWL_NOTIFICATIONS_DEFAULT (CFArray):
|
||||
* Names of notifications that should be enabled by default.
|
||||
* If omitted, GROWL_NOTIFICATIONS_ALL will be used.
|
||||
* GROWL_APP_NAME (CFString):
|
||||
* Same as the applicationName member of this structure.
|
||||
* If both are present, the applicationName member shall prevail.
|
||||
* If this key is present, you may omit applicationName (set it to <code>NULL</code>).
|
||||
* GROWL_APP_ICON (CFData):
|
||||
* Same as the iconData member of this structure.
|
||||
* If both are present, the iconData member shall prevail.
|
||||
* If this key is present, you may omit iconData (set it to <code>NULL</code>).
|
||||
*
|
||||
* If you change the contents of this dictionary after setting the delegate,
|
||||
* be sure to call Growl_Reregister.
|
||||
*
|
||||
* This can be <code>NULL</code> if you have an auto-discoverable plist file in your app
|
||||
* bundle. (XXX refer to more information on that)
|
||||
*/
|
||||
CFDictionaryRef registrationDictionary;
|
||||
|
||||
/* The data can be in any format supported by NSImage. As of
|
||||
* Mac OS X 10.3, this includes the .icns, TIFF, JPEG, GIF, PNG, PDF, and
|
||||
* PICT formats.
|
||||
*
|
||||
* If this is not supplied, Growl will look up your application's icon by
|
||||
* its application name.
|
||||
*/
|
||||
CFDataRef applicationIconData;
|
||||
|
||||
/* Installer display attributes
|
||||
*
|
||||
* These four attributes are used by the Growl installer, if this framework
|
||||
* supports it.
|
||||
* For any of these being <code>NULL</code>, a localised default will be
|
||||
* supplied.
|
||||
*/
|
||||
|
||||
/* If this is <code>NULL</code>, Growl will use a default,
|
||||
* localized title.
|
||||
*
|
||||
* Only used if you're using Growl-WithInstaller.framework. Otherwise,
|
||||
* this member is ignored.
|
||||
*/
|
||||
CFStringRef growlInstallationWindowTitle;
|
||||
/* This information may be as long or short as desired (the
|
||||
* window will be sized to fit it). If Growl is not installed, it will
|
||||
* be displayed to the user as an explanation of what Growl is and what
|
||||
* it can do in your application.
|
||||
* It should probably note that no download is required to install.
|
||||
*
|
||||
* If this is <code>NULL</code>, Growl will use a default, localized
|
||||
* explanation.
|
||||
*
|
||||
* Only used if you're using Growl-WithInstaller.framework. Otherwise,
|
||||
* this member is ignored.
|
||||
*/
|
||||
CFStringRef growlInstallationInformation;
|
||||
/* If this is <code>NULL</code>, Growl will use a default,
|
||||
* localized title.
|
||||
*
|
||||
* Only used if you're using Growl-WithInstaller.framework. Otherwise,
|
||||
* this member is ignored.
|
||||
*/
|
||||
CFStringRef growlUpdateWindowTitle;
|
||||
/* This information may be as long or short as desired (the
|
||||
* window will be sized to fit it). If an older version of Growl is
|
||||
* installed, it will be displayed to the user as an explanation that an
|
||||
* updated version of Growl is included in your application and
|
||||
* no download is required.
|
||||
*
|
||||
* If this is <code>NULL</code>, Growl will use a default, localized
|
||||
* explanation.
|
||||
*
|
||||
* Only used if you're using Growl-WithInstaller.framework. Otherwise,
|
||||
* this member is ignored.
|
||||
*/
|
||||
CFStringRef growlUpdateInformation;
|
||||
|
||||
/* This member is provided for use by your retain and release
|
||||
* callbacks (see below).
|
||||
*
|
||||
* GrowlApplicationBridge never directly uses this member. Instead, it
|
||||
* calls your retain callback (if non-<code>NULL</code>) and your release
|
||||
* callback (if non-<code>NULL</code>).
|
||||
*/
|
||||
unsigned referenceCount;
|
||||
|
||||
//Functions. Currently all of these are optional (any of them can be NULL).
|
||||
|
||||
/* When you call Growl_SetDelegate(newDelegate), it will call
|
||||
* oldDelegate->release(oldDelegate), and then it will call
|
||||
* newDelegate->retain(newDelegate), and the return value from retain
|
||||
* is what will be set as the delegate.
|
||||
* (This means that this member works like CFRetain and -[NSObject retain].)
|
||||
* This member is optional (it can be <code>NULL</code>).
|
||||
* For a delegate allocated with malloc, this member would be
|
||||
* <code>NULL</code>.
|
||||
* @result A delegate to which GrowlApplicationBridge holds a reference.
|
||||
*/
|
||||
void *(*retain)(void *);
|
||||
/* When you call Growl_SetDelegate(newDelegate), it will call
|
||||
* oldDelegate->release(oldDelegate), and then it will call
|
||||
* newDelegate->retain(newDelegate), and the return value from retain
|
||||
* is what will be set as the delegate.
|
||||
* (This means that this member works like CFRelease and
|
||||
* -[NSObject release].)
|
||||
* This member is optional (it can be NULL).
|
||||
* For a delegate allocated with malloc, this member might be
|
||||
* <code>free</code>(3).
|
||||
*/
|
||||
void (*release)(void *);
|
||||
|
||||
/* Informs the delegate that Growl (specifically, the GrowlHelperApp) was
|
||||
* launched successfully (or was already running). The application can
|
||||
* take actions with the knowledge that Growl is installed and functional.
|
||||
*/
|
||||
void (*growlIsReady)(void);
|
||||
|
||||
/* Informs the delegate that a Growl notification was clicked. It is only
|
||||
* sent for notifications sent with a non-<code>NULL</code> clickContext,
|
||||
* so if you want to receive a message when a notification is clicked,
|
||||
* clickContext must not be <code>NULL</code> when calling
|
||||
* Growl_PostNotification or
|
||||
* Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext.
|
||||
*/
|
||||
void (*growlNotificationWasClicked)(CFPropertyListRef clickContext);
|
||||
|
||||
/* Informs the delegate that a Growl notification timed out. It is only
|
||||
* sent for notifications sent with a non-<code>NULL</code> clickContext,
|
||||
* so if you want to receive a message when a notification is clicked,
|
||||
* clickContext must not be <code>NULL</code> when calling
|
||||
* Growl_PostNotification or
|
||||
* Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext.
|
||||
*/
|
||||
void (*growlNotificationTimedOut)(CFPropertyListRef clickContext);
|
||||
};
|
||||
|
||||
/*! @struct Growl_Notification
|
||||
* @abstract Structure describing a Growl notification.
|
||||
* @discussion XXX
|
||||
* @field size The size of the notification structure.
|
||||
* @field name Identifies the notification.
|
||||
* @field title Short synopsis of the notification.
|
||||
* @field description Additional text.
|
||||
* @field iconData An icon for the notification.
|
||||
* @field priority An indicator of the notification's importance.
|
||||
* @field reserved Bits reserved for future usage.
|
||||
* @field isSticky Requests that a notification stay on-screen until dismissed explicitly.
|
||||
* @field clickContext An identifier to be passed to your click callback when a notification is clicked.
|
||||
* @field clickCallback A callback to call when the notification is clicked.
|
||||
*/
|
||||
struct Growl_Notification {
|
||||
/* This should be sizeof(struct Growl_Notification).
|
||||
*/
|
||||
size_t size;
|
||||
|
||||
/* The notification name distinguishes one type of
|
||||
* notification from another. The name should be human-readable, as it
|
||||
* will be displayed in the Growl preference pane.
|
||||
*
|
||||
* The name is used in the GROWL_NOTIFICATIONS_ALL and
|
||||
* GROWL_NOTIFICATIONS_DEFAULT arrays in the registration dictionary, and
|
||||
* in this member of the Growl_Notification structure.
|
||||
*/
|
||||
CFStringRef name;
|
||||
|
||||
/* A notification's title describes the notification briefly.
|
||||
* It should be easy to read quickly by the user.
|
||||
*/
|
||||
CFStringRef title;
|
||||
|
||||
/* The description supplements the title with more
|
||||
* information. It is usually longer and sometimes involves a list of
|
||||
* subjects. For example, for a 'Download complete' notification, the
|
||||
* description might have one filename per line. GrowlMail in Growl 0.6
|
||||
* uses a description of '%d new mail(s)' (formatted with the number of
|
||||
* messages).
|
||||
*/
|
||||
CFStringRef description;
|
||||
|
||||
/* The notification icon usually indicates either what
|
||||
* happened (it may have the same icon as e.g. a toolbar item that
|
||||
* started the process that led to the notification), or what it happened
|
||||
* to (e.g. a document icon).
|
||||
*
|
||||
* The icon data is optional, so it can be <code>NULL</code>. In that
|
||||
* case, the application icon is used alone. Not all displays support
|
||||
* icons.
|
||||
*
|
||||
* The data can be in any format supported by NSImage. As of Mac OS X
|
||||
* 10.3, this includes the .icns, TIFF, JPEG, GIF, PNG, PDF, and PICT form
|
||||
* ats.
|
||||
*/
|
||||
CFDataRef iconData;
|
||||
|
||||
/* Priority is new in Growl 0.6, and is represented as a
|
||||
* signed integer from -2 to +2. 0 is Normal priority, -2 is Very Low
|
||||
* priority, and +2 is Very High priority.
|
||||
*
|
||||
* Not all displays support priority. If you do not wish to assign a
|
||||
* priority to your notification, assign 0.
|
||||
*/
|
||||
signed int priority;
|
||||
|
||||
/* These bits are not used in Growl 0.6. Set them to 0.
|
||||
*/
|
||||
unsigned reserved: 31;
|
||||
|
||||
/* When the sticky bit is clear, in most displays,
|
||||
* notifications disappear after a certain amount of time. Sticky
|
||||
* notifications, however, remain on-screen until the user dismisses them
|
||||
* explicitly, usually by clicking them.
|
||||
*
|
||||
* Sticky notifications were introduced in Growl 0.6. Most notifications
|
||||
* should not be sticky. Not all displays support sticky notifications,
|
||||
* and the user may choose in Growl's preference pane to force the
|
||||
* notification to be sticky or non-sticky, in which case the sticky bit
|
||||
* in the notification will be ignored.
|
||||
*/
|
||||
unsigned isSticky: 1;
|
||||
|
||||
/* If this is not <code>NULL</code>, and your click callback
|
||||
* is not <code>NULL</code> either, this will be passed to the callback
|
||||
* when your notification is clicked by the user.
|
||||
*
|
||||
* Click feedback was introduced in Growl 0.6, and it is optional. Not
|
||||
* all displays support click feedback.
|
||||
*/
|
||||
CFPropertyListRef clickContext;
|
||||
|
||||
/* If this is not <code>NULL</code>, it will be called instead
|
||||
* of the Growl delegate's click callback when clickContext is
|
||||
* non-<code>NULL</code> and the notification is clicked on by the user.
|
||||
*
|
||||
* Click feedback was introduced in Growl 0.6, and it is optional. Not
|
||||
* all displays support click feedback.
|
||||
*
|
||||
* The per-notification click callback is not yet supported as of Growl
|
||||
* 0.7.
|
||||
*/
|
||||
void (*clickCallback)(CFPropertyListRef clickContext);
|
||||
|
||||
CFStringRef identifier;
|
||||
};
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Easy initialisers
|
||||
|
||||
/*! @defined InitGrowlDelegate
|
||||
* @abstract Callable macro. Initializes a Growl delegate structure to defaults.
|
||||
* @discussion Call with a pointer to a struct Growl_Delegate. All of the
|
||||
* members of the structure will be set to 0 or <code>NULL</code>, except for
|
||||
* size (which will be set to <code>sizeof(struct Growl_Delegate)</code>) and
|
||||
* referenceCount (which will be set to 1).
|
||||
*/
|
||||
#define InitGrowlDelegate(delegate) \
|
||||
do { \
|
||||
if (delegate) { \
|
||||
(delegate)->size = sizeof(struct Growl_Delegate); \
|
||||
(delegate)->applicationName = NULL; \
|
||||
(delegate)->registrationDictionary = NULL; \
|
||||
(delegate)->applicationIconData = NULL; \
|
||||
(delegate)->growlInstallationWindowTitle = NULL; \
|
||||
(delegate)->growlInstallationInformation = NULL; \
|
||||
(delegate)->growlUpdateWindowTitle = NULL; \
|
||||
(delegate)->growlUpdateInformation = NULL; \
|
||||
(delegate)->referenceCount = 1U; \
|
||||
(delegate)->retain = NULL; \
|
||||
(delegate)->release = NULL; \
|
||||
(delegate)->growlIsReady = NULL; \
|
||||
(delegate)->growlNotificationWasClicked = NULL; \
|
||||
(delegate)->growlNotificationTimedOut = NULL; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
/*! @defined InitGrowlNotification
|
||||
* @abstract Callable macro. Initializes a Growl notification structure to defaults.
|
||||
* @discussion Call with a pointer to a struct Growl_Notification. All of
|
||||
* the members of the structure will be set to 0 or <code>NULL</code>, except
|
||||
* for size (which will be set to
|
||||
* <code>sizeof(struct Growl_Notification)</code>).
|
||||
*/
|
||||
#define InitGrowlNotification(notification) \
|
||||
do { \
|
||||
if (notification) { \
|
||||
(notification)->size = sizeof(struct Growl_Notification); \
|
||||
(notification)->name = NULL; \
|
||||
(notification)->title = NULL; \
|
||||
(notification)->description = NULL; \
|
||||
(notification)->iconData = NULL; \
|
||||
(notification)->priority = 0; \
|
||||
(notification)->reserved = 0U; \
|
||||
(notification)->isSticky = false; \
|
||||
(notification)->clickContext = NULL; \
|
||||
(notification)->clickCallback = NULL; \
|
||||
(notification)->identifier = NULL; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Public API
|
||||
|
||||
// @functiongroup Managing the Growl delegate
|
||||
|
||||
/*! @function Growl_SetDelegate
|
||||
* @abstract Replaces the current Growl delegate with a new one, or removes
|
||||
* the Growl delegate.
|
||||
* @param newDelegate
|
||||
* @result Returns false and does nothing else if a pointer that was passed in
|
||||
* is unsatisfactory (because it is non-<code>NULL</code>, but at least one
|
||||
* required member of it is <code>NULL</code>). Otherwise, sets or unsets the
|
||||
* delegate and returns true.
|
||||
* @discussion When <code>newDelegate</code> is non-<code>NULL</code>, sets
|
||||
* the delegate to <code>newDelegate</code>. When it is <code>NULL</code>,
|
||||
* the current delegate will be unset, and no delegate will be in place.
|
||||
*
|
||||
* It is legal for <code>newDelegate</code> to be the current delegate;
|
||||
* nothing will happen, and Growl_SetDelegate will return true. It is also
|
||||
* legal for it to be <code>NULL</code>, as described above; again, it will
|
||||
* return true.
|
||||
*
|
||||
* If there was a delegate in place before the call, Growl_SetDelegate will
|
||||
* call the old delegate's release member if it was non-<code>NULL</code>. If
|
||||
* <code>newDelegate</code> is non-<code>NULL</code>, Growl_SetDelegate will
|
||||
* call <code>newDelegate->retain</code>, and set the delegate to its return
|
||||
* value.
|
||||
*
|
||||
* If you are using Growl-WithInstaller.framework, and an older version of
|
||||
* Growl is installed on the user's system, the user will automatically be
|
||||
* prompted to update.
|
||||
*
|
||||
* GrowlApplicationBridge currently does not copy this structure, nor does it
|
||||
* retain any of the CF objects in the structure (it regards the structure as
|
||||
* a container that retains the objects when they are added and releases them
|
||||
* when they are removed or the structure is destroyed). Also,
|
||||
* GrowlApplicationBridge currently does not modify any member of the
|
||||
* structure, except possibly the referenceCount by calling the retain and
|
||||
* release members.
|
||||
*/
|
||||
GROWL_EXPORT Boolean Growl_SetDelegate(struct Growl_Delegate *newDelegate);
|
||||
|
||||
/*! @function Growl_GetDelegate
|
||||
* @abstract Returns the current Growl delegate, if any.
|
||||
* @result The current Growl delegate.
|
||||
* @discussion Returns the last pointer passed into Growl_SetDelegate, or
|
||||
* <code>NULL</code> if no such call has been made.
|
||||
*
|
||||
* This function follows standard Core Foundation reference-counting rules.
|
||||
* Because it is a Get function, not a Copy function, it will not retain the
|
||||
* delegate on your behalf. You are responsible for retaining and releasing
|
||||
* the delegate as needed.
|
||||
*/
|
||||
GROWL_EXPORT struct Growl_Delegate *Growl_GetDelegate(void);
|
||||
|
||||
#pragma mark -
|
||||
|
||||
// @functiongroup Posting Growl notifications
|
||||
|
||||
/*! @function Growl_PostNotification
|
||||
* @abstract Posts a Growl notification.
|
||||
* @param notification The notification to post.
|
||||
* @discussion This is the preferred means for sending a Growl notification.
|
||||
* The notification name and at least one of the title and description are
|
||||
* required (all three are preferred). All other parameters may be
|
||||
* <code>NULL</code> (or 0 or false as appropriate) to accept default values.
|
||||
*
|
||||
* If using the Growl-WithInstaller framework, if Growl is not installed the
|
||||
* user will be prompted to install Growl.
|
||||
* If the user cancels, this function will have no effect until the next
|
||||
* application session, at which time when it is called the user will be
|
||||
* prompted again. The user is also given the option to not be prompted again.
|
||||
* If the user does choose to install Growl, the requested notification will
|
||||
* be displayed once Growl is installed and running.
|
||||
*/
|
||||
GROWL_EXPORT void Growl_PostNotification(const struct Growl_Notification *notification);
|
||||
|
||||
/*! @function Growl_PostNotificationWithDictionary
|
||||
* @abstract Notifies using a userInfo dictionary suitable for passing to
|
||||
* CFDistributedNotificationCenter.
|
||||
* @param userInfo The dictionary to notify with.
|
||||
* @discussion Before Growl 0.6, your application would have posted
|
||||
* notifications using CFDistributedNotificationCenter by creating a userInfo
|
||||
* dictionary with the notification data. This had the advantage of allowing
|
||||
* you to add other data to the dictionary for programs besides Growl that
|
||||
* might be listening.
|
||||
*
|
||||
* This function allows you to use such dictionaries without being restricted
|
||||
* to using CFDistributedNotificationCenter. The keys for this dictionary
|
||||
* can be found in GrowlDefines.h.
|
||||
*/
|
||||
GROWL_EXPORT void Growl_PostNotificationWithDictionary(CFDictionaryRef userInfo);
|
||||
|
||||
/*! @function Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext
|
||||
* @abstract Posts a Growl notification using parameter values.
|
||||
* @param title The title of the notification.
|
||||
* @param description The description of the notification.
|
||||
* @param notificationName The name of the notification as listed in the
|
||||
* registration dictionary.
|
||||
* @param iconData Data representing a notification icon. Can be <code>NULL</code>.
|
||||
* @param priority The priority of the notification (-2 to +2, with -2
|
||||
* being Very Low and +2 being Very High).
|
||||
* @param isSticky If true, requests that this notification wait for a
|
||||
* response from the user.
|
||||
* @param clickContext An object to pass to the clickCallback, if any. Can
|
||||
* be <code>NULL</code>, in which case the clickCallback is not called.
|
||||
* @discussion Creates a temporary Growl_Notification, fills it out with the
|
||||
* supplied information, and calls Growl_PostNotification on it.
|
||||
* See struct Growl_Notification and Growl_PostNotification for more
|
||||
* information.
|
||||
*
|
||||
* The icon data can be in any format supported by NSImage. As of Mac OS X
|
||||
* 10.3, this includes the .icns, TIFF, JPEG, GIF, PNG, PDF, and PICT formats.
|
||||
*/
|
||||
GROWL_EXPORT void Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext(
|
||||
/*inhale*/
|
||||
CFStringRef title,
|
||||
CFStringRef description,
|
||||
CFStringRef notificationName,
|
||||
CFDataRef iconData,
|
||||
signed int priority,
|
||||
Boolean isSticky,
|
||||
CFPropertyListRef clickContext);
|
||||
|
||||
#pragma mark -
|
||||
|
||||
// @functiongroup Registering
|
||||
|
||||
/*! @function Growl_RegisterWithDictionary
|
||||
* @abstract Register your application with Growl without setting a delegate.
|
||||
* @discussion When you call this function with a dictionary,
|
||||
* GrowlApplicationBridge registers your application using that dictionary.
|
||||
* If you pass <code>NULL</code>, GrowlApplicationBridge will ask the delegate
|
||||
* (if there is one) for a dictionary, and if that doesn't work, it will look
|
||||
* in your application's bundle for an auto-discoverable plist.
|
||||
* (XXX refer to more information on that)
|
||||
*
|
||||
* If you pass a dictionary to this function, it must include the
|
||||
* <code>GROWL_APP_NAME</code> key, unless a delegate is set.
|
||||
*
|
||||
* This function is mainly an alternative to the delegate system introduced
|
||||
* with Growl 0.6. Without a delegate, you cannot receive callbacks such as
|
||||
* <code>growlIsReady</code> (since they are sent to the delegate). You can,
|
||||
* however, set a delegate after registering without one.
|
||||
*
|
||||
* This function was introduced in Growl.framework 0.7.
|
||||
* @result <code>false</code> if registration failed (e.g. if Growl isn't installed).
|
||||
*/
|
||||
GROWL_EXPORT Boolean Growl_RegisterWithDictionary(CFDictionaryRef regDict);
|
||||
|
||||
/*! @function Growl_Reregister
|
||||
* @abstract Updates your registration with Growl.
|
||||
* @discussion If your application changes the contents of the
|
||||
* GROWL_NOTIFICATIONS_ALL key in the registrationDictionary member of the
|
||||
* Growl delegate, or if it changes the value of that member, or if it
|
||||
* changes the contents of its auto-discoverable plist, call this function
|
||||
* to have Growl update its registration information for your application.
|
||||
*
|
||||
* Otherwise, this function does not normally need to be called. If you're
|
||||
* using a delegate, your application will be registered when you set the
|
||||
* delegate if both the delegate and its registrationDictionary member are
|
||||
* non-<code>NULL</code>.
|
||||
*
|
||||
* This function is now implemented using
|
||||
* <code>Growl_RegisterWithDictionary</code>.
|
||||
*/
|
||||
GROWL_EXPORT void Growl_Reregister(void);
|
||||
|
||||
#pragma mark -
|
||||
|
||||
/*! @function Growl_SetWillRegisterWhenGrowlIsReady
|
||||
* @abstract Tells GrowlApplicationBridge to register with Growl when Growl
|
||||
* launches (or not).
|
||||
* @discussion When Growl has started listening for notifications, it posts a
|
||||
* <code>GROWL_IS_READY</code> notification on the Distributed Notification
|
||||
* Center. GrowlApplicationBridge listens for this notification, using it to
|
||||
* perform various tasks (such as calling your delegate's
|
||||
* <code>growlIsReady</code> callback, if it has one). If this function is
|
||||
* called with <code>true</code>, one of those tasks will be to reregister
|
||||
* with Growl (in the manner of <code>Growl_Reregister</code>).
|
||||
*
|
||||
* This attribute is automatically set back to <code>false</code>
|
||||
* (the default) after every <code>GROWL_IS_READY</code> notification.
|
||||
* @param flag <code>true</code> if you want GrowlApplicationBridge to register with
|
||||
* Growl when next it is ready; <code>false</code> if not.
|
||||
*/
|
||||
GROWL_EXPORT void Growl_SetWillRegisterWhenGrowlIsReady(Boolean flag);
|
||||
/*! @function Growl_WillRegisterWhenGrowlIsReady
|
||||
* @abstract Reports whether GrowlApplicationBridge will register with Growl
|
||||
* when Growl next launches.
|
||||
* @result <code>true</code> if GrowlApplicationBridge will register with
|
||||
* Growl when next it posts GROWL_IS_READY; <code>false</code> if not.
|
||||
*/
|
||||
GROWL_EXPORT Boolean Growl_WillRegisterWhenGrowlIsReady(void);
|
||||
|
||||
#pragma mark -
|
||||
|
||||
// @functiongroup Obtaining registration dictionaries
|
||||
|
||||
/*! @function Growl_CopyRegistrationDictionaryFromDelegate
|
||||
* @abstract Asks the delegate for a registration dictionary.
|
||||
* @discussion If no delegate is set, or if the delegate's
|
||||
* <code>registrationDictionary</code> member is <code>NULL</code>, this
|
||||
* function returns <code>NULL</code>.
|
||||
*
|
||||
* This function does not attempt to clean up the dictionary in any way - for
|
||||
* example, if it is missing the <code>GROWL_APP_NAME</code> key, the result
|
||||
* will be missing it too. Use
|
||||
* <code>Growl_CreateRegistrationDictionaryByFillingInDictionary</code> or
|
||||
* <code>Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys</code>
|
||||
* to try to fill in missing keys.
|
||||
*
|
||||
* This function was introduced in Growl.framework 0.7.
|
||||
* @result A registration dictionary.
|
||||
*/
|
||||
GROWL_EXPORT CFDictionaryRef Growl_CopyRegistrationDictionaryFromDelegate(void);
|
||||
|
||||
/*! @function Growl_CopyRegistrationDictionaryFromBundle
|
||||
* @abstract Looks in a bundle for a registration dictionary.
|
||||
* @discussion This function looks in a bundle for an auto-discoverable
|
||||
* registration dictionary file using <code>CFBundleCopyResourceURL</code>.
|
||||
* If it finds one, it loads the file using <code>CFPropertyList</code> and
|
||||
* returns the result.
|
||||
*
|
||||
* If you pass <code>NULL</code> as the bundle, the main bundle is examined.
|
||||
*
|
||||
* This function does not attempt to clean up the dictionary in any way - for
|
||||
* example, if it is missing the <code>GROWL_APP_NAME</code> key, the result
|
||||
* will be missing it too. Use
|
||||
* <code>Growl_CreateRegistrationDictionaryByFillingInDictionary:</code> or
|
||||
* <code>Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys</code>
|
||||
* to try to fill in missing keys.
|
||||
*
|
||||
* This function was introduced in Growl.framework 0.7.
|
||||
* @result A registration dictionary.
|
||||
*/
|
||||
GROWL_EXPORT CFDictionaryRef Growl_CopyRegistrationDictionaryFromBundle(CFBundleRef bundle);
|
||||
|
||||
/*! @function Growl_CreateBestRegistrationDictionary
|
||||
* @abstract Obtains a registration dictionary, filled out to the best of
|
||||
* GrowlApplicationBridge's knowledge.
|
||||
* @discussion This function creates a registration dictionary as best
|
||||
* GrowlApplicationBridge knows how.
|
||||
*
|
||||
* First, GrowlApplicationBridge examines the Growl delegate (if there is
|
||||
* one) and gets the registration dictionary from that. If no such dictionary
|
||||
* was obtained, GrowlApplicationBridge looks in your application's main
|
||||
* bundle for an auto-discoverable registration dictionary file. If that
|
||||
* doesn't exist either, this function returns <code>NULL</code>.
|
||||
*
|
||||
* Second, GrowlApplicationBridge calls
|
||||
* <code>Growl_CreateRegistrationDictionaryByFillingInDictionary</code> with
|
||||
* whatever dictionary was obtained. The result of that function is the
|
||||
* result of this function.
|
||||
*
|
||||
* GrowlApplicationBridge uses this function when you call
|
||||
* <code>Growl_SetDelegate</code>, or when you call
|
||||
* <code>Growl_RegisterWithDictionary</code> with <code>NULL</code>.
|
||||
*
|
||||
* This function was introduced in Growl.framework 0.7.
|
||||
* @result A registration dictionary.
|
||||
*/
|
||||
GROWL_EXPORT CFDictionaryRef Growl_CreateBestRegistrationDictionary(void);
|
||||
|
||||
#pragma mark -
|
||||
|
||||
// @functiongroup Filling in registration dictionaries
|
||||
|
||||
/*! @function Growl_CreateRegistrationDictionaryByFillingInDictionary
|
||||
* @abstract Tries to fill in missing keys in a registration dictionary.
|
||||
* @param regDict The dictionary to fill in.
|
||||
* @result The dictionary with the keys filled in.
|
||||
* @discussion This function examines the passed-in dictionary for missing keys,
|
||||
* and tries to work out correct values for them. As of 0.7, it uses:
|
||||
*
|
||||
* Key Value
|
||||
* --- -----
|
||||
* <code>GROWL_APP_NAME</code> <code>CFBundleExecutableName</code>
|
||||
* <code>GROWL_APP_ICON</code> The icon of the application.
|
||||
* <code>GROWL_APP_LOCATION</code> The location of the application.
|
||||
* <code>GROWL_NOTIFICATIONS_DEFAULT</code> <code>GROWL_NOTIFICATIONS_ALL</code>
|
||||
*
|
||||
* Keys are only filled in if missing; if a key is present in the dictionary,
|
||||
* its value will not be changed.
|
||||
*
|
||||
* This function was introduced in Growl.framework 0.7.
|
||||
*/
|
||||
GROWL_EXPORT CFDictionaryRef Growl_CreateRegistrationDictionaryByFillingInDictionary(CFDictionaryRef regDict);
|
||||
/*! @function Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys
|
||||
* @abstract Tries to fill in missing keys in a registration dictionary.
|
||||
* @param regDict The dictionary to fill in.
|
||||
* @param keys The keys to fill in. If <code>NULL</code>, any missing keys are filled in.
|
||||
* @result The dictionary with the keys filled in.
|
||||
* @discussion This function examines the passed-in dictionary for missing keys,
|
||||
* and tries to work out correct values for them. As of 0.7, it uses:
|
||||
*
|
||||
* Key Value
|
||||
* --- -----
|
||||
* <code>GROWL_APP_NAME</code> <code>CFBundleExecutableName</code>
|
||||
* <code>GROWL_APP_ICON</code> The icon of the application.
|
||||
* <code>GROWL_APP_LOCATION</code> The location of the application.
|
||||
* <code>GROWL_NOTIFICATIONS_DEFAULT</code> <code>GROWL_NOTIFICATIONS_ALL</code>
|
||||
*
|
||||
* Only those keys that are listed in <code>keys</code> will be filled in.
|
||||
* Other missing keys are ignored. Also, keys are only filled in if missing;
|
||||
* if a key is present in the dictionary, its value will not be changed.
|
||||
*
|
||||
* This function was introduced in Growl.framework 0.7.
|
||||
*/
|
||||
GROWL_EXPORT CFDictionaryRef Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys(CFDictionaryRef regDict, CFSetRef keys);
|
||||
|
||||
/*! @brief Tries to fill in missing keys in a notification dictionary.
|
||||
* @param notifDict The dictionary to fill in.
|
||||
* @return The dictionary with the keys filled in. This will be a separate instance from \a notifDict.
|
||||
* @discussion This function examines the \a notifDict for missing keys, and
|
||||
* tries to get them from the last known registration dictionary. As of 1.1,
|
||||
* the keys that it will look for are:
|
||||
*
|
||||
* \li <code>GROWL_APP_NAME</code>
|
||||
* \li <code>GROWL_APP_ICON</code>
|
||||
*
|
||||
* @since Growl.framework 1.1
|
||||
*/
|
||||
GROWL_EXPORT CFDictionaryRef Growl_CreateNotificationDictionaryByFillingInDictionary(CFDictionaryRef notifDict);
|
||||
|
||||
#pragma mark -
|
||||
|
||||
// @functiongroup Querying Growl's status
|
||||
|
||||
/*! @function Growl_IsInstalled
|
||||
* @abstract Determines whether the Growl prefpane and its helper app are
|
||||
* installed.
|
||||
* @result Returns true if Growl is installed, false otherwise.
|
||||
*/
|
||||
GROWL_EXPORT Boolean Growl_IsInstalled(void);
|
||||
|
||||
/*! @function Growl_IsRunning
|
||||
* @abstract Cycles through the process list to find whether GrowlHelperApp
|
||||
* is running.
|
||||
* @result Returns true if Growl is running, false otherwise.
|
||||
*/
|
||||
GROWL_EXPORT Boolean Growl_IsRunning(void);
|
||||
|
||||
#pragma mark -
|
||||
|
||||
// @functiongroup Launching Growl
|
||||
|
||||
/*! @typedef GrowlLaunchCallback
|
||||
* @abstract Callback to notify you that Growl is running.
|
||||
* @param context The context pointer passed to Growl_LaunchIfInstalled.
|
||||
* @discussion Growl_LaunchIfInstalled calls this callback function if Growl
|
||||
* was already running or if it launched Growl successfully.
|
||||
*/
|
||||
typedef void (*GrowlLaunchCallback)(void *context);
|
||||
|
||||
/*! @function Growl_LaunchIfInstalled
|
||||
* @abstract Launches GrowlHelperApp if it is not already running.
|
||||
* @param callback A callback function which will be called if Growl was successfully
|
||||
* launched or was already running. Can be <code>NULL</code>.
|
||||
* @param context The context pointer to pass to the callback. Can be <code>NULL</code>.
|
||||
* @result Returns true if Growl was successfully launched or was already
|
||||
* running; returns false and does not call the callback otherwise.
|
||||
* @discussion Returns true and calls the callback (if the callback is not
|
||||
* <code>NULL</code>) if the Growl helper app began launching or was already
|
||||
* running. Returns false and performs no other action if Growl could not be
|
||||
* launched (e.g. because the Growl preference pane is not properly installed).
|
||||
*
|
||||
* If <code>Growl_CreateBestRegistrationDictionary</code> returns
|
||||
* non-<code>NULL</code>, this function will register with Growl atomically.
|
||||
*
|
||||
* The callback should take a single argument; this is to allow applications
|
||||
* to have context-relevant information passed back. It is perfectly
|
||||
* acceptable for context to be <code>NULL</code>. The callback itself can be
|
||||
* <code>NULL</code> if you don't want one.
|
||||
*/
|
||||
GROWL_EXPORT Boolean Growl_LaunchIfInstalled(GrowlLaunchCallback callback, void *context);
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Constants
|
||||
|
||||
/*! @defined GROWL_PREFPANE_BUNDLE_IDENTIFIER
|
||||
* @abstract The CFBundleIdentifier of the Growl preference pane bundle.
|
||||
* @discussion GrowlApplicationBridge uses this to determine whether Growl is
|
||||
* currently installed, by searching for the Growl preference pane. Your
|
||||
* application probably does not need to use this macro itself.
|
||||
*/
|
||||
#ifndef GROWL_PREFPANE_BUNDLE_IDENTIFIER
|
||||
#define GROWL_PREFPANE_BUNDLE_IDENTIFIER CFSTR("com.growl.prefpanel")
|
||||
#endif
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _GROWLAPPLICATIONBRIDGE_CARBON_H_ */
|
|
@ -1,575 +0,0 @@
|
|||
//
|
||||
// GrowlApplicationBridge.h
|
||||
// Growl
|
||||
//
|
||||
// Created by Evan Schoenberg on Wed Jun 16 2004.
|
||||
// Copyright 2004-2006 The Growl Project. All rights reserved.
|
||||
//
|
||||
|
||||
/*!
|
||||
* @header GrowlApplicationBridge.h
|
||||
* @abstract Defines the GrowlApplicationBridge class.
|
||||
* @discussion This header defines the GrowlApplicationBridge class as well as
|
||||
* the GROWL_PREFPANE_BUNDLE_IDENTIFIER constant.
|
||||
*/
|
||||
|
||||
#ifndef __GrowlApplicationBridge_h__
|
||||
#define __GrowlApplicationBridge_h__
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AppKit/AppKit.h>
|
||||
#import "GrowlDefines.h"
|
||||
|
||||
//Forward declarations
|
||||
@protocol GrowlApplicationBridgeDelegate;
|
||||
|
||||
//Internal notification when the user chooses not to install (to avoid continuing to cache notifications awaiting installation)
|
||||
#define GROWL_USER_CHOSE_NOT_TO_INSTALL_NOTIFICATION @"User chose not to install"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark -
|
||||
|
||||
/*!
|
||||
* @class GrowlApplicationBridge
|
||||
* @abstract A class used to interface with Growl.
|
||||
* @discussion This class provides a means to interface with Growl.
|
||||
*
|
||||
* Currently it provides a way to detect if Growl is installed and launch the
|
||||
* GrowlHelperApp if it's not already running.
|
||||
*/
|
||||
@interface GrowlApplicationBridge : NSObject {
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* @method isGrowlInstalled
|
||||
* @abstract Detects whether Growl is installed.
|
||||
* @discussion Determines if the Growl prefpane and its helper app are installed.
|
||||
* @result Returns YES if Growl is installed, NO otherwise.
|
||||
*/
|
||||
+ (BOOL) isGrowlInstalled;
|
||||
|
||||
/*!
|
||||
* @method isGrowlRunning
|
||||
* @abstract Detects whether GrowlHelperApp is currently running.
|
||||
* @discussion Cycles through the process list to find whether GrowlHelperApp is running and returns its findings.
|
||||
* @result Returns YES if GrowlHelperApp is running, NO otherwise.
|
||||
*/
|
||||
+ (BOOL) isGrowlRunning;
|
||||
|
||||
#pragma mark -
|
||||
|
||||
/*!
|
||||
* @method setGrowlDelegate:
|
||||
* @abstract Set the object which will be responsible for providing and receiving Growl information.
|
||||
* @discussion This must be called before using GrowlApplicationBridge.
|
||||
*
|
||||
* The methods in the GrowlApplicationBridgeDelegate protocol are required
|
||||
* and return the basic information needed to register with Growl.
|
||||
*
|
||||
* The methods in the GrowlApplicationBridgeDelegate_InformalProtocol
|
||||
* informal protocol are individually optional. They provide a greater
|
||||
* degree of interaction between the application and growl such as informing
|
||||
* the application when one of its Growl notifications is clicked by the user.
|
||||
*
|
||||
* The methods in the GrowlApplicationBridgeDelegate_Installation_InformalProtocol
|
||||
* informal protocol are individually optional and are only applicable when
|
||||
* using the Growl-WithInstaller.framework which allows for automated Growl
|
||||
* installation.
|
||||
*
|
||||
* When this method is called, data will be collected from inDelegate, Growl
|
||||
* will be launched if it is not already running, and the application will be
|
||||
* registered with Growl.
|
||||
*
|
||||
* If using the Growl-WithInstaller framework, if Growl is already installed
|
||||
* but this copy of the framework has an updated version of Growl, the user
|
||||
* will be prompted to update automatically.
|
||||
*
|
||||
* @param inDelegate The delegate for the GrowlApplicationBridge. It must conform to the GrowlApplicationBridgeDelegate protocol.
|
||||
*/
|
||||
+ (void) setGrowlDelegate:(NSObject<GrowlApplicationBridgeDelegate> *)inDelegate;
|
||||
|
||||
/*!
|
||||
* @method growlDelegate
|
||||
* @abstract Return the object responsible for providing and receiving Growl information.
|
||||
* @discussion See setGrowlDelegate: for details.
|
||||
* @result The Growl delegate.
|
||||
*/
|
||||
+ (NSObject<GrowlApplicationBridgeDelegate> *) growlDelegate;
|
||||
|
||||
#pragma mark -
|
||||
|
||||
/*!
|
||||
* @method notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:
|
||||
* @abstract Send a Growl notification.
|
||||
* @discussion This is the preferred means for sending a Growl notification.
|
||||
* The notification name and at least one of the title and description are
|
||||
* required (all three are preferred). All other parameters may be
|
||||
* <code>nil</code> (or 0 or NO as appropriate) to accept default values.
|
||||
*
|
||||
* If using the Growl-WithInstaller framework, if Growl is not installed the
|
||||
* user will be prompted to install Growl. If the user cancels, this method
|
||||
* will have no effect until the next application session, at which time when
|
||||
* it is called the user will be prompted again. The user is also given the
|
||||
* option to not be prompted again. If the user does choose to install Growl,
|
||||
* the requested notification will be displayed once Growl is installed and
|
||||
* running.
|
||||
*
|
||||
* @param title The title of the notification displayed to the user.
|
||||
* @param description The full description of the notification displayed to the user.
|
||||
* @param notifName The internal name of the notification. Should be human-readable, as it will be displayed in the Growl preference pane.
|
||||
* @param iconData <code>NSData</code> object to show with the notification as its icon. If <code>nil</code>, the application's icon will be used instead.
|
||||
* @param priority The priority of the notification. The default value is 0; positive values are higher priority and negative values are lower priority. Not all Growl displays support priority.
|
||||
* @param isSticky If YES, the notification will remain on screen until clicked. Not all Growl displays support sticky notifications.
|
||||
* @param clickContext A context passed back to the Growl delegate if it implements -(void)growlNotificationWasClicked: and the notification is clicked. Not all display plugins support clicking. The clickContext must be plist-encodable (completely of <code>NSString</code>, <code>NSArray</code>, <code>NSNumber</code>, <code>NSDictionary</code>, and <code>NSData</code> types).
|
||||
*/
|
||||
+ (void) notifyWithTitle:(NSString *)title
|
||||
description:(NSString *)description
|
||||
notificationName:(NSString *)notifName
|
||||
iconData:(NSData *)iconData
|
||||
priority:(signed int)priority
|
||||
isSticky:(BOOL)isSticky
|
||||
clickContext:(id)clickContext;
|
||||
|
||||
/*!
|
||||
* @method notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:identifier:
|
||||
* @abstract Send a Growl notification.
|
||||
* @discussion This is the preferred means for sending a Growl notification.
|
||||
* The notification name and at least one of the title and description are
|
||||
* required (all three are preferred). All other parameters may be
|
||||
* <code>nil</code> (or 0 or NO as appropriate) to accept default values.
|
||||
*
|
||||
* If using the Growl-WithInstaller framework, if Growl is not installed the
|
||||
* user will be prompted to install Growl. If the user cancels, this method
|
||||
* will have no effect until the next application session, at which time when
|
||||
* it is called the user will be prompted again. The user is also given the
|
||||
* option to not be prompted again. If the user does choose to install Growl,
|
||||
* the requested notification will be displayed once Growl is installed and
|
||||
* running.
|
||||
*
|
||||
* @param title The title of the notification displayed to the user.
|
||||
* @param description The full description of the notification displayed to the user.
|
||||
* @param notifName The internal name of the notification. Should be human-readable, as it will be displayed in the Growl preference pane.
|
||||
* @param iconData <code>NSData</code> object to show with the notification as its icon. If <code>nil</code>, the application's icon will be used instead.
|
||||
* @param priority The priority of the notification. The default value is 0; positive values are higher priority and negative values are lower priority. Not all Growl displays support priority.
|
||||
* @param isSticky If YES, the notification will remain on screen until clicked. Not all Growl displays support sticky notifications.
|
||||
* @param clickContext A context passed back to the Growl delegate if it implements -(void)growlNotificationWasClicked: and the notification is clicked. Not all display plugins support clicking. The clickContext must be plist-encodable (completely of <code>NSString</code>, <code>NSArray</code>, <code>NSNumber</code>, <code>NSDictionary</code>, and <code>NSData</code> types).
|
||||
* @param identifier An identifier for this notification. Notifications with equal identifiers are coalesced.
|
||||
*/
|
||||
+ (void) notifyWithTitle:(NSString *)title
|
||||
description:(NSString *)description
|
||||
notificationName:(NSString *)notifName
|
||||
iconData:(NSData *)iconData
|
||||
priority:(signed int)priority
|
||||
isSticky:(BOOL)isSticky
|
||||
clickContext:(id)clickContext
|
||||
identifier:(NSString *)identifier;
|
||||
|
||||
/*! @method notifyWithDictionary:
|
||||
* @abstract Notifies using a userInfo dictionary suitable for passing to
|
||||
* <code>NSDistributedNotificationCenter</code>.
|
||||
* @param userInfo The dictionary to notify with.
|
||||
* @discussion Before Growl 0.6, your application would have posted
|
||||
* notifications using <code>NSDistributedNotificationCenter</code> by
|
||||
* creating a userInfo dictionary with the notification data. This had the
|
||||
* advantage of allowing you to add other data to the dictionary for programs
|
||||
* besides Growl that might be listening.
|
||||
*
|
||||
* This method allows you to use such dictionaries without being restricted
|
||||
* to using <code>NSDistributedNotificationCenter</code>. The keys for this dictionary
|
||||
* can be found in GrowlDefines.h.
|
||||
*/
|
||||
+ (void) notifyWithDictionary:(NSDictionary *)userInfo;
|
||||
|
||||
#pragma mark -
|
||||
|
||||
/*! @method registerWithDictionary:
|
||||
* @abstract Register your application with Growl without setting a delegate.
|
||||
* @discussion When you call this method with a dictionary,
|
||||
* GrowlApplicationBridge registers your application using that dictionary.
|
||||
* If you pass <code>nil</code>, GrowlApplicationBridge will ask the delegate
|
||||
* (if there is one) for a dictionary, and if that doesn't work, it will look
|
||||
* in your application's bundle for an auto-discoverable plist.
|
||||
* (XXX refer to more information on that)
|
||||
*
|
||||
* If you pass a dictionary to this method, it must include the
|
||||
* <code>GROWL_APP_NAME</code> key, unless a delegate is set.
|
||||
*
|
||||
* This method is mainly an alternative to the delegate system introduced
|
||||
* with Growl 0.6. Without a delegate, you cannot receive callbacks such as
|
||||
* <code>-growlIsReady</code> (since they are sent to the delegate). You can,
|
||||
* however, set a delegate after registering without one.
|
||||
*
|
||||
* This method was introduced in Growl.framework 0.7.
|
||||
*/
|
||||
+ (BOOL) registerWithDictionary:(NSDictionary *)regDict;
|
||||
|
||||
/*! @method reregisterGrowlNotifications
|
||||
* @abstract Reregister the notifications for this application.
|
||||
* @discussion This method does not normally need to be called. If your
|
||||
* application changes what notifications it is registering with Growl, call
|
||||
* this method to have the Growl delegate's
|
||||
* <code>-registrationDictionaryForGrowl</code> method called again and the
|
||||
* Growl registration information updated.
|
||||
*
|
||||
* This method is now implemented using <code>-registerWithDictionary:</code>.
|
||||
*/
|
||||
+ (void) reregisterGrowlNotifications;
|
||||
|
||||
#pragma mark -
|
||||
|
||||
/*! @method setWillRegisterWhenGrowlIsReady:
|
||||
* @abstract Tells GrowlApplicationBridge to register with Growl when Growl
|
||||
* launches (or not).
|
||||
* @discussion When Growl has started listening for notifications, it posts a
|
||||
* <code>GROWL_IS_READY</code> notification on the Distributed Notification
|
||||
* Center. GrowlApplicationBridge listens for this notification, using it to
|
||||
* perform various tasks (such as calling your delegate's
|
||||
* <code>-growlIsReady</code> method, if it has one). If this method is
|
||||
* called with <code>YES</code>, one of those tasks will be to reregister
|
||||
* with Growl (in the manner of <code>-reregisterGrowlNotifications</code>).
|
||||
*
|
||||
* This attribute is automatically set back to <code>NO</code> (the default)
|
||||
* after every <code>GROWL_IS_READY</code> notification.
|
||||
* @param flag <code>YES</code> if you want GrowlApplicationBridge to register with
|
||||
* Growl when next it is ready; <code>NO</code> if not.
|
||||
*/
|
||||
+ (void) setWillRegisterWhenGrowlIsReady:(BOOL)flag;
|
||||
/*! @method willRegisterWhenGrowlIsReady
|
||||
* @abstract Reports whether GrowlApplicationBridge will register with Growl
|
||||
* when Growl next launches.
|
||||
* @result <code>YES</code> if GrowlApplicationBridge will register with Growl
|
||||
* when next it posts GROWL_IS_READY; <code>NO</code> if not.
|
||||
*/
|
||||
+ (BOOL) willRegisterWhenGrowlIsReady;
|
||||
|
||||
#pragma mark -
|
||||
|
||||
/*! @method registrationDictionaryFromDelegate
|
||||
* @abstract Asks the delegate for a registration dictionary.
|
||||
* @discussion If no delegate is set, or if the delegate's
|
||||
* <code>-registrationDictionaryForGrowl</code> method returns
|
||||
* <code>nil</code>, this method returns <code>nil</code>.
|
||||
*
|
||||
* This method does not attempt to clean up the dictionary in any way - for
|
||||
* example, if it is missing the <code>GROWL_APP_NAME</code> key, the result
|
||||
* will be missing it too. Use <code>+[GrowlApplicationBridge
|
||||
* registrationDictionaryByFillingInDictionary:]</code> or
|
||||
* <code>+[GrowlApplicationBridge
|
||||
* registrationDictionaryByFillingInDictionary:restrictToKeys:]</code> to try
|
||||
* to fill in missing keys.
|
||||
*
|
||||
* This method was introduced in Growl.framework 0.7.
|
||||
* @result A registration dictionary.
|
||||
*/
|
||||
+ (NSDictionary *) registrationDictionaryFromDelegate;
|
||||
|
||||
/*! @method registrationDictionaryFromBundle:
|
||||
* @abstract Looks in a bundle for a registration dictionary.
|
||||
* @discussion This method looks in a bundle for an auto-discoverable
|
||||
* registration dictionary file using <code>-[NSBundle
|
||||
* pathForResource:ofType:]</code>. If it finds one, it loads the file using
|
||||
* <code>+[NSDictionary dictionaryWithContentsOfFile:]</code> and returns the
|
||||
* result.
|
||||
*
|
||||
* If you pass <code>nil</code> as the bundle, the main bundle is examined.
|
||||
*
|
||||
* This method does not attempt to clean up the dictionary in any way - for
|
||||
* example, if it is missing the <code>GROWL_APP_NAME</code> key, the result
|
||||
* will be missing it too. Use <code>+[GrowlApplicationBridge
|
||||
* registrationDictionaryByFillingInDictionary:]</code> or
|
||||
* <code>+[GrowlApplicationBridge
|
||||
* registrationDictionaryByFillingInDictionary:restrictToKeys:]</code> to try
|
||||
* to fill in missing keys.
|
||||
*
|
||||
* This method was introduced in Growl.framework 0.7.
|
||||
* @result A registration dictionary.
|
||||
*/
|
||||
+ (NSDictionary *) registrationDictionaryFromBundle:(NSBundle *)bundle;
|
||||
|
||||
/*! @method bestRegistrationDictionary
|
||||
* @abstract Obtains a registration dictionary, filled out to the best of
|
||||
* GrowlApplicationBridge's knowledge.
|
||||
* @discussion This method creates a registration dictionary as best
|
||||
* GrowlApplicationBridge knows how.
|
||||
*
|
||||
* First, GrowlApplicationBridge contacts the Growl delegate (if there is
|
||||
* one) and gets the registration dictionary from that. If no such dictionary
|
||||
* was obtained, GrowlApplicationBridge looks in your application's main
|
||||
* bundle for an auto-discoverable registration dictionary file. If that
|
||||
* doesn't exist either, this method returns <code>nil</code>.
|
||||
*
|
||||
* Second, GrowlApplicationBridge calls
|
||||
* <code>+registrationDictionaryByFillingInDictionary:</code> with whatever
|
||||
* dictionary was obtained. The result of that method is the result of this
|
||||
* method.
|
||||
*
|
||||
* GrowlApplicationBridge uses this method when you call
|
||||
* <code>+setGrowlDelegate:</code>, or when you call
|
||||
* <code>+registerWithDictionary:</code> with <code>nil</code>.
|
||||
*
|
||||
* This method was introduced in Growl.framework 0.7.
|
||||
* @result A registration dictionary.
|
||||
*/
|
||||
+ (NSDictionary *) bestRegistrationDictionary;
|
||||
|
||||
#pragma mark -
|
||||
|
||||
/*! @method registrationDictionaryByFillingInDictionary:
|
||||
* @abstract Tries to fill in missing keys in a registration dictionary.
|
||||
* @discussion This method examines the passed-in dictionary for missing keys,
|
||||
* and tries to work out correct values for them. As of 0.7, it uses:
|
||||
*
|
||||
* Key Value
|
||||
* --- -----
|
||||
* <code>GROWL_APP_NAME</code> <code>CFBundleExecutableName</code>
|
||||
* <code>GROWL_APP_ICON</code> The icon of the application.
|
||||
* <code>GROWL_APP_LOCATION</code> The location of the application.
|
||||
* <code>GROWL_NOTIFICATIONS_DEFAULT</code> <code>GROWL_NOTIFICATIONS_ALL</code>
|
||||
*
|
||||
* Keys are only filled in if missing; if a key is present in the dictionary,
|
||||
* its value will not be changed.
|
||||
*
|
||||
* This method was introduced in Growl.framework 0.7.
|
||||
* @param regDict The dictionary to fill in.
|
||||
* @result The dictionary with the keys filled in. This is an autoreleased
|
||||
* copy of <code>regDict</code>.
|
||||
*/
|
||||
+ (NSDictionary *) registrationDictionaryByFillingInDictionary:(NSDictionary *)regDict;
|
||||
/*! @method registrationDictionaryByFillingInDictionary:restrictToKeys:
|
||||
* @abstract Tries to fill in missing keys in a registration dictionary.
|
||||
* @discussion This method examines the passed-in dictionary for missing keys,
|
||||
* and tries to work out correct values for them. As of 0.7, it uses:
|
||||
*
|
||||
* Key Value
|
||||
* --- -----
|
||||
* <code>GROWL_APP_NAME</code> <code>CFBundleExecutableName</code>
|
||||
* <code>GROWL_APP_ICON</code> The icon of the application.
|
||||
* <code>GROWL_APP_LOCATION</code> The location of the application.
|
||||
* <code>GROWL_NOTIFICATIONS_DEFAULT</code> <code>GROWL_NOTIFICATIONS_ALL</code>
|
||||
*
|
||||
* Only those keys that are listed in <code>keys</code> will be filled in.
|
||||
* Other missing keys are ignored. Also, keys are only filled in if missing;
|
||||
* if a key is present in the dictionary, its value will not be changed.
|
||||
*
|
||||
* This method was introduced in Growl.framework 0.7.
|
||||
* @param regDict The dictionary to fill in.
|
||||
* @param keys The keys to fill in. If <code>nil</code>, any missing keys are filled in.
|
||||
* @result The dictionary with the keys filled in. This is an autoreleased
|
||||
* copy of <code>regDict</code>.
|
||||
*/
|
||||
+ (NSDictionary *) registrationDictionaryByFillingInDictionary:(NSDictionary *)regDict restrictToKeys:(NSSet *)keys;
|
||||
|
||||
/*! @brief Tries to fill in missing keys in a notification dictionary.
|
||||
* @param notifDict The dictionary to fill in.
|
||||
* @return The dictionary with the keys filled in. This will be a separate instance from \a notifDict.
|
||||
* @discussion This function examines the \a notifDict for missing keys, and
|
||||
* tries to get them from the last known registration dictionary. As of 1.1,
|
||||
* the keys that it will look for are:
|
||||
*
|
||||
* \li <code>GROWL_APP_NAME</code>
|
||||
* \li <code>GROWL_APP_ICON</code>
|
||||
*
|
||||
* @since Growl.framework 1.1
|
||||
*/
|
||||
+ (NSDictionary *) notificationDictionaryByFillingInDictionary:(NSDictionary *)regDict;
|
||||
|
||||
+ (NSDictionary *) frameworkInfoDictionary;
|
||||
@end
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark -
|
||||
|
||||
/*!
|
||||
* @protocol GrowlApplicationBridgeDelegate
|
||||
* @abstract Required protocol for the Growl delegate.
|
||||
* @discussion The methods in this protocol are required and are called
|
||||
* automatically as needed by GrowlApplicationBridge. See
|
||||
* <code>+[GrowlApplicationBridge setGrowlDelegate:]</code>.
|
||||
* See also <code>GrowlApplicationBridgeDelegate_InformalProtocol</code>.
|
||||
*/
|
||||
|
||||
@protocol GrowlApplicationBridgeDelegate
|
||||
|
||||
// -registrationDictionaryForGrowl has moved to the informal protocol as of 0.7.
|
||||
|
||||
@end
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark -
|
||||
|
||||
/*!
|
||||
* @category NSObject(GrowlApplicationBridgeDelegate_InformalProtocol)
|
||||
* @abstract Methods which may be optionally implemented by the GrowlDelegate.
|
||||
* @discussion The methods in this informal protocol will only be called if implemented by the delegate.
|
||||
*/
|
||||
@interface NSObject (GrowlApplicationBridgeDelegate_InformalProtocol)
|
||||
|
||||
/*!
|
||||
* @method registrationDictionaryForGrowl
|
||||
* @abstract Return the dictionary used to register this application with Growl.
|
||||
* @discussion The returned dictionary gives Growl the complete list of
|
||||
* notifications this application will ever send, and it also specifies which
|
||||
* notifications should be enabled by default. Each is specified by an array
|
||||
* of <code>NSString</code> objects.
|
||||
*
|
||||
* For most applications, these two arrays can be the same (if all sent
|
||||
* notifications should be displayed by default).
|
||||
*
|
||||
* The <code>NSString</code> objects of these arrays will correspond to the
|
||||
* <code>notificationName:</code> parameter passed in
|
||||
* <code>+[GrowlApplicationBridge
|
||||
* notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:]</code> calls.
|
||||
*
|
||||
* The dictionary should have the required key object pairs:
|
||||
* key: GROWL_NOTIFICATIONS_ALL object: <code>NSArray</code> of <code>NSString</code> objects
|
||||
* key: GROWL_NOTIFICATIONS_DEFAULT object: <code>NSArray</code> of <code>NSString</code> objects
|
||||
*
|
||||
* The dictionary may have the following key object pairs:
|
||||
* key: GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES object: <code>NSDictionary</code> of key: notification name object: human-readable notification name
|
||||
*
|
||||
* You do not need to implement this method if you have an auto-discoverable
|
||||
* plist file in your app bundle. (XXX refer to more information on that)
|
||||
*
|
||||
* @result The <code>NSDictionary</code> to use for registration.
|
||||
*/
|
||||
- (NSDictionary *) registrationDictionaryForGrowl;
|
||||
|
||||
/*!
|
||||
* @method applicationNameForGrowl
|
||||
* @abstract Return the name of this application which will be used for Growl bookkeeping.
|
||||
* @discussion This name is used both internally and in the Growl preferences.
|
||||
*
|
||||
* This should remain stable between different versions and incarnations of
|
||||
* your application.
|
||||
* For example, "SurfWriter" is a good app name, whereas "SurfWriter 2.0" and
|
||||
* "SurfWriter Lite" are not.
|
||||
*
|
||||
* You do not need to implement this method if you are providing the
|
||||
* application name elsewhere, meaning in an auto-discoverable plist file in
|
||||
* your app bundle (XXX refer to more information on that) or in the result
|
||||
* of -registrationDictionaryForGrowl.
|
||||
*
|
||||
* @result The name of the application using Growl.
|
||||
*/
|
||||
- (NSString *) applicationNameForGrowl;
|
||||
|
||||
/*!
|
||||
* @method applicationIconForGrowl
|
||||
* @abstract Return the <code>NSImage</code> to treat as the application icon.
|
||||
* @discussion The delegate may optionally return an <code>NSImage</code>
|
||||
* object to use as the application icon. If this method is not implemented,
|
||||
* {{{-applicationIconDataForGrowl}}} is tried. If that method is not
|
||||
* implemented, the application's own icon is used. Neither method is
|
||||
* generally needed.
|
||||
* @result The <code>NSImage</code> to treat as the application icon.
|
||||
*/
|
||||
- (NSImage *) applicationIconForGrowl;
|
||||
|
||||
/*!
|
||||
* @method applicationIconDataForGrowl
|
||||
* @abstract Return the <code>NSData</code> to treat as the application icon.
|
||||
* @discussion The delegate may optionally return an <code>NSData</code>
|
||||
* object to use as the application icon; if this is not implemented, the
|
||||
* application's own icon is used. This is not generally needed.
|
||||
* @result The <code>NSData</code> to treat as the application icon.
|
||||
* @deprecated In version 1.1, in favor of {{{-applicationIconForGrowl}}}.
|
||||
*/
|
||||
- (NSData *) applicationIconDataForGrowl;
|
||||
|
||||
/*!
|
||||
* @method growlIsReady
|
||||
* @abstract Informs the delegate that Growl has launched.
|
||||
* @discussion Informs the delegate that Growl (specifically, the
|
||||
* GrowlHelperApp) was launched successfully. The application can take actions
|
||||
* with the knowledge that Growl is installed and functional.
|
||||
*/
|
||||
- (void) growlIsReady;
|
||||
|
||||
/*!
|
||||
* @method growlNotificationWasClicked:
|
||||
* @abstract Informs the delegate that a Growl notification was clicked.
|
||||
* @discussion Informs the delegate that a Growl notification was clicked. It
|
||||
* is only sent for notifications sent with a non-<code>nil</code>
|
||||
* clickContext, so if you want to receive a message when a notification is
|
||||
* clicked, clickContext must not be <code>nil</code> when calling
|
||||
* <code>+[GrowlApplicationBridge notifyWithTitle: description:notificationName:iconData:priority:isSticky:clickContext:]</code>.
|
||||
* @param clickContext The clickContext passed when displaying the notification originally via +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:].
|
||||
*/
|
||||
- (void) growlNotificationWasClicked:(id)clickContext;
|
||||
|
||||
/*!
|
||||
* @method growlNotificationTimedOut:
|
||||
* @abstract Informs the delegate that a Growl notification timed out.
|
||||
* @discussion Informs the delegate that a Growl notification timed out. It
|
||||
* is only sent for notifications sent with a non-<code>nil</code>
|
||||
* clickContext, so if you want to receive a message when a notification is
|
||||
* clicked, clickContext must not be <code>nil</code> when calling
|
||||
* <code>+[GrowlApplicationBridge notifyWithTitle: description:notificationName:iconData:priority:isSticky:clickContext:]</code>.
|
||||
* @param clickContext The clickContext passed when displaying the notification originally via +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:].
|
||||
*/
|
||||
- (void) growlNotificationTimedOut:(id)clickContext;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
/*!
|
||||
* @category NSObject(GrowlApplicationBridgeDelegate_Installation_InformalProtocol)
|
||||
* @abstract Methods which may be optionally implemented by the Growl delegate when used with Growl-WithInstaller.framework.
|
||||
* @discussion The methods in this informal protocol will only be called if
|
||||
* implemented by the delegate. They allow greater control of the information
|
||||
* presented to the user when installing or upgrading Growl from within your
|
||||
* application when using Growl-WithInstaller.framework.
|
||||
*/
|
||||
@interface NSObject (GrowlApplicationBridgeDelegate_Installation_InformalProtocol)
|
||||
|
||||
/*!
|
||||
* @method growlInstallationWindowTitle
|
||||
* @abstract Return the title of the installation window.
|
||||
* @discussion If not implemented, Growl will use a default, localized title.
|
||||
* @result An NSString object to use as the title.
|
||||
*/
|
||||
- (NSString *)growlInstallationWindowTitle;
|
||||
|
||||
/*!
|
||||
* @method growlUpdateWindowTitle
|
||||
* @abstract Return the title of the upgrade window.
|
||||
* @discussion If not implemented, Growl will use a default, localized title.
|
||||
* @result An NSString object to use as the title.
|
||||
*/
|
||||
- (NSString *)growlUpdateWindowTitle;
|
||||
|
||||
/*!
|
||||
* @method growlInstallationInformation
|
||||
* @abstract Return the information to display when installing.
|
||||
* @discussion This information may be as long or short as desired (the window
|
||||
* will be sized to fit it). It will be displayed to the user as an
|
||||
* explanation of what Growl is and what it can do in your application. It
|
||||
* should probably note that no download is required to install.
|
||||
*
|
||||
* If this is not implemented, Growl will use a default, localized explanation.
|
||||
* @result An NSAttributedString object to display.
|
||||
*/
|
||||
- (NSAttributedString *)growlInstallationInformation;
|
||||
|
||||
/*!
|
||||
* @method growlUpdateInformation
|
||||
* @abstract Return the information to display when upgrading.
|
||||
* @discussion This information may be as long or short as desired (the window
|
||||
* will be sized to fit it). It will be displayed to the user as an
|
||||
* explanation that an updated version of Growl is included in your
|
||||
* application and no download is required.
|
||||
*
|
||||
* If this is not implemented, Growl will use a default, localized explanation.
|
||||
* @result An NSAttributedString object to display.
|
||||
*/
|
||||
- (NSAttributedString *)growlUpdateInformation;
|
||||
|
||||
@end
|
||||
|
||||
//private
|
||||
@interface GrowlApplicationBridge (GrowlInstallationPrompt_private)
|
||||
+ (void) _userChoseNotToInstallGrowl;
|
||||
@end
|
||||
|
||||
#endif /* __GrowlApplicationBridge_h__ */
|
|
@ -1,348 +0,0 @@
|
|||
//
|
||||
// GrowlDefines.h
|
||||
//
|
||||
|
||||
#ifndef _GROWLDEFINES_H
|
||||
#define _GROWLDEFINES_H
|
||||
|
||||
#ifdef __OBJC__
|
||||
#define XSTR(x) (@x)
|
||||
#define STRING_TYPE NSString *
|
||||
#else
|
||||
#define XSTR CFSTR
|
||||
#define STRING_TYPE CFStringRef
|
||||
#endif
|
||||
|
||||
/*! @header GrowlDefines.h
|
||||
* @abstract Defines all the notification keys.
|
||||
* @discussion Defines all the keys used for registration with Growl and for
|
||||
* Growl notifications.
|
||||
*
|
||||
* Most applications should use the functions or methods of Growl.framework
|
||||
* instead of posting notifications such as those described here.
|
||||
* @updated 2004-01-25
|
||||
*/
|
||||
|
||||
// UserInfo Keys for Registration
|
||||
#pragma mark UserInfo Keys for Registration
|
||||
|
||||
/*! @group Registration userInfo keys */
|
||||
/* @abstract Keys for the userInfo dictionary of a GROWL_APP_REGISTRATION distributed notification.
|
||||
* @discussion The values of these keys describe the application and the
|
||||
* notifications it may post.
|
||||
*
|
||||
* Your application must register with Growl before it can post Growl
|
||||
* notifications (and have them not be ignored). However, as of Growl 0.6,
|
||||
* posting GROWL_APP_REGISTRATION notifications directly is no longer the
|
||||
* preferred way to register your application. Your application should instead
|
||||
* use Growl.framework's delegate system.
|
||||
* See +[GrowlApplicationBridge setGrowlDelegate:] or Growl_SetDelegate for
|
||||
* more information.
|
||||
*/
|
||||
|
||||
/*! @defined GROWL_APP_NAME
|
||||
* @abstract The name of your application.
|
||||
* @discussion The name of your application. This should remain stable between
|
||||
* different versions and incarnations of your application.
|
||||
* For example, "SurfWriter" is a good app name, whereas "SurfWriter 2.0" and
|
||||
* "SurfWriter Lite" are not.
|
||||
*/
|
||||
#define GROWL_APP_NAME XSTR("ApplicationName")
|
||||
/*! @defined GROWL_APP_ID
|
||||
* @abstract The bundle identifier of your application.
|
||||
* @discussion The bundle identifier of your application. This key should
|
||||
* be unique for your application while there may be several applications
|
||||
* with the same GROWL_APP_NAME.
|
||||
* This key is optional.
|
||||
*/
|
||||
#define GROWL_APP_ID XSTR("ApplicationId")
|
||||
/*! @defined GROWL_APP_ICON
|
||||
* @abstract The image data for your application's icon.
|
||||
* @discussion Image data representing your application's icon. This may be
|
||||
* superimposed on a notification icon as a badge, used as the notification
|
||||
* icon when a notification-specific icon is not supplied, or ignored
|
||||
* altogether, depending on the display. Must be in a format supported by
|
||||
* NSImage, such as TIFF, PNG, GIF, JPEG, BMP, PICT, or PDF.
|
||||
*
|
||||
* Optional. Not supported by all display plugins.
|
||||
*/
|
||||
#define GROWL_APP_ICON XSTR("ApplicationIcon")
|
||||
/*! @defined GROWL_NOTIFICATIONS_DEFAULT
|
||||
* @abstract The array of notifications to turn on by default.
|
||||
* @discussion These are the names of the notifications that should be enabled
|
||||
* by default when your application registers for the first time. If your
|
||||
* application reregisters, Growl will look here for any new notification
|
||||
* names found in GROWL_NOTIFICATIONS_ALL, but ignore any others.
|
||||
*/
|
||||
#define GROWL_NOTIFICATIONS_DEFAULT XSTR("DefaultNotifications")
|
||||
/*! @defined GROWL_NOTIFICATIONS_ALL
|
||||
* @abstract The array of all notifications your application can send.
|
||||
* @discussion These are the names of all of the notifications that your
|
||||
* application may post. See GROWL_NOTIFICATION_NAME for a discussion of good
|
||||
* notification names.
|
||||
*/
|
||||
#define GROWL_NOTIFICATIONS_ALL XSTR("AllNotifications")
|
||||
/*! @defined GROWL_NOTIFICATIONS_HUMAN_READABLE_DESCRIPTIONS
|
||||
* @abstract A dictionary of human-readable names for your notifications.
|
||||
* @discussion By default, the Growl UI will display notifications by the names given in GROWL_NOTIFICATIONS_ALL
|
||||
* which correspond to the GROWL_NOTIFICATION_NAME. This dictionary specifies the human-readable name to display.
|
||||
* The keys of the dictionary are GROWL_NOTIFICATION_NAME strings; the objects are the human-readable versions.
|
||||
* For any GROWL_NOTIFICATION_NAME not specific in this dictionary, the GROWL_NOTIFICATION_NAME will be displayed.
|
||||
*
|
||||
* This key is optional.
|
||||
*/
|
||||
#define GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES XSTR("HumanReadableNames")
|
||||
/*! @defined GROWL_NOTIFICATIONS_DESCRIPTIONS
|
||||
* @abstract A dictionary of descriptions of _when_ each notification occurs
|
||||
* @discussion This is an NSDictionary whose keys are GROWL_NOTIFICATION_NAME strings and whose objects are
|
||||
* descriptions of _when_ each notification occurs, such as "You received a new mail message" or
|
||||
* "A file finished downloading".
|
||||
*
|
||||
* This key is optional.
|
||||
*/
|
||||
#define GROWL_NOTIFICATIONS_DESCRIPTIONS XSTR("NotificationDescriptions")
|
||||
|
||||
/*! @defined GROWL_TICKET_VERSION
|
||||
* @abstract The version of your registration ticket.
|
||||
* @discussion Include this key in a ticket plist file that you put in your
|
||||
* application bundle for auto-discovery. The current ticket version is 1.
|
||||
*/
|
||||
#define GROWL_TICKET_VERSION XSTR("TicketVersion")
|
||||
// UserInfo Keys for Notifications
|
||||
#pragma mark UserInfo Keys for Notifications
|
||||
|
||||
/*! @group Notification userInfo keys */
|
||||
/* @abstract Keys for the userInfo dictionary of a GROWL_NOTIFICATION distributed notification.
|
||||
* @discussion The values of these keys describe the content of a Growl
|
||||
* notification.
|
||||
*
|
||||
* Not all of these keys are supported by all displays. Only the name, title,
|
||||
* and description of a notification are universal. Most of the built-in
|
||||
* displays do support all of these keys, and most other visual displays
|
||||
* probably will also. But, as of 0.6, the Log, MailMe, and Speech displays
|
||||
* support only textual data.
|
||||
*/
|
||||
|
||||
/*! @defined GROWL_NOTIFICATION_NAME
|
||||
* @abstract The name of the notification.
|
||||
* @discussion The name of the notification. Note that if you do not define
|
||||
* GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES when registering your ticket originally this name
|
||||
* will the one displayed within the Growl preference pane and should be human-readable.
|
||||
*/
|
||||
#define GROWL_NOTIFICATION_NAME XSTR("NotificationName")
|
||||
/*! @defined GROWL_NOTIFICATION_TITLE
|
||||
* @abstract The title to display in the notification.
|
||||
* @discussion The title of the notification. Should be very brief.
|
||||
* The title usually says what happened, e.g. "Download complete".
|
||||
*/
|
||||
#define GROWL_NOTIFICATION_TITLE XSTR("NotificationTitle")
|
||||
/*! @defined GROWL_NOTIFICATION_DESCRIPTION
|
||||
* @abstract The description to display in the notification.
|
||||
* @discussion The description should be longer and more verbose than the title.
|
||||
* The description usually tells the subject of the action,
|
||||
* e.g. "Growl-0.6.dmg downloaded in 5.02 minutes".
|
||||
*/
|
||||
#define GROWL_NOTIFICATION_DESCRIPTION XSTR("NotificationDescription")
|
||||
/*! @defined GROWL_NOTIFICATION_ICON
|
||||
* @discussion Image data for the notification icon. Must be in a format
|
||||
* supported by NSImage, such as TIFF, PNG, GIF, JPEG, BMP, PICT, or PDF.
|
||||
*
|
||||
* Optional. Not supported by all display plugins.
|
||||
*/
|
||||
#define GROWL_NOTIFICATION_ICON XSTR("NotificationIcon")
|
||||
/*! @defined GROWL_NOTIFICATION_APP_ICON
|
||||
* @discussion Image data for the application icon, in case GROWL_APP_ICON does
|
||||
* not apply for some reason. Must be in a format supported by NSImage, such
|
||||
* as TIFF, PNG, GIF, JPEG, BMP, PICT, or PDF.
|
||||
*
|
||||
* Optional. Not supported by all display plugins.
|
||||
*/
|
||||
#define GROWL_NOTIFICATION_APP_ICON XSTR("NotificationAppIcon")
|
||||
/*! @defined GROWL_NOTIFICATION_PRIORITY
|
||||
* @discussion The priority of the notification as an integer number from
|
||||
* -2 to +2 (+2 being highest).
|
||||
*
|
||||
* Optional. Not supported by all display plugins.
|
||||
*/
|
||||
#define GROWL_NOTIFICATION_PRIORITY XSTR("NotificationPriority")
|
||||
/*! @defined GROWL_NOTIFICATION_STICKY
|
||||
* @discussion A Boolean number controlling whether the notification is sticky.
|
||||
*
|
||||
* Optional. Not supported by all display plugins.
|
||||
*/
|
||||
#define GROWL_NOTIFICATION_STICKY XSTR("NotificationSticky")
|
||||
/*! @defined GROWL_NOTIFICATION_CLICK_CONTEXT
|
||||
* @abstract Identifies which notification was clicked.
|
||||
* @discussion An identifier for the notification for clicking purposes.
|
||||
*
|
||||
* This will be passed back to the application when the notification is
|
||||
* clicked. It must be plist-encodable (a data, dictionary, array, number, or
|
||||
* string object), and it should be unique for each notification you post.
|
||||
* A good click context would be a UUID string returned by NSProcessInfo or
|
||||
* CFUUID.
|
||||
*
|
||||
* Optional. Not supported by all display plugins.
|
||||
*/
|
||||
#define GROWL_NOTIFICATION_CLICK_CONTEXT XSTR("NotificationClickContext")
|
||||
|
||||
/*! @defined GROWL_DISPLAY_PLUGIN
|
||||
* @discussion The name of a display plugin which should be used for this notification.
|
||||
* Optional. If this key is not set or the specified display plugin does not
|
||||
* exist, the display plugin stored in the application ticket is used. This key
|
||||
* allows applications to use different default display plugins for their
|
||||
* notifications. The user can still override those settings in the preference
|
||||
* pane.
|
||||
*/
|
||||
#define GROWL_DISPLAY_PLUGIN XSTR("NotificationDisplayPlugin")
|
||||
|
||||
/*! @defined GROWL_NOTIFICATION_IDENTIFIER
|
||||
* @abstract An identifier for the notification for coalescing purposes.
|
||||
* Notifications with the same identifier fall into the same class; only
|
||||
* the last notification of a class is displayed on the screen. If a
|
||||
* notification of the same class is currently being displayed, it is
|
||||
* replaced by this notification.
|
||||
*
|
||||
* Optional. Not supported by all display plugins.
|
||||
*/
|
||||
#define GROWL_NOTIFICATION_IDENTIFIER XSTR("GrowlNotificationIdentifier")
|
||||
|
||||
/*! @defined GROWL_APP_PID
|
||||
* @abstract The process identifier of the process which sends this
|
||||
* notification. If this field is set, the application will only receive
|
||||
* clicked and timed out notifications which originate from this process.
|
||||
*
|
||||
* Optional.
|
||||
*/
|
||||
#define GROWL_APP_PID XSTR("ApplicationPID")
|
||||
|
||||
/*! @defined GROWL_NOTIFICATION_PROGRESS
|
||||
* @abstract If this key is set, it should contain a double value wrapped
|
||||
* in a NSNumber which describes some sort of progress (from 0.0 to 100.0).
|
||||
* If this is key is not set, no progress bar is shown.
|
||||
*
|
||||
* Optional. Not supported by all display plugins.
|
||||
*/
|
||||
#define GROWL_NOTIFICATION_PROGRESS XSTR("NotificationProgress")
|
||||
|
||||
// Notifications
|
||||
#pragma mark Notifications
|
||||
|
||||
/*! @group Notification names */
|
||||
/* @abstract Names of distributed notifications used by Growl.
|
||||
* @discussion These are notifications used by applications (directly or
|
||||
* indirectly) to interact with Growl, and by Growl for interaction between
|
||||
* its components.
|
||||
*
|
||||
* Most of these should no longer be used in Growl 0.6 and later, in favor of
|
||||
* Growl.framework's GrowlApplicationBridge APIs.
|
||||
*/
|
||||
|
||||
/*! @defined GROWL_APP_REGISTRATION
|
||||
* @abstract The distributed notification for registering your application.
|
||||
* @discussion This is the name of the distributed notification that can be
|
||||
* used to register applications with Growl.
|
||||
*
|
||||
* The userInfo dictionary for this notification can contain these keys:
|
||||
* <ul>
|
||||
* <li>GROWL_APP_NAME</li>
|
||||
* <li>GROWL_APP_ICON</li>
|
||||
* <li>GROWL_NOTIFICATIONS_ALL</li>
|
||||
* <li>GROWL_NOTIFICATIONS_DEFAULT</li>
|
||||
* </ul>
|
||||
*
|
||||
* No longer recommended as of Growl 0.6. An alternate method of registering
|
||||
* is to use Growl.framework's delegate system.
|
||||
* See +[GrowlApplicationBridge setGrowlDelegate:] or Growl_SetDelegate for
|
||||
* more information.
|
||||
*/
|
||||
#define GROWL_APP_REGISTRATION XSTR("GrowlApplicationRegistrationNotification")
|
||||
/*! @defined GROWL_APP_REGISTRATION_CONF
|
||||
* @abstract The distributed notification for confirming registration.
|
||||
* @discussion The name of the distributed notification sent to confirm the
|
||||
* registration. Used by the Growl preference pane. Your application probably
|
||||
* does not need to use this notification.
|
||||
*/
|
||||
#define GROWL_APP_REGISTRATION_CONF XSTR("GrowlApplicationRegistrationConfirmationNotification")
|
||||
/*! @defined GROWL_NOTIFICATION
|
||||
* @abstract The distributed notification for Growl notifications.
|
||||
* @discussion This is what it all comes down to. This is the name of the
|
||||
* distributed notification that your application posts to actually send a
|
||||
* Growl notification.
|
||||
*
|
||||
* The userInfo dictionary for this notification can contain these keys:
|
||||
* <ul>
|
||||
* <li>GROWL_NOTIFICATION_NAME (required)</li>
|
||||
* <li>GROWL_NOTIFICATION_TITLE (required)</li>
|
||||
* <li>GROWL_NOTIFICATION_DESCRIPTION (required)</li>
|
||||
* <li>GROWL_NOTIFICATION_ICON</li>
|
||||
* <li>GROWL_NOTIFICATION_APP_ICON</li>
|
||||
* <li>GROWL_NOTIFICATION_PRIORITY</li>
|
||||
* <li>GROWL_NOTIFICATION_STICKY</li>
|
||||
* <li>GROWL_NOTIFICATION_CLICK_CONTEXT</li>
|
||||
* <li>GROWL_APP_NAME (required)</li>
|
||||
* </ul>
|
||||
*
|
||||
* No longer recommended as of Growl 0.6. Three alternate methods of posting
|
||||
* notifications are +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:],
|
||||
* Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext, and
|
||||
* Growl_PostNotification.
|
||||
*/
|
||||
#define GROWL_NOTIFICATION XSTR("GrowlNotification")
|
||||
/*! @defined GROWL_SHUTDOWN
|
||||
* @abstract The distributed notification name that tells Growl to shutdown.
|
||||
* @discussion The Growl preference pane posts this notification when the
|
||||
* "Stop Growl" button is clicked.
|
||||
*/
|
||||
#define GROWL_SHUTDOWN XSTR("GrowlShutdown")
|
||||
/*! @defined GROWL_PING
|
||||
* @abstract A distributed notification to check whether Growl is running.
|
||||
* @discussion This is used by the Growl preference pane. If it receives a
|
||||
* GROWL_PONG, the preference pane takes this to mean that Growl is running.
|
||||
*/
|
||||
#define GROWL_PING XSTR("Honey, Mind Taking Out The Trash")
|
||||
/*! @defined GROWL_PONG
|
||||
* @abstract The distributed notification sent in reply to GROWL_PING.
|
||||
* @discussion GrowlHelperApp posts this in reply to GROWL_PING.
|
||||
*/
|
||||
#define GROWL_PONG XSTR("What Do You Want From Me, Woman")
|
||||
/*! @defined GROWL_IS_READY
|
||||
* @abstract The distributed notification sent when Growl starts up.
|
||||
* @discussion GrowlHelperApp posts this when it has begin listening on all of
|
||||
* its sources for new notifications. GrowlApplicationBridge (in
|
||||
* Growl.framework), upon receiving this notification, reregisters using the
|
||||
* registration dictionary supplied by its delegate.
|
||||
*/
|
||||
#define GROWL_IS_READY XSTR("Lend Me Some Sugar; I Am Your Neighbor!")
|
||||
/*! @defined GROWL_NOTIFICATION_CLICKED
|
||||
* @abstract The distributed notification sent when a supported notification is clicked.
|
||||
* @discussion When a Growl notification with a click context is clicked on by
|
||||
* the user, Growl posts this distributed notification.
|
||||
* The GrowlApplicationBridge responds to this notification by calling a
|
||||
* callback in its delegate.
|
||||
*/
|
||||
#define GROWL_NOTIFICATION_CLICKED XSTR("GrowlClicked!")
|
||||
#define GROWL_NOTIFICATION_TIMED_OUT XSTR("GrowlTimedOut!")
|
||||
|
||||
/*! @group Other symbols */
|
||||
/* Symbols which don't fit into any of the other categories. */
|
||||
|
||||
/*! @defined GROWL_KEY_CLICKED_CONTEXT
|
||||
* @abstract Used internally as the key for the clickedContext passed over DNC.
|
||||
* @discussion This key is used in GROWL_NOTIFICATION_CLICKED, and contains the
|
||||
* click context that was supplied in the original notification.
|
||||
*/
|
||||
#define GROWL_KEY_CLICKED_CONTEXT XSTR("ClickedContext")
|
||||
/*! @defined GROWL_REG_DICT_EXTENSION
|
||||
* @abstract The filename extension for registration dictionaries.
|
||||
* @discussion The GrowlApplicationBridge in Growl.framework registers with
|
||||
* Growl by creating a file with the extension of .(GROWL_REG_DICT_EXTENSION)
|
||||
* and opening it in the GrowlHelperApp. This happens whether or not Growl is
|
||||
* running; if it was stopped, it quits immediately without listening for
|
||||
* notifications.
|
||||
*/
|
||||
#define GROWL_REG_DICT_EXTENSION XSTR("growlRegDict")
|
||||
|
||||
|
||||
#define GROWL_POSITION_PREFERENCE_KEY @"GrowlSelectedPosition"
|
||||
|
||||
#endif //ndef _GROWLDEFINES_H
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//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>Growl</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.growl.growlframework</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.2</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>GRRR</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.2</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>GrowlApplicationBridge</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1 +0,0 @@
|
|||
A
|
|
@ -1 +0,0 @@
|
|||
Versions/Current/Headers
|
|
@ -1 +0,0 @@
|
|||
Versions/Current/Modules
|
|
@ -1 +0,0 @@
|
|||
Versions/Current/Resources
|
|
@ -1 +0,0 @@
|
|||
Versions/Current/UnrarKit
|
|
@ -1,526 +0,0 @@
|
|||
//
|
||||
// URKArchive.h
|
||||
// UnrarKit
|
||||
//
|
||||
//
|
||||
|
||||
#import <CoreGraphics/CoreGraphics.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UnrarKit/UnrarKitMacros.h>
|
||||
|
||||
RarosHppIgnore
|
||||
#import <UnrarKit/raros.hpp>
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
DllHppIgnore
|
||||
#import <UnrarKit/dll.hpp>
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
@class URKFileInfo;
|
||||
|
||||
/**
|
||||
* Defines the various error codes that the listing and extraction methods return.
|
||||
* These are returned in NSError's [code]([NSError code]) field.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, URKErrorCode) {
|
||||
|
||||
/**
|
||||
* The last file of the archive has been read
|
||||
*/
|
||||
URKErrorCodeEndOfArchive = ERAR_END_ARCHIVE,
|
||||
|
||||
/**
|
||||
* The library ran out of memory while reading the archive
|
||||
*/
|
||||
URKErrorCodeNoMemory = ERAR_NO_MEMORY,
|
||||
|
||||
/**
|
||||
* The header's CRC doesn't match the decompressed data's CRC
|
||||
*/
|
||||
URKErrorCodeBadData = ERAR_BAD_DATA,
|
||||
|
||||
/**
|
||||
* The archive is not a valid RAR file
|
||||
*/
|
||||
URKErrorCodeBadArchive = ERAR_BAD_ARCHIVE,
|
||||
|
||||
/**
|
||||
* The archive is an unsupported RAR format or version
|
||||
*/
|
||||
URKErrorCodeUnknownFormat = ERAR_UNKNOWN_FORMAT,
|
||||
|
||||
/**
|
||||
* Failed to open a reference to the file
|
||||
*/
|
||||
URKErrorCodeOpen = ERAR_EOPEN,
|
||||
|
||||
/**
|
||||
* Failed to create the target directory for extraction
|
||||
*/
|
||||
URKErrorCodeCreate = ERAR_ECREATE,
|
||||
|
||||
/**
|
||||
* Failed to close the archive
|
||||
*/
|
||||
URKErrorCodeClose = ERAR_ECLOSE,
|
||||
|
||||
/**
|
||||
* Failed to read the archive
|
||||
*/
|
||||
URKErrorCodeRead = ERAR_EREAD,
|
||||
|
||||
/**
|
||||
* Failed to write a file to disk
|
||||
*/
|
||||
URKErrorCodeWrite = ERAR_EWRITE,
|
||||
|
||||
/**
|
||||
* The archive header's comments are larger than the buffer size
|
||||
*/
|
||||
URKErrorCodeSmall = ERAR_SMALL_BUF,
|
||||
|
||||
/**
|
||||
* The cause of the error is unspecified
|
||||
*/
|
||||
URKErrorCodeUnknown = ERAR_UNKNOWN,
|
||||
|
||||
/**
|
||||
* A password was not given for a password-protected archive
|
||||
*/
|
||||
URKErrorCodeMissingPassword = ERAR_MISSING_PASSWORD,
|
||||
|
||||
/**
|
||||
* No data was returned from the archive
|
||||
*/
|
||||
URKErrorCodeArchiveNotFound = 101,
|
||||
|
||||
/**
|
||||
* User cancelled the operation
|
||||
*/
|
||||
URKErrorCodeUserCancelled = 102,
|
||||
|
||||
/**
|
||||
* Error converting string to UTF-8
|
||||
*/
|
||||
URKErrorCodeStringConversion = 103,
|
||||
};
|
||||
|
||||
typedef NSString *const URKProgressInfoKey;
|
||||
|
||||
|
||||
/**
|
||||
* Defines the keys passed in `-[NSProgress userInfo]` for certain methods
|
||||
*/
|
||||
static URKProgressInfoKey _Nonnull
|
||||
/**
|
||||
* For `extractFilesTo:overwrite:error:`, this key contains an instance of URKFileInfo with the file currently being extracted
|
||||
*/
|
||||
URKProgressInfoKeyFileInfoExtracting = @"URKProgressInfoKeyFileInfoExtracting";
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
extern NSString *URKErrorDomain;
|
||||
|
||||
/**
|
||||
* An Objective-C/Cocoa wrapper around the unrar library
|
||||
*/
|
||||
@interface URKArchive : NSObject
|
||||
// Minimum of iOS 9, macOS 10.11 SDKs
|
||||
#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED > 90000) || (defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED > 101100)
|
||||
<NSProgressReporting>
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* The URL of the archive
|
||||
*/
|
||||
@property(nullable, weak, atomic, readonly) NSURL *fileURL;
|
||||
|
||||
/**
|
||||
* The filename of the archive
|
||||
*/
|
||||
@property(nullable, weak, atomic, readonly) NSString *filename;
|
||||
|
||||
/**
|
||||
* The password of the archive
|
||||
*/
|
||||
@property(nullable, nonatomic, strong) NSString *password;
|
||||
|
||||
/**
|
||||
* The total uncompressed size (in bytes) of all files in the archive. Returns nil on errors
|
||||
*/
|
||||
@property(nullable, atomic, readonly) NSNumber *uncompressedSize;
|
||||
|
||||
/**
|
||||
* The total compressed size (in bytes) of the archive. Returns nil on errors
|
||||
*/
|
||||
@property(nullable, atomic, readonly) NSNumber *compressedSize;
|
||||
|
||||
/**
|
||||
* True if the file is one volume of a multi-part archive
|
||||
*/
|
||||
@property(atomic, readonly) BOOL hasMultipleVolumes;
|
||||
|
||||
/**
|
||||
* Can be used for progress reporting, but it's not necessary. You can also use
|
||||
* implicit progress reporting. If you don't use it, one will still be created,
|
||||
* which will become a child progress of whichever one is the current NSProgress
|
||||
* instance.
|
||||
*
|
||||
* To use this, assign it before beginning an operation that reports progress. Once
|
||||
* the method you're calling has a reference to it, it will nil it out. Please check
|
||||
* for nil before assigning it to avoid concurrency conflicts.
|
||||
*/
|
||||
@property(nullable, strong) NSProgress *progress;
|
||||
|
||||
/**
|
||||
* When performing operations on a RAR archive, the contents of compressed files are checked
|
||||
* against the record of what they were when the archive was created. If there's a mismatch,
|
||||
* either the metadata (header) or archive contents have become corrupted. You can defeat this check by
|
||||
* setting this property to YES, though there may be security implications to turning the
|
||||
* warnings off, as it may indicate a maliciously crafted archive intended to exploit a vulnerability.
|
||||
*
|
||||
* It's recommended to leave the decision of how to treat archives with mismatched CRCs to the user
|
||||
*/
|
||||
@property (assign) BOOL ignoreCRCMismatches;
|
||||
|
||||
|
||||
/**
|
||||
* **DEPRECATED:** Creates and returns an archive at the given path
|
||||
*
|
||||
* @param filePath A path to the archive file
|
||||
*/
|
||||
+ (nullable instancetype)rarArchiveAtPath:(NSString *)filePath __deprecated_msg("Use -initWithPath:error: instead");
|
||||
|
||||
/**
|
||||
* **DEPRECATED:** Creates and returns an archive at the given URL
|
||||
*
|
||||
* @param fileURL The URL of the archive file
|
||||
*/
|
||||
+ (nullable instancetype)rarArchiveAtURL:(NSURL *)fileURL __deprecated_msg("Use -initWithURL:error: instead");
|
||||
|
||||
/**
|
||||
* **DEPRECATED:** Creates and returns an archive at the given path, with a given password
|
||||
*
|
||||
* @param filePath A path to the archive file
|
||||
* @param password The passowrd of the given archive
|
||||
*/
|
||||
+ (nullable instancetype)rarArchiveAtPath:(NSString *)filePath password:(NSString *)password __deprecated_msg("Use -initWithPath:password:error: instead");
|
||||
|
||||
/**
|
||||
* **DEPRECATED:** Creates and returns an archive at the given URL, with a given password
|
||||
*
|
||||
* @param fileURL The URL of the archive file
|
||||
* @param password The passowrd of the given archive
|
||||
*/
|
||||
+ (nullable instancetype)rarArchiveAtURL:(NSURL *)fileURL password:(NSString *)password __deprecated_msg("Use -initWithURL:password:error: instead");
|
||||
|
||||
|
||||
/**
|
||||
* Do not use the default initializer
|
||||
*/
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
/**
|
||||
* Creates and returns an archive at the given path
|
||||
*
|
||||
* @param filePath A path to the archive file
|
||||
* @param error Contains any error during initialization
|
||||
*
|
||||
* @return Returns an initialized URKArchive, unless there's a problem creating a bookmark to the path
|
||||
*/
|
||||
- (nullable instancetype)initWithPath:(NSString *)filePath error:(NSError **)error;
|
||||
|
||||
/**
|
||||
* Creates and returns an archive at the given URL
|
||||
*
|
||||
* @param fileURL The URL of the archive file
|
||||
* @param error Contains any error during initialization
|
||||
*
|
||||
* @return Returns an initialized URKArchive, unless there's a problem creating a bookmark to the URL
|
||||
*/
|
||||
- (nullable instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)error;
|
||||
|
||||
/**
|
||||
* Creates and returns an archive at the given path, with a given password
|
||||
*
|
||||
* @param filePath A path to the archive file
|
||||
* @param password The passowrd of the given archive
|
||||
* @param error Contains any error during initialization
|
||||
*
|
||||
* @return Returns an initialized URKArchive, unless there's a problem creating a bookmark to the path
|
||||
*/
|
||||
- (nullable instancetype)initWithPath:(NSString *)filePath password:(NSString *)password error:(NSError **)error;
|
||||
|
||||
/**
|
||||
* Creates and returns an archive at the given URL, with a given password
|
||||
*
|
||||
* @param fileURL The URL of the archive file
|
||||
* @param password The passowrd of the given archive
|
||||
* @param error Contains any error during initialization
|
||||
*
|
||||
* @return Returns an initialized URKArchive, unless there's a problem creating a bookmark to the URL
|
||||
*/
|
||||
- (nullable instancetype)initWithURL:(NSURL *)fileURL password:(NSString *)password error:(NSError **)error;
|
||||
|
||||
|
||||
/**
|
||||
* Determines whether a file is a RAR archive by reading the signature
|
||||
*
|
||||
* @param filePath Path to the file being checked
|
||||
*
|
||||
* @return YES if the file exists and contains a signature indicating it is a RAR archive
|
||||
*/
|
||||
+ (BOOL)pathIsARAR:(NSString *)filePath;
|
||||
|
||||
/**
|
||||
* Determines whether a file is a RAR archive by reading the signature
|
||||
*
|
||||
* @param fileURL URL of the file being checked
|
||||
*
|
||||
* @return YES if the file exists and contains a signature indicating it is a RAR archive
|
||||
*/
|
||||
+ (BOOL)urlIsARAR:(NSURL *)fileURL;
|
||||
|
||||
/**
|
||||
* Lists the names of the files in the archive
|
||||
*
|
||||
* @param error Contains an NSError object when there was an error reading the archive
|
||||
*
|
||||
* @return Returns a list of NSString containing the paths within the archive's contents, or nil if an error was encountered
|
||||
*/
|
||||
- (nullable NSArray<NSString*> *)listFilenames:(NSError **)error;
|
||||
|
||||
/**
|
||||
* Lists the various attributes of each file in the archive
|
||||
*
|
||||
* @param error Contains an NSError object when there was an error reading the archive
|
||||
*
|
||||
* @return Returns a list of URKFileInfo objects, which contain metadata about the archive's files, or nil if an error was encountered
|
||||
*/
|
||||
- (nullable NSArray<URKFileInfo*> *)listFileInfo:(NSError **)error;
|
||||
|
||||
/**
|
||||
* Iterates the header of the archive, calling the block with each archived file's info.
|
||||
*
|
||||
* WARNING: There is no filtering of duplicate header entries. If a file is listed twice, `action`
|
||||
* will be called twice with that file's path
|
||||
*
|
||||
* @param action The action to perform using the data. Must be non-nil
|
||||
*
|
||||
* - *fileInfo* The metadata of the file within the archive
|
||||
* - *stop* Set to YES to stop reading the archive
|
||||
*
|
||||
* @param error Contains an NSError object when there was an error reading the archive
|
||||
*
|
||||
* @return Returns NO if an error was encountered
|
||||
*/
|
||||
- (BOOL) iterateFileInfo:(void(^)(URKFileInfo *fileInfo, BOOL *stop))action
|
||||
error:(NSError **)error;
|
||||
|
||||
/**
|
||||
* Lists the URLs of volumes in a single- or multi-volume archive
|
||||
*
|
||||
* @param error Contains an NSError object when there was an error reading the archive
|
||||
*
|
||||
* @return Returns the list of URLs of all volumes of the archive
|
||||
*/
|
||||
- (nullable NSArray<NSURL*> *)listVolumeURLs:(NSError **)error;
|
||||
|
||||
/**
|
||||
* Writes all files in the archive to the given path. Supports NSProgress for progress reporting, which also
|
||||
* allows cancellation in the middle of extraction. Use the progress property (as explained in the README) to
|
||||
* retrieve more detailed information, such as the current file being extracted, number of files extracted,
|
||||
* and the URKFileInfo instance being extracted
|
||||
*
|
||||
* @param filePath The destination path of the unarchived files
|
||||
* @param overwrite YES to overwrite files in the destination directory, NO otherwise
|
||||
* @param error Contains an NSError object when there was an error reading the archive
|
||||
*
|
||||
* @return YES on successful extraction, NO if an error was encountered
|
||||
*/
|
||||
- (BOOL)extractFilesTo:(NSString *)filePath
|
||||
overwrite:(BOOL)overwrite
|
||||
error:(NSError **)error;
|
||||
|
||||
/**
|
||||
* **DEPRECATED:** Writes all files in the archive to the given path
|
||||
*
|
||||
* @param filePath The destination path of the unarchived files
|
||||
* @param overwrite YES to overwrite files in the destination directory, NO otherwise
|
||||
* @param progressBlock Called every so often to report the progress of the extraction
|
||||
*
|
||||
* - *currentFile* The info about the file that's being extracted
|
||||
* - *percentArchiveDecompressed* The percentage of the archive that has been decompressed
|
||||
*
|
||||
* @param error Contains an NSError object when there was an error reading the archive
|
||||
*
|
||||
* @return YES on successful extraction, NO if an error was encountered
|
||||
*/
|
||||
- (BOOL)extractFilesTo:(NSString *)filePath
|
||||
overwrite:(BOOL)overwrite
|
||||
progress:(nullable void (^)(URKFileInfo *currentFile, CGFloat percentArchiveDecompressed))progressBlock
|
||||
error:(NSError **)error __deprecated_msg("Use -extractFilesTo:overwrite:error: instead, and if using the progress block, replace with NSProgress as described in the README");
|
||||
|
||||
/**
|
||||
* Unarchive a single file from the archive into memory. Supports NSProgress for progress reporting, which also
|
||||
* allows cancellation in the middle of extraction
|
||||
*
|
||||
* @param fileInfo The info of the file within the archive to be expanded. Only the filename property is used
|
||||
* @param error Contains an NSError object when there was an error reading the archive
|
||||
*
|
||||
* @return An NSData object containing the bytes of the file, or nil if an error was encountered
|
||||
*/
|
||||
- (nullable NSData *)extractData:(URKFileInfo *)fileInfo
|
||||
error:(NSError **)error;
|
||||
|
||||
/**
|
||||
* **DEPRECATED:** Unarchive a single file from the archive into memory
|
||||
*
|
||||
* @param fileInfo The info of the file within the archive to be expanded. Only the filename property is used
|
||||
* @param progressBlock Called every so often to report the progress of the extraction
|
||||
*
|
||||
* - *percentDecompressed* The percentage of the archive that has been decompressed
|
||||
*
|
||||
* @param error Contains an NSError object when there was an error reading the archive
|
||||
*
|
||||
* @return An NSData object containing the bytes of the file, or nil if an error was encountered
|
||||
*/
|
||||
- (nullable NSData *)extractData:(URKFileInfo *)fileInfo
|
||||
progress:(nullable void (^)(CGFloat percentDecompressed))progressBlock
|
||||
error:(NSError **)error __deprecated_msg("Use -extractData:error: instead, and if using the progress block, replace with NSProgress as described in the README");
|
||||
|
||||
/**
|
||||
* Unarchive a single file from the archive into memory. Supports NSProgress for progress reporting, which also
|
||||
* allows cancellation in the middle of extraction
|
||||
*
|
||||
* @param filePath The path of the file within the archive to be expanded
|
||||
*
|
||||
* - *percentDecompressed* The percentage of the file that has been decompressed
|
||||
*
|
||||
* @param error Contains an NSError object when there was an error reading the archive
|
||||
*
|
||||
* @return An NSData object containing the bytes of the file, or nil if an error was encountered
|
||||
*/
|
||||
- (nullable NSData *)extractDataFromFile:(NSString *)filePath
|
||||
error:(NSError **)error;
|
||||
|
||||
/**
|
||||
* **DEPRECATED:** Unarchive a single file from the archive into memory
|
||||
*
|
||||
* @param filePath The path of the file within the archive to be expanded
|
||||
* @param progressBlock Called every so often to report the progress of the extraction
|
||||
*
|
||||
* - *percentDecompressed* The percentage of the file that has been decompressed
|
||||
*
|
||||
* @param error Contains an NSError object when there was an error reading the archive
|
||||
*
|
||||
* @return An NSData object containing the bytes of the file, or nil if an error was encountered
|
||||
*/
|
||||
- (nullable NSData *)extractDataFromFile:(NSString *)filePath
|
||||
progress:(nullable void (^)(CGFloat percentDecompressed))progressBlock
|
||||
error:(NSError **)error __deprecated_msg("Use -extractDataFromFile:error: instead, and if using the progress block, replace with NSProgress as described in the README");
|
||||
|
||||
/**
|
||||
* Loops through each file in the archive in alphabetical order, allowing you to perform an
|
||||
* action using its info. Supports NSProgress for progress reporting, which also allows
|
||||
* cancellation of the operation in the middle
|
||||
*
|
||||
* @param action The action to perform using the data
|
||||
*
|
||||
* - *fileInfo* The metadata of the file within the archive
|
||||
* - *stop* Set to YES to stop reading the archive
|
||||
*
|
||||
* @param error Contains an error if any was returned
|
||||
*
|
||||
* @return YES if no errors were encountered, NO otherwise
|
||||
*/
|
||||
- (BOOL)performOnFilesInArchive:(void(^)(URKFileInfo *fileInfo, BOOL *stop))action
|
||||
error:(NSError **)error;
|
||||
|
||||
/**
|
||||
* Extracts each file in the archive into memory, allowing you to perform an action
|
||||
* on it (not sorted). Supports NSProgress for progress reporting, which also allows
|
||||
* cancellation of the operation in the middle
|
||||
*
|
||||
* @param action The action to perform using the data
|
||||
*
|
||||
* - *fileInfo* The metadata of the file within the archive
|
||||
* - *fileData* The full data of the file in the archive
|
||||
* - *stop* Set to YES to stop reading the archive
|
||||
*
|
||||
* @param error Contains an error if any was returned
|
||||
*
|
||||
* @return YES if no errors were encountered, NO otherwise
|
||||
*/
|
||||
- (BOOL)performOnDataInArchive:(void(^)(URKFileInfo *fileInfo, NSData *fileData, BOOL *stop))action
|
||||
error:(NSError **)error;
|
||||
|
||||
/**
|
||||
* Unarchive a single file from the archive into memory. Supports NSProgress for progress reporting, which also
|
||||
* allows cancellation in the middle of extraction
|
||||
*
|
||||
* @param filePath The path of the file within the archive to be expanded
|
||||
* @param error Contains an NSError object when there was an error reading the archive
|
||||
* @param action The block to run for each chunk of data, each of size <= bufferSize
|
||||
*
|
||||
* - *dataChunk* The data read from the archived file. Read bytes and length to write the data
|
||||
* - *percentDecompressed* The percentage of the file that has been decompressed
|
||||
*
|
||||
* @return YES if all data was read successfully, NO if an error was encountered
|
||||
*/
|
||||
- (BOOL)extractBufferedDataFromFile:(NSString *)filePath
|
||||
error:(NSError **)error
|
||||
action:(void(^)(NSData *dataChunk, CGFloat percentDecompressed))action;
|
||||
|
||||
/**
|
||||
* YES if archive protected with a password, NO otherwise
|
||||
*/
|
||||
- (BOOL)isPasswordProtected;
|
||||
|
||||
/**
|
||||
* Tests whether the provided password unlocks the archive
|
||||
*
|
||||
* @return YES if correct password or archive is not password protected, NO if password is wrong
|
||||
*/
|
||||
- (BOOL)validatePassword;
|
||||
|
||||
/**
|
||||
Iterate through the archive, checking for any errors, including CRC mismatches between
|
||||
the archived file and its header
|
||||
|
||||
@return YES if the data is all correct, false if any check failed (_even if ignoreCRCMismatches is YES_)
|
||||
*/
|
||||
- (BOOL)checkDataIntegrity;
|
||||
|
||||
/**
|
||||
Iterate through the archive, checking for any errors, including CRC mismatches between
|
||||
the archived file and its header. If any file's CRC doesn't match, run the given block
|
||||
to allow the API consumer to decide whether to ignore mismatches. NOTE: This may be a
|
||||
security risk. The block is intended to prompt the user, which is why it's forced onto
|
||||
the main thread, rather than making a design-time decision
|
||||
|
||||
@param ignoreCRCMismatches This block, called on the main thread, allows a consuming API to
|
||||
prompt the user whether or not he'd like to ignore CRC mismatches.
|
||||
This block is called the first time a CRC mismatch is detected, if
|
||||
at all. It won't be called if all CRCs match. If this returns YES,
|
||||
then all further CRC mismatches will be ignored for the
|
||||
archive instance
|
||||
|
||||
@return YES if the data is all correct and/or the block returns YES; returns false if
|
||||
any check failed and the given block also returns NO
|
||||
*/
|
||||
- (BOOL)checkDataIntegrityIgnoringCRCMismatches:(BOOL(^)(void))ignoreCRCMismatches;
|
||||
|
||||
/**
|
||||
Check a particular file, to determine if its data matches the CRC
|
||||
checksum stored at the time it written
|
||||
|
||||
@param filePath The file in the archive to check
|
||||
|
||||
@return YES if the data is correct, false if any check failed
|
||||
*/
|
||||
- (BOOL)checkDataIntegrityOfFile:(NSString *)filePath;
|
||||
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -1,158 +0,0 @@
|
|||
//
|
||||
// URKFileInfo.h
|
||||
// UnrarKit
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UnrarKit/UnrarKitMacros.h>
|
||||
|
||||
RarosHppIgnore
|
||||
#import <UnrarKit/raros.hpp>
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
DllHppIgnore
|
||||
#import <UnrarKit/dll.hpp>
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
/* See http://www.forensicswiki.org/wiki/RAR and
|
||||
http://www.rarlab.com/technote.htm#filehead for
|
||||
more information about the RAR File Header spec */
|
||||
|
||||
/**
|
||||
* Defines the packing methods that can be used on a file in an archive
|
||||
*/
|
||||
typedef NS_ENUM(NSUInteger, URKCompressionMethod) {
|
||||
|
||||
/**
|
||||
* No compression is used
|
||||
*/
|
||||
URKCompressionMethodStorage = 0x30,
|
||||
|
||||
/**
|
||||
* Fastest compression
|
||||
*/
|
||||
URKCompressionMethodFastest = 0x31,
|
||||
|
||||
/**
|
||||
* Fast compression
|
||||
*/
|
||||
URKCompressionMethodFast = 0x32,
|
||||
|
||||
/**
|
||||
* Normal compression
|
||||
*/
|
||||
URKCompressionMethodNormal = 0x33,
|
||||
|
||||
/**
|
||||
* Good compression
|
||||
*/
|
||||
URKCompressionMethodGood = 0x34,
|
||||
|
||||
/**
|
||||
* Best compression
|
||||
*/
|
||||
URKCompressionMethodBest = 0x35,
|
||||
};
|
||||
|
||||
/**
|
||||
* Defines the various operating systems that can be used when archiving
|
||||
*/
|
||||
typedef NS_ENUM(NSUInteger, URKHostOS) {
|
||||
|
||||
/**
|
||||
* MS-DOS
|
||||
*/
|
||||
URKHostOSMSDOS = 0,
|
||||
|
||||
/**
|
||||
* OS/2
|
||||
*/
|
||||
URKHostOSOS2 = 1,
|
||||
|
||||
/**
|
||||
* Windows
|
||||
*/
|
||||
URKHostOSWindows = 2,
|
||||
|
||||
/**
|
||||
* Unix
|
||||
*/
|
||||
URKHostOSUnix = 3,
|
||||
|
||||
/**
|
||||
* Mac OS
|
||||
*/
|
||||
URKHostOSMacOS = 4,
|
||||
|
||||
/**
|
||||
* BeOS
|
||||
*/
|
||||
URKHostOSBeOS = 5,
|
||||
};
|
||||
|
||||
/**
|
||||
* A wrapper around a RAR archive's file header, defining the various fields
|
||||
* it contains
|
||||
*/
|
||||
@interface URKFileInfo : NSObject
|
||||
|
||||
/**
|
||||
* The name of the file's archive
|
||||
*/
|
||||
@property (readonly, strong) NSString *archiveName;
|
||||
|
||||
/**
|
||||
* The name of the file
|
||||
*/
|
||||
@property (readonly, strong) NSString *filename;
|
||||
|
||||
/**
|
||||
* The timestamp of the file
|
||||
*/
|
||||
@property (readonly, strong) NSDate *timestamp;
|
||||
|
||||
/**
|
||||
* The CRC checksum of the file
|
||||
*/
|
||||
@property (readonly, assign) NSUInteger CRC;
|
||||
|
||||
/**
|
||||
* Size of the uncompressed file
|
||||
*/
|
||||
@property (readonly, assign) long long uncompressedSize;
|
||||
|
||||
/**
|
||||
* Size of the compressed file
|
||||
*/
|
||||
@property (readonly, assign) long long compressedSize;
|
||||
|
||||
/**
|
||||
* YES if the file will be continued of the next volume
|
||||
*/
|
||||
@property (readonly) BOOL isEncryptedWithPassword;
|
||||
|
||||
/**
|
||||
* YES if the file is a directory
|
||||
*/
|
||||
@property (readonly) BOOL isDirectory;
|
||||
|
||||
/**
|
||||
* The type of compression
|
||||
*/
|
||||
@property (readonly, assign) URKCompressionMethod compressionMethod;
|
||||
|
||||
/**
|
||||
* The OS of the file
|
||||
*/
|
||||
@property (readonly, assign) URKHostOS hostOS;
|
||||
|
||||
/**
|
||||
* Returns a URKFileInfo instance for the given extended header data
|
||||
*
|
||||
* @param fileHeader The header data for a RAR file
|
||||
*
|
||||
* @return an instance of URKFileInfo
|
||||
*/
|
||||
+ (instancetype) fileInfo:(struct RARHeaderDataEx *)fileHeader;
|
||||
|
||||
@end
|
|
@ -1,19 +0,0 @@
|
|||
//
|
||||
// UnrarKit.h
|
||||
// UnrarKit
|
||||
//
|
||||
// Created by Dov Frankel on 1/9/2015.
|
||||
// Copyright (c) 2015 Abbey Code. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//! Project version number for UnrarKit.
|
||||
FOUNDATION_EXPORT double UnrarKitVersionNumber;
|
||||
|
||||
//! Project version string for UnrarKit.
|
||||
FOUNDATION_EXPORT const unsigned char UnrarKitVersionString[];
|
||||
|
||||
|
||||
#import <UnrarKit/URKArchive.h>
|
||||
#import <UnrarKit/URKFileInfo.h>
|
|
@ -1,126 +0,0 @@
|
|||
//
|
||||
// UnrarKitMacros.h
|
||||
// UnrarKit
|
||||
//
|
||||
// Created by Dov Frankel on 8/8/17.
|
||||
// Copyright © 2017 Abbey Code. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef UnrarKitMacros_h
|
||||
#define UnrarKitMacros_h
|
||||
|
||||
//#import "Availability.h"
|
||||
//#import "AvailabilityInternal.h"
|
||||
|
||||
#define _stringify(a) #a
|
||||
|
||||
#define RarHppIgnore \
|
||||
_Pragma( _stringify( clang diagnostic push ) ) \
|
||||
_Pragma( _stringify( clang diagnostic ignored "-Wcast-align" ) ) \
|
||||
_Pragma( _stringify( clang diagnostic ignored "-Wextra-semi" ) ) \
|
||||
_Pragma( _stringify( clang diagnostic ignored "-Wold-style-cast" ) ) \
|
||||
_Pragma( _stringify( clang diagnostic ignored "-Wpadded" ) ) \
|
||||
_Pragma( _stringify( clang diagnostic ignored "-Wreserved-id-macro" ) ) \
|
||||
_Pragma( _stringify( clang diagnostic ignored "-Wshorten-64-to-32" ) ) \
|
||||
_Pragma( _stringify( clang diagnostic ignored "-Wcast-qual" ) ) \
|
||||
_Pragma( _stringify( clang diagnostic ignored "-Wundef" ) ) \
|
||||
|
||||
#define DllHppIgnore \
|
||||
_Pragma( _stringify( clang diagnostic push ) ) \
|
||||
_Pragma( _stringify( clang diagnostic ignored "-Wreserved-id-macro" ) ) \
|
||||
_Pragma( _stringify( clang diagnostic ignored "-Wstrict-prototypes" ) ) \
|
||||
|
||||
#define RarosHppIgnore \
|
||||
_Pragma( _stringify( clang diagnostic push ) ) \
|
||||
_Pragma( _stringify( clang diagnostic ignored "-Wreserved-id-macro" ) ) \
|
||||
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wundef"
|
||||
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
|
||||
|
||||
|
||||
// iOS 10, macOS 10.12, tvOS 10.0, watchOS 3.0
|
||||
#define UNIFIED_LOGGING_SUPPORTED \
|
||||
__IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 \
|
||||
|| __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 \
|
||||
|| __TV_OS_VERSION_MIN_REQUIRED >= 100000 \
|
||||
|| __WATCH_OS_VERSION_MIN_REQUIRED >= 30000
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
#define SDK_10_13_MAJOR 11
|
||||
#define SDK_10_13_MINOR 0
|
||||
#else
|
||||
#define SDK_10_13_MAJOR 10
|
||||
#define SDK_10_13_MINOR 13
|
||||
#endif
|
||||
|
||||
#if UNIFIED_LOGGING_SUPPORTED
|
||||
#import <os/log.h>
|
||||
#import <os/activity.h>
|
||||
|
||||
// Called from +[UnrarKit initialize] and +[URKArchiveTestCase setUp]
|
||||
extern os_log_t unrarkit_log; // Declared in URKArchive.mm
|
||||
extern BOOL unrarkitIsAtLeast10_13SDK; // Declared in URKArchive.m
|
||||
#define URKLogInit() \
|
||||
unrarkit_log = os_log_create("com.abbey-code.UnrarKit", "General"); \
|
||||
\
|
||||
NSOperatingSystemVersion minVersion; \
|
||||
minVersion.majorVersion = SDK_10_13_MAJOR; \
|
||||
minVersion.minorVersion = SDK_10_13_MINOR; \
|
||||
minVersion.patchVersion = 0; \
|
||||
unrarkitIsAtLeast10_13SDK = [[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:minVersion]; \
|
||||
URKLogDebug("Is >= 10.13 (or iOS 11): %@", unrarkitIsAtLeast10_13SDK ? @"YES" : @"NO");
|
||||
|
||||
#define URKLog(format, ...) os_log(unrarkit_log, format, ##__VA_ARGS__);
|
||||
#define URKLogInfo(format, ...) os_log_info(unrarkit_log, format, ##__VA_ARGS__);
|
||||
#define URKLogDebug(format, ...) os_log_debug(unrarkit_log, format, ##__VA_ARGS__);
|
||||
|
||||
|
||||
#define URKLogError(format, ...) \
|
||||
if (unrarkitIsAtLeast10_13SDK) os_log_error(unrarkit_log, format, ##__VA_ARGS__); \
|
||||
else os_log_with_type(unrarkit_log, OS_LOG_TYPE_ERROR, format, ##__VA_ARGS__);
|
||||
|
||||
#define URKLogFault(format, ...) \
|
||||
if (unrarkitIsAtLeast10_13SDK) os_log_fault(unrarkit_log, format, ##__VA_ARGS__); \
|
||||
else os_log_with_type(unrarkit_log, OS_LOG_TYPE_FAULT, format, ##__VA_ARGS__);
|
||||
|
||||
|
||||
#define URKCreateActivity(name) \
|
||||
os_activity_t activity = os_activity_create(name, OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT); \
|
||||
os_activity_scope(activity);
|
||||
|
||||
|
||||
#else // Fall back to regular NSLog
|
||||
|
||||
// No-op, as nothing needs to be initialized
|
||||
#define URKLogInit() (void)0
|
||||
|
||||
|
||||
// Only used below
|
||||
#define _removeLogFormatTokens(format) [[@format \
|
||||
stringByReplacingOccurrencesOfString:@"{public}" withString:@""] \
|
||||
stringByReplacingOccurrencesOfString:@"{iec-bytes}" withString:@""]
|
||||
#define _nsLogWithoutWarnings(format, ...) \
|
||||
_Pragma( _stringify( clang diagnostic push ) ) \
|
||||
_Pragma( _stringify( clang diagnostic ignored "-Wformat-nonliteral" ) ) \
|
||||
_Pragma( _stringify( clang diagnostic ignored "-Wformat-security" ) ) \
|
||||
NSLog(_removeLogFormatTokens(format), ##__VA_ARGS__); \
|
||||
_Pragma( _stringify( clang diagnostic pop ) )
|
||||
|
||||
// All levels do the same thing
|
||||
#define URKLog(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
|
||||
#define URKLogInfo(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
|
||||
#define URKLogDebug(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
|
||||
#define URKLogError(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
|
||||
#define URKLogFault(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
|
||||
|
||||
// No-op, as no equivalent to Activities exists
|
||||
#define URKCreateActivity(name) (void)0
|
||||
|
||||
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
#endif // UNIFIED_LOGGING_SUPPORTED
|
||||
|
||||
#endif /* UnrarKitMacros_h */
|
|
@ -1,189 +0,0 @@
|
|||
#ifndef _UNRAR_DLL_
|
||||
#define _UNRAR_DLL_
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
#define ERAR_SUCCESS 0
|
||||
#define ERAR_END_ARCHIVE 10
|
||||
#define ERAR_NO_MEMORY 11
|
||||
#define ERAR_BAD_DATA 12
|
||||
#define ERAR_BAD_ARCHIVE 13
|
||||
#define ERAR_UNKNOWN_FORMAT 14
|
||||
#define ERAR_EOPEN 15
|
||||
#define ERAR_ECREATE 16
|
||||
#define ERAR_ECLOSE 17
|
||||
#define ERAR_EREAD 18
|
||||
#define ERAR_EWRITE 19
|
||||
#define ERAR_SMALL_BUF 20
|
||||
#define ERAR_UNKNOWN 21
|
||||
#define ERAR_MISSING_PASSWORD 22
|
||||
#define ERAR_EREFERENCE 23
|
||||
#define ERAR_BAD_PASSWORD 24
|
||||
|
||||
#define RAR_OM_LIST 0
|
||||
#define RAR_OM_EXTRACT 1
|
||||
#define RAR_OM_LIST_INCSPLIT 2
|
||||
|
||||
#define RAR_SKIP 0
|
||||
#define RAR_TEST 1
|
||||
#define RAR_EXTRACT 2
|
||||
|
||||
#define RAR_VOL_ASK 0
|
||||
#define RAR_VOL_NOTIFY 1
|
||||
|
||||
#define RAR_DLL_VERSION 8
|
||||
|
||||
#define RAR_HASH_NONE 0
|
||||
#define RAR_HASH_CRC32 1
|
||||
#define RAR_HASH_BLAKE2 2
|
||||
|
||||
|
||||
#ifdef _UNIX
|
||||
#define CALLBACK
|
||||
#define PASCAL
|
||||
#define LONG long
|
||||
#define HANDLE void *
|
||||
#define LPARAM long
|
||||
#define UINT unsigned int
|
||||
#endif
|
||||
|
||||
#define RHDF_SPLITBEFORE 0x01
|
||||
#define RHDF_SPLITAFTER 0x02
|
||||
#define RHDF_ENCRYPTED 0x04
|
||||
#define RHDF_SOLID 0x10
|
||||
#define RHDF_DIRECTORY 0x20
|
||||
|
||||
|
||||
struct RARHeaderData
|
||||
{
|
||||
char ArcName[260];
|
||||
char FileName[260];
|
||||
unsigned int Flags;
|
||||
unsigned int PackSize;
|
||||
unsigned int UnpSize;
|
||||
unsigned int HostOS;
|
||||
unsigned int FileCRC;
|
||||
unsigned int FileTime;
|
||||
unsigned int UnpVer;
|
||||
unsigned int Method;
|
||||
unsigned int FileAttr;
|
||||
char *CmtBuf;
|
||||
unsigned int CmtBufSize;
|
||||
unsigned int CmtSize;
|
||||
unsigned int CmtState;
|
||||
};
|
||||
|
||||
|
||||
struct RARHeaderDataEx
|
||||
{
|
||||
char ArcName[1024];
|
||||
wchar_t ArcNameW[1024];
|
||||
char FileName[1024];
|
||||
wchar_t FileNameW[1024];
|
||||
unsigned int Flags;
|
||||
unsigned int PackSize;
|
||||
unsigned int PackSizeHigh;
|
||||
unsigned int UnpSize;
|
||||
unsigned int UnpSizeHigh;
|
||||
unsigned int HostOS;
|
||||
unsigned int FileCRC;
|
||||
unsigned int FileTime;
|
||||
unsigned int UnpVer;
|
||||
unsigned int Method;
|
||||
unsigned int FileAttr;
|
||||
char *CmtBuf;
|
||||
unsigned int CmtBufSize;
|
||||
unsigned int CmtSize;
|
||||
unsigned int CmtState;
|
||||
unsigned int DictSize;
|
||||
unsigned int HashType;
|
||||
char Hash[32];
|
||||
unsigned int RedirType;
|
||||
wchar_t *RedirName;
|
||||
unsigned int RedirNameSize;
|
||||
unsigned int DirTarget;
|
||||
unsigned int MtimeLow;
|
||||
unsigned int MtimeHigh;
|
||||
unsigned int CtimeLow;
|
||||
unsigned int CtimeHigh;
|
||||
unsigned int AtimeLow;
|
||||
unsigned int AtimeHigh;
|
||||
unsigned int Reserved[988];
|
||||
};
|
||||
|
||||
|
||||
struct RAROpenArchiveData
|
||||
{
|
||||
char *ArcName;
|
||||
unsigned int OpenMode;
|
||||
unsigned int OpenResult;
|
||||
char *CmtBuf;
|
||||
unsigned int CmtBufSize;
|
||||
unsigned int CmtSize;
|
||||
unsigned int CmtState;
|
||||
};
|
||||
|
||||
typedef int (CALLBACK *UNRARCALLBACK)(UINT msg,LPARAM UserData,LPARAM P1,LPARAM P2);
|
||||
|
||||
#define ROADF_VOLUME 0x0001
|
||||
#define ROADF_COMMENT 0x0002
|
||||
#define ROADF_LOCK 0x0004
|
||||
#define ROADF_SOLID 0x0008
|
||||
#define ROADF_NEWNUMBERING 0x0010
|
||||
#define ROADF_SIGNED 0x0020
|
||||
#define ROADF_RECOVERY 0x0040
|
||||
#define ROADF_ENCHEADERS 0x0080
|
||||
#define ROADF_FIRSTVOLUME 0x0100
|
||||
|
||||
#define ROADOF_KEEPBROKEN 0x0001
|
||||
|
||||
struct RAROpenArchiveDataEx
|
||||
{
|
||||
char *ArcName;
|
||||
wchar_t *ArcNameW;
|
||||
unsigned int OpenMode;
|
||||
unsigned int OpenResult;
|
||||
char *CmtBuf;
|
||||
unsigned int CmtBufSize;
|
||||
unsigned int CmtSize;
|
||||
unsigned int CmtState;
|
||||
unsigned int Flags;
|
||||
UNRARCALLBACK Callback;
|
||||
LPARAM UserData;
|
||||
unsigned int OpFlags;
|
||||
wchar_t *CmtBufW;
|
||||
unsigned int Reserved[25];
|
||||
};
|
||||
|
||||
enum UNRARCALLBACK_MESSAGES {
|
||||
UCM_CHANGEVOLUME,UCM_PROCESSDATA,UCM_NEEDPASSWORD,UCM_CHANGEVOLUMEW,
|
||||
UCM_NEEDPASSWORDW
|
||||
};
|
||||
|
||||
typedef int (PASCAL *CHANGEVOLPROC)(char *ArcName,int Mode);
|
||||
typedef int (PASCAL *PROCESSDATAPROC)(unsigned char *Addr,int Size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HANDLE PASCAL RAROpenArchive(struct RAROpenArchiveData *ArchiveData);
|
||||
HANDLE PASCAL RAROpenArchiveEx(struct RAROpenArchiveDataEx *ArchiveData);
|
||||
int PASCAL RARCloseArchive(HANDLE hArcData);
|
||||
int PASCAL RARReadHeader(HANDLE hArcData,struct RARHeaderData *HeaderData);
|
||||
int PASCAL RARReadHeaderEx(HANDLE hArcData,struct RARHeaderDataEx *HeaderData);
|
||||
int PASCAL RARProcessFile(HANDLE hArcData,int Operation,char *DestPath,char *DestName);
|
||||
int PASCAL RARProcessFileW(HANDLE hArcData,int Operation,wchar_t *DestPath,wchar_t *DestName);
|
||||
void PASCAL RARSetCallback(HANDLE hArcData,UNRARCALLBACK Callback,LPARAM UserData);
|
||||
void PASCAL RARSetChangeVolProc(HANDLE hArcData,CHANGEVOLPROC ChangeVolProc);
|
||||
void PASCAL RARSetProcessDataProc(HANDLE hArcData,PROCESSDATAPROC ProcessDataProc);
|
||||
void PASCAL RARSetPassword(HANDLE hArcData,char *Password);
|
||||
int PASCAL RARGetDllVersion();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif
|
|
@ -1,36 +0,0 @@
|
|||
#ifndef _RAR_RAROS_
|
||||
#define _RAR_RAROS_
|
||||
|
||||
#ifdef __EMX__
|
||||
#define _EMX
|
||||
#endif
|
||||
|
||||
#ifdef __DJGPP__
|
||||
#define _DJGPP
|
||||
#define _EMX
|
||||
#endif
|
||||
|
||||
#if defined(__WIN32__) || defined(_WIN32)
|
||||
#define _WIN_ALL // Defined for all Windows platforms, 32 and 64 bit, mobile and desktop.
|
||||
#ifdef _M_X64
|
||||
#define _WIN_64
|
||||
#else
|
||||
#define _WIN_32
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(ANDROID) || defined(__ANDROID__)
|
||||
#define _UNIX
|
||||
#define _ANDROID
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#define _UNIX
|
||||
#define _APPLE
|
||||
#endif
|
||||
|
||||
#if !defined(_EMX) && !defined(_WIN_ALL) && !defined(_BEOS) && !defined(_APPLE)
|
||||
#define _UNIX
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,6 +0,0 @@
|
|||
framework module UnrarKit {
|
||||
umbrella header "UnrarKit.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>20E241</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>UnrarKit</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.abbey-code.UnrarKit</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>UnrarKit</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.10-beta8</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>MacOSX</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.10-beta8</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>12E262</string>
|
||||
<key>DTPlatformName</key>
|
||||
<string>macosx</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>11.3</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>20E214</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx11.3</string>
|
||||
<key>DTXcode</key>
|
||||
<string>1250</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>12E262</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.15</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,48 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>20E241</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.abbey-code.UnrarKitResources</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>UnrarKitResources</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.10-beta8</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>MacOSX</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.10-beta8</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>12E262</string>
|
||||
<key>DTPlatformName</key>
|
||||
<string>macosx</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>11.3</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>20E214</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx11.3</string>
|
||||
<key>DTXcode</key>
|
||||
<string>1250</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>12E262</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.15</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2017 Abbey Code. All rights reserved.</string>
|
||||
</dict>
|
||||
</plist>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,139 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>files</key>
|
||||
<dict>
|
||||
<key>Resources/en.lproj/UnrarKit.strings</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
4aNLooY8/Q8rOLSmctvEV9DwGAI=
|
||||
</data>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>files2</key>
|
||||
<dict>
|
||||
<key>Resources/en.lproj/UnrarKit.strings</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
4aNLooY8/Q8rOLSmctvEV9DwGAI=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
VkPIaVIWGPyRA1tTE53onpl4aTmx0CNs/3U2d7cG4kc=
|
||||
</data>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>rules</key>
|
||||
<dict>
|
||||
<key>^Resources/</key>
|
||||
<true/>
|
||||
<key>^Resources/.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Resources/Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^version.plist$</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>rules2</key>
|
||||
<dict>
|
||||
<key>.*\.dSYM($|/)</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>11</real>
|
||||
</dict>
|
||||
<key>^(.*/)?\.DS_Store$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>2000</real>
|
||||
</dict>
|
||||
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
|
||||
<dict>
|
||||
<key>nested</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>10</real>
|
||||
</dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^Info\.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^PkgInfo$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^Resources/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Resources/Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^[^/]+$</key>
|
||||
<dict>
|
||||
<key>nested</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>10</real>
|
||||
</dict>
|
||||
<key>^embedded\.provisionprofile$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^version\.plist$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
Binary file not shown.
|
@ -1,261 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>files</key>
|
||||
<dict>
|
||||
<key>Resources/Info.plist</key>
|
||||
<data>
|
||||
kP+2hGbc5UbBLTWCykQCQHNGqVg=
|
||||
</data>
|
||||
<key>Resources/UnrarKitResources.bundle/Contents/Info.plist</key>
|
||||
<data>
|
||||
Opiy+QsoZ4Z9HnQ5FuuqJVeKu4Y=
|
||||
</data>
|
||||
<key>Resources/UnrarKitResources.bundle/Contents/Resources/en.lproj/UnrarKit.strings</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
4aNLooY8/Q8rOLSmctvEV9DwGAI=
|
||||
</data>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeDirectory</key>
|
||||
<data>
|
||||
X/1CdbBv5ljMRaLAqxX97GriBBA=
|
||||
</data>
|
||||
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeRequirements</key>
|
||||
<data>
|
||||
OnX22wWFKRSOFN1+obRynMCeyXM=
|
||||
</data>
|
||||
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeRequirements-1</key>
|
||||
<data>
|
||||
utnQg7dzZjbLL250eedIQZhLplQ=
|
||||
</data>
|
||||
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeResources</key>
|
||||
<data>
|
||||
3xyPKEjTSKm1dE8pKU5KJxlzgQ8=
|
||||
</data>
|
||||
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeSignature</key>
|
||||
<data>
|
||||
2jmj7l5rSw0yVb/vlWAYkK/YBwk=
|
||||
</data>
|
||||
</dict>
|
||||
<key>files2</key>
|
||||
<dict>
|
||||
<key>Headers/URKArchive.h</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
rox3zCtp5PtT6aCGBTc1urWEeCJWSVnbsKHdY1SV5aU=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/URKFileInfo.h</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
DErdK++0JLNG/lSf5ria/P7Ptb1joLcY5+JS+EbbQjM=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/UnrarKit.h</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
Im9W8u5nUegygTw75tBTuhRUIB8SXdaLaaU2SknY53Q=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/UnrarKitMacros.h</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
vKAewkQ+cR0c+94ld4BCAoOzicn0ulUtzKSJizjVs0w=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/dll.hpp</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
dkoTdXvns0VAnQEd3UOvIVqVdI1jeZe4CoRH+HSR2gk=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/raros.hpp</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
TbRkm1cPRL7UDN/I1f7b7t8nm+p8qh5fsrogXk9ufDI=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
QFhnMeeSvaRbXgjqqZukQbhw6sra4mMmeaWDBLZ3bNs=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Resources/Info.plist</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
oFI2EUT3wJtNxFjndO2DAV5kvegT3oIk+Rh7oLoiur8=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Resources/UnrarKitResources.bundle/Contents/Info.plist</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
Xh55AZikgaMdZGZTYMHyoo7wFxKFVTt+idYrxVuqbWc=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Resources/UnrarKitResources.bundle/Contents/Resources/en.lproj/UnrarKit.strings</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
VkPIaVIWGPyRA1tTE53onpl4aTmx0CNs/3U2d7cG4kc=
|
||||
</data>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeDirectory</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
uWJS1b2WPBEsDL3c0Hq2WiDig0Du9nZnYqmyYD59dyg=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeRequirements</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
mHkgkE6rZQ51eIwFSqCwUk5qgL/HGqMt+NI3phdD+YY=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeRequirements-1</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
xnfMwM29lyD/os6DQ6LuOXHUv8CmFE4Y8ks2mr2ILh0=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeResources</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
dYGyaLe+INkvAnQFRHNAbgDP4a0iweQD6U2S6rEO0UA=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeSignature</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
|
||||
</data>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>rules</key>
|
||||
<dict>
|
||||
<key>^Resources/</key>
|
||||
<true/>
|
||||
<key>^Resources/.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Resources/Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^version.plist$</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>rules2</key>
|
||||
<dict>
|
||||
<key>.*\.dSYM($|/)</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>11</real>
|
||||
</dict>
|
||||
<key>^(.*/)?\.DS_Store$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>2000</real>
|
||||
</dict>
|
||||
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
|
||||
<dict>
|
||||
<key>nested</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>10</real>
|
||||
</dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^Info\.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^PkgInfo$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^Resources/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Resources/Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^[^/]+$</key>
|
||||
<dict>
|
||||
<key>nested</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>10</real>
|
||||
</dict>
|
||||
<key>^embedded\.provisionprofile$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^version\.plist$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1 +0,0 @@
|
|||
A
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>TicketVersion</key>
|
||||
<integer>1</integer>
|
||||
<key>AllNotifications</key>
|
||||
<array>
|
||||
<string>QuietUnrarExtractionComplete</string>
|
||||
</array>
|
||||
<key>DefaultNotifications</key>
|
||||
<array>
|
||||
<string>QuietUnrarExtractionComplete</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
|
@ -13,12 +13,13 @@
|
|||
D488BC6810AF437B00B3451C /* libunrar.so in Frameworks */ = {isa = PBXBuildFile; fileRef = D488BC6710AF437B00B3451C /* libunrar.so */; };
|
||||
D488BCC110AF49C700B3451C /* libunrar.so in CopyFiles */ = {isa = PBXBuildFile; fileRef = D488BC6710AF437B00B3451C /* libunrar.so */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
D488BE5510B05F3800B3451C /* PasswordView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D488BE5410B05F3800B3451C /* PasswordView.xib */; };
|
||||
D488BFCC10B1FD4500B3451C /* Growl Registration Ticket.growlRegDict in Resources */ = {isa = PBXBuildFile; fileRef = D488BFCB10B1FD4500B3451C /* Growl Registration Ticket.growlRegDict */; };
|
||||
D4A49691105435BE00BE38AE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||
D4A49692105435C100BE38AE /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
|
||||
D4A96E2110545E9A0091ECB4 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4A96E2010545E9A0091ECB4 /* Carbon.framework */; };
|
||||
E2A3B839265C00AA00A6C0A3 /* UnrarKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2A3B838265C00AA00A6C0A3 /* UnrarKit.framework */; };
|
||||
E2A3B83A265C00AA00A6C0A3 /* UnrarKit.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = E2A3B838265C00AA00A6C0A3 /* UnrarKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
E2A3B83D265EA8B900A6C0A3 /* UnrarKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2A3B83B265EA8B800A6C0A3 /* UnrarKit.framework */; };
|
||||
E2A3B83E265EA8B900A6C0A3 /* UnrarKit.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = E2A3B83B265EA8B800A6C0A3 /* UnrarKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
E2A3B83F265EA8B900A6C0A3 /* UnzipKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2A3B83C265EA8B800A6C0A3 /* UnzipKit.framework */; };
|
||||
E2A3B840265EA8B900A6C0A3 /* UnzipKit.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = E2A3B83C265EA8B800A6C0A3 /* UnzipKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
|
@ -38,8 +39,9 @@
|
|||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
E2A3B83A265C00AA00A6C0A3 /* UnrarKit.framework in CopyFiles */,
|
||||
E2A3B83E265EA8B900A6C0A3 /* UnrarKit.framework in CopyFiles */,
|
||||
D488BCC110AF49C700B3451C /* libunrar.so in CopyFiles */,
|
||||
E2A3B840265EA8B900A6C0A3 /* UnzipKit.framework in CopyFiles */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -57,10 +59,7 @@
|
|||
8D1107310486CEB800E47090 /* QuietUnrar-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "QuietUnrar-Info.plist"; sourceTree = "<group>"; };
|
||||
8D1107320486CEB800E47090 /* QuietUnrar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = QuietUnrar.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D488BC6710AF437B00B3451C /* libunrar.so */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libunrar.so; path = libunrar/libunrar.so; sourceTree = "<group>"; };
|
||||
D488BDB610B0160300B3451C /* PasswordDialog.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PasswordDialog.xib; sourceTree = "<group>"; };
|
||||
D488BE5410B05F3800B3451C /* PasswordView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PasswordView.xib; sourceTree = "<group>"; };
|
||||
D488BFAF10B1F97F00B3451C /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Growl.framework; path = Frameworks/Growl.framework; sourceTree = "<group>"; };
|
||||
D488BFCB10B1FD4500B3451C /* Growl Registration Ticket.growlRegDict */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Growl Registration Ticket.growlRegDict"; sourceTree = "<group>"; };
|
||||
D4A495741054177300BE38AE /* arccmt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = arccmt.cpp; path = libunrar/arccmt.cpp; sourceTree = "<group>"; };
|
||||
D4A495751054177300BE38AE /* archive.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = archive.cpp; path = libunrar/archive.cpp; sourceTree = "<group>"; };
|
||||
D4A495761054177300BE38AE /* archive.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = archive.hpp; path = libunrar/archive.hpp; sourceTree = "<group>"; };
|
||||
|
@ -170,7 +169,8 @@
|
|||
D4A96E2010545E9A0091ECB4 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
|
||||
E296811D24BE4BCD00974229 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
E296811E24BE4BCD00974229 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
E2A3B838265C00AA00A6C0A3 /* UnrarKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UnrarKit.framework; path = Frameworks/UnrarKit.framework; sourceTree = "<group>"; };
|
||||
E2A3B83B265EA8B800A6C0A3 /* UnrarKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UnrarKit.framework; path = Carthage/Build/Mac/UnrarKit.framework; sourceTree = "<group>"; };
|
||||
E2A3B83C265EA8B800A6C0A3 /* UnzipKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UnzipKit.framework; path = Carthage/Build/Mac/UnzipKit.framework; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -180,8 +180,9 @@
|
|||
files = (
|
||||
D488BC6810AF437B00B3451C /* libunrar.so in Frameworks */,
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
|
||||
E2A3B839265C00AA00A6C0A3 /* UnrarKit.framework in Frameworks */,
|
||||
E2A3B83D265EA8B900A6C0A3 /* UnrarKit.framework in Frameworks */,
|
||||
D4A96E2110545E9A0091ECB4 /* Carbon.framework in Frameworks */,
|
||||
E2A3B83F265EA8B900A6C0A3 /* UnzipKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -253,8 +254,6 @@
|
|||
8D1107310486CEB800E47090 /* QuietUnrar-Info.plist */,
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
|
||||
1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
|
||||
D488BDB610B0160300B3451C /* PasswordDialog.xib */,
|
||||
D488BFCB10B1FD4500B3451C /* Growl Registration Ticket.growlRegDict */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
|
@ -262,11 +261,11 @@
|
|||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E2A3B838265C00AA00A6C0A3 /* UnrarKit.framework */,
|
||||
E2A3B83B265EA8B800A6C0A3 /* UnrarKit.framework */,
|
||||
E2A3B83C265EA8B800A6C0A3 /* UnzipKit.framework */,
|
||||
D488BC6710AF437B00B3451C /* libunrar.so */,
|
||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
|
||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
|
||||
D488BFAF10B1F97F00B3451C /* Growl.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
|
@ -413,6 +412,7 @@
|
|||
D4A4965210541D2600BE38AE /* CopyFiles */,
|
||||
D4A49697105435C700BE38AE /* Resources */,
|
||||
D488BC8210AF470700B3451C /* ShellScript */,
|
||||
E2A3B841265EA8E800A6C0A3 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
|
@ -459,7 +459,6 @@
|
|||
D4A49692105435C100BE38AE /* MainMenu.xib in Resources */,
|
||||
D4A49691105435BE00BE38AE /* InfoPlist.strings in Resources */,
|
||||
D488BE5510B05F3800B3451C /* PasswordView.xib in Resources */,
|
||||
D488BFCC10B1FD4500B3451C /* Growl Registration Ticket.growlRegDict in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -479,6 +478,25 @@
|
|||
shellPath = /bin/sh;
|
||||
shellScript = "#export NEWLIBPATH=\"@loader_path/../Frameworks\"\n#export PROJECT_PATH=\"/Users/rob/Programming/Projects - Mine/QuietUnrar\"\n#\n#mkdir \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks\"\n#cp -f \"$PROJECT_PATH/libunrar/libunrar.so\" \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks/libunrar.so\"\n\ninstall_name_tool -change libunrar.so @loader_path/../Frameworks/libunrar.so \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\"\n";
|
||||
};
|
||||
E2A3B841265EA8E800A6C0A3 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"$(SRCROOT)/Carthage/Build/Mac/UnrarKit.framework",
|
||||
"$(SRCROOT)/Carthage/Build/Mac/UnzipKit.framework",
|
||||
);
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n/usr/local/bin/carthage copy-frameworks\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
|
@ -533,6 +551,7 @@
|
|||
"$(inherited)",
|
||||
"\"$(SRCROOT)/Frameworks\"",
|
||||
"$(PROJECT_DIR)/Frameworks",
|
||||
"$(PROJECT_DIR)/Carthage/Build/Mac",
|
||||
);
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
|
@ -566,6 +585,7 @@
|
|||
"$(inherited)",
|
||||
"\"$(SRCROOT)/Frameworks\"",
|
||||
"$(PROJECT_DIR)/Frameworks",
|
||||
"$(PROJECT_DIR)/Carthage/Build/Mac",
|
||||
);
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
//
|
||||
|
||||
#import <Carbon/Carbon.h>
|
||||
//#import <Growl/Growl.h>
|
||||
#import <UnrarKit/UnrarKit.h>
|
||||
#import "QuietUnrarAppDelegate.h"
|
||||
#import "libunrar/dll.hpp"
|
||||
|
@ -112,6 +111,7 @@ int callbackFunction(UINT message, LPARAM userData, LPARAM parameterOne, LPARAM
|
|||
}
|
||||
|
||||
// Call one at a time for each file selected when app is run
|
||||
// This is seemingly never called, even when only selecting a single file.
|
||||
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename {
|
||||
//NSLog(@"openFile: %@", filename);
|
||||
|
||||
|
@ -128,16 +128,7 @@ int callbackFunction(UINT message, LPARAM userData, LPARAM parameterOne, LPARAM
|
|||
for (NSString * filename in arrayOfFilenames) {
|
||||
BOOL extracted = [self extractRarWith:filename];
|
||||
if (extracted) {
|
||||
//[GrowlApplicationBridge setGrowlDelegate:@""];
|
||||
|
||||
// [GrowlApplicationBridge
|
||||
// notifyWithTitle:@"QuietUnrar: Extraction Complete"
|
||||
// description:[NSString stringWithFormat:@"The archive %@ was successfully extracted", filename]
|
||||
// notificationName:@"QuietUnrarExtractionComplete"
|
||||
// iconData:nil
|
||||
// priority:0
|
||||
// isSticky:NO
|
||||
// clickContext:nil];
|
||||
// post notification based on user preference
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue