InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IBookSyncOptions.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Yeming Liu
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 // Comments: This interface is used to define the synchronization options for book .
24 //
25 //========================================================================================
26 
27 #ifndef __IBOOKSYNCOPTIONS__
28 #define __IBOOKSYNCOPTIONS__
29 
30 #include "IPMUnknown.h"
31 #include "IPMStream.h"
32 #include "KeyValuePair.h"
33 #include "K2Vector.h"
34 #include "BookID.h"
35 
40 {
41  public:
42  typedef object_type data_type;
43 
47  SyncStyleIDInfo() : fTurnOn(kFalse) {}
48 
53  const PMIID styleID, // sync style interface id
54  const PMString& styleName, // style name
55  const bool16 turnOn) : // turn on/off flag
56  fStyleID(styleID),
57  fStyleName(styleName),
58  fTurnOn(turnOn) {}
59 
64  bool16 operator==(const SyncStyleIDInfo& other) const
65  {
66  return ( (fStyleID == other.fStyleID) &&
67  (fStyleName == other.fStyleName) &&
68  (fTurnOn == other.fTurnOn) );
69  }
70 
76  {
77  int32 styleID(0);
78  if (s->IsReading())
79  {
80  s->XferInt32(styleID);
81  fStyleID = (PMIID)styleID;
82  }
83  else
84  s->XferInt32((int32&)fStyleID);
85 
86  fStyleName.ReadWrite(s);
87  s->XferBool(fTurnOn);
88  }
89 
90  PMIID fStyleID; // synchronization style interface id
91  PMString fStyleName; // style name
92  bool16 fTurnOn; // flag indicates if style is turned on or not, if it is turned on, we should synchronize it.
93 };
94 
101 {
102  public:
103  enum { kDefaultIID = IID_IBOOKSYNCOPTIONS };
104 
110 
111 
115  virtual void SetSyncStyleMap(const K2Vector<KeyValuePair<PMString, K2Vector<SyncStyleIDInfo> > >& styleMap) = 0;
116 };
117 
118 
119 #endif //__IBOOKSYNCOPTIONS__