Skip to content

Commit

Permalink
first import
Browse files Browse the repository at this point in the history
git-svn-id: file://localhost/Users/liyanage/Desktop/svnroot-private/freitag-fuji@6 3d77b58f-1df1-0310-9d13-cc6abd89a21a
  • Loading branch information
liyanage committed May 24, 2005
0 parents commit 79d0b40
Show file tree
Hide file tree
Showing 101 changed files with 19,382 additions and 0 deletions.
Binary file added English.lproj/InfoPlist.strings
Binary file not shown.
51 changes: 51 additions & 0 deletions English.lproj/MainMenu.nib/classes.nib

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions English.lproj/MainMenu.nib/info.nib

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added English.lproj/MainMenu.nib/keyedobjects.nib
Binary file not shown.
1 change: 1 addition & 0 deletions Frameworks/CURLHandle.framework/CURLHandle
1 change: 1 addition & 0 deletions Frameworks/CURLHandle.framework/Headers
1 change: 1 addition & 0 deletions Frameworks/CURLHandle.framework/Resources
Binary file not shown.
@@ -0,0 +1,61 @@
//
// CURLHandle+extras.h
//
// Created by Dan Wood <dwood@karelia.com> on Mon Oct 01 2001.
// This is in the public domain, but please report any improvements back to the author.
//
// The current version of CURLHandle is 1.9.
//

#import "CURLHandle.h"


@interface CURLHandle ( extras )

/*" Miscellaneous functions "*/

- (void) setProgressIndicator:(id)inProgressIndicator;

/*" Set options for the transfer "*/

- (void) setConnectionTimeout:(long) inSeconds;
- (void) setTransferTimeout:(long) inSeconds;
- (void) setCookieFile:(NSString *)inFilePath;
- (void) setRequestCookies:(NSDictionary *)inDict;
- (void) setFailsOnError:(BOOL)inFlag;
- (void) setFollowsRedirects:(BOOL)inFlag;
- (void) setPostString:(NSString *)inPostString;
- (void) setPostDictionary:(NSDictionary *)inDictionary;
- (void) setPostDictionary:(NSDictionary *)inDictionary encoding:(NSStringEncoding) inEncoding;
- (void) setReferer:(NSString *)inReferer;
- (void) setUserAgent:(NSString *)inUserAgent;
- (void) setUserName:(NSString*)inUserName password:(NSString *)inPassword;
- (void) setNoBody:(BOOL)inNoBody;
- (void) setRange:(NSString *)inRange;
- (void) setIfModSince:(NSDate *)inModDate;
- (void) setLowSpeedTime:(long) inSeconds;
- (void) setLowSpeedLimit:(long) inBytes;
- (void) setVerbose: (BOOL) beVerbose;

/*" Get information about the transfer "*/

- (double)downloadContentLength;
- (double)downloadSize;
- (double)downloadSpeed;
- (double)nameLookupTime;
- (double)pretransferTime;
- (double)totalTime;
- (double)uploadContentLength;
- (double)uploadSize;
- (double)uploadSpeed;
- (long)fileTime;
- (long)headerSize;
- (long)httpCode;
- (long)requestSize;

/*" Multipart post operations "*/
- (void) setMultipartPostDictionary: (NSDictionary *) inDictionary;
- (void) setMultipartPostDictionary: (NSDictionary *) values headers: (NSDictionary *) headers;


@end
148 changes: 148 additions & 0 deletions Frameworks/CURLHandle.framework/Versions/A/Headers/CURLHandle.h
@@ -0,0 +1,148 @@
//
// CURLHandle.h
//
// Created by Dan Wood <dwood@karelia.com> on Fri Jun 22 2001.
// This is in the public domain, but please report any improvements back to the author.
//
// The current version of CURLHandle is 1.9.
//

#import <Foundation/Foundation.h>
#import <curl/curl.h>

/*" The cache has been removed "*/
extern NSString *CURLHandleCacheDeleteNotification;

/*" The cache has been created "*/
extern NSString *CURLHandleCacheCreateNotification;

/*" The cache has been changed "*/
extern NSString *CURLHandleCacheChangeNotification;

