InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IInCopyBridgeUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Bernd Paradies
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __IInCopyBridgeUtils__
25 #define __IInCopyBridgeUtils__
26 
27 #include "InCopyBridgeID.h"
28 #include "IPMUnknown.h"
29 
30 #include "K2Vector.h"
31 #include "ICommand.h"
32 
33 class ICommand;
34 class UIDRef;
35 class PMString;
36 class IDataLink;
37 class IDocument;
38 
39 // DEPRECATED. DO NOT USE THIS INTERFACE.
40 // See method descriptions below for suggested alternative methods to use.
41 
43 {
44 public:
45  enum { kDefaultIID = IID_IINCOPYBRIDGEUTILS };
46 
51  {
52  // ARM's _ExpectedErrors, see ARMTypes.h .
53  //kSuccess = 0,
54  //kCancelled = 1,
55  //kUnauthorized,
56  //kNoSuchResource,
57  //kNoContent,
58  //kPermissionDenied,
59  //kLockedElsewhere,
60  //kLockedByOther,
61  //kLockedExclusively,
62  //kLockedShared,
63  //kLockRevoked,
64  //kNoSuchReplica,
65  //kWouldClobberLocked,
66  //kWouldClobberModified,
67  //kWouldClobberCurrent,
68  //kNoSuchParent,
69  //kNoMountPoint,
70  //kCantMountParent,
71  //kCantMountChild,
72  //kMountPointsDiffer,
73  //kNotInARM,
74  //kCollectionAlreadyExists,
75  //kNonCollectionAlreadyExists,
76  //kCantCaptureUnlessCurrent,
78  //kLastExpectedError = 0x7FFFFFFF, // force enum to be a 32 bit int
79 
81  //kIllegalURL = -6666, /* a distinctive number, for luck! */
82  //kForbidden,
83  //kServerBusy,
84  //kRedirect,
85  //kServerFailure,
86  //kDatabaseFailure,
87  //kDiskFailure,
88  //kMemoryFailure,
89  //kNetworkFailure,
90  //kConfigurationError,
91  //kClientNameError,
92  //kRequestError,
93  //kFileOpenFailure,
94  //kBadParameterPassed,
95  //kCantFindMountPointFolder,
96  //kFileNotFound,
97  //kFolderNotFound,
98  //kItemWasNotAFolder,
99  //kCantResolveAlias,
100  //kCantOpenOptionsFile,
101  //kCantCreateAlias,
102  //kCantOpenResourceFork,
103  //kFileAlreadyExists,
104  //kNoMountPointRoot,
105  //kIllegalMountName,
106  //kNotDAVResource, // server return shows protocol failure
107  //kResourceMissing, // didn't find a resource we expected
108  //kCantCreateFolder,
109  //kEncodingError, // can't map characters
110  //kMountPointRootMissing, // the mount point root was expected but couldn't be found
112  //kNonSpecific = -1,
113  //kLastUnexpectedError = 0x7FFFFFFF, // force enum to be a 32 bit int
114  //
115 
116  // InCopyBridge errors
117  kNoError = kICBErr_NoError,
118  kUnknown = kICBErr_Unknown,
119  kInvalidParameter = kICBErr_InvalidParameter,
120  kNoDataLink = kICBErr_NoDataLink,
121  kBrokenLink = kICBErr_BrokenLink,
122  kLinkIsEmbedded = kICBErr_LinkIsEmbedded,
123  kNotNormalLink = kICBErr_NotNormalLink,
124  kCantGetLinkFile = kICBErr_CantGetLinkFile,
125  kInvalidUserName = kICBErr_kInvalidUserName,
126  kLinkIsMissing = kICBErr_kLinkIsMissing,
127  kLastInCopyBridgeError = kLinkIsMissing
128  };
129 
130 #ifdef ID_DEPRECATED
131 
136  virtual void SetInCopyUsername( const PMString& userName ) const = 0;
137 
144  virtual PMString GetInCopyUsername( UIFlags uiFlags = kFullUI ) const = 0;
145 
146 
153  virtual IDataLink *QueryDataLink( const UIDRef& storyRef ) const = 0;
154 
155 
164  virtual bool16 LockTextModel( const UIDRef& storyRef, bool16 lockStory, ICommand::Undoability undoabilityFlag = ICommand::kRegularUndo ) const = 0;
165 
166 
175  virtual bool16 LockItem( const UIDRef& itemRef, bool16 lock, ICommand::Undoability undoabilityFlag = ICommand::kRegularUndo ) const = 0;
176 
177 
185  virtual ErrorCode NotifyResponders( ICommand *icBridgeCommand, ServiceID serviceID = kLiveEditCmdResponderService ) const = 0;
186 
187 
194  virtual bool16 GetInCopyLockFile( const IDFile& storySysFile, IDFile& inCopyLockFile ) const = 0;
195 
196 
205  virtual bool16 SyncTextModelLock( const UIDRef& storyRef, IDFile& storyFile, UIFlags uiFlags = kFullUI ) const = 0;
206 
214  virtual bool16 SetTextModelLock( const UIDRef& storyRef ) const = 0;
215 
222  virtual bool16 IsInCopyStory( const UIDRef& storyRef ) const = 0;
223 
224 
237  virtual bool16 GetSysFileOfStory( const UIDRef& storyRef, IDFile& storyFile, FileTypeInfoID& fileTypeInfo, ICBridgeError* errorCode = nil, bool16 allowSynchronous = kTrue ) const = 0;
238 
239 
247  virtual PMString GetGUIDOfStory( const UIDRef& storyRef, bool16 createGUIDifNecessary = kTrue ) const = 0;
248 
255  virtual bool16 AreStoriesLocked( const IDocument* document, bool16 useCachedValue = kFalse ) const = 0;
256 
264  virtual bool16 ExportStory( const UIDRef& storyRef, const IDFile& storyFile, const FileTypeInfoID fileTypeID ) const = 0;
265 
266 #endif // ID_DEPRECATED
267 
268 };
269 
270 
271 #endif // __IInCopyBridgeUtils__