12286d8edStholo /* This file was written by Jim Kingdon, and is hereby placed 22286d8edStholo in the public domain. */ 32286d8edStholo 42286d8edStholo /* Bits of the SCC interface. 52286d8edStholo For paranoia's sake, I'm not using the same names as Microsoft. 62286d8edStholo I don't imagine copying a few names could be a credible copyright 72286d8edStholo case, but it seems safer to stick to only what is necessary for 82286d8edStholo the interface to work. 92286d8edStholo 102286d8edStholo Note that some of the descriptions here have a certain amount of 112286d8edStholo guesswork (for example, sometimes I have tried to translate to CVS 122286d8edStholo terminology without actually verifying that the item means what I 132286d8edStholo think it does). If you find errors, please let us know according to 142286d8edStholo the usual procedures for reporting CVS bugs. */ 152286d8edStholo typedef long SCC_return; 162286d8edStholo #define SCC_return_success 0 172286d8edStholo #define SCC_return_unknown_project -2 182286d8edStholo /* The file is not under SCC control. */ 192286d8edStholo #define SCC_return_non_scc_file -11 202286d8edStholo /* This operation is not supported. I believe this status can only 212286d8edStholo be returned from SccGet, SccAdd, SccRemove, SccHistory, or 222286d8edStholo SccQueryInfo. I'm not really sure what happens if it is returned 232286d8edStholo from other calls. */ 242286d8edStholo #define SCC_return_not_supported -14 252286d8edStholo #define SCC_return_non_specific_error -15 262286d8edStholo 272286d8edStholo enum SCC_command 282286d8edStholo { 292286d8edStholo SCC_command_get, 302286d8edStholo SCC_command_checkout, 312286d8edStholo SCC_command_checkin, 322286d8edStholo SCC_command_uncheckout, 332286d8edStholo SCC_command_add, 342286d8edStholo SCC_command_remove, 352286d8edStholo SCC_command_diff, 362286d8edStholo SCC_command_history, 372286d8edStholo SCC_command_rename, 382286d8edStholo SCC_command_properties, 392286d8edStholo SCC_command_options 402286d8edStholo }; 412286d8edStholo 422286d8edStholo /* Outproc codes, for second argument to outproc. */ 432286d8edStholo #define SCC_outproc_info 1L 442286d8edStholo #define SCC_outproc_warning 2L 452286d8edStholo #define SCC_outproc_error 3L 462286d8edStholo /* Codes 4-7 relate to cancels and are only supported if the 472286d8edStholo development environment said so with SccSetOption. */ 482286d8edStholo /* A status message, typically goes in something analogous to the emacs 492286d8edStholo minibuffer. For both this and SCC_outproc_nostatus, the development 502286d8edStholo environment returns SCC_outproc_return_cancelled if the user has 512286d8edStholo hit the cancel button. */ 522286d8edStholo #define SCC_outproc_status 4L 532286d8edStholo /* Like SCC_outproc_status, but there is no message to report. */ 542286d8edStholo #define SCC_outproc_nostatus 5L 552286d8edStholo /* Tell the development environment to offer a cancel button. */ 562286d8edStholo #define SCC_outproc_cancel_on 6L 572286d8edStholo /* Tell the development environment to not offer a cancel button. */ 582286d8edStholo #define SCC_outproc_cancel_off 7L 592286d8edStholo 602286d8edStholo /* Return values from outproc. */ 612286d8edStholo #define SCC_outproc_return_success 0L 622286d8edStholo #define SCC_outproc_return_cancelled -1L 632286d8edStholo typedef long (*SCC_outproc) (char *, long); 642286d8edStholo 652286d8edStholo typedef BOOL (*SCC_popul_proc) (LPVOID callerdat, BOOL add_keep, 662286d8edStholo LONG status, LPCSTR file); 672286d8edStholo 682286d8edStholo /* Maximum sizes of various strings. These are arbitrary limits 692286d8edStholo which are imposed by the SCC. */ 702286d8edStholo /* Name argument to SccInitialize. */ 712286d8edStholo #define SCC_max_name 31 722286d8edStholo /* Path argument to SccInitialize. */ 732286d8edStholo #define SCC_max_init_path 31 742286d8edStholo /* Various paths many places in the interface. */ 752286d8edStholo #include <stdlib.h> 762286d8edStholo #define SCC_max_path _MAX_PATH 772286d8edStholo 782286d8edStholo /* Status codes, as used by QueryInfo and GetEvents. */ 792286d8edStholo /* This means that we can't get status. If the status is not 802286d8edStholo SCC_status_error, then the status is a set of bit flags, as defined by 812286d8edStholo the other SCC_status_* codes. */ 822286d8edStholo #define SCC_status_error -1L 832286d8edStholo 842286d8edStholo /* The following status codes are things which the development environment 852286d8edStholo is encouraged to check to determine things like whether to allow 862286d8edStholo a checkin. */ 872286d8edStholo /* The current user has the file checked out (that is, under "cvs edit"). 882286d8edStholo It may or may not be in the directory where the development 892286d8edStholo environment thinks it should be. */ 902286d8edStholo #define SCC_status_out_me 0x1000L 912286d8edStholo /* Should be set only if out_me is set. The file is checked out where 922286d8edStholo the development environment thinks it should be. */ 932286d8edStholo #define SCC_status_out_here 2L 942286d8edStholo /* Some other user has the file checked out. */ 952286d8edStholo #define SCC_status_out_someoneelse 4L 962286d8edStholo /* Reserved checkouts are in effect for the file. */ 972286d8edStholo #define SCC_status_reserved 8L 982286d8edStholo /* Reserved checkouts are not in effect for the file. Multiple users 992286d8edStholo can edit it. Only one of SCC_status_reserved or SCC_status_nonreserved 1002286d8edStholo should be set. I think maybe this flag should only be set if there 1012286d8edStholo actually is more than one copy currently checked out. */ 1022286d8edStholo #define SCC_status_nonreserved 0x10L 1032286d8edStholo 1042286d8edStholo /* The following flags are intended for the development environment to 1052286d8edStholo display the status of a file. We are allowed to support them or not 1062286d8edStholo as we choose. */ 1072286d8edStholo /* The file in the working directory is not the latest version in the 1082286d8edStholo repository. Like when "cvs status" says "Needs Checkout". */ 1092286d8edStholo #define SCC_status_needs_update 0x20L 1102286d8edStholo /* The file is no longer in the project. I think this is the case where 1112286d8edStholo cvs update prints "file xxx is no longer pertinent" (but I don't know, 1122286d8edStholo there are other statuses involved with removed files). */ 1132286d8edStholo #define SCC_status_not_pertinent 0x40L 1142286d8edStholo /* No checkins are permitted for this file. No real CVS analogue, because 1152286d8edStholo this sort of thing would be done by commitinfo, &c. */ 1162286d8edStholo #define SCC_status_no_checkins 0x80L 1172286d8edStholo /* There was a merge, but the user hasn't yet dealt with it. I think this 1182286d8edStholo probably should be used both if there were conflicts on the merge and 1192286d8edStholo if there were not (not sure, though). */ 1202286d8edStholo #define SCC_status_had_conflicts 0x100L 1212286d8edStholo /* This indicates something has happened to the file. I suspect it mainly 1222286d8edStholo is intended for cases in which we detect that something happened to the 1232286d8edStholo file behind our backs. I suppose CVS might use this for cases in which 1242286d8edStholo sanity checks on the CVSADM files fail, or in which the file has been 1252286d8edStholo made read/write without a "cvs edit", or that sort of thing. 1262286d8edStholo 1272286d8edStholo Or maybe it should be set if the file has been edited in the 1282286d8edStholo normal fashion. I'm not sure. */ 1292286d8edStholo #define SCC_status_munged 0x800L 1302286d8edStholo /* The file exists in several projects. In CVS I would suppose the 1312286d8edStholo equivalent probably would be that several modules (using features 1322286d8edStholo like -d) are capable of checking out a given file in the repository 1332286d8edStholo in several locations. CVS has no current ability to give a different 1342286d8edStholo status when that has happened, but it might be cool. */ 1352286d8edStholo #define SCC_status_several_projects 0x200L 1362286d8edStholo /* There is a sticky tag or date in effect. */ 1372286d8edStholo #define SCC_status_stuck 0x400L 1382286d8edStholo 1392286d8edStholo /* Bits to set in the caps used by SccInitialize. Most of these are 1402286d8edStholo relatively straightforward, for example SCC_cap_QueryInfo is set to 1412286d8edStholo indicate that the SccQueryInfo function is supported. */ 1422286d8edStholo /* CodeWright 5.00b and 5.00c seem to call SccQueryInfo regardless of whether 1432286d8edStholo this bit is set in caps. */ 1442286d8edStholo #define SCC_cap_QueryInfo 0x80L 1452286d8edStholo #define SCC_cap_GetProjPath 0x200L 1462286d8edStholo #define SCC_cap_AddFromScc 0x400L 1472286d8edStholo #define SCC_cap_want_outproc 0x8000L 1482286d8edStholo 1492286d8edStholo /* These are command options. Some of them are specific to a particular 1502286d8edStholo command, some of them are good for more than one command. Because many 1512286d8edStholo values are reused for different commands, look at the listed commands 1522286d8edStholo to see what a particular value means for a particular command. */ 1532286d8edStholo /* Recurse into directories. SccGet. */ 1542286d8edStholo #define SCC_cmdopt_recurse 2L 1552286d8edStholo /* This means to get all the files in a directory. SccGet. */ 1562286d8edStholo #define SCC_cmdopt_dir 1L 1572286d8edStholo /* Without this flag, after a checkin, files are normally not checked 1582286d8edStholo out. This flag disables that handling, and if it is set files will 1592286d8edStholo still be checked out after the checkin completes. SccCheckin, SccAdd. */ 1602286d8edStholo #define SCC_cmdopt_no_unedit 0x1000L 1612286d8edStholo /* File is text. SccAdd. */ 1622286d8edStholo #define SCC_cmdopt_text 1L 1632286d8edStholo /* File is binary. SccAdd. */ 1642286d8edStholo #define SCC_cmdopt_binary 2L 1652286d8edStholo /* We are supposed to decide whether it is text or binary. We can use the 1662286d8edStholo CVS wrappers stuff to decide based on the file name. Obviously, this 1672286d8edStholo constant is just another way of saying that neither SCC_cmdopt_text nor 1682286d8edStholo SCC_cmdopt_binary are set. SccAdd. */ 1692286d8edStholo #define SCC_cmdopt_auto 0L 1702286d8edStholo /* Maintain only a head revision for the file, no history. SccAdd. */ 1712286d8edStholo #define SCC_cmdopt_only_one 4L 1722286d8edStholo /* In addition to removing the file from the repository, also delete it 1732286d8edStholo from the working directory. My guess is that development environments 1742286d8edStholo would generally tend to pass this flag by default. SccRemove. */ 1752286d8edStholo #define SCC_cmdopt_retain_local 1L 1762286d8edStholo /* Compare files in a case-insensitive fashion. SccDiff. */ 1772286d8edStholo #define SCC_cmdopt_case_insensitive 2L 1782286d8edStholo /* Ignore whitespace in comparing files. SccDiff. */ 1792286d8edStholo #define SCC_cmdopt_ignore_all_space 4L 1802286d8edStholo /* Instead of generating diffs, just say whether files are equal, based on 1812286d8edStholo the file contents. SccDiff. */ 1822286d8edStholo #define SCC_cmdopt_compare_files 0x10L 1832286d8edStholo /* Instead of generating diffs, just say whether files are equal. This may 1842286d8edStholo use a checksum if we want, or if not, it can be the same as 1852286d8edStholo SCC_cmdopt_compare_files. */ 1862286d8edStholo #define SCC_cmdopt_consult_checksum 0x20L 1872286d8edStholo /* Instead of generating diffs, just say whether files are equal. This may 1882286d8edStholo use a timestamp if we want, or if not, it can be the same as either 1892286d8edStholo SCC_cmdopt_consult_checksum or SCC_cmdopt_compare_files. */ 1902286d8edStholo #define SCC_cmdopt_consult_timestamp 0x40L 1912286d8edStholo 1922286d8edStholo /* Values for the flags argument to OpenProject. */ 1932286d8edStholo /* If this is set, and the development environment tries to open a project 1942286d8edStholo which doesn't exist, then create it. */ 1952286d8edStholo #define SCC_open_autocreate 1L 1962286d8edStholo /* If autocreate is not set, and the development environment tries to 1972286d8edStholo open a project which doesn't exist, and may_prompt is set, we are 1982286d8edStholo allowed to prompt the user to create a new project. If may_prompt 1992286d8edStholo is not set, we should just return SCC_return_unknown_project and 2002286d8edStholo not open the project. */ 2012286d8edStholo #define SCC_open_may_prompt 2L 2022286d8edStholo 2032286d8edStholo /* Constants for SccSetOption. */ 2042286d8edStholo #define SCC_option_background 1L 2052286d8edStholo /* If option is SCC_option_background, then val turns background 2062286d8edStholo processing on or off. If it is off, we can, if we need to, queue 2072286d8edStholo up events or something which won't disturb the development 2082286d8edStholo environment. */ 2092286d8edStholo # define SCC_option_background_yes 1L 2102286d8edStholo # define SCC_option_background_no 0L 2112286d8edStholo #define SCC_option_cancel 3L 2122286d8edStholo /* If option is SCC_option_cancel, then val says whether the development 2132286d8edStholo environment supports the SCC_outproc_* codes related to having the 2142286d8edStholo development environment handle a cancel button. If this is not set, 2152286d8edStholo we are allowed/encouraged to implement a cancel button ourselves. */ 2162286d8edStholo # define SCC_option_cancel_on 1L 2172286d8edStholo # define SCC_option_cancel_off 0L 2182286d8edStholo /* A SCC_option_* value of 10 has also been observed (I think from 2192286d8edStholo CodeWright 5.00). I have no idea what it means; it isn't documented 2202286d8edStholo by the SCC API from Microsoft (version 0.99.0823). */ 2212286d8edStholo 2222286d8edStholo /* The "void *context_arg" argument to most of the Scc* functions 2232286d8edStholo stores a pointer to a structure that the version control system 2242286d8edStholo gets to allocate, so it doesn't need any global variables. */ 2252286d8edStholo 2262286d8edStholo /* In addition to context_arg, most of the Scc* functions take a 2272286d8edStholo "HWND window" argument. This is so that we can put up dialogs. 2282286d8edStholo The window which is passed in is the IDE's window, which we 2292286d8edStholo should use as the parent of dialogs that we put up. */ 2302286d8edStholo 2312286d8edStholo #include <windows.h> 2322286d8edStholo 2332286d8edStholo /* Return the version of the SCC spec, major version in the high word, 2342286d8edStholo minor version in the low word. Recommended value is 0x10001 for 2352286d8edStholo version 1.1 of the spec. */ 2362286d8edStholo extern LONG SccGetVersion (void); 2372286d8edStholo 2382286d8edStholo /* Set up the version control system. This should be called before any 2392286d8edStholo other SCC calls other than SccGetVersion. */ 2402286d8edStholo extern SCC_return SccInitialize 2412286d8edStholo (/* The version control system should allocate the context argument 2422286d8edStholo in SccInitialize and store a pointer to it in *contextp. */ 2432286d8edStholo void **contextp, 2442286d8edStholo 2452286d8edStholo HWND window, LPSTR caller, 2462286d8edStholo /* Version control system should copy in the 2472286d8edStholo name of the version control system here, 2482286d8edStholo up to SCC_max_name bytes. */ 2492286d8edStholo LPSTR name, 2502286d8edStholo 2512286d8edStholo /* Version control system should set *caps to indicate what it 2522286d8edStholo supports, using bits from SCC_cap_*. */ 2532286d8edStholo LPLONG caps, 2542286d8edStholo 2552286d8edStholo /* Version control system should copy in a string here, that the 2562286d8edStholo development environment can put places like a makefile to 2572286d8edStholo distinguish this version control system from others. Up to 2582286d8edStholo SCC_max_init_path bytes. */ 2592286d8edStholo LPSTR path, 2602286d8edStholo 2612286d8edStholo /* Version control system should set these to the maximum size for 2622286d8edStholo checkout comments and comments. I'm not sure whether existing 2632286d8edStholo development environments tend to allocate fixed size arrays 2642286d8edStholo based on the return length (I would recommend that a development 2652286d8edStholo environment not do so, but that is a different question). */ 2662286d8edStholo LPDWORD co_comment_len, 2672286d8edStholo LPDWORD comment_len); 2682286d8edStholo 2692286d8edStholo /* The version control system should free any resources it has allocated, 2702286d8edStholo including the context structure itself. */ 2712286d8edStholo extern SCC_return SccUninitialize (void *context_arg); 2722286d8edStholo 2732286d8edStholo extern SCC_return SccOpenProject 2742286d8edStholo (void *context_arg, HWND window, LPSTR user, 2752286d8edStholo LPSTR project, LPSTR local_proj, 2762286d8edStholo LPSTR aux_proj, 2772286d8edStholo LPSTR comment, 2782286d8edStholo 2792286d8edStholo /* This is the function which the version control system can call 2802286d8edStholo to ask the development environment to display output, or 2812286d8edStholo (SCC_outproc)0 if the development environment doesn't support 2822286d8edStholo the outproc feature. */ 2832286d8edStholo SCC_outproc outproc, 2842286d8edStholo 2852286d8edStholo /* One or more of the SCC_open_* settings. */ 2862286d8edStholo LONG flags); 2872286d8edStholo 2882286d8edStholo extern SCC_return SccCloseProject (void *context_arg); 2892286d8edStholo 2902286d8edStholo /* cvs get. */ 2912286d8edStholo extern SCC_return SccGet 2922286d8edStholo (void *context_arg, HWND window, 2932286d8edStholo 2942286d8edStholo /* Files to get, where file_names is an array 2952286d8edStholo of num_files names. */ 2962286d8edStholo /* As with all file names passed to us by the SCC, these file names 2972286d8edStholo are absolute pathnames. I think they will tend to be paths 2982286d8edStholo within the local directory specified by the local_proj argument 2992286d8edStholo to SccOpenProject, although I don't know whether there are any 3002286d8edStholo exceptions to that. */ 3012286d8edStholo LONG num_files, 3022286d8edStholo LPSTR *file_names, 3032286d8edStholo 3042286d8edStholo /* Command options. */ 3052286d8edStholo LONG options, 3062286d8edStholo 3072286d8edStholo void *prov_options); 3082286d8edStholo 3092286d8edStholo /* cvs edit. */ 3102286d8edStholo extern SCC_return SccCheckout 3112286d8edStholo (void *context_arg, HWND window, 3122286d8edStholo 3132286d8edStholo /* Files to operate on, where file_names is an array of num_files 3142286d8edStholo names. */ 3152286d8edStholo LONG num_files, 3162286d8edStholo LPSTR *file_names, 3172286d8edStholo 3182286d8edStholo LPSTR comment, 3192286d8edStholo 3202286d8edStholo /* Command options. I'm not sure what command options, if any, are 3212286d8edStholo defined for SccCheckout. */ 3222286d8edStholo LONG options, 3232286d8edStholo 3242286d8edStholo void *prov_options); 3252286d8edStholo 3262286d8edStholo /* cvs ci. */ 3272286d8edStholo extern SCC_return SccCheckin 3282286d8edStholo (void *context_arg, HWND window, 3292286d8edStholo 3302286d8edStholo /* Files to operate on, where file_names is an array of num_files 3312286d8edStholo names. */ 3322286d8edStholo LONG num_files, 3332286d8edStholo LPSTR *file_names, 3342286d8edStholo 3352286d8edStholo LPSTR comment, 3362286d8edStholo 3372286d8edStholo /* Command options. */ 3382286d8edStholo LONG options, 3392286d8edStholo 3402286d8edStholo void *prov_options); 3412286d8edStholo 3422286d8edStholo /* cvs unedit. */ 3432286d8edStholo extern SCC_return SccUncheckout 3442286d8edStholo (void *context_arg, HWND window, 3452286d8edStholo 3462286d8edStholo /* Files to operate on, where file_names is an array of num_files 3472286d8edStholo names. */ 3482286d8edStholo LONG num_files, 3492286d8edStholo LPSTR *file_names, 3502286d8edStholo 3512286d8edStholo /* Command options. I'm not sure what command options, if any, are 3522286d8edStholo defined for SccUncheckout. */ 3532286d8edStholo LONG options, 3542286d8edStholo 3552286d8edStholo void *prov_options); 3562286d8edStholo 3572286d8edStholo /* cvs add + cvs ci, more or less, I think (but see also 3582286d8edStholo the "keep checked out" flag in options). */ 3592286d8edStholo extern SCC_return SccAdd 3602286d8edStholo (void *context_arg, HWND window, 3612286d8edStholo 3622286d8edStholo /* Files to operate on, where file_names is an array of num_files 3632286d8edStholo names. */ 3642286d8edStholo LONG num_files, 3652286d8edStholo LPSTR *file_names, 3662286d8edStholo 3672286d8edStholo LPSTR comment, 3682286d8edStholo 3692286d8edStholo /* Array of num_files command options, one for each file. */ 3702286d8edStholo LONG *options, 3712286d8edStholo 3722286d8edStholo void *prov_options); 3732286d8edStholo 3742286d8edStholo /* cvs rm -f + cvs ci, I think. Should barf if SCC_REMOVE_KEEP 3752286d8edStholo (or maybe just put the file there, as if the user had removed 3762286d8edStholo it and then done a "copy <saved-file> <filename>". */ 3772286d8edStholo extern SCC_return SccRemove 3782286d8edStholo (void *context_arg, HWND window, 3792286d8edStholo 3802286d8edStholo /* Files to operate on, where file_names is an array of num_files 3812286d8edStholo names. */ 3822286d8edStholo LONG num_files, 3832286d8edStholo LPSTR *file_names, 3842286d8edStholo 3852286d8edStholo LPSTR comment, 3862286d8edStholo 3872286d8edStholo /* Command options. */ 3882286d8edStholo LONG options, 3892286d8edStholo 3902286d8edStholo void *prov_options); 3912286d8edStholo 3922286d8edStholo /* mv, cvs add, cvs rm, and cvs ci, I think. */ 3932286d8edStholo extern SCC_return SccRename 3942286d8edStholo (void *context_arg, HWND window, LPSTR old_name, 3952286d8edStholo LPSTR new_name); 3962286d8edStholo 3972286d8edStholo /* If SCC_cmdopt_compare_files, SCC_cmdopt_consult_checksum, or 3982286d8edStholo SCC_cmdopt_consult_timestamp, then we are supposed to silently 3992286d8edStholo return a status, without providing any information directly to the 4002286d8edStholo user. For no args or checksum (which we fall back to full compare) 4012286d8edStholo basically a call to No_Diff or ? in the client case. For 4022286d8edStholo timestamp, just a Classify_File. Now, if contents not set, then 4032286d8edStholo want to do a cvs diff, and preferably start up WinDiff or something 4042286d8edStholo (to be determined, for now perhaps could just return text via 4052286d8edStholo outproc). */ 4062286d8edStholo extern SCC_return SccDiff 4072286d8edStholo (void *context_arg, HWND window, LPSTR file_name, 4082286d8edStholo 4092286d8edStholo /* Command options. */ 4102286d8edStholo LONG options, 4112286d8edStholo 4122286d8edStholo void *prov_options); 4132286d8edStholo 4142286d8edStholo /* cvs log, I presume. If we want to get fancier we could bring 4152286d8edStholo up a screen more analogous to the tkCVS log window, let the user 4162286d8edStholo do "cvs update -r", etc. */ 4172286d8edStholo extern SCC_return SccHistory 4182286d8edStholo (void *context_arg, HWND window, 4192286d8edStholo 4202286d8edStholo /* Files to operate on, where file_names is an array of num_files 4212286d8edStholo names. */ 4222286d8edStholo LONG num_files, 4232286d8edStholo LPSTR *file_names, 4242286d8edStholo 4252286d8edStholo /* Command options. I'm not sure what command options, 4262286d8edStholo if any, are defined for SccHistory. */ 4272286d8edStholo LONG options, 4282286d8edStholo 4292286d8edStholo void *prov_options); 4302286d8edStholo 4312286d8edStholo /* cvs status, presumably. */ 4322286d8edStholo extern SCC_return SccProperties 4332286d8edStholo (void *context_arg, HWND window, LPSTR file_name); 4342286d8edStholo 4352286d8edStholo /* Not sure what this should do. The most obvious thing is some 4362286d8edStholo kind of front-end to "cvs admin" but I'm not actually sure that 4372286d8edStholo is the most useful thing. */ 4382286d8edStholo extern SCC_return SccRunScc 4392286d8edStholo (void *context_arg, HWND window, 4402286d8edStholo 4412286d8edStholo LONG num_files, 4422286d8edStholo LPSTR *file_names); 4432286d8edStholo 444*b6f6614eStholo /* If the user invokes version-control-system-defined behavior 445*b6f6614eStholo (typically by clicking an Advanced button in a dialog, e.g. the Get 446*b6f6614eStholo dialog), and the user clicks on that button, then the development 447*b6f6614eStholo environment calls SccGetCommandOptions. The version control system 448*b6f6614eStholo interacts with the user and then sets *PROV_OPTIONSP to whatever it 449*b6f6614eStholo wants. The development environment doesn't do anything with it, 450*b6f6614eStholo but does pass it to the various commands as prov_options. If it 451*b6f6614eStholo calls SccGetCommandOptions again, it will pass the same value (so 452*b6f6614eStholo user choices from the previous "Advanced" click can serve as 453*b6f6614eStholo defaults). 454*b6f6614eStholo 455*b6f6614eStholo Note that "provider options" (prov_options) are unrelated to 456*b6f6614eStholo "command options" (SCC_cmdopt_*). */ 457*b6f6614eStholo 4582286d8edStholo extern SCC_return SccGetCommandOptions 4592286d8edStholo (void *context_arg, HWND window, 4602286d8edStholo enum SCC_command command, 4612286d8edStholo void **prov_optionsp); 4622286d8edStholo 4632286d8edStholo /* Not existing CVS functionality, I don't think. 4642286d8edStholo Need to be able to tell user about what files 4652286d8edStholo are out there without actually getting them. */ 4662286d8edStholo extern SCC_return SccPopulateList 4672286d8edStholo (void *context_arg, enum SCC_command command, 4682286d8edStholo 4692286d8edStholo LONG num_files, 4702286d8edStholo LPSTR *file_names, 4712286d8edStholo 4722286d8edStholo SCC_popul_proc populate, 4732286d8edStholo void *callerdat, 4742286d8edStholo 4752286d8edStholo /* Command options. I'm not sure what command options, 4762286d8edStholo if any, are defined for SccPopulateList. */ 4772286d8edStholo LONG options); 4782286d8edStholo 4792286d8edStholo /* cvs status, sort of. */ 4802286d8edStholo extern SCC_return SccQueryInfo 4812286d8edStholo (void *context_arg, 4822286d8edStholo 4832286d8edStholo LONG num_files, LPSTR *file_names, 4842286d8edStholo 4852286d8edStholo /* This is an array of NUM_FILES entries. In each one 4862286d8edStholo we store a SCC_status_* code. */ 4872286d8edStholo LPLONG status); 4882286d8edStholo 4892286d8edStholo /* Like QueryInfo, but fast and for only a single file. For example, the 4902286d8edStholo development environment might call this quite frequently to keep its 4912286d8edStholo screen display updated. Supposed to only return cached status 4922286d8edStholo information, not go to disk or anything. I assume that 4932286d8edStholo QueryInfo and probably the usual calls like Get would cause 4942286d8edStholo the version control system to cache the status in the first place. */ 4952286d8edStholo extern SCC_return SccGetEvents 4962286d8edStholo (void *context_arg, LPSTR file_name, 4972286d8edStholo 4982286d8edStholo /* Here the version control system stores the SCC_status_* code. */ 4992286d8edStholo LPLONG status, 5002286d8edStholo 5012286d8edStholo LPLONG events_remaining); 5022286d8edStholo 5032286d8edStholo /* This is where the user gives us the CVSROOT. */ 5042286d8edStholo extern SCC_return SccGetProjPath 5052286d8edStholo (void *context_arg, HWND window, LPSTR user, 5062286d8edStholo 5072286d8edStholo /* Version control system copies in the project name 5082286d8edStholo here, up to SCC_max_path bytes. */ 5092286d8edStholo LPSTR proj_name, 5102286d8edStholo 5112286d8edStholo /* If allow_change, the version control system may copy 5122286d8edStholo into this field, up to SCC_max_path bytes. */ 5132286d8edStholo LPSTR local_proj, 5142286d8edStholo 5152286d8edStholo /* Version control system copies into this field, up to 5162286d8edStholo SCC_max_path bytes. */ 5172286d8edStholo LPSTR aux_proj, 5182286d8edStholo 5192286d8edStholo BOOL allow_change, BOOL *new); 5202286d8edStholo 5212286d8edStholo /* Pretty much similar to SccPopulateList. Not sure whether this also 5222286d8edStholo involves getting the files, or whether the development environment will 5232286d8edStholo typically call SccGet after this function. */ 5242286d8edStholo extern SCC_return SccAddFromScc 5252286d8edStholo (void *context_arg, HWND window, 5262286d8edStholo 5272286d8edStholo /* Version control system sets *files to the number of files and 5282286d8edStholo *file_names to an array each element of which and contains the 5292286d8edStholo name of one of the files. The names can be relative pathnames 5302286d8edStholo (e.g. "foo.c"). If files is NULL, that means something different; 5312286d8edStholo the version control system should free the memory that it allocated 5322286d8edStholo for file_names. */ 5332286d8edStholo LONG *files, 5342286d8edStholo char ***file_names); 5352286d8edStholo 5362286d8edStholo /* This changes several aspects of how we interact with the IDE. */ 5372286d8edStholo extern SCC_return SccSetOption 5382286d8edStholo (void *context_arg, 5392286d8edStholo /* One of the SCC_option_* codes. */ 5402286d8edStholo LONG option, 5412286d8edStholo /* Meaning of this will depend on the value of option. */ 5422286d8edStholo LONG val); 5432286d8edStholo 5442286d8edStholo /* New functions with CodeWright 5.00c: SccAddRef, SccRelease, 5452286d8edStholo SccDiffToRev, SccLabel, SccLock and SccMerge. I don't have any 5462286d8edStholo details on them. */ 547