beautypg.com

Adding source control system functionality, Bool scs_getagentinfo(), Bool scs_connect() – Adobe Dreamweaver API Reference CS5 User Manual

Page 92

background image

87

DREAMWEAVER API REFERENCE

The source control integration API

Last updated 8/27/2013

Adding source control system functionality

You can add source control system functionality to Dreamweaver by writing a

GetNewFeatures

handler that returns

a set of menu items and corresponding C functions. For example, if you write a Sourcesafe library and want to let
Dreamweaver users see the history of a file, you can write a

GetNewFeatures

handler that returns the History menu

item and the C function name of

history

. Then, in Windows, when the user right-clicks a file, the History menu item

is one of the items on the menu. If a user selects the History menu item, Dreamweaver calls the corresponding
function, passing the selected files to the DLL. The DLL displays the History dialog box so the user can interact with it
in the same way as Sourcesafe.

The source control integration API required functions

The source control integration API has required and optional functions. The functions listed in this section are
required.

bool SCS_GetAgentInfo()

Description
This function asks the DLL to return its name and description, which appear in the Edit Sites dialog box. The name
appears in the Server Access pop-up menu (for example, Sourcesafe, WebDav, Perforce) and the description below the
pop-up menu.

Arguments
char name[32], char version[32], char description[256], const char *dwAppVersion

The name argument is the name of the source control system. The name appears in the combo box for selecting a
source control system on the Source Control tab in the Edit Sites dialog box. The name can be a maximum of 32
characters.

The version argument is a string that indicates the version of the DLL. The version appears on the Source Control
tab in the Edit Sites dialog box. The version can be a maximum of 32 characters.

The description argument is a string that indicates the description of the source control system. The description
appears on the Source Control tab in the Edit Sites dialog box. The description can be a maximum of 256 characters.

The dwAppVersion argument is a string that indicates the version of Dreamweaver that is calling the DLL. The DLL
can use this string to determine the version and language of Dreamweaver.

Returns
A Boolean value:

true

if successful;

false

otherwise.

bool SCS_Connect()

Description
This function connects the user to the source control system. If the DLL does not have log-in information, the DLL
must display a dialog box to prompt the user for the information and must store the data for later use.