ASPEN_SetNewsWatch

 

Related Topics

 

 

Purpose

Enable or disable news notices.

 

 

Call Syntax

#include <aspen.h>

AspenRequest(GLOBAL_session, ASPEN_SetNewsWatch, (void *)&newsWatch, NULL);

 

 

Parameters

Input

A void pointer to a boolean that indicates whether to enable (1) or disable (0) news.

 

Output

None.

 

 

Structures

None.

 

 

Remarks

Use ASPEN_SetNewsWatch to toggle the notification of news headlines and/or stories.

 

While enabled, ASPEN_SetNewsWatch causes news notices to register in an AspenEvent() thread as an ASPEN_NewsNotice.

 

Calling ASPEN_SetNewsWatch with a zero (0) value boolean disables news notices.

 

Because ASPEN_GetNewsIndex is not yet fully implemented, there is no way to get a list of news stories currently stored in the Aspen Server’s news database. Therefore, a client application has access only to the real-time headlines and stories received by the Server.

 

See ASPEN_GetNumberedStory for information on a method of accessing headlines and stories in the Server's news database.

 

 

Return Value

ASPEN_OK

 

 

See Also

AspenRequest()

AspenEvent()

ASPEN_NewsNotice

ASPEN_GetNewsIndex

ASPEN_GetNumberedStory

 

 

Example

void CNewsDlg::OnRequestNews()

{

   server_list          *slp = list;

   BOOL                 newsWatch = 1;

   CString              strStory;

   int                  retval;

   retval = AspenRequest(slp->server_session, ASPEN_SetNewsWatch, (void *)&newsWatch, NULL);

   if (retval != ASPEN_OK)

   {

      strText.Format("News Watch Request Unsuccessful");

      m_NewsText.AppendNewsText(strText);

   }

}

 

©2006 Aspen Research Group, Ltd. All rights reserved. Terms of Use.