home *** CD-ROM | disk | FTP | other *** search
- /*
- NXDataLink
- Application Kit, Release 3.0
- Copyright (c) 1991, NeXT, Inc. All rights reserved.
- */
-
- #import <Foundation/NSObject.h>
- #import <objc/hashtable.h>
- #import "NSPasteboard.h"
- #import <sys/types.h>
- #import "NSSelection.h"
- @class NSDataLinkManager;
- @class NSArray;
-
- typedef enum _NXDataLinkUpdateMode {
- NSUpdateContinuously = 1,
- NSUpdateWhenSourceSaved = 2,
- NSUpdateManually = 3,
- NSUpdateNever = 4
- } NSDataLinkUpdateMode;
-
- typedef enum _NXDataLinkDisposition {
- NSLinkInDestination = 1,
- NSLinkInSource = 2,
- NSLinkBroken = 3
- } NSDataLinkDisposition;
-
- extern NSString * NSDataLinkPboardType;
-
- /* A persistent identifier of links on the destination side. Never 0. */
- typedef int NSDataLinkNumber;
-
- /* filename suffix used for saved links */
- extern NSString * NSDataLinkFilenameExtension;
-
- @interface NSDataLink : NSObject {
- /* these instance variables are NOT part of the API, are subject to change in future releases */
- @private
- NSSelection *srcSelection;
- id srcFile;
- char *srcAppName;
- id srcMgr;
- NSSelection *destSelection;
- char *destFileName;
- char *destAppName;
- id destMgr;
- time_t lastUpdateTime;
- NSDataLinkNumber linkNum;
- struct _dlFlags {
- unsigned int dirty:1;
- unsigned int memorable:1;
- unsigned int mode:2;
- unsigned int canUpdateContinuously:1;
- unsigned int updateMode:4;
- unsigned int appVerifiesLinks:1;
- unsigned int willOpenSource:1;
- unsigned int willUpdate:1;
- unsigned int dead:1;
- unsigned int cyclical:1;
- unsigned int RESERVED:2;
- } dlFlags;
- NSString * *types;
- unsigned int _reservedDataLink1;
- }
-
- - initLinkedToSourceSelection:(NSSelection *)selection managedBy:linkManager supportingTypes:(NSArray *)newTypes;
- - initLinkedToFile:(NSString *)filename;
- - initFromPasteboard:(NSPasteboard *)pasteboard;
- - initFromFile:(NSString *)filename;
- - copyFromZone:(NSZone *)zone;
-
- - writeToPasteboard:(NSPasteboard *)pasteboard;
- - writeToFile:(NSString *)filename;
-
- - saveLinkIn:(NSString *)directoryName;
-
- - (NSArray *)types;
- - (NSSelection *)sourceSelection;
- - (NSSelection *)destinationSelection;
- - (NSString *)sourceFilename;
- - (NSString *)destinationFilename;
- - (NSString *)sourceAppName;
- - (NSString *)destinationAppName;
- - (NSDataLinkManager *)manager;
- - (time_t)lastUpdateTime;
- - (NSDataLinkNumber)linkNumber;
- - (NSDataLinkDisposition)disposition;
-
- - updateDestination;
- - openSource;
- - break;
- - setUpdateMode:(NSDataLinkUpdateMode)mode;
- - (NSDataLinkUpdateMode)updateMode;
- - sourceEdited;
-
- @end
-