Presence2

Defines an instance of an object containing presence information for a particular contact. Valid for GroupWise 2012.

Properties

The following table lists the properties for this class, along with access and descriptions.

Property

Access

Description

Contact

R/O

DIGWAddressBookEntry7 Returns the contact associated with this presence object.

Methods

GetBitmap(
   string *bstrBitmapDllname, 
   VARIANT *vResID,
   long *nImages
   )
  • Returns the DLL and resource ID of a bitmap that lists all of the possible presence states for this provider. nImages is the number of images in the bitmap.
GetPresence(
   GW_PRESENCE_CONTEXT GWContext,
   [string *bstrStatusString,
   GW_PRESENCE_TYPE *PredefinedPresence,
   long *nBitmapIndex    
   )
  • Returns the presence given the context. bstrStatusString is a description of the state (offline, available, etc).
  • PredefinedPresence is the constant that best describes the user’s presence, and nBitmapIndex is the index of the appropriate icon in the bitmap returned by GetBitmap.

The following presence type constants are returned:

eGW_PRS_AVAILABLE

The user is available.

eGW_PRS_AWAY

The user is away.

eGW_PRS_BUSY

The user is busy.

eGW_PRS_IDLE

The user is idle.

eGW_PRS_INVALID

Unknown presence state.

eGW_PRS_OFFLINE

The user is offline.

eGW_PRS_ON_THE_PHONE

The user is on the phone.

eGW_PRS_UNKNOWN

The user's status is unknown.

GetAvailableActions([out] GW_PRESENCE_PROVIDER_ACTIONS *pavailableActions)
  • Called to ask the presence object what actions it can perform on the given contact.

The following presence provider action constants are returned:

eGW_LEAVE_VOICE_MESSAGE

The provider can leave a voice message.

eGW_NONE

The provider can't do any actions.

eGW_PHONE_CALL

The provider can dial the user.

eGW_SEND_IM

The provider can send an IM to the user.

eGW_SEND_SMS_MESSAGE

The provider can send a SMS message.

eGW_SEND_EMAIL

The provider can send an e-mail.

eGW_SEND_FILE

The provider can send a file.

eGW_VIDEO_CALL

The provider can create a video chat/call with the user.

ButtonLClicked(long hWnd)
  • Called if the user left clicks on the presence icon.
ButtonRClicked(long hWnd)
  • Called if the user right clicks on the presence icon.
DisablePresence();
  • Called when the user is done using the presence for this user (switched views, closed a contact, etc).
GetSubmenu(
   GW_PRESENCE_PROVIDER_ACTIONS action,
   VARIANT_BOOL bOnlyProvider,
   long *phMenu
   )
  • Called when the client is aggregating several presence providers using the “'little man” icon.
  • Action is set when the client is requesting providers for a specific action. Otherwise, it is 0.
  • bOnlyProvider is set to VARIANT_TRUE if this is the only provider that indicated it can handle the action.
  • phMenu is expected to return a windows HMENU, which will be combined with other menus for the right click action.
MenuClicked(long MenuId,
   string MenuText
   )
  • Called if the user clicks on any menu returned by GetSubMenu.
  • MenuId is the Menu id that was clicked.
  • MenuText is the text that was displayed in the menu.

Remarks

None.