InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ISharedContentFacade.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Ashish Duggal
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // ADOBE CONFIDENTIAL
16 //
17 // Copyright 2010 Adobe Systems Incorporated
18 // All Rights Reserved.
19 //
20 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
21 // with the terms of the Adobe license agreement accompanying it. If you have received
22 // this file from a source other than Adobe, then your use, modification, or
23 // distribution of it requires the prior written permission of Adobe.
24 //
25 // Description:
26 // A high level API for dealing with shared content links, link resources and link objects.
27 //
28 //========================================================================================
29 
30 #ifndef __ISharedContentFacade__
31 #define __ISharedContentFacade__
32 
33 // ----- Includes -----
34 #include "IPMUnknown.h"
35 
36 #include "SharedContentID.h"
37 #include "Utils.h"
38 #include "URI.h"
39 
40 // -----Forward Declarations------
41 class ILink;
42 class ILinkResource;
43 class ITextModel;
44 
45 
57 namespace Facade
58 {
59 
61  {
62  public:
63  enum { kDefaultIID = IID_ISHAREDCONTENTFACADE };
64 
68  enum LinkPageItemOption{ kPIUpdateOnSave,
69  kPIWarnOnUpdateOfEditedPageItem,
70  kPIStyleMappingExceptions,
71  kPIPathgeometryOverride,
72  kPIGraphicAttributesOverride,
73  kPIInteractiveAttributesOverride,
74  kPIContentOverride,
75  kPIOtherAttributesOverride};
76 
80  enum LinkStoryOption{ kUpdateOnSave,
81  kWarnOnUpdateOfEditedStory,
82  kRemoveForcedLineBreaks,
83  kMapStyles, };
84 
93  virtual ErrorCode CreateSharedContentLink (const UIDRef& sourceRef, const UIDRef& targetRef, UID& outLinkUID) const = 0;
94 
101  virtual bool16 CanCreateSharedContentLink (const UIDRef& sourceRef, const UIDRef& targetRef) const = 0;
102 
108  virtual UIDRef GetLinkForSharedContentLinkObject(const UIDRef& linkObj) const = 0;
109 
116  virtual UIDRef GetResourceObjectForSharedContentLink(const UIDRef& linkResourceRef,const URI& linkedContentURI) const = 0;
117 
123  virtual bool16 IsSharedContentLink(const ILink* link) const = 0;
124 
130  virtual bool16 IsSharedContentInternalLink(const ILink* link) const = 0;
131 
137  virtual bool16 IsSharedContentExternalLink(const ILink* link) const = 0;
138 
144  virtual bool16 IsSharedContentLinkResource(const ILinkResource* linkResource) const = 0;
145 
151  virtual bool16 IsSharedContentExternalLinkResource(const ILinkResource* linkResource) const = 0;
152 
157  virtual bool16 IsSharedStoryLinkObject(const UIDRef& textModelRef) const = 0;
158 
163  virtual bool16 IsSharedPageItemLinkObject(const UIDRef& pageItemRef) const = 0;
164 
170  virtual bool16 IsSharedPageItemLink(const ILink* link) const = 0;
171 
177  virtual bool16 IsSharedStoryLink(const ILink* link) const = 0;
178 
184  virtual bool16 IsSharedPageItemLinkResource(const ILinkResource* linkResource) const = 0;
185 
191  virtual bool16 IsSharedStoryLinkResource(const ILinkResource* linkResource) const = 0;
192 
198  virtual bool16 IsSharedPageItemOptionSet(ILink* link, LinkPageItemOption option) const = 0;
199 
205  virtual bool16 IsSharedStoryOptionSet(ILink* link, LinkStoryOption option) = 0;
206 
212  virtual bool16 IsSharedStoryOptionSet(const UIDRef& textModel, LinkStoryOption option) = 0;
213 
219  virtual ErrorCode CopySharedPageItemOptions(const UIDRef& sourceRef, const UIDRef& targetRef) = 0;
220 
226  virtual ErrorCode CopySharedStoryOptions(const UIDRef& sourceModel, const UIDRef& targetModel) = 0;
227 
236  virtual ErrorCode SetSharedStoryOption(const UIDRef& textModel, LinkStoryOption option, const bool16 newValue) = 0;
237 
246  virtual ErrorCode SetSharedPageItemOption(const UIDRef& pageItem, LinkPageItemOption option, const bool16 newValue) = 0;
247 
253  virtual UIDRef GetResourceObjectForSharedStoryLink(const UIDRef& linkRef) const = 0;
254 
260  virtual bool16 ContainsSharedStoryLink(const UIDList& linkList) const = 0;
261  };
262 
263 } // namespace Facade
264 
265 
266 #endif // __ISharedContentFacade__