-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathStipplePublishSupport.lua
1495 lines (1348 loc) · 90.7 KB
/
StipplePublishSupport.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-- Lightroom SDK
local LrDialogs = import 'LrDialogs'
local LrApplication = import 'LrApplication'
local LrTasks = import 'LrTasks'
local catalog = LrApplication.activeCatalog()
-- Stipple plug-in
require 'StippleAPI'
--[[
--- The <i>service definition script</i> for a publish service provider associates
-- the code and hooks that extend the behavior of Lightroom's Publish features
-- with their implementation for your plug-in. The plug-in's <code>Info.lua</code> file
-- identifies this script in the <code>LrExportServiceProvider</code> entry. The script
-- must define the needed callback functions and properties (with the required
-- names and syntax) and assign them to members of the table that it returns.
-- <p>The <code>StipplePublishSupport.lua</code> file of the Stipple sample plug-in provides
-- examples of and documentation for the hooks that a plug-in must provide in order to
-- define a publish service. Because much of the functionality of a publish service
-- is the same as that of an export service, this example builds upon that defined in the
-- <code>StippleExportServiceProvider.lua</code> file.</p>
-- <p>The service definition script for a publish service should return a table that contains:
-- <ul><li>A pair of functions that initialize and terminate your publish service. </li>
-- <li>Optional items that define the desired customizations for the Publish dialog.
-- These can restrict the built-in services offered by the dialog,
-- or customize the dialog by defining new sections. </li>
-- <li> A function that defines the publish operation to be performed
-- on rendered photos (required).</li>
-- <li> Additional functions and/or properties to customize the publish operation.</li>
-- </ul>
-- <p>Most of these functions are the same as those defined for an export service provider.
-- Publish services, unlike export services, cannot create presets. (You could think of the
-- publish service itself as an export preset.) The settings tables passed
-- to these callback functions contain only Lightroom-defined settings, and settings that
-- have been explicitly declared in the <code>exportPresetFields</code> list of the publish service.
-- A callback function that you define for a publish service cannot make any changes to the
-- settings table passed to it.</p>
-- @module_type Plug-in provided
module 'SDK - Publish service provider' -- not actually executed, but suffices to trick LuaDocs
--]]
--============================================================================--
local publishServiceProvider = {}
--------------------------------------------------------------------------------
--- (string) Plug-in defined value is the filename of the icon to be displayed
-- for this publish service provider, in the Publish Services panel, the Publish
-- Manager dialog, and in the header shown when a published collection is selected.
-- The icon must be in PNG format and no more than 24 pixels wide or 19 pixels tall.
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.small_icon
-- @class property
publishServiceProvider.small_icon = 'StippleLogo.png'
--------------------------------------------------------------------------------
--- (optional, string) Plug-in defined value customizes the behavior of the
-- Description entry in the Publish Manager dialog. If the user does not provide
-- an explicit name choice, Lightroom can provide one based on another entry
-- in the publishSettings property table. This entry contains the name of the
-- property that should be used in this case.
-- @name publishServiceProvider.publish_fallbackNameBinding
-- @class property
publishServiceProvider.publish_fallbackNameBinding = 'fullname'
--------------------------------------------------------------------------------
--- (optional, string) Plug-in defined value customizes the name of a published
-- collection to match the terminology used on the service you are targeting.
-- <p>This string is typically used in combination with verbs that take action on
-- the published collection, such as "Create ^1" or "Rename ^1".</p>
-- <p>If not provided, Lightroom uses the default name, "Published Collection." </p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.titleForPublishedCollection
-- @class property
publishServiceProvider.titleForPublishedCollection = LOC "$$$/Stipple/TitleForPublishedCollection=Photoset"
--------------------------------------------------------------------------------
--- (optional, string) Plug-in defined value customizes the name of a published
-- collection to match the terminology used on the service you are targeting.
-- <p>Unlike <code>titleForPublishedCollection</code>, this string is typically
-- used by itself. In English, these strings nay be the same, but in
-- other languages (notably German), you may have to use a different form
-- of the name to be gramatically correct. If you are localizing your plug-in,
-- use a separate translation key to make this possible.</p>
-- <p>If not provided, Lightroom uses the value of
-- <code>titleForPublishedCollection</code> instead.</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.titleForPublishedCollection_standalone
-- @class property
publishServiceProvider.titleForPublishedCollection_standalone = LOC "$$$/Stipple/TitleForPublishedCollection/Standalone=Photoset"
--------------------------------------------------------------------------------
--- (optional, string) Plug-in defined value customizes the name of a published
-- collection set to match the terminoy used on the service you are targeting.
-- <p>This string is typically used in combination with verbs that take action on
-- the published collection set, such as "Create ^1" or "Rename ^1".</p>
-- <p>If not provided, Lightroom uses the default name, "Published Collection Set." </p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.titleForPublishedCollectionSet
-- @class property
-- publishServiceProvider.titleForPublishedCollectionSet = "(something)" -- not used for Stipple plug-in
--------------------------------------------------------------------------------
--- (optional, string) Plug-in defined value customizes the name of a published
-- collection to match the terminology used on the service you are targeting.
-- <p>Unlike <code>titleForPublishedCollectionSet</code>, this string is typically
-- used by itself. In English, these strings may be the same, but in
-- other languages (notably German), you may have to use a different form
-- of the name to be gramatically correct. If you are localizing your plug-in,
-- use a separate translation key to make this possible.</p>
-- <p>If not provided, Lightroom uses the value of
-- <code>titleForPublishedCollectionSet</code> instead.</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.titleForPublishedCollectionSet_standalone
-- @class property
--publishServiceProvider.titleForPublishedCollectionSet_standalone = "(something)" -- not used for Stipple plug-in
--------------------------------------------------------------------------------
--- (optional, string) Plug-in defined value customizes the name of a published
-- smart collection to match the terminology used on the service you are targeting.
-- <p>This string is typically used in combination with verbs that take action on
-- the published smart collection, such as "Create ^1" or "Rename ^1".</p>
-- <p>If not provided, Lightroom uses the default name, "Published Smart Collection." </p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.titleForPublishedSmartCollection
-- @class property
publishServiceProvider.titleForPublishedSmartCollection = LOC "$$$/Stipple/TitleForPublishedSmartCollection=Smart Photoset"
--------------------------------------------------------------------------------
--- (optional, string) Plug-in defined value customizes the name of a published
-- smart collection to match the terminology used on the service you are targeting.
-- <p>Unlike <code>titleForPublishedSmartCollection</code>, this string is typically
-- used by itself. In English, these strings may be the same, but in
-- other languages (notably German), you may have to use a different form
-- of the name to be gramatically correct. If you are localizing your plug-in,
-- use a separate translation key to make this possible.</p>
-- <p>If not provided, Lightroom uses the value of
-- <code>titleForPublishedSmartCollectionSet</code> instead.</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.titleForPublishedSmartCollection_standalone
-- @class property
publishServiceProvider.titleForPublishedSmartCollection_standalone = LOC "$$$/Stipple/TitleForPublishedSmartCollection/Standalone=Smart Photoset"
--------------------------------------------------------------------------------
--- (optional) If you provide this plug-in defined callback function, Lightroom calls it to
-- retrieve the default collection behavior for this publish service, then use that information to create
-- a built-in <i>default collection</i> for this service (if one does not yet exist).
-- This special collection is marked in italics and always listed at the top of the list of published collections.
-- <p>This callback should return a table that configures the default collection. The
-- elements of the configuration table are optional, and default as shown.</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @param publishSettings (table) The settings for this publish service, as specified
-- by the user in the Publish Manager dialog. Any changes that you make in
-- this table do not persist beyond the scope of this function call.
-- @return (table) A table with the following fields:
-- <ul>
-- <li><b>defaultCollectionName</b>: (string) The name for the default
-- collection. If not specified, the name is "untitled" (or
-- a language-appropriate equivalent). </li>
-- <li><b>defaultCollectionCanBeDeleted</b>: (Boolean) True to allow the
-- user to delete the default collection. Default is true. </li>
-- <li><b>canAddCollection</b>: (Boolean) True to allow the
-- user to add collections through the UI. Default is true. </li>
-- <li><b>maxCollectionSetDepth</b>: (number) A maximum depth to which
-- collection sets can be nested, or zero to disallow collection sets.
-- If not specified, unlimited nesting is allowed. </li>
-- </ul>
-- @name publishServiceProvider.getCollectionBehaviorInfo
-- @class function
function publishServiceProvider.getCollectionBehaviorInfo( publishSettings )
return {
defaultCollectionName = LOC "$$$/Stipple/DefaultCollectionName/Photostream=Photostream",
defaultCollectionCanBeDeleted = false,
canAddCollection = true,
maxCollectionSetDepth = 0, -- Collection sets are not supported through the Stipple sample plug-in.
}
end
--------------------------------------------------------------------------------
--- When set to the string "disable", the "Go to Published Collection" context-menu item
-- is disabled (dimmed) for this publish service.
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.titleForGoToPublishedCollection
-- @class property
publishServiceProvider.titleForGoToPublishedCollection = LOC "$$$/Stipple/TitleForGoToPublishedCollection=Show in Stipple"
--------------------------------------------------------------------------------
--- (optional) This plug-in defined callback function is called when the user chooses
-- the "Go to Published Collection" context-menu item.
-- <p>If this function is not provided, Lightroom uses the URL recorded for the published collection via
-- <a href="LrExportSession.html#exportSession:recordRemoteCollectionUrl"><code>exportSession:recordRemoteCollectionUrl</code></a>.</p>
-- <p>This is not a blocking call. It is called from within a task created
-- using the <a href="LrTasks.html"><code>LrTasks</code></a> namespace. In most
-- cases, you should not need to start your own task within this function.</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.goToPublishedCollection
-- @class function
-- @param publishSettings (table) The settings for this publish service, as specified
-- by the user in the Publish Manager dialog. Any changes that you make in
-- this table do not persist beyond the scope of this function call.
-- @param info (table) A table with these fields:
-- <ul>
-- <li><b>publishedCollectionInfo</b>: (<a href="LrPublishedCollectionInfo.html"><code>LrPublishedCollectionInfo</code></a>)
-- An object containing publication information for this published collection.</li>
-- <li><b>photo</b>: (<a href="LrPhoto.html"><code>LrPhoto</code></a>) The photo object. </li>
-- <li><b>publishedPhoto</b>: (<a href="LrPublishedPhoto.html"><code>LrPublishedPhoto</code></a>)
-- The object that contains information previously recorded about this photo's publication.</li>
-- <li><b>remoteId</b>: (string or number) The ID for this published collection
-- that was stored via <a href="LrExportSession.html#exportSession:recordRemoteCollectionId"><code>exportSession:recordRemoteCollectionId</code></a></li>
-- <li><b>remoteUrl</b>: (optional, string) The URL, if any, that was recorded for the published collection via
-- <a href="LrExportSession.html#exportSession:recordRemoteCollectionUrl"><code>exportSession:recordRemoteCollectionUrl</code></a>.</li>
-- </ul>
--[[ Not used for Stipple plug-in.
function publishServiceProvider.goToPublishedCollection( publishSettings, info )
end
--]]
--------------------------------------------------------------------------------
--- (optional, string) Plug-in defined value overrides the label for the
-- "Go to Published Photo" context-menu item, allowing you to use something more appropriate to
-- your service. Set to the special value "disable" to disable (dim) the menu item for this service.
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.titleForGoToPublishedPhoto
-- @class property
publishServiceProvider.titleForGoToPublishedPhoto = LOC "$$$/Stipple/TitleForGoToPublishedCollection=Show in Stipple"
--------------------------------------------------------------------------------
--- (optional) This plug-in defined callback function is called when the user chooses the
-- "Go to Published Photo" context-menu item.
-- <p>If this function is not provided, Lightroom invokes the URL recorded for the published photo via
-- <a href="LrExportRendition.html#exportRendition:recordPublishedPhotoUrl"><code>exportRendition:recordPublishedPhotoUrl</code></a>.</p>
-- <p>This is not a blocking call. It is called from within a task created
-- using the <a href="LrTasks.html"><code>LrTasks</code></a> namespace. In most
-- cases, you should not need to start your own task within this function.</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.goToPublishedPhoto
-- @class function
-- @param publishSettings (table) The settings for this publish service, as specified
-- by the user in the Publish Manager dialog. Any changes that you make in
-- this table do not persist beyond the scope of this function call.
-- @param info (table) A table with these fields:
-- <ul>
-- <li><b>publishedCollectionInfo</b>: (<a href="LrPublishedCollectionInfo.html"><code>LrPublishedCollectionInfo</code></a>)
-- An object containing publication information for this published collection.</li>
-- <li><b>photo</b>: (<a href="LrPhoto.html"><code>LrPhoto</code></a>) The photo object. </li>
-- <li><b>publishedPhoto</b>: (<a href="LrPublishedPhoto.html"><code>LrPublishedPhoto</code></a>)
-- The object that contains information previously recorded about this photo's publication.</li>
-- <li><b>remoteId</b>: (string or number) The ID for this published photo
-- that was stored via <a href="LrExportRendition.html#exportRendition:recordPublishedPhotoId"><code>exportRendition:recordPublishedPhotoId</code></a></li>
-- <li><b>remoteUrl</b>: (optional, string) The URL, if any, that was recorded for the published photo via
-- <a href="LrExportRendition.html#exportRendition:recordPublishedPhotoUrl"><code>exportRendition:recordPublishedPhotoUrl</code></a>.</li>
-- </ul>
--[[ Not used for Stipple plug-in.
function publishServiceProvider.goToPublishedPhoto( publishSettings, info )
end
]]--
--------------------------------------------------------------------------------
--- (optional) This plug-in defined callback function is called when the user creates
-- a new publish service via the Publish Manager dialog. It allows your plug-in
-- to perform additional initialization.
-- <p>This is not a blocking call. It is called from within a task created
-- using the <a href="LrTasks.html"><code>LrTasks</code></a> namespace. In most
-- cases, you should not need to start your own task within this function.</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.didCreateNewPublishService
-- @class function
-- @param publishSettings (table) The settings for this publish service, as specified
-- by the user in the Publish Manager dialog. Any changes that you make in
-- this table do not persist beyond the scope of this function call.
-- @param info (table) A table with these fields:
-- <ul>
-- <li><b>connectionName</b>: (string) the name of the newly-created service</li>
-- <li><b>publishService</b>: (<a href="LrPublishService.html"><code>LrPublishService</code></a>)
-- The publish service object.</li>
-- </ul>
--[[ Not used for Stipple plug-in.
function publishServiceProvider.didCreateNewPublishService( publishSettings, info )
end
--]]
--------------------------------------------------------------------------------
--- (optional) This plug-in defined callback function is called when the user creates
-- a new publish service via the Publish Manager dialog. It allows your plug-in
-- to perform additional initialization.
-- <p>This is not a blocking call. It is called from within a task created
-- using the <a href="LrTasks.html"><code>LrTasks</code></a> namespace. In most
-- cases, you should not need to start your own task within this function.</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.didUpdatePublishService
-- @class function
-- @param publishSettings (table) The settings for this publish service, as specified
-- by the user in the Publish Manager dialog. Any changes that you make in
-- this table do not persist beyond the scope of this function call.
-- @param info (table) A table with these fields:
-- <ul>
-- <li><b>connectionName</b>: (string) the name of the newly-created service</li>
-- <li><b>nPublishedPhotos</b>: (number) how many photos are currently published on the service</li>
-- <li><b>publishService</b>: (<a href="LrPublishService.html"><code>LrPublishService</code></a>)
-- The publish service object.</li>
-- <li><b>changedMoreThanName</b>: (boolean) true if any setting other than the name
-- (description) has changed</li>
-- </ul>
--[[ Not used for Stipple plug-in.
function publishServiceProvider.didUpdatePublishService( publishSettings, info )
end
]]--
--------------------------------------------------------------------------------
--- (optional) This plug-in defined callback function is called when the user
-- has attempted to delete the publish service from Lightroom.
-- It provides an opportunity for you to customize the confirmation dialog.
-- <p>Do not use this hook to actually tear down the service. Instead, use
-- <a href="#publishServiceProvider.willDeletePublishService"><code>willDeletePublishService</code></a>
-- for that purpose.
-- <p>This is not a blocking call. It is called from within a task created
-- using the <a href="LrTasks.html"><code>LrTasks</code></a> namespace. In most
-- cases, you should not need to start your own task within this function.</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.shouldDeletePublishService
-- @class function
-- @param publishSettings (table) The settings for this publish service, as specified
-- by the user in the Publish Manager dialog. Any changes that you make in
-- this table do not persist beyond the scope of this function call.
-- @param info (table) A table with these fields:
-- <ul>
-- <li><b>publishService</b>: (<a href="LrPublishService.html"><code>LrPublishService</code></a>)
-- The publish service object.</li>
-- <li><b>nPhotos</b>: (number) The number of photos contained in
-- published collections within this service.</li>
-- <li><b>connectionName</b>: (string) The name assigned to this publish service connection by the user.</li>
-- </ul>
-- @return (string) 'cancel', 'delete', or nil (to allow Lightroom's default
-- dialog to be shown instead)
--[[ Not used for Stipple plug-in.
function publishServiceProvider.shouldDeletePublishService( publishSettings, info )
end
]]--
--------------------------------------------------------------------------------
--- (optional) This plug-in defined callback function is called when the user
-- has confirmed the deletion of the publish service from Lightroom.
-- It provides a final opportunity for you to remove private data
-- immediately before the publish service is removed from the Lightroom catalog.
-- <p>Do not use this hook to present user interface (aside from progress,
-- if the operation will take a long time). Instead, use
-- <a href="#publishServiceProvider.shouldDeletePublishService"><code>shouldDeletePublishService</code></a>
-- for that purpose.
-- <p>This is not a blocking call. It is called from within a task created
-- using the <a href="LrTasks.html"><code>LrTasks</code></a> namespace. In most
-- cases, you should not need to start your own task within this function.</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.willDeletePublishService
-- @class function
-- @param publishSettings (table) The settings for this publish service, as specified
-- by the user in the Publish Manager dialog. Any changes that you make in
-- this table do not persist beyond the scope of this function call.
-- @param info (table) A table with these fields:
-- <ul>
-- <li><b>publishService</b>: (<a href="LrPublishService.html"><code>LrPublishService</code></a>)
-- The publish service object.</li>
-- <li><b>nPhotos</b>: (number) The number of photos contained in
-- published collections within this service.</li>
-- <li><b>connectionName</b>: (string) The name assigned to this publish service connection by the user.</li>
-- </ul>
--[[ Not used for Stipple plug-in.
function publishServiceProvider.willDeletePublishService( publishSettings, info )
end
--]]
--------------------------------------------------------------------------------
--- (optional) This plug-in defined callback function is called when the user
-- has attempted to delete one or more published collections defined by your
-- plug-in from Lightroom. It provides an opportunity for you to customize the
-- confirmation dialog.
-- <p>Do not use this hook to actually tear down the collection(s). Instead, use
-- <a href="#publishServiceProvider.deletePublishedCollection"><code>deletePublishedCollection</code></a>
-- for that purpose.
-- <p>This is not a blocking call. It is called from within a task created
-- using the <a href="LrTasks.html"><code>LrTasks</code></a> namespace. In most
-- cases, you should not need to start your own task within this function.</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.shouldDeletePublishedCollection
-- @class function
-- @param publishSettings (table) The settings for this publish service, as specified
-- by the user in the Publish Manager dialog. Any changes that you make in
-- this table do not persist beyond the scope of this function call.
-- @param info (table) A table with these fields:
-- <ul>
-- <li><b>collections</b>: (array of <a href="LrPublishedCollection.html"><code>LrPublishedCollection</code></a>
-- or <a href="LrPublishedCollectionSet.html"><code>LrPublishedCollectionSet</code></a>)
-- The published collection objects.</li>
-- <li><b>nPhotos</b>: (number) The number of photos contained in the
-- published collection. Only present if there is a single published collection
-- to be deleted.</li>
-- <li><b>nChildren</b>: (number) The number of child collections contained within the
-- published collection set. Only present if there is a single published collection set
-- to be deleted.</li>
-- <li><b>hasItemsOnService</b>: (boolean) True if one or more photos have been
-- published through the collection(s) to be deleted.</li>
-- </ul>
-- @return (string) "ignore", "cancel", "delete", or nil
-- (If you return nil, Lightroom's default dialog will be displayed.)
--[[ Not used for Stipple plug-in.
function publishServiceProvider.shouldDeletePublishedCollection( publishSettings, info )
end
]]--
--------------------------------------------------------------------------------
--- (optional) This plug-in defined callback function is called when the user
-- has attempted to delete one or more photos from the Lightroom catalog that are
-- published through your service. It provides an opportunity for you to customize
-- the confirmation dialog.
-- <p>Do not use this hook to actually delete photo(s). Instead, if the user
-- confirms the deletion for all relevant services. Lightroom will call
-- <a href="#publishServiceProvider.deletePhotosFromPublishedCollection"><code>deletePhotosFromPublishedCollection</code></a>
-- for that purpose.
-- <p>This is not a blocking call. It is called from within a task created
-- using the <a href="LrTasks.html"><code>LrTasks</code></a> namespace. In most
-- cases, you should not need to start your own task within this function.</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.shouldDeletePhotosFromServiceOnDeleteFromCatalog
-- @class function
-- @param publishSettings (table) The settings for this publish service, as specified
-- by the user in the Publish Manager dialog. Any changes that you make in
-- this table do not persist beyond the scope of this function call.
-- @param nPhotos (number) The number of photos that are being deleted. At least
-- one of these photos is published through this service; some may only be published
-- on other services or not published at all.
-- @return (string) What action should Lightroom take?
-- <ul>
-- <li><b>"ignore"</b>: Leave the photos on the service and simply forget about them.</li>
-- <li><b>"cancel"</b>: Stop the attempt to delete the photos.
-- <li><b>"delete"</b>: Have Lightroom delete the photos immediately from the service.
-- (Your plug-in will receive a call to its
-- <a href="#publishServiceProvider.deletePhotosFromPublishedCollection"><code>deletePhotosFromPublishedCollection</code></a>
-- in this case.)</li>
-- <li><b>nil</b>: Allow Lightroom's built-in confirmation dialog to be displayed.</li>
-- </ul>
--[[ Not used for Stipple plug-in.
function publishServiceProvider.shouldDeletePhotosFromServiceOnDeleteFromCatalog( publishSettings, nPhotos )
end
]]--
--------------------------------------------------------------------------------
--- This plug-in defined callback function is called when one or more photos
-- have been removed from a published collection and need to be removed from
-- the service. If the service you are supporting allows photos to be deleted
-- via its API, you should do that from this function.
-- <p>As each photo is deleted, you should call the <code>deletedCallback</code>
-- function to inform Lightroom that the deletion was successful. This will cause
-- Lightroom to remove the photo from the "Delete Photos to Remove" group in the
-- Library grid.</p>
-- <p>This is not a blocking call. It is called from within a task created
-- using the <a href="LrTasks.html"><code>LrTasks</code></a> namespace. In most
-- cases, you should not need to start your own task within this function.</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.deletePhotosFromPublishedCollection
-- @class function
-- @param publishSettings (table) The settings for this publish service, as specified
-- by the user in the Publish Manager dialog. Any changes that you make in
-- this table do not persist beyond the scope of this function call.
-- @param arrayOfPhotoIds (table) The remote photo IDs that were declared by this plug-in
-- when they were published.
-- @param deletedCallback (function) This function must be called for each photo ID
-- as soon as the deletion is confirmed by the remote service. It takes a single
-- argument: the photo ID from the arrayOfPhotoIds array.
-- @param localCollectionId (number) The local identifier for the collection for which
-- photos are being removed.
function publishServiceProvider.deletePhotosFromPublishedCollection( publishSettings, arrayOfPhotoIds, deletedCallback, localId )
local set = {}
local function removePhotos(setId)
for i, photoId in ipairs( arrayOfPhotoIds ) do
StippleAPI.deletePhotoFromPhotoset( publishSettings, { photoId = photoId, photosetId = setId, suppressErrorCodes = { [ 1 ] = true } } ) -- If Stipple says photo not found, ignore that.
end
end
LrTasks.startAsyncTask(function()
set = catalog:getPublishedCollectionByLocalIdentifier(localId)
removePhotos(set:getRemoteId())
end)
for _,id in ipairs( arrayOfPhotoIds ) do
deletedCallback( id )
end
end
--------------------------------------------------------------------------------
--- (optional) This plug-in defined callback function is called whenever a new
-- publish service is created and whenever the settings for a publish service
-- are changed. It allows the plug-in to specify which metadata should be
-- considered when Lightroom determines whether an existing photo should be
-- moved to the "Modified Photos to Re-Publish" status.
-- <p>This is a blocking call.</p>
-- @name publishServiceProvider.metadataThatTriggersRepublish
-- @class function
-- @param publishSettings (table) The settings for this publish service, as specified
-- by the user in the Publish Manager dialog. Any changes that you make in
-- this table do not persist beyond the scope of this function call.
-- @return (table) A table containing one or more of the following elements
-- as key, Boolean true or false as a value, where true means that a change
-- to the value does trigger republish status, and false means changes to the
-- value are ignored:
-- <ul>
-- <li><b>default</b>: All built-in metadata that appears in XMP for the file.
-- You can override this default behavior by explicitly naming any of these
-- specific fields:
-- <ul>
-- <li><b>rating</b></li>
-- <li><b>label</b></li>
-- <li><b>title</b></li>
-- <li><b>caption</b></li>
-- <li><b>gps</b></li>
-- <li><b>gpsAltitude</b></li>
-- <li><b>creator</b></li>
-- <li><b>creatorJobTitle</b></li>
-- <li><b>creatorAddress</b></li>
-- <li><b>creatorCity</b></li>
-- <li><b>creatorStateProvince</b></li>
-- <li><b>creatorPostalCode</b></li>
-- <li><b>creatorCountry</b></li>
-- <li><b>creatorPhone</b></li>
-- <li><b>creatorEmail</b></li>
-- <li><b>creatorUrl</b></li>
-- <li><b>headline</b></li>
-- <li><b>iptcSubjectCode</b></li>
-- <li><b>descriptionWriter</b></li>
-- <li><b>iptcCategory</b></li>
-- <li><b>iptcOtherCategories</b></li>
-- <li><b>dateCreated</b></li>
-- <li><b>intellectualGenre</b></li>
-- <li><b>scene</b></li>
-- <li><b>location</b></li>
-- <li><b>city</b></li>
-- <li><b>stateProvince</b></li>
-- <li><b>country</b></li>
-- <li><b>isoCountryCode</b></li>
-- <li><b>jobIdentifier</b></li>
-- <li><b>instructions</b></li>
-- <li><b>provider</b></li>
-- <li><b>source</b></li>
-- <li><b>copyright</b></li>
-- <li><b>rightsUsageTerms</b></li>
-- <li><b>copyrightInfoUrl</b></li>
-- <li><b>copyrightStatus</b></li>
-- <li><b>keywords</b></li>
-- </ul>
-- <li><b>customMetadata</b>: All plug-in defined custom metadata (defined by any plug-in).</li>
-- <li><b><i>(plug-in ID)</i>.*</b>: All custom metadata defined by the plug-in with the specified ID.</li>
-- <li><b><i>(plug-in ID).(field ID)</i></b>: One specific custom metadata field defined by the plug-in with the specified ID.</li>
-- </ul>
function publishServiceProvider.metadataThatTriggersRepublish( publishSettings )
return {
default = false,
title = true,
caption = true,
keywords = true,
gps = true,
dateCreated = true,
}
end
--------------------------------------------------------------------------------
--- (optional) This plug-in defined callback function is called when the user
-- creates a new published collection or edits an existing one. It can add
-- additional controls to the dialog box for editing this collection. These controls
-- can be used to configure behaviors specific to this collection (such as
-- privacy or appearance on a web service).
-- <p>This is a blocking call. If you need to start a long-running task (such as
-- network access), create a task using the <a href="LrTasks.html"><code>LrTasks</code></a>
-- namespace.</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.viewForCollectionSettings
-- @class function
-- @param f (<a href="LrView.html#LrView.osFactory"><code>LrView.osFactory</code></a> object)
-- A view factory object.
-- @param publishSettings (table) The settings for this publish service, as specified
-- by the user in the Publish Manager dialog. Any changes that you make in
-- this table do not persist beyond the scope of this function call.
-- @param info (table) A table with these fields:
-- <ul>
-- <li><b>collectionSettings</b>: (<a href="LrObservableTable.html"><code>LrObservableTable</code></a>)
-- Plug-in specific settings for this collection. The settings in this table
-- are not interpreted by Lightroom in any way, except that they are stored
-- with the collection. These settings can be accessed via
-- <a href="LrPublishedCollection.html#pubCollection:getCollectionInfoSummary"><code>LrPublishedCollection:getCollectionInfoSummary</code></a>.
-- The values in this table must be numbers, strings, or Booleans.
-- There are some special properties in this table:
-- <p><code>LR_canSaveCollection</code>,
-- which allows you to disable the Edit or Create button in the collection dialog.
-- (If set to true, the Edit / Create button is enabled; if false, it is disabled.)</p>
-- <p><code>LR_liveName</code> will be kept current with the value displayed
-- in the name field of the dialog during the life span of the dialog. This enables
-- a plug-in to add an observer to monitor name changes performed in the dialog.</p>
-- <p><code>LR_canEditName</code> allows the plug-in
-- to control whether the edit field containing the collection name in the dialog is enabled.
-- In the case of new creation, the value defaults to true, meaning that the collection name is
-- editable via the UI, while in the case of a collection being edited, the value defaults in accordance with
-- what the plug-in specifies (or doesn't specify) via 'publishServiceProvider.disableRenamePublishedCollection'.</p></li>
-- <li><b>collectionType</b>: (string) Either "collection" or "smartCollection"
-- (see also: <code>viewForCollectionSetSettings</code>)</li>
-- <li><b>isDefaultCollection</b>: (Boolean) True if this is the default collection.</li>
-- <li><b>name</b>: (string) In the case of editing, the name of this collection (at the time when the edit operation was initiated),
-- otherwise nil.</li>
-- <li><b>parents</b>: (table) An array of information about parents of this collection, in which each element contains:
-- <ul>
-- <li><b>localCollectionId</b>: (number) The local collection ID.</li>
-- <li><b>name</b>: (string) Name of the collection set.</li>
-- <li><b>remoteCollectionId</b>: (number or string) The remote collection ID assigned by the server.</li>
-- </ul>
-- This field is only present when editing an existing published collection.
-- </li>
-- <li><b>pluginContext</b>: (<a href="LrObservableTable.html"><code>LrObservableTable</code></a>)
-- This is a place for your plug-in to store transient state while the collection
-- settings dialog is running. It is passed to your plug-in's
-- <code>endDialogForCollectionSettings</code> callback, and then discarded.</li>
-- <li><b>publishedCollection</b>: (<a href="LrPublishedCollection.html"><code>LrPublishedCollection</code></a>)
-- The published collection object being edited, or nil when creating a new
-- collection.</li>
-- <li><b>publishService</b>: (<a href="LrPublishService.html"><code>LrPublishService</code></a>)
-- The publish service object to which this collection belongs.</li>
-- </ul>
-- @return (table) A single view description created from one of the methods in
-- the view factory. (We recommend that <code>f:groupBox</code> be the outermost view.)
--[[ Not used for Stipple plug-in. This is an example of how this function might work.
function publishServiceProvider.viewForCollectionSettings( f, publishSettings, info )
local collectionSettings = assert( info.collectionSettings )
-- Fill in default parameters. This code sample targets a hypothetical service
-- that allows users to enable or disable ratings and comments on a per-collection
-- basis.
if collectionSettings.enableRating == nil then
collectionSettings.enableRating = false
end
if collectionSettings.enableComments == nil then
collectionSettings.enableComments = false
end
local bind = import 'LrView'.bind
return f:group_box {
title = "Sample Plug-in Collection Settings", -- this should be localized via LOC
size = 'small',
fill_horizontal = 1,
bind_to_object = assert( collectionSettings ),
f:column {
fill_horizontal = 1,
spacing = f:label_spacing(),
f:checkbox {
title = "Enable Rating", -- this should be localized via LOC
value = bind 'enableRating',
},
f:checkbox {
title = "Enable Comments", -- this should be localized via LOC
value = bind 'enableComments',
},
},
}
end
--]]
--------------------------------------------------------------------------------
--- (optional) This plug-in defined callback function is called when the user
-- creates a new published collection set or edits an existing one. It can add
-- additional controls to the dialog box for editing this collection set. These controls
-- can be used to configure behaviors specific to this collection set (such as
-- privacy or appearance on a web service).
-- <p>This is a blocking call. If you need to start a long-running task (such as
-- network access), create a task using the <a href="LrTasks.html"><code>LrTasks</code></a>
-- namespace.</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.viewForCollectionSetSettings
-- @class function
-- @param f (<a href="LrView.html#LrView.osFactory"><code>LrView.osFactory</code></a> object)
-- A view factory object.
-- @param publishSettings (table) The settings for this publish service, as specified
-- by the user in the Publish Manager dialog. Any changes that you make in
-- this table do not persist beyond the scope of this function call.
-- @param info (table) A table with these fields:
-- <ul>
-- <li><b>collectionSettings</b>: (<a href="LrObservableTable.html"><code>LrObservableTable</code></a>)
-- plug-in specific settings for this collection set. The settings in this table
-- are not interpreted by Lightroom in any way, except that they are stored
-- with the collection set. These settings can be accessed via
-- <a href="LrPublishedCollectionSet.html#pubCollectionSet:getCollectionSetInfoSummary"><code>LrPublishedCollection:getCollectionSetInfoSummary</code></a>.
-- The values in this table must be numbers, strings, or Booleans.
-- There are some special properties in this table:
-- <p><code>LR_canSaveCollection</code>,
-- which allows you to disable the Edit or Create button in the collection set dialog.
-- (If set to true, the Edit / Create button is enabled; if false, it is disabled.)</p>
-- <p><code>LR_liveName</code> will be kept current with the value displayed
-- in the name field of the dialog during the life span of the dialog. This enables
-- a plug-in to add an observer to monitor name changes performed in the dialog.</p>
-- <p><code>LR_canEditName</code> allows the plug-in
-- to control whether the edit field containing the collection set name in the dialog is enabled.
-- In the case of new creation, the value defaults to true, meaning that the collection set name is
-- editable via the UI, while in the case of a collection being edited, the value defaults in accordance with
-- what the plug-in specifies (or doesn't specify) via 'publishServiceProvider.disableRenamePublishedCollection'.</p></li>
-- <li><b>collectionType</b>: (string) "collectionSet"</li>
-- <li><b>isDefaultCollection</b>: (Boolean) true if this is the default collection (will always be false)</li>
-- <li><b>name</b>: (string) In the case of edit, the name of this collection set (at the time when the edit operation was initiated),
-- otherwise nil.</li>
-- <li><b>parents</b>: (table) An array of information about parents of this collection, in which each element contains:
-- <ul>
-- <li><b>localCollectionId</b>: (number) The local collection ID.</li>
-- <li><b>name</b>: (string) Name of the collection set.</li>
-- <li><b>remoteCollectionId</b>: (number or string) The remote collection ID assigned by the server.</li>
-- </ul>
-- This field is only present when editing an existing published collection set. </li>
-- <li><b>pluginContext</b>: (<a href="LrObservableTable.html"><code>LrObservableTable</code></a>)
-- This is a place for your plug-in to store transient state while the collection set
-- settings dialog is running. It will be passed to your plug-in during the
-- <code>endDialogForCollectionSettings</code> and then discarded.</li>
-- <li><b>publishedCollection</b>: (<a href="LrPublishedCollectionSet.html"><code>LrPublishedCollectionSet</code></a>)
-- The published collection set object being edited. Will be nil when creating a new
-- collection Set.</li>
-- <li><b>publishService</b>: (<a href="LrPublishService.html"><code>LrPublishService</code></a>)
-- The publish service object.</li>
-- </ul>
-- @return (table) A single view description created from one of the methods in
-- the view factory. (We recommend that <code>f:groupBox</code> be the outermost view.)
--[[ Not used for Stipple plug-in.
function publishServiceProvider.viewForCollectionSetSettings( f, publishSettings, info )
-- See viewForCollectionSettings example above.
end
--]]
--------------------------------------------------------------------------------
--- (optional) This plug-in defined callback function is called when the user
-- closes the dialog for creating a new published collection or editing an existing
-- one. It is only called if you have also provided the <code>viewForCollectionSettings</code>
-- callback, and is your opportunity to clean up any tasks or processes you may
-- have started while the dialog was running.
-- <p>This is a blocking call. If you need to start a long-running task (such as
-- network access), create a task using the <a href="LrTasks.html"><code>LrTasks</code></a>
-- namespace.</p>
-- <p>Your code should <b>not</b> update the server from here. That should be done
-- via the <code>updateCollectionSettings</code> callback. (If, for instance, the
-- settings changes are later undone; this callback is not called again, but
-- <code>updateCollectionSettings</code> is.)</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.endDialogForCollectionSettings
-- @class function
-- @param publishSettings (table) The settings for this publish service, as specified
-- by the user in the Publish Manager dialog. Any changes that you make in
-- this table do not persist beyond the scope of this function call.
-- @param info (table) A table with these fields:
-- <ul>
-- <li><b>collectionSettings</b>: (<a href="LrObservableTable.html"><code>LrObservableTable</code></a>)
-- Plug-in specific settings for this collection. The settings in this table
-- are not interpreted by Lightroom in any way, except that they are stored
-- with the collection. These settings can be accessed via
-- <a href="LrPublishedCollection.html#pubCollection:getCollectionInfoSummary"><code>LrPublishedCollection:getCollectionInfoSummary</code></a>.
-- The values in this table must be numbers, strings, or Booleans.</li>
-- <li><b>collectionType</b>: (string) Either "collection" or "smartCollection"</li>
-- <li><b>isDefaultCollection</b>: (Boolean) True if this is the default collection.</li>
-- <li><b>name</b>: (string) If the dialog was canceled, the name of the collection (or collection set) which was selected when the create or
-- edit operation was initiated. If no published collection or collection set was selected, the name of the publish service it
-- belongs to. If the dialog was dismissed with Edit or Create, the name of the collection when the dialog was dismissed.</li>
-- <li><b>parents</b>: (table) An array of information about parents of this collection, in which each element contains:
-- <ul>
-- <li><b>localCollectionId</b>: (number) The local collection ID.</li>
-- <li><b>name</b>: (string) Name of the collection set.</li>
-- <li><b>remoteCollectionId</b>: (number or string) The remote collection ID assigned by the server.</li>
-- </ul>
-- This field is only present when editing an existing published collection.
-- </li>
-- <li><b>pluginContext</b>: (<a href="LrObservableTable.html"><code>LrObservableTable</code></a>)
-- This is a place for your plug-in to store transient state while the collection
-- settings dialog is running. It is passed to your plug-in's
-- <code>endDialogForCollectionSettings</code> callback, and then discarded.</li>
-- <li><b>publishedCollection</b>: (<a href="LrPublishedCollection.html"><code>LrPublishedCollection</code></a>)
-- The published collection object being edited.</li>
-- <li><b>publishService</b>: (<a href="LrPublishService.html"><code>LrPublishService</code></a>)
-- The publish service object to which this collection belongs.</li>
-- <li><b>why</b>: (string) The button that was used to close the dialog, one of "ok" or "cancel".
-- </ul>
--[[ Not used for Stipple plug-in. This is an example of how this function might work.
function publishServiceProvider.endDialogForCollectionSettings( publishSettings, info )
-- not used for Stipple plug-in
end
--]]
--------------------------------------------------------------------------------
--- (optional) This plug-in defined callback function is called when the user
-- closes the dialog for creating a new published collection set or editing an existing
-- one. It is only called if you have also provided the <code>viewForCollectionSetSettings</code>
-- callback, and is your opportunity to clean up any tasks or processes you may
-- have started while the dialog was running.
-- <p>This is a blocking call. If you need to start a long-running task (such as
-- network access), create a task using the <a href="LrTasks.html"><code>LrTasks</code></a>
-- namespace.</p>
-- <p>Your code should <b>not</b> update the server from here. That should be done
-- via the <code>updateCollectionSetSettings</code> callback. (If, for instance, the
-- settings changes are later undone; this callback will not be called again;
-- <code>updateCollectionSetSettings</code> will be.)</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.endDialogForCollectionSetSettings
-- @class function
-- @param publishSettings (table) The settings for this publish service, as specified
-- by the user in the Publish Manager dialog. Any changes that you make in
-- this table do not persist beyond the scope of this function call.
-- @param info (table) A table with these fields:
-- <ul>
-- <li><b>collectionSettings</b>: (<a href="LrObservableTable.html"><code>LrObservableTable</code></a>)
-- plug-in specific settings for this collection set. The settings in this table
-- are not interpreted by Lightroom in any way, except that they are stored
-- with the collection set. These settings can be accessed via
-- <a href="LrPublishedCollectionSet.html#pubCollectionSet:getCollectionSetInfoSummary"><code>LrPublishedCollectionSet:getCollectionSetInfoSummary</code></a>.
-- The values in this table must be numbers, strings, or Booleans.</li>
-- <li><b>collectionType</b>: (string) "collectionSet"</li>
-- <li><b>isDefaultCollection</b>: (boolean) true if this is the default collection (will always be false)</li>
-- <li><b>name</b>: (string) If the dialog was canceled, the name of the collection (or collection set) which was selected when the create or
-- edit operation was initiated. If no published collection or collection set was selected, the name of the publish service it
-- belongs to. If the dialog was dismissed with Edit or Create, the name of the collection set when the dialog was dismissed.</li>
-- <li><b>parents</b>: (table) An array of information about parents of this collection, in which each element contains:
-- <ul>
-- <li><b>localCollectionId</b>: (number) The local collection ID.</li>
-- <li><b>name</b>: (string) Name of the collection set.</li>
-- <li><b>remoteCollectionId</b>: (number or string) The remote collection ID assigned by the server.</li>
-- </ul>
-- This field is only present when editing an existing published collection set.
-- </li>
-- <li><b>pluginContext</b>: (<a href="LrObservableTable.html"><code>LrObservableTable</code></a>)
-- This is a place for your plug-in to store transient state while the collection set
-- settings dialog is running. It will be passed to your plug-in during the
-- <code>endDialogForCollectionSettings</code> and then discarded.</li>
-- <li><b>publishedCollectionSet</b>: (<a href="LrPublishedCollectionSet.html"><code>LrPublishedCollectionSet</code></a>)
-- The published collection set object being edited.</li>
-- <li><b>publishService</b>: (<a href="LrPublishService.html"><code>LrPublishService</code></a>)
-- The publish service object.</li>
-- <li><b>why</b>: (string) Why the dialog was closed. Either "ok" or "cancel".
-- </ul>
--[[ Not used for Stipple plug-in. This is an example of how this function might work.
function publishServiceProvider.endDialogForCollectionSetSettings( publishSettings, info )
-- not used for Stipple plug-in
end
--]]
--------------------------------------------------------------------------------
--- (optional) This plug-in defined callback function is called when the user
-- has changed the per-collection settings defined via the <code>viewForCollectionSettings</code>
-- callback. It is your opportunity to update settings on your web service to
-- match the new settings.
-- <p>This is not a blocking call. It is called from within a task created
-- using the <a href="LrTasks.html"><code>LrTasks</code></a> namespace. In most
-- cases, you should not need to start your own task within this function.</p>
-- <p>Your code should <b>not</b> use this callback function to clean up from the
-- dialog. This callback is not be called if the user cancels the dialog.</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.updateCollectionSettings
-- @class function
-- @param publishSettings (table) The settings for this publish service, as specified
-- by the user in the Publish Manager dialog. Any changes that you make in
-- this table do not persist beyond the scope of this function call.
-- @param info (table) A table with these fields:
-- <ul>
-- <li><b>collectionSettings</b>: (<a href="LrObservableTable.html"><code>LrObservableTable</code></a>)
-- Plug-in specific settings for this collection. The settings in this table
-- are not interpreted by Lightroom in any way, except that they are stored
-- with the collection. These settings can be accessed via
-- <a href="LrPublishedCollection.html#pubCollection:getCollectionInfoSummary"><code>LrPublishedCollection:getCollectionInfoSummary</code></a>.
-- The values in this table must be numbers, strings, or Booleans.
-- <li><b>isDefaultCollection</b>: (Boolean) True if this is the default collection.</li>
-- <li><b>name</b>: (string) The name of this collection.</li>
-- <li><b>parents</b>: (table) An array of information about parents of this collection, in which each element contains:
-- <ul>
-- <li><b>localCollectionId</b>: (number) The local collection ID.</li>
-- <li><b>name</b>: (string) Name of the collection set.</li>
-- <li><b>remoteCollectionId</b>: (number or string) The remote collection ID assigned by the server.</li>
-- </ul> </li>
-- <li><b>publishedCollection</b>: (<a href="LrPublishedCollection.html"><code>LrPublishedCollection</code></a>
-- or <a href="LrPublishedCollectionSet.html"><code>LrPublishedCollectionSet</code></a>)
-- The published collection object being edited.</li>
-- <li><b>publishService</b>: (<a href="LrPublishService.html"><code>LrPublishService</code></a>)
-- The publish service object to which this collection belongs.</li>
-- </ul>
--[[ Not used for Stipple plug-in.
function publishServiceProvider.updateCollectionSettings( publishSettings, info )
end
--]]
--------------------------------------------------------------------------------
--- (optional) This plug-in defined callback function is called when the user
-- has changed the per-collection set settings defined via the <code>viewForCollectionSetSettings</code>
-- callback. It is your opportunity to update settings on your web service to
-- match the new settings.
-- <p>This is not a blocking call. It is called from within a task created
-- using the <a href="LrTasks.html"><code>LrTasks</code></a> namespace. In most
-- cases, you should not need to start your own task within this function.</p>
-- <p>Your code should <b>not</b> use this callback function to clean up from the
-- dialog. This callback will not be called if the user cancels the dialog.</p>
-- <p>First supported in version 3.0 of the Lightroom SDK.</p>
-- @name publishServiceProvider.updateCollectionSetSettings
-- @class function
-- @param publishSettings (table) The settings for this publish service, as specified
-- by the user in the Publish Manager dialog. Any changes that you make in
-- this table do not persist beyond the scope of this function call.
-- @param info (table) A table with these fields:
-- <ul>
-- <li><b>collectionSettings</b>: (<a href="LrObservableTable.html"><code>LrObservableTable</code></a>)
-- Plug-in specific settings for this collection set. The settings in this table
-- are not interpreted by Lightroom in any way, except that they are stored
-- with the collection set. These settings can be accessed via
-- <a href="LrPublishedCollectionSet.html#pubCollectionSet:getCollectionSetInfoSummary"><code>LrPublishedCollectionSet:getCollectionSetInfoSummary</code></a>.
-- The values in this table must be numbers, strings, or Booleans.
-- <li><b>isDefaultCollection</b>: (Boolean) True if this is the default collection (always false in this case).</li>
-- <li><b>name</b>: (string) The name of this collection set.</li>
-- <li><b>parents</b>: (table) An array of information about parents of this collection, in which each element contains:
-- <ul>
-- <li><b>localCollectionId</b>: (number) The local collection ID.</li>
-- <li><b>name</b>: (string) Name of the collection set.</li>
-- <li><b>remoteCollectionId</b>: (number or string) The remote collection ID assigned by the server.</li>
-- </ul>
-- </li>
-- <li><b>publishedCollection</b>: (<a href="LrPublishedCollectionSet.html"><code>LrPublishedCollectionSet</code></a>)
-- The published collection set object being edited.</li>
-- <li><b>publishService</b>: (<a href="LrPublishService.html"><code>LrPublishService</code></a>)
-- The publish service object.</li>
-- </ul>
--[[ Not used for Stipple plug-in.
function publishServiceProvider.updateCollectionSetSettings( publishSettings, info )
end
--]]
--------------------------------------------------------------------------------
--- (optional) This plug-in defined callback function is called when new or updated
-- photos are about to be published to the service. It allows you to specify whether
-- the user-specified sort order should be followed as-is or reversed. The Stipple
-- sample plug-in uses this to reverse the order on the Photostream so that photos
-- appear in the Stipple web interface in the same sequence as they are shown in the
-- library grid.
-- <p>This is not a blocking call. It is called from within a task created
-- using the <a href="LrTasks.html"><code>LrTasks</code></a> namespace. In most