/*" A handle has been created; the object is the handle itself. "*/

extern NSString *CURLHandleCreatedNotification;

/*" Cache of URL contents, keyed by URL "*/
extern NSMutableDictionary *sCurlCache;

/*" Set of URLs that CURLHandle will process "*/
extern NSMutableSet *sAcceptedURLs;

/*" YES if CURLHandle will accept %all HTTP "*/
extern BOOL sAcceptAllHTTP;

/*" YES if CURLHandle will allow use of a proxy server "*/
extern BOOL sAllowsProxy;

/*" Proxy User ID:Password combo for all uses of CURL. "*/
extern NSString *sProxyUserIDAndPassword;

/*" Callbacks from reading a chunk of data. Since we pass "self" in as the "data pointer",
we can use that to get back into Objective C and do the work with the class.
"*/

extern size_t curlBodyFunction(void *ptr, size_t size, size_t nmemb, void *inSelf);
extern size_t curlHeaderFunction(void *ptr, size_t size, size_t nmemb, void *inSelf);

@interface CURLHandle : NSURLHandle
{
NSThread *mMainThread; /*" Reference to main thread so thread can determine if it's a background thread or not "*/
CURL *mCURL; /*" Pointer to the actual CURL object that does all the hard work "*/
char mErrorBuffer[CURL_ERROR_SIZE]; /*" Buffer to hold string generated by CURL; this is then converted to an NSString. "*/
int mResult; /*" Result after performing a CURL operation; it is displayed as an error code in case there was no error string generated. "*/

NSURL *mNSURL; /*" The instance of #NSURL that is the URL to load "*/

NSMutableData *mHeaderBuffer; /*" The buffer that is filled with data from the header as the download progresses; it's appended to one line at a time. "*/

NSString *mHeaderString; /*" The header buffer, converted into a string, upon demand. "*/

NSMutableDictionary *mStringOptions; /*" Dictionary of keys(ints) & values (NSStrings) for performing curl_easy_setopt. We store the options in a dictionary and then invoke #curl_easy_setopt on each option right before the #curl_easy_perform so that we can retain their memory until it is needed."*/

NSDictionary *mProxies; /*" Dictionary of proxy information; it's released when the handle is deallocated since it's needed for the transfer."*/

NSMutableDictionary *mHTTPHeaders; /*" Dictionary of & values (NSStrings) for additional HTTP headers. We store the options in a dictionary and then make use of them right before the #curl_easy_perform so that we can retain their memory until it is needed."*/

id mProgressIndicator; /*" A progress indicator, to animate during foreground loads. This will help give some indication of loading progress, though of course you're better off loading in the background. "*/

// Backgrounding support
NSPort *mPort; /*" A port for communicating between the background thread and the foreground thread. "*/

BOOL mAbortBackground; /*" A flag that is set by the foreground thread and read by the background thread; it's an indicator that the user has cancelled. "*/

FILE *mPutFile; /*" The FILE stream if putFile: is used. It's only saved so it can be closed after perform "*/

}

/*" CURLHandle-specific interfaces. "*/

+ (void) curlGoodbye;
+ (void) curlHelloSignature:(NSString *) inSignature acceptAll:(BOOL)inAcceptAllHTTP;
+ (void)curlAcceptURL:(NSURL *)url;
+ (void)curlFlushEntireCache;
- (CURL *) curl;
- (void) setString:(NSString *)inString forKey:(CURLoption) inCurlOption;
- (void) setStringOrNumberObject:(id)inString forKey:(CURLoption) inCurlOption;
- (void) setURL:(NSURL *)inURL;
- (NSURL *)url;
- (void) setHTTPHeaders:(NSDictionary *)inDict;
+ (void) setProxyUserIDAndPassword:(NSString *)inString;
+ (void) setAllowsProxy:(BOOL) inBool;
- (void) setPutFile:(NSString *)path;
- (void) setPutFileOffset:(int)offset;
- (NSArray *)getResponseCookies;
+ (NSString *) curlVersion;

/*" NSURLHandle overrides "*/

+ (BOOL)canInitWithURL:(NSURL *)anURL;
+ (NSURLHandle *)cachedHandleForURL:(NSURL *)anURL;
- (NSData *)loadInForeground;
- (NSString *)curlError;
- (id) initWithURL:(NSURL *)anURL cached:(BOOL)willCache;
- (id)propertyForKey:(NSString *)propertyKey;
- (id)propertyForKeyIfAvailable:(NSString *)propertyKey;
- (void) dealloc;
- (void)beginLoadInBackground;
- (void)cancelLoadInBackground;
- (void)endLoadInBackground;

/*" Support Methods "*/

- (size_t) curlWritePtr:(void *)inPtr size:(size_t)inSize number:(size_t)inNumber message:(int)inMessageID;
- (void) curlThreadBackgroundLoad:(id)inParam;
- (void) prepareAndPerformCurl;
- (void)handlePortMessage:(NSPortMessage *)portMessage;
- (NSString *)headerString;

@end

@interface NSDictionary ( CurlHTTPExtensions )

- (NSString *) formatForHTTP;
- (NSString *) formatForHTTPUsingEncoding:(NSStringEncoding)inEncoding;
- (NSString *) formatForHTTPUsingEncoding:(NSStringEncoding)inEncoding ordering:(NSArray *)inOrdering;

@end

@interface NSArray ( CurlHTTPExtensions )

- (NSDictionary *)parsedCookies;

@end

@interface NSString ( CurlHTTPExtensions )

- (NSString *) headerStatus;
- (NSString *) headerHTTPVersion;
- (NSString *) headerMatchingKey:(NSString *)inKey;
- (NSArray *) headersMatchingKey:(NSString *)inKey;
- (NSArray *) allHTTPHeaderDicts;
- (NSString *) headerKey;
- (NSString *) headerValue;
- (NSArray *) componentsSeparatedByLineSeparators;

@end


20 changes: 20 additions & 0 deletions Frameworks/CURLHandle.framework/Versions/A/Resources/Info.plist
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>CURLHandle</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.8</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.8</string>
</dict>
</plist>
1 change: 1 addition & 0 deletions Frameworks/CURLHandle.framework/Versions/Current
1 change: 1 addition & 0 deletions Frameworks/CocoaSequenceGrabber.framework/Headers
1 change: 1 addition & 0 deletions Frameworks/CocoaSequenceGrabber.framework/Resources
Binary file not shown.
@@ -0,0 +1,46 @@
//
// CSGCamera.h
// MotionTracker
//
// Created by Tim Omernick on 3/7/05.
// Copyright 2005 Tim Omernick. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <QuickTime/QuickTime.h>

@class CSGImage;

/*
CSGCamera provides a simple way to access the default sequence grabber component (say, an iSight or other DV camera). To use:
- Instantiate an CSGCamera instance (using the plain old -init method)
- Set the CSGCamera's delegate using -setDelegate:. The delegate is the object which will receive -camera:didReceiveFrame: messages.
- Call -startWithSize: on the CSGCamera instance with a decent size (like 512x384).
- Call -stop to stop recording.
*/

@interface CSGCamera : NSObject
{
id delegate;
SeqGrabComponent component;
SGChannel channel;
GWorldPtr gWorld;
Rect boundsRect;
ImageSequence decompressionSequence;
TimeScale timeScale;
TimeValue lastTime;
NSTimeInterval startTime;
NSTimer *frameTimer;
}

- (void)setDelegate:(id)newDelegate;
- (BOOL)startWithSize:(NSSize)frameSize;
- (BOOL)stop;
- (void)runSettingsDialog;

@end

@interface NSObject (Private)
- (void)camera:(CSGCamera *)aCamera didReceiveFrame:(CSGImage *)aFrame;
@end
@@ -0,0 +1,19 @@
//
// CSGImage.h
// MotionTracker
//
// Created by Tim Omernick on 3/6/05.
// Copyright 2005 Tim Omernick. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@interface CSGImage : NSImage
{
NSTimeInterval sampleTime;
}

- (NSTimeInterval)sampleTime;
- (void)setSampleTime:(NSTimeInterval)newSampleTime;

@end

0 comments on commit 79d0b40

Please sign in to comment.