InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IBarcodeFacade.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: kaubansa
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 _IBARCODEFACADE_
25 #define _IBARCODEFACADE_
26 
27 #include "EPSID.h"
28 #include "PMString.h"
29 #include "IQRCodeMetaData.h"
30 
31 namespace Facade
32 {
33  class IBarcodeFacade : public IPMUnknown
34  {
35  public:
36  enum { kDefaultIID = IID_IBARCODEFACADE};
37 
38  struct VCardData
39  {
40  PMString FirstName,
41  LastName,
42  JobTitle,
43  TelNo,
44  CellNo,
45  Email,
46  Website,
47  Org,
48  Street,
49  City,
50  Zip,
51  Country;
52  };
53 
54  struct VCardData2 // Adds State
55  {
56  PMString FirstName,
57  LastName,
58  JobTitle,
59  TelNo,
60  CellNo,
61  Email,
62  Website,
63  Org,
64  Street,
65  City,
66  State,
67  Zip,
68  Country;
69  };
70 
71  // Utility methods to Create QRCodes.
72  // 1. If the QRCode will replace a page item, specify its UIDRef as 1st parameter.
73  // If QRCode will instead load in placegun, create a UIDRef with UID == kInvalidUID, pointing to document database.
74  // 2. ErrorLevel is used to specify the fault tolerance level for QRCode. Currently, only QRCodes with fault tolerance of 15% (kM) can be created.
75  // Other values from IQRCodeMetaData::ErrorLevel enum can be passed in, but they are not applied right now.
76  // 3. Returns - UID of created QRCode if successful, kInvalidUID otherwise.
77 
78  virtual UID CreateQRCodeEmail(const UIDRef& toReplace, const PMString& to, const PMString& subject, const PMString& message,
79  IQRCodeMetaData::ErrorLevel level = IQRCodeMetaData::kM, const UID& qrCodeSwatchUID = kInvalidUID) = 0;
80 
81  /*
82  @Deprecated This API is deprecated. Please Use CreateQRCodeVCard_2() instead. This API does not include the state field in the address field of the vCard.
83  */
84 
85  virtual UID CreateQRCodeVCard(const UIDRef& toReplace, const VCardData& vcardData, IQRCodeMetaData::ErrorLevel level = IQRCodeMetaData::kM, const UID& qrCodeSwatchUID = kInvalidUID) = 0;
86 
87  virtual UID CreateQRCodeSMS(const UIDRef& toReplace, const PMString& to, const PMString& message,
88  IQRCodeMetaData::ErrorLevel level = IQRCodeMetaData::kM, const UID& qrCodeSwatchUID = kInvalidUID) = 0;
89 
90  virtual UID CreateQRCodeHyperLink(const UIDRef& toReplace, const PMString& url,
91  IQRCodeMetaData::ErrorLevel level = IQRCodeMetaData::kM, const UID& qrCodeSwatchUID = kInvalidUID) = 0;
92 
93  virtual UID CreateQRCodeText(const UIDRef& toReplace, const PMString& text,
94  IQRCodeMetaData::ErrorLevel level = IQRCodeMetaData::kM, const UID& qrCodeSwatchUID = kInvalidUID) = 0;
95 
96  virtual bool16 IsQRCode(const UIDRef& uidref) = 0;
97 
98  // Creates QRCode of type Business Card (vCard). CreateQRCodeVCard() did not include the state field in the address of the vCard.
99  // CreateQRCodeVCard_2() adds the state to the address as well.
100 
101  virtual UID CreateQRCodeVCard_2(const UIDRef& toReplace, const VCardData2& vcardData, IQRCodeMetaData::ErrorLevel level = IQRCodeMetaData::kM, const UID& qrCodeSwatchUID = kInvalidUID) = 0;
102  };
103 }
104 
105 #endif // IBarcodeFacade