Graphisoft®

API Development KitVersion: 18

APIEnv_ProjectSharingID

팀워크 프로젝트의 경우 프로젝트 공유 데이터를 리턴합니다.

    GSErrCode ACAPI_Environment (
        APIEnv_ProjectSharingID,
        API_SharingInfo*     sharingInfo
    );

 

파라미터

sharingInfo
팀 프로젝트의 등록된 멤버들의 데이터입니다.

 

리턴 값

NoError
함수가 성공적으로 완료되었습니다.
APIERR_BADPARS
sharingInfoNULL입니다.
APIERR_NOPLAN
sharingInfoNULL입니다.
APIERR_MEMFULL
메모리가 부족합니다.

다른 공통 API 오류들에 대해서는 API 오류 문서를 보십시오.

 

설명

이 함수는 열린 팀 프로젝트의 등록된 멤버들을 가져오는 데 사용합니다. 멤버 데이터는 API_UserInfo 레코드들의 배열을 통해 리턴됩니다.

더 이상 필요하지 않으면 멤버 데이터 핸들을 폐기하는 것을 잊지 마십시오.

 

예제

API_SharingInfo    sharingInfo;
Int32               i;
char               buffer[256];
GSErrCode          err;

BNZeroMemory (&sharingInfo, sizeof (API_SharingInfo));
err = ACAPI_Environment (APIEnv_ProjectSharingID, &sharingInfo, NULL, NULL);
if (err) {
    GiveMessage_Err ("Error in APIEnv_ProjectSharingID", err);
    return;
}

for (i = 0; i < sharingInfo.nUsers; i++) {
    sprintf (buffer, "  \"%10s\"   id:%2d   %s",
             (*sharingInfo.users)[i].name,
             (*sharingInfo.users)[i].userId,
             (*sharingInfo.users)[i].connected ? "Connected" : "");
    if ((*sharingInfo.users)[i].userId == projectInfo.userId)
        buffer[0] = '*';
    GiveMessage (buffer, false);
}

BMKillHandle ((GSHandle *) &sharingInfo.users);

 

요구사항

버전: API 2.1 또는 이후
헤더: APIdefs_Environment.h

 

참고사항

API_UserInfo, API_SharingInfo,
ACAPI_Environment, API 함수