Bull DPX/20 Betriebsanweisung Seite 192

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 424
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 191
2-24
SOMobjects Base Toolkit: Programmers Reference Manual
get_principal Method
Purpose
Returns the ID of the principal that issued the request.
IDL Syntax
Principal get_principal (
in SOMDObject obj,
in Environment* req_ev);
Description
The get_principal method returns the ID of the principal that issued a request.
Parameters
receiver A pointer to a BOA (SOMOA) object for the server.
env A pointer to the Environment structure for the method caller.
obj A pointer to the object reference which is the target of the method call.
req_ev A pointer to the Environment object passed as input to the request.
Return Value
The get_principal method returns a pointer to a Principal object which identifies the user
and host from which a request originated.
Example
#include <somd.h>
/* assumed context: inside a method implementation */
void methodBody(SOMObject *somSelf, Environment *ev, ...)
{
Principal p;
SOMDObject selfRef;
Environment localev;
SOMInitEnvironment(&localev);
/* get a reference to myself from the server object */
selfRef =
somdRefFromSOMObj(SOMD_ServerObject, &ev, somSelf);
/* get principal information from the SOMOA */
p = _get_principal(SOMD_SOMOAObject, &localev, selfRef, ev);
printf(”user = %s, host = %s\n”,
__get_userName(p), __get_hostName(p));
...
}
Original Class
BOA
Related Information
Classes: Principal
Seitenansicht 191
1 2 ... 187 188 189 190 191 192 193 194 195 196 197 ... 423 424

Kommentare zu diesen Handbüchern

Keine Kommentare