edmiRemoteGetModel

EdmiError edmiRemoteGetModel(SdaiServerContext serverContextId,
                               SdaiRepository    repository, 
                               SdaiString        modelName,
                               SdaiModel         *modelId,
                               SdaiInvocationId  *edmiInvocationId);


Returns the numeric modelId that uniquely identifies the specified model in a remote EDMdatabase. The model is uniquely identified in the remote EDMdatabase  by its name and the repositoryId of the repository in which it is contained.

Arguments


TypeNameComment
SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

SdaiRepository

repository

The numeric repositoryId that uniquely identifies the repository that contains the model of interest in the remote  EDMdatabase

SdaiString

modelName

The name of the model for which to retrieve its modelId. Model names are case sensitive.

SdaiModel

modelId

A variable that will receive the numeric modelId that uniquely identifies the model.

SdaiInvocationId

edmiInvocationId

Currently not used.

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

 

Options


  

 

Example


 

 EdmiError rstat;
 SdaiServerContext myContext;
 SdaiRepository repId;
 SdaiModel modId;
 SdaiInstance directorId;
 SdaiInteger protCode;
 SdaiInstance *pAdmin, owner, groupOwner;
 struct {
 SdaiInstance Id; 
 SdaiInteger Code; 
 } *pAccessFor;
  
 /* Define Remote Server Context */
 rstat = edmiDefineServerContext("MyRemoteServerContext",
 "Superuser", NULL, "cf37ftr", 
 "TCP", "9090", "MyServerHost", 
 NULL, NULL, NULL, NULL, NULL, &myContext); 
  
 /* Get Johnnys hour list model */
 rstat = edmiRemoteGetUser(myContext, "Director", &directorId, NULL);
 rstat = edmiRemoteGetRepository(myContext,
 "StaffRepository", &repId, NULL); 
 rstat = edmiRemoteGetModel(myContext, repId,
 "JohnnysHourList", &modId, NULL); 
  
 /* Get all protection info */
 rstat = edmiRemoteGetInstanceAccessRights(myContext, modId, 0,
 &owner, &groupOwner, &protCode,  
 &pAdmin, &pAccessFor, NULL); 
  
  
 /* Remove Directors individually set access */
 while(pAccessFor->Id) {
 if (pAccessFor->Id == directorId) { 
 rstat = edmiRemoteDeleteAccessRights(myContext,  
 modId, directorId, NULL); 
 break; 
 } 
 ++pAccessFor; 
 }
 . . .

 

See also

Filter by label

There are no items with the selected labels at this time.

Â