-
Notifications
You must be signed in to change notification settings - Fork 9
/
scc.h
782 lines (672 loc) · 34.5 KB
/
scc.h
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
//***************************************************************************
// scc.h
//
// This module contains the prototypes and definitions for Microsoft's
// Source Code Control API. This file and the SCC API are covered by
// Non-Disclosure Agreements (NDA) and are not to be redistributed in any
// for without permission by Microsoft.
//
// This module has been updated to include the following:
// May '96:
// * The SCC version number has been bumped to 1.1.
// * 16-bit is no longer supported.
// * A new capability bit, SCC_CAP_REENTRANT, has been added. A provider
// which returns this bit can handle multiple SCC context values (eg:
// multiple simultaneous open projects), and reentrant calls for thos
// contexts (ie: thread safe).
// * A new option, SCC_OPT_SCCCHECKOUTONLY has been added. This is used
// to disallow scc operations from outside of integration. Integration
// hosts like MS Access use this to prevent files from being checked out
// without also being imported into scc.
// March '98:
// * The SetOption SCC_OPT_SHARESUBPROJ was added to allow destination dir
// for share. Setting this option changes the semantics of SccAddFromScc
// to accept the target as input.
//
// Copyright (c) Microsoft Corporation 1995-1996, All rights reserved.
//***************************************************************************
#ifndef _SCC_DEFS
#define _SCC_DEFS
#include <stdlib.h>
/****************************************************************************
Make it easy to export functions
****************************************************************************/
#if !defined( EXTFUN )
#if defined( WIN32 )
#define EXTFUN __declspec(dllexport)
#else
#define EXTFUN __export
#endif
#endif
#if defined( __cplusplus )
#define SCCEXTERNC extern "C"
#else
#define SCCEXTERNC
#endif
/****************************************************************************
Linkage for external functions will be C naming mode.
****************************************************************************/
#if defined( __cplusplus )
extern "C" {
#endif
/****************************************************************************
Take care of type information based on platform and settings.
****************************************************************************/
#if defined( UNICODE )
#include <winnls.h>
#else
typedef LPSTR LPTSTR;
typedef LPCSTR LPCTSTR;
typedef char TCHAR;
#endif
#if defined( WIN16 )
typedef BOOL far * LPBOOL;
#endif
/****************************************************************************
Version Flag. Major is HIWORD, Minor is LOWORD
****************************************************************************/
#define SCC_MAJOR_VER_VAL 1
#define SCC_MINOR_VER_VAL 1
#define SCC_VER_NUM MAKELONG(SCC_MINOR_VER_VAL, SCC_MAJOR_VER_VAL)
#define SCC_GET_MAJOR_VER(ver) HIWORD(ver)
#define SCC_GET_MINOR_VER(ver) LOWORD(ver)
/****************************************************************************
Following strings are the keys for accessing the registry to find
the SCC provider.
****************************************************************************/
#if !defined( _SCC_REG_KEYS )
#define _SCC_REG_KEYS
#define STR_SCC_PROVIDER_REG_LOCATION "Software\\SourceCodeControlProvider"
#define STR_PROVIDERREGKEY "ProviderRegKey"
#define STR_SCCPROVIDERPATH "SCCServerPath"
#define STR_SCCPROVIDERNAME "SCCServerName"
#define STR_SCC_INI_SECTION "Source Code Control"
#define STR_SCC_INI_KEY "SourceCodeControlProvider"
#define SCC_PROJECTNAME_KEY "SCC_Project_Name"
#define SCC_PROJECTAUX_KEY "SCC_Aux_Path"
#define SCC_STATUS_FILE "MSSCCPRJ.SCC"
#define SCC_KEY "SCC"
#define SCC_FILE_SIGNATURE "This is a source code control file"
#endif /* _SCC_REG_KEYS */
/****************************************************************************
String lengths (each length does *not* include the terminating '\0')
****************************************************************************/
#define SCC_NAME_LEN 31 // lpSccName, SCCInitialize
#define SCC_AUXLABEL_LEN 31 // lpAuxPathLabel, SCCInitialize
#define SCC_USER_LEN 31 // lpUser, SCCOpenProject
#define SCC_PRJPATH_LEN 300 // lpAuxProjPath, SCCGetProjPath
/****************************************************************************
These are the error codes that may be returned from a function.
All errors are < 0, warnings are > 0, and success is 0. Use the
macros provided for quick checking.
****************************************************************************/
typedef long SCCRTN;
typedef SCCRTN FAR * LPSCCRTN;
#define IS_SCC_ERROR(rtn) (((rtn) < 0) ? TRUE : FALSE)
#define IS_SCC_SUCCESS(rtn) (((rtn) == SCC_OK) ? TRUE : FALSE)
#define IS_SCC_WARNING(rtn) (((rtn) > 0) ? TRUE : FALSE)
#define SCC_I_SHARESUBPROJOK 7
#define SCC_I_FILEDIFFERS 6
#define SCC_I_RELOADFILE 5
#define SCC_I_FILENOTAFFECTED 4
#define SCC_I_PROJECTCREATED 3
#define SCC_I_OPERATIONCANCELED 2
#define SCC_I_ADV_SUPPORT 1
#define SCC_OK 0
#define SCC_E_INITIALIZEFAILED -1
#define SCC_E_UNKNOWNPROJECT -2
#define SCC_E_COULDNOTCREATEPROJECT -3
#define SCC_E_NOTCHECKEDOUT -4
#define SCC_E_ALREADYCHECKEDOUT -5
#define SCC_E_FILEISLOCKED -6
#define SCC_E_FILEOUTEXCLUSIVE -7
#define SCC_E_ACCESSFAILURE -8
#define SCC_E_CHECKINCONFLICT -9
#define SCC_E_FILEALREADYEXISTS -10
#define SCC_E_FILENOTCONTROLLED -11
#define SCC_E_FILEISCHECKEDOUT -12
#define SCC_E_NOSPECIFIEDVERSION -13
#define SCC_E_OPNOTSUPPORTED -14
#define SCC_E_NONSPECIFICERROR -15
#define SCC_E_OPNOTPERFORMED -16
#define SCC_E_TYPENOTSUPPORTED -17
#define SCC_E_VERIFYMERGE -18
#define SCC_E_FIXMERGE -19
#define SCC_E_SHELLFAILURE -20
#define SCC_E_INVALIDUSER -21
#define SCC_E_PROJECTALREADYOPEN -22
#define SCC_E_PROJSYNTAXERR -23
#define SCC_E_INVALIDFILEPATH -24
#define SCC_E_PROJNOTOPEN -25
#define SCC_E_NOTAUTHORIZED -26
#define SCC_E_FILESYNTAXERR -27
#define SCC_E_FILENOTEXIST -28
#define SCC_E_CONNECTIONFAILURE -29
#ifndef _SCC_STATUS_DEFINED
#define _SCC_STATUS_DEFINED
/****************************************************************************
The SCC_STATUS_xxx macros define the state of a file
****************************************************************************/
enum SccStatus
{
SCC_STATUS_INVALID = -1L, // Status could not be obtained, don't rely on it
SCC_STATUS_NOTCONTROLLED = 0x0000L, // File is not under source control
SCC_STATUS_CONTROLLED = 0x0001L, // File is under source code control
SCC_STATUS_CHECKEDOUT = 0x0002L, // Checked out to current user at local path
SCC_STATUS_OUTOTHER = 0x0004L, // File is checked out to another user
SCC_STATUS_OUTEXCLUSIVE = 0x0008L, // File is exclusively check out
SCC_STATUS_OUTMULTIPLE = 0x0010L, // File is checked out to multiple people
SCC_STATUS_OUTOFDATE = 0x0020L, // The file is not the most recent
SCC_STATUS_DELETED = 0x0040L, // File has been deleted from the project
SCC_STATUS_LOCKED = 0x0080L, // No more versions allowed
SCC_STATUS_MERGED = 0x0100L, // File has been merged but not yet fixed/verified
SCC_STATUS_SHARED = 0x0200L, // File is shared between projects
SCC_STATUS_PINNED = 0x0400L, // File is shared to an explicit version
SCC_STATUS_MODIFIED = 0x0800L, // File has been modified/broken/violated
SCC_STATUS_OUTBYUSER = 0x1000L // File is checked out by current user someplace
};
#endif /* _SCC_STATUS_DEFINED */
/****************************************************************************
SccOpenProject flags
****************************************************************************/
#define SCC_OP_CREATEIFNEW 0x00000001L
#define SCC_OP_SILENTOPEN 0x00000002L
/****************************************************************************
Keep checked out
****************************************************************************/
#define SCC_KEEP_CHECKEDOUT 0x1000
/****************************************************************************
Add flags
****************************************************************************/
#define SCC_FILETYPE_AUTO 0x00
#define SCC_FILETYPE_TEXT 0x01
#define SCC_FILETYPE_BINARY 0x02
#define SCC_ADD_STORELATEST 0x04
/****************************************************************************
Diff flags. The SCC_DIFF_QD_xxx flags are mutually exclusive. If any
one of the three are specified, then no visual feed back is to be given.
If one is specified but not supported, then the next best one is chosen.
****************************************************************************/
#define SCC_DIFF_IGNORECASE 0x0002
#define SCC_DIFF_IGNORESPACE 0x0004
#define SCC_DIFF_QD_CONTENTS 0x0010
#define SCC_DIFF_QD_CHECKSUM 0x0020
#define SCC_DIFF_QD_TIME 0x0040
#define SCC_DIFF_QUICK_DIFF 0x0070 /* Any QD means no display */
/****************************************************************************
Get flags
****************************************************************************/
#define SCC_GET_ALL 0x00000001L
#define SCC_GET_RECURSIVE 0x00000002L
/****************************************************************************
PopulateList flags
****************************************************************************/
#define SCC_PL_DIR 0x00000001L
/****************************************************************************
Options for SccGetCommandOptions and SccPopulateList
****************************************************************************/
typedef LPVOID LPCMDOPTS;
enum SCCCOMMAND
{
SCC_COMMAND_GET,
SCC_COMMAND_CHECKOUT,
SCC_COMMAND_CHECKIN,
SCC_COMMAND_UNCHECKOUT,
SCC_COMMAND_ADD,
SCC_COMMAND_REMOVE,
SCC_COMMAND_DIFF,
SCC_COMMAND_HISTORY,
SCC_COMMAND_RENAME,
SCC_COMMAND_PROPERTIES,
SCC_COMMAND_OPTIONS
};
typedef BOOL (*POPLISTFUNC) (LPVOID pvCallerData, BOOL bAddKeep, LONG nStatus, LPCSTR lpFile);
/****************************************************************************
The SCC_CAP_xxx flags are used to determine what capabilites a provider
has.
****************************************************************************/
#define SCC_CAP_REMOVE 0x00000001L // Supports the SCC_Remove command
#define SCC_CAP_RENAME 0x00000002L // Supports the SCC_Rename command
#define SCC_CAP_DIFF 0x00000004L // Supports the SCC_Diff command
#define SCC_CAP_HISTORY 0x00000008L // Supports the SCC_History command
#define SCC_CAP_PROPERTIES 0x00000010L // Supports the SCC_Properties command
#define SCC_CAP_RUNSCC 0x00000020L // Supports the SCC_RunScc command
#define SCC_CAP_GETCOMMANDOPTIONS 0x00000040L // Supports the SCC_GetCommandOptions command
#define SCC_CAP_QUERYINFO 0x00000080L // Supports the SCC_QueryInfo command
#define SCC_CAP_GETEVENTS 0x00000100L // Supports the SCC_GetEvents command
#define SCC_CAP_GETPROJPATH 0x00000200L // Supports the SCC_GetProjPath command
#define SCC_CAP_ADDFROMSCC 0x00000400L // Supports the SCC_AddFromScc command
#define SCC_CAP_COMMENTCHECKOUT 0x00000800L // Supports a comment on Checkout
#define SCC_CAP_COMMENTCHECKIN 0x00001000L // Supports a comment on Checkin
#define SCC_CAP_COMMENTADD 0x00002000L // Supports a comment on Add
#define SCC_CAP_COMMENTREMOVE 0x00004000L // Supports a comment on Remove
#define SCC_CAP_TEXTOUT 0x00008000L // Writes text to an IDE-provided output function
#define SCC_CAP_ADD_STORELATEST 0x00200000L // Supports storing files without deltas
#define SCC_CAP_HISTORY_MULTFILE 0x00400000L // Multiple file history is supported
#define SCC_CAP_IGNORECASE 0x00800000L // Supports case insensitive file comparison
#define SCC_CAP_IGNORESPACE 0x01000000L // Supports file comparison that ignores white space
#define SCC_CAP_POPULATELIST 0x02000000L // Supports finding extra files
#define SCC_CAP_COMMENTPROJECT 0x04000000L // Supports comments on create project
#define SCC_CAP_DIFFALWAYS 0x10000000L // Supports diff in all states if under control
#define SCC_CAP_GET_NOUI 0x20000000L // Provider doesn't support a UI for SccGet,
// but IDE may still call SccGet function.
#define SCC_CAP_REENTRANT 0x40000000L // Provider is reentrant and thread safe.
/****************************************************************************
The following flags are used for the print call-back that the IDE
provides on SccInitialize.
If the IDE supports cancel, it may get one of the Cancel messages.
In this case, the provider will inform the IDE to show the Cancel
button with SCC_MSG_STARTCANCEL. After this, any set of normal
messages may be sent. If any of these return SCC_MSG_RTN_CANCEL,
then the provider will quit the operation and return. The Provider
will also poll periodically with SCC_MSG_DOCANCEL to see if the
user has canceled the operation. When all operations are done, or
the user has canceled, SCC_MSG_STOPCANCEL will be sent through.
The SCC_MSG_INFO, WARNING, and ERROR types are used for messages that
get displayed in the scrolling list of messages. SCC_MSG_STATUS is
a special type that indicates that the text should show up in a
status bar or temporary display area. This message type should not
remain permanently in the list.
****************************************************************************/
enum
{
// Return codes
SCC_MSG_RTN_CANCEL=-1, // Returned from call-back to indicate cancel
SCC_MSG_RTN_OK=0, // Returned from call-back to continue
// Message types
SCC_MSG_INFO=1, // Message is informational
SCC_MSG_WARNING, // Message is a warning
SCC_MSG_ERROR, // Message is an error
SCC_MSG_STATUS, // Message is meant for status bar
// IDE supports Cancel operation
SCC_MSG_DOCANCEL, // No text, IDE returns 0 or SCC_MSG_RTN_CANCEL
SCC_MSG_STARTCANCEL, // Start a cancel loop
SCC_MSG_STOPCANCEL // Stop the cancel loop
};
#ifndef _LPTEXTOUTPROC_DEFINED
#define _LPTEXTOUTPROC_DEFINED
typedef long (*LPTEXTOUTPROC) (LPCSTR, DWORD);
#endif /* _LPTEXTOUTPROC_DEFINED */
/****************************************************************************
nOption values for SccSetOption.
****************************************************************************/
#define SCC_OPT_EVENTQUEUE 0x00000001L // Set status of the event queue
#define SCC_OPT_USERDATA 0x00000002L // Specify user data for
// SCC_OPT_NAMECHANGEPFN
#define SCC_OPT_HASCANCELMODE 0x00000003L // The IDE can handle Cancel
// of long running operations
#define SCC_OPT_NAMECHANGEPFN 0x00000004L // Set a callback for name changes
#define SCC_OPT_SCCCHECKOUTONLY 0x00000005L // Disable SS explorer checkout,
// and don't set working dir
#define SCC_OPT_SHARESUBPROJ 0x00000006L // Allow destination dir for share
/* SCC_OPT_EVENTQUEUE values */
#define SCC_OPT_EQ_DISABLE 0x00L // Suspend event queue activity
#define SCC_OPT_EQ_ENABLE 0x01L // Enable event queue logging
/* SCC_OPT_NAMECHANGEPFN callback typedef */
typedef void (*OPTNAMECHANGEPFN)(LONG pvCallerData,
LPCSTR pszOldName, LPCSTR pszNewName);
/****************************************************************************
Values for SCC_OPT_HASCANCELMODE. By default, it is assumed that the IDE
will not allow for canceling a long running operation. The provider must
handle this on their own in this case. If the IDE, however, sets this
option to SCC_OPT_HCM_YES, it means that it will handle canceling the
operation. In this case, use the SCC_MSG_xxx flags with the output
call-back to tell the IDE what messages to display while the operation
is running.
****************************************************************************/
#define SCC_OPT_HCM_NO 0L // (Default) Has no cancel mode,
// Provider must supply if desired
#define SCC_OPT_HCM_YES 1L // IDE handles cancel
/****************************************************************************
Values for SCC_OPT_SCCCHECKOUTONLY. By default, it is assumed that
the user may use the gui to get and checkout files from this project,
and that a working dir should be set, If this option is explicitly turned on,
then no working dir is set for the project, and the files may only be gotten
or checked in or out from scc integration, never from the gui.
****************************************************************************/
#define SCC_OPT_SCO_NO 0L // (Default) OK to checkout from GUI
// Working dir is set.
#define SCC_OPT_SCO_YES 1L // no GUI checkout, no working dir
/****************************************************************************
The SCC_PROC_NAMES macro will expand for each function in the API.
You must define SCC_PROC to do what you want. For this file, it
creates an enum (see code just after the table), by concatenating
SCC_CMD_ with the function name. This enum is used in the sccuser.cpp
module as an index for function pointers of the provider. sccuser.cpp
also redefines SCC_PROC to expand a table of character string function
names. This table, when used with the enum, allows for adding and
removing of function names from the API will only a recompile required
to fix up addresses and offsets. You can #undef SCC_PROC and redefine
it to do other tables of your own if required.
****************************************************************************/
#define SCC_PROC(nam) SCC_CMD_ ## nam
#define SCC_PROC_NAMES \
SCC_PROC(SccInitialize), \
SCC_PROC(SccUninitialize), \
SCC_PROC(SccOpenProject), \
SCC_PROC(SccCloseProject), \
SCC_PROC(SccGet), \
SCC_PROC(SccCheckout), \
SCC_PROC(SccUncheckout), \
SCC_PROC(SccCheckin), \
SCC_PROC(SccAdd), \
SCC_PROC(SccRemove), \
SCC_PROC(SccRename), \
SCC_PROC(SccDiff), \
SCC_PROC(SccHistory), \
SCC_PROC(SccProperties), \
SCC_PROC(SccRunScc), \
SCC_PROC(SccGetCommandOptions), \
SCC_PROC(SccQueryInfo), \
SCC_PROC(SccGetEvents), \
SCC_PROC(SccGetProjPath), \
SCC_PROC(SccPopulateList), \
SCC_PROC(SccAddFromScc), \
SCC_PROC(SccSetOption), \
SCC_PROC(SccGetVersion)
enum
{
SCC_PROC_NAMES
};
#define SCC_CMD_COUNT (SCC_CMD_SccGetVersion + 1)
/****************************************************************************
Following are the ASCII definitions of the functions.
****************************************************************************/
#if !defined( UNICODE )
/*******************************************************************************
Returns a 4 byte version of the provider. This can be used to check for
SCC spec conformance.
*******************************************************************************/
SCCEXTERNC LONG EXTFUN SccGetVersion(void);
/*******************************************************************************
Call this function once per instance of a provider.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccInitialize(
LPVOID * ppContext,
HWND hWnd,
LPCSTR lpCallerName,
LPSTR lpSccName,
LPLONG lpSccCaps,
LPSTR lpAuxPathLabel,
LPLONG pnCheckoutCommentLen,
LPLONG pnCommentLen
);
/*******************************************************************************
Call this function once for every instance of a provider, when it is going
away. You must call SccInitialize before calling this function, and should
not call it with any open projects.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccUninitialize(
LPVOID pContext
);
/*******************************************************************************
Opens a project. This function should never be called with an already open
project on pContext. The lpUser, lpProjName, and lpAuxProjPath values
may be modified by the provider.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccOpenProject(
LPVOID pContext,
HWND hWnd,
LPSTR lpUser,
LPSTR lpProjName,
LPCSTR lpLocalProjPath,
LPSTR lpAuxProjPath,
LPCSTR lpComment,
LPTEXTOUTPROC lpTextOutProc,
LONG dwFlags
);
/*******************************************************************************
Called to close a project opened by SccOpenProject.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccCloseProject(
LPVOID pContext
);
/*******************************************************************************
Prompts the user for provider project information. This may include the
path to a certain project. The caller must be prepared to accept changes
to lpUser, lpProjName, lpLocalPath, and lpAuxProjPath. lpProjName and
lpAuxProjPath are then used in a call to SccOpenProject. They should not
be modified by the caller upon return. The caller should avoid displaying
these two parameters upon return, as the provider might use a formatted
string that is not ready for view.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccGetProjPath(
LPVOID pContext,
HWND hWnd,
LPSTR lpUser,
LPSTR lpProjName,
LPSTR lpLocalPath,
LPSTR lpAuxProjPath,
BOOL bAllowChangePath,
LPBOOL pbNew
);
/*******************************************************************************
Retrieves a read only copy of a set of files. The array is a set of files
on the local disk. The paths must be fully qualified.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccGet(
LPVOID pContext,
HWND hWnd,
LONG nFiles,
LPCSTR* lpFileNames,
LONG dwFlags,
LPCMDOPTS pvOptions
);
/*******************************************************************************
Checks out the array of files. The array is a set of fully qualified local
path names.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccCheckout(
LPVOID pContext,
HWND hWnd,
LONG nFiles,
LPCSTR* lpFileNames,
LPCSTR lpComment,
LONG dwFlags,
LPCMDOPTS pvOptions
);
/*******************************************************************************
Undo a checkout of an array of files. The array is a set of fully qualified
local path names.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccUncheckout(
LPVOID pContext,
HWND hWnd,
LONG nFiles,
LPCSTR* lpFileNames,
LONG dwFlags,
LPCMDOPTS pvOptions
);
/*******************************************************************************
Make the modifications the user has made to an array of files permanent. The
file names must be fully qualified local paths.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccCheckin(
LPVOID pContext,
HWND hWnd,
LONG nFiles,
LPCSTR* lpFileNames,
LPCSTR lpComment,
LONG dwFlags,
LPCMDOPTS pvOptions
);
/*******************************************************************************
Add an array of fully qualified files to the source control system. The
array of flags describe the type of file. See the SCC_FILETYPE_xxxx flags.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccAdd(
LPVOID pContext,
HWND hWnd,
LONG nFiles,
LPCSTR* lpFileNames,
LPCSTR lpComment,
LONG * pdwFlags,
LPCMDOPTS pvOptions
);
/*******************************************************************************
Removes the array of fully qualified files from the source control system.
The files are not removed from the user's disk, unless advanced options
are set by the user. Advaned options are defined by the provider.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccRemove(
LPVOID pContext,
HWND hWnd,
LONG nFiles,
LPCSTR* lpFileNames,
LPCSTR lpComment,
LONG dwFlags,
LPCMDOPTS pvOptions
);
/*******************************************************************************
Renames the given file to a new name in the source control system. The
provider should not attempt to access the file on disk. It is the
caller's responsibility to rename the file on disk.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccRename(
LPVOID pContext,
HWND hWnd,
LPCSTR lpFileName,
LPCSTR lpNewName
);
/*******************************************************************************
Show the differences between the local users fully qualified file and the
version under source control.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccDiff(
LPVOID pContext,
HWND hWnd,
LPCSTR lpFileName,
LONG dwFlags,
LPCMDOPTS pvOptions
);
/*******************************************************************************
Show the history for an array of fully qualified local file names. The
provider may not always support an array of files, in which case only the
first files history will be shown.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccHistory(
LPVOID pContext,
HWND hWnd,
LONG nFiles,
LPCSTR* lpFileNames,
LONG dwFlags,
LPCMDOPTS pvOptions
);
/*******************************************************************************
Show the properties of a fully qualified file. The properties are defined
by the provider and may be different for each one.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccProperties(
LPVOID pContext,
HWND hWnd,
LPCSTR lpFileName
);
/*******************************************************************************
Examine a list of fully qualified files for their current status. The
return array will be a bitmask of SCC_STATUS_xxxx bits. A provider may
not support all of the bit types. For example, SCC_STATUS_OUTOFDATE may
be expensive for some provider to provide. In this case the bit is simply
not set.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccQueryInfo(
LPVOID pContext,
LONG nFiles,
LPCSTR* lpFileNames,
LPLONG lpStatus
);
/*******************************************************************************
Like SccQueryInfo, this function will examine the list of files for their
current status. In addition, it will use the pfnPopulate function to
notify the caller when a file does not match the critera for the nCommand.
For example, if the command is SCC_COMMAND_CHECKIN, and a file in the list
is not checked out, then the callback is used to tell the caller this.
Finally, the provider may find other files that could be part of the command
and add them. This allows a VB user to check out a .bmp file that is used
by their VB project, but does not appear in the VB makefile.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccPopulateList(
LPVOID pContext,
enum SCCCOMMAND nCommand,
LONG nFiles,
LPCSTR* lpFileNames,
POPLISTFUNC pfnPopulate,
LPVOID pvCallerData,
LPLONG lpStatus,
LONG dwFlags
);
/*******************************************************************************
SccGetEvents runs in the background checking the status of files that the
caller has asked about (via SccQueryInfo). When the status changes, it
builds a list of those changes that the caller may exhaust on idle. This
function must take virtually no time to run, or the performance of the
caller will start to degrade. For this reason, some providers may choose
not to implement this function.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccGetEvents(
LPVOID pContext,
LPSTR lpFileName,
LPLONG lpStatus,
LPLONG pnEventsRemaining
);
/*******************************************************************************
This function allows a user to access the full range of features of the
source control system. This might involve launching the native front end
to the product. Optionally, a list of files are given for the call. This
allows the provider to immediately select or subset their list. If the
provider does not support this feature, it simply ignores the values.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccRunScc(
LPVOID pContext,
HWND hWnd,
LONG nFiles,
LPCSTR* lpFileNames
);
/*******************************************************************************
This function will prompt the user for advaned options for the given
command. Call it once with ppvOptions==NULL to see if the provider
actually supports the feature. Call it again when the user wants to see
the advaned options (usually implemented as an Advaned button on a dialog).
If a valid *ppvOptions is returned from the second call, then this value
becomes the pvOptions value for the SccGet, SccCheckout, SccCheckin, etc...
functions.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccGetCommandOptions(
LPVOID pContext,
HWND hWnd,
enum SCCCOMMAND nCommand,
LPCMDOPTS * ppvOptions
);
/*******************************************************************************
This function allows the user to browse for files that are already in the
source control system and then make those files part of the current project.
This is handy, for example, to get a common header file into the current
project without having to copy the file. The return array of files
(lplpFileNames) contains the list of files that the user wants added to
the current makefile/project.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccAddFromScc(
LPVOID pContext,
HWND hWnd,
LPLONG pnFiles,
LPCSTR** lplpFileNames
);
/*******************************************************************************
SccSetOption is a generic function used to set a wide variety of options.
Each option starts with SCC_OPT_xxx and has its own defined set of values.
*******************************************************************************/
SCCEXTERNC SCCRTN EXTFUN SccSetOption(
LPVOID pContext,
LONG nOption,
LONG dwVal
);
/****************************************************************************
Following are the UNICODE definitions of the functions.
****************************************************************************/
#else
#error UNICODE Not supported
#endif // UNICODE
#if defined( __cplusplus )
}
#endif
#endif // _SCC_DEFS
//******* EOF ********