home *** CD-ROM | disk | FTP | other *** search
/ c't freeware shareware 1997 / CT_SW_97.ISO / mac / Software / finanzen / win95 / quotenow.exe / data.z / server.h < prev    next >
C/C++ Source or Header  |  1997-01-31  |  19KB  |  582 lines

  1. //SERVER.H
  2.  
  3. //DO NOT DISTRIBUTE THIS FILE
  4.  
  5. /*
  6. QuotesNow! is trademark and (C)opyright 1996
  7. by Federated Telecommunications Corp. and
  8. Windows Xpert Systems 
  9.  
  10.   THIS FILE CANNOT BE DISTRIBUTED
  11.  
  12. You or any entity using this code must purchase a copy of QuotesNow!
  13. (tm) for each person that will use this source code.  The purchaser/
  14. registered user may freely distribute compiled derivative
  15. (machine readable code only) versions of this code.
  16.  
  17. Registered Users (Users who have purchased the QuotesNow! (tm) program
  18. from Federated Telecommunications Corp. or Windows Xpert Systems)
  19. Once you have purchased the application, you may use one copy
  20. of the program.  The program is licensed to YOU (the purchaser/user
  21. by name), no other user may legally use the software.
  22. It is understood that you use the software at your own risk.
  23.  Registered Users may produce compiled derivative works of the
  24.  source code provided with this program as long as it's intended use
  25.  is only for use with the QuotesNow! (tm) program by Windows Xpert Systems
  26.  and Federated Telecommunications Corp.  The derivative source code
  27.  may be distributed as long as all notices in all code, including
  28.  copyright and trademark notices remain intact and the author makes it
  29.  clear that the source code may only be used to work with the
  30.  QuotesNow! (tm) program by Windows Xpert Systems and 
  31.  Federated Telecommunications, and that any user of the source code must
  32.  purchase the QuotesNow! (tm) program to use it.  The header files
  33.  (files ending in .h, such as server.h) may not be distributed
  34.  seperately from the QuotesNow! (tm) program.
  35.  The add-in .SRV/.DLL source code itself may only be distributed
  36.  as a derivative work as mentioned above 
  37.  (with all notices intact and the author notifying any potential
  38.  user of the required uses of the source code - only a Registered
  39.  QuotesNow! (tm) user may distribute/use the Source code derivative
  40.  work.)
  41.  
  42.   */
  43.  
  44.  
  45.  
  46. #ifndef _SERVER_H
  47. #define _SERVER_H
  48. #include <afxtempl.h>
  49.  
  50. //Server,h
  51. #define WXSSERVER_APIVERSION    1.0
  52.  
  53. #define WXSSERVER_INITFUNCTION        "WxsServerInit"
  54. #define WXSSERVER_APIVERSIONFUNC    "WxsGetApiVersion"
  55.  
  56. //used by inline news servers
  57. #define DONT_IGNORE        0
  58. #define IGNORE_NEWS        1
  59. #define IGNORE_QUOTE    2
  60.  
  61. //flags that are passed and used with the Ticker
  62. //bar callback to determine if the callback
  63. //is being called after a symbol or after
  64. //the end of all symbols
  65. #define TICKERBAR_FLAG_SYMBOL    0
  66. #define TICKERBAR_FLAG_ENDALL    1
  67.  
  68.  
  69. //these are defines for the return values
  70. //to be used by the stock quote parsing routine
  71. //or the option quote parsing routine
  72. #define PARSERET_OK                1
  73. #define PARSERET_ERROR            -1
  74. #define PARSERET_INVALIDSYMBOL    -2
  75. #define PARSERET_SERVERERROR    -3
  76.  
  77. //types of settings - used by edit settings interface
  78. //this value is just to let your add-in know which
  79. //page of it's property sheet for it's settings it
  80. //should display as the currently active page.
  81. //All pages should be available to tab to if needed
  82. #define WXSSETTINGS_GENERALALL    0    //general/all settings
  83. #define    WXSSETTINGS_STOCKQUOTES    1    //stock quote settings
  84. #define WXSSETTINGS_OPTQUOTES    2    //option quote settings
  85. #define WXSSETTINGS_GRAPHS        3    //graph settings
  86. #define WXSSETTINGS_NEWS        4    //news settings
  87.  
  88.  
  89. //Define used when calling RegisterWebLink
  90. //to define the link for all stock symbols
  91. #define RWL_WXSALLSYMBOLS    "#AllSymbols"
  92.  
  93.  
  94. class CServerObject;
  95.  
  96.  
  97. class CPubDrawObject
  98. {
  99. public:
  100.     CString m_str;
  101.     int m_x;
  102.     int m_y;
  103.     int m_iImage;
  104.     CSize m_size;
  105.     enum {DRAWTYPE_STOCK=0,DRAWTYPE_NEWS=1,DRAWTYPE_OTHER=2};
  106.     int m_iDrawType;        //object type
  107.     CString m_sSymbol;
  108.     int m_iData;            //used for keeping track of object info
  109.     CString m_httpAddress;
  110.  
  111. };
  112.  
  113.  
  114.  
  115. class CNewsObj : public CObject
  116. {
  117. public:
  118.     
  119.     void Serialize(CArchive &ar);
  120.     CNewsObj();
  121.     ~CNewsObj();
  122.     
  123.     CNewsObj & operator=(CNewsObj &news);
  124.     CString m_sSymbol;                //related stock symbol for news
  125.     CString m_sHeadline;            //headline of news item
  126.     CString m_sHttpLink;            //full http for link to story
  127.     CTime    m_time;                    //time of news item used internally
  128.     CString m_sTime;                //string for time of news item
  129.                                     //use in .DLL since CTime doesn't
  130.                                     //work in .DLL
  131.  
  132.     //Used internally and will be used by linked in server objects
  133.     //a unique server id is used because a user can change news
  134.     //servers and build up news from different sources.  Only
  135.     //the server that had the item will know when the full story
  136.     //text may not be available any more,etc.  So m_sServerID
  137.     //is used by the news server that added the item to check
  138.     //to see if a item exists already, is new or should be
  139.     //deleted because full text is no longer availble.
  140.     CString m_sServerID;            //unqiue server id
  141.  
  142.  
  143.     //can be used by the server .dll that created the item specified
  144.     //by the unique m_sServerID for processing.
  145.     DWORD    m_dwHint;
  146.     
  147.     //Found flag is used to indicate if this news item was found on the
  148.     //the server during the last news retrieval.  If it was found
  149.     //it is kept in the list.  If it was not found because the server
  150.     //no longer has information on it, then the news item is removed
  151.     //when DeleteNotFoundReadNews is called on the stock object
  152.     BOOL    m_bFound;
  153.  
  154.     
  155.  
  156.     DECLARE_SERIAL(CNewsObj)
  157. };
  158.  
  159.  
  160. class CPubSrvStockObj : public CObject
  161. {
  162.     public:
  163.  
  164.  
  165.         CString m_sSymbol;        //ticker symbol (such as IBM)
  166.         CString m_sName;        //full company name 
  167.         float    m_fPrice;        //last price
  168.         float    m_fChange;        //change in price from the open
  169.         float    m_fHigh;        //high price for the day
  170.         float    m_fLow;            //low price for the day
  171.         UINT    m_nVolume;        //total volume for the day
  172.         float    m_fBid;            //current bid price
  173.         float    m_fAsk;            //current ask price
  174.         float    m_fYearHigh;    //52 week high
  175.         float    m_fYearLow;        //52 week low
  176.         float    m_fPercentChange;    //percent change
  177.         UINT    m_nOpenInterest;    //open interest
  178.         CTime    m_cTime;        //time of quote from server
  179.         CString m_sTime;        //server time return string (display)
  180.  
  181.         enum    {OBJECT_STOCK,OBJECT_OPTION};
  182.         DWORD   m_dwObjectType;    //object type either stock or option
  183.  
  184.         CString m_httpGraph;            //http Graph string
  185.         CString m_httpNews;                //http news string
  186.         CString m_httpHistoricalData;    //http historical data string
  187.         CString m_httpWWW;                //home page http address
  188.  
  189.         float    m_fAlertLow;            //low alert value
  190.         float    m_fAlertHigh;            //high alert value
  191.         DWORD    m_dwAlertVolume;        //high volume alert
  192.         BOOL    m_bNewsAlert;            //news alert if TRUE
  193.         
  194.         CObArray    m_tnNewsArray;        //array of New news CNewsObj
  195.         CObArray    m_tnReadNewsArray;    //array of Old news CNewsObj
  196.  
  197.         DWORD        m_dwLastNewsCount;    //can be used by server
  198.         DWORD        m_dwNewsCount;        //can be used by server
  199.  
  200.         BOOL        m_bEndOfDay;        //TRUE if quote is an end of day quote
  201.  
  202.         //quote time from server in integer format rather than
  203.         //CTime since CTime is not supported in .DLL's
  204.         int            m_iDay;
  205.         int            m_iMonth;
  206.         int            m_iYear;
  207.         int            m_iHour;
  208.         int            m_iMinute;
  209.         int            m_iSecond;
  210.  
  211.         //Special variables and defines for internal use
  212.     
  213.     enum {F_SYMBOL=0,F_NAME=1,F_PRICE=2,F_CHANGE=3,F_HIGH=4,
  214.         F_LOW=5,F_VOLUME=6,F_BID=7,F_ASK=8,
  215.         F_52WEEKHIGH=9,F_52WEEKLOW=10,F_LASTUPDATE=11,F_SHARES=12,
  216.         F_TOTALVALUE=13,F_GAINLOSS=14};
  217.  
  218.         BOOL m_bClearAlert;
  219.  
  220.     CPubSrvStockObj & operator=(CPubSrvStockObj &pbsobj)
  221.     {
  222.         m_sSymbol=pbsobj.m_sSymbol;
  223.         m_sName=pbsobj.m_sName;
  224.         m_fPrice=pbsobj.m_fPrice;
  225.         m_fChange=pbsobj.m_fChange;
  226.         m_fHigh=pbsobj.m_fHigh;
  227.         m_fLow=pbsobj.m_fLow;
  228.         m_nVolume=pbsobj.m_nVolume;
  229.         m_fBid=pbsobj.m_fBid;
  230.         m_fAsk=pbsobj.m_fAsk;
  231.         m_fYearHigh=pbsobj.m_fYearHigh;
  232.         m_fYearLow=pbsobj.m_fYearLow;
  233.         m_fPercentChange=pbsobj.m_fPercentChange;
  234.         m_nOpenInterest=pbsobj.m_nOpenInterest;
  235.         m_cTime=pbsobj.m_cTime;
  236.         m_sTime=pbsobj.m_sTime;
  237.         m_iDay=pbsobj.m_iDay;
  238.         m_iMonth=pbsobj.m_iMonth;
  239.         m_iYear=pbsobj.m_iYear;
  240.         m_iHour=pbsobj.m_iHour;
  241.         m_iMinute=pbsobj.m_iMinute;
  242.         m_iSecond=pbsobj.m_iSecond;
  243.         m_bClearAlert=pbsobj.m_bClearAlert;
  244.         m_bEndOfDay=pbsobj.m_bEndOfDay;
  245.         
  246.         //handle copying new news array
  247.         int nSize=m_tnNewsArray.GetSize();
  248.         for (int z=0; z<nSize; z++)
  249.             delete m_tnNewsArray[z];
  250.  
  251.         m_tnNewsArray.RemoveAll();
  252.         nSize=pbsobj.m_tnNewsArray.GetSize();
  253.  
  254.         for (z=0; z<nSize; z++)
  255.         {
  256.             CNewsObj *pnews=new CNewsObj;
  257.             CNewsObj *pnews1=(CNewsObj *)pbsobj.m_tnNewsArray[z];
  258.             *pnews=*pnews1;
  259.  
  260.             //add newly created item to the array.
  261.             //we needed to create a new item because if the old sobj
  262.             //is deleted it would delete all of the news objects
  263.             //as well and then we would be left with invalid pointers
  264.             m_tnNewsArray.Add(pnews);
  265.         }
  266.  
  267.         //Handle copying old news array
  268.         nSize=m_tnReadNewsArray.GetSize();
  269.         for (z=0; z<nSize; z++)
  270.             delete m_tnReadNewsArray[z];
  271.  
  272.         m_tnReadNewsArray.RemoveAll();
  273.         nSize=pbsobj.m_tnReadNewsArray.GetSize();
  274.  
  275.         for (z=0; z<nSize; z++)
  276.         {
  277.             CNewsObj *pnews=new CNewsObj;
  278.             CNewsObj *pnews1=(CNewsObj *)pbsobj.m_tnReadNewsArray[z];
  279.             *pnews=*pnews1;
  280.  
  281.             //add newly created item to the array.
  282.             //we needed to create a new item because if the old sobj
  283.             //is deleted it would delete all of the news objects
  284.             //as well and then we would be left with invalid pointers
  285.             m_tnReadNewsArray.Add(pnews);
  286.         }
  287.  
  288.         
  289.         m_dwLastNewsCount=pbsobj.m_dwLastNewsCount;
  290.         m_dwNewsCount=pbsobj.m_dwNewsCount;
  291.  
  292.         return *this;
  293.     }
  294.  
  295.     //DeleteNotFoundReadNews
  296.     //Used to remove news items that do NOT have the
  297.     //m_bFound flag set to TRUE.  The server .dll
  298.     //is responsible for setting the flag and calling this function
  299.     //or handling deletion on it's own.
  300.     //This is just a helper function
  301.     BOOL DeleteNotFoundReadNews(CString &sServerID)
  302.     {
  303.     int nSize=m_tnReadNewsArray.GetSize();
  304.     int z;
  305.  
  306.     for (z=0; z<nSize; z++)
  307.     {
  308.         CNewsObj *pnews=(CNewsObj *)m_tnReadNewsArray[z];
  309.  
  310.         if (sServerID==pnews->m_sServerID && !pnews->m_bFound)
  311.         {
  312.             //remove this news item since it has been read and
  313.             //the news page is not carrying it anymore
  314.             delete pnews;
  315.             m_tnReadNewsArray.RemoveAt(z);
  316.  
  317.             //reset our for loop to handle the fact that
  318.             //and item has been removed
  319.             nSize--;
  320.             z--;
  321.         }
  322.  
  323.         
  324.     }
  325.  
  326.     return TRUE;
  327.     
  328.     }
  329.  
  330.     //ClearReadNewsFoundFlag
  331.     //Is used to clear the m_bFound flag before a server checks
  332.     //it's news items, so that it can set the found flags for any
  333.     //news items it does find on the server
  334.     BOOL ClearReadNewsFoundFlag(CString &sServerID)
  335.     {
  336.     int nSize=m_tnReadNewsArray.GetSize();
  337.     int z;
  338.  
  339.     for (z=0; z<nSize; z++)
  340.     {
  341.         CNewsObj *pnews=(CNewsObj *)m_tnReadNewsArray[z];
  342.  
  343.         if (sServerID==pnews->m_sServerID)
  344.             pnews->m_bFound=FALSE;
  345.     }
  346.  
  347.     return TRUE;
  348.     }
  349.  
  350. public:
  351.             ~CPubSrvStockObj() {
  352.             
  353.             //delete the memory associated with the news
  354.             //arrays
  355.             int nSize=m_tnNewsArray.GetSize();
  356.  
  357.             for (int z=0; z<nSize; z++)
  358.             delete m_tnNewsArray[z];
  359.  
  360.             m_tnNewsArray.RemoveAll();
  361.  
  362.             nSize=m_tnReadNewsArray.GetSize();
  363.  
  364.             for (z=0; z<nSize; z++)
  365.                 delete m_tnReadNewsArray[z];
  366.  
  367.             m_tnReadNewsArray.RemoveAll();
  368.  
  369.         };
  370.  
  371.  
  372. }; //end of public stock obj
  373.  
  374.  
  375. typedef CArray<CPubSrvStockObj,CPubSrvStockObj&> CPUBSTOCKOBJ;
  376.  
  377. typedef int (* FILEEXPORT_CALLBACK)(CPUBSTOCKOBJ &,HANDLE fp,DWORD dwSettings);
  378.  
  379. typedef BOOL (* GTI_CALLBACK)(UINT uMTable,UINT uLevel,UINT uSubTable,
  380.                                         UINT uRow,UINT uColumn,
  381.                                         char *pStart,
  382.                                         char *pEnd,LONG lData);
  383.  
  384. typedef char * (* UTILITY_GETTAGS)(char *p,CString &sTag,char **lend);
  385. typedef BOOL (* UTILITY_GETTABLEITEMS)(char *buffer,GTI_CALLBACK gtiCallBack,LONG lData);
  386. typedef BOOL (* UTILITY_SPLITSTRINGDASH)(const char *pString,CString &s1,CString &s2);
  387. typedef BOOL (* UTILITY_FIXUPNUMBER)(CString &s);
  388. typedef char * (* UTILITY_FINDDATAFIELD)(char *p, char **end);
  389. typedef int (* UTILITY_GETNUMBERANDFRACTION)(char *buffer,char *end, float& fValue);
  390. typedef int (* UTILITY_REGISTERFILEFORMAT)(const char *lpszFormatName,FILEEXPORT_CALLBACK lpfnExport,
  391.                                                    const char *lpszExt,const char *lpszServerName,BOOL bDisplayDialog=TRUE);
  392.  
  393. typedef BOOL (* WEBLINK_CALLBACK)(DWORD dwSettings,const char *lpszRSymbol,
  394.                                           const char *lpszTitle,
  395.                                           DWORD dwUserValue);
  396.  
  397. typedef BOOL (* UTILITY_REGISTERWEBLINK)(const char *lpszRSymbol,
  398.                                                  const char *lpszTitle,
  399.                                                  const char *lpszServerName,
  400.                                                  const char *lpzHttp,
  401.                                                  WEBLINK_CALLBACK lpfnCallback,
  402.                                                  DWORD lpdwUser);
  403.  
  404.  
  405. struct WXSINFO
  406. {
  407.     DWORD dwSize;
  408.     UTILITY_GETTAGS lpfnGetTagS;
  409.     UTILITY_GETTABLEITEMS lpfnGetTableItems;
  410.     UTILITY_SPLITSTRINGDASH lpfnSplitStringDash;
  411.     UTILITY_FIXUPNUMBER lpfnFixupNumber;
  412.     UTILITY_FINDDATAFIELD lpfnFindDataField;
  413.     UTILITY_GETNUMBERANDFRACTION lpfnGetNumberAndFraction;
  414.     UTILITY_REGISTERFILEFORMAT    lpfnRegisterFileFormat;    
  415.     UTILITY_REGISTERFILEFORMAT    lpfnRegisterImportFileFormat;
  416.     UTILITY_REGISTERWEBLINK        lpfnRegisterWebLink;
  417.     HWND hFrameWnd;
  418. };
  419.  
  420. #ifndef _SERVER_DLL
  421.  
  422. class CStockObj;
  423.  
  424. //internal client defines to call into .srv dll
  425. //typedef int (CALLBACK* SERVERPARSE_CALLBACK)(char *,DWORD,CStockObj *,int,CServerObject *);
  426.  
  427. //OLD BAD DEFINES
  428. //typedef BOOL (CALLBACK* SERVERINIT_CALLBACK)(CServerObject *,float fVersion,int iCServerObject,WXSINFO *pwxs);
  429. //typedef float (CALLBACK* SERVERWXS_GETAPIVERSION)();
  430.  
  431. extern "C" typedef BOOL (* SERVERINIT_CALLBACK)(CServerObject *,float fVersion,int iCServerObject,WXSINFO *pwxs);
  432. extern "C" typedef float (* SERVERWXS_GETAPIVERSION)();
  433.  
  434. #else
  435.  
  436. #endif
  437.  
  438. typedef int (* SERVERPARSE_CALLBACK)(char *,DWORD,CPUBSTOCKOBJ &,int,CServerObject *);
  439. typedef DWORD (* SRV_HANDLEREQUEST_CALLBACK)(CPUBSTOCKOBJ &,DWORD);
  440. typedef BOOL (* SERVERFORMAT_CALLBACK)(CString *,LPCSTR lpstrSymbol,DWORD dwSettings);
  441. typedef DWORD (* SRV_SETTINGSCREATE_CALLBACK)(void *buffer,DWORD len);
  442. typedef BOOL (* SRV_SETTINGSDELETE_CALLBACK)(DWORD dwSettings);
  443. typedef DWORD (* SRV_SETTINGSEDIT_CALLBACK)(DWORD dwSettings,int iWhichSetting);
  444. typedef DWORD (* SRV_SETTINGSGET_CALLBACK)(DWORD dwSettings,void **lpBuf,LPDWORD lpdwSize);
  445.  
  446. typedef int (* STOCKUPDATE_CALLBACK)(CPubSrvStockObj &pobj,DWORD dwSettings);
  447. typedef DWORD (* SRV_GETUSERPWD_CALLBACK)(DWORD dwSettings,
  448.                                          CString &sUsername,
  449.                                          CString &sPassword);
  450.  
  451.  
  452. typedef BOOL (* SERVERTICKERBAR_CALLBACK)(DWORD dwSettings,DWORD dwFlag,
  453.                                                   CPubDrawObject *dobj);
  454.  
  455.  
  456.  
  457.  
  458.  
  459. class CServerObject : public CObject
  460. {
  461. public:
  462.     DWORD m_dwSize;
  463.     CServerObject & operator=(CServerObject &srv);
  464.     void Serialize(CArchive &ar);
  465.     CString    m_sServerName;                //Server Name "My Server"
  466.     CString    m_httpAddress;                //http address "www.myaddress.com"
  467.     CString m_httpSQuoteFormat;            //http request format "/cgi-bin/quote?symbol=%s"
  468.     CString m_httpOQuoteFormat;            //http request format "/cgi-bin/quote?symbol=%s"
  469.     CString m_httpGraphFormat;            //http request format "/cgi-bin/quote?symbol=%s"
  470.     CString m_httpNewsFormat;            //http request format "/cgi-bin/quote?symbol=%s"
  471.     
  472.     CString m_httpHistoricalDataFormat;    //http request format "/cgi-bin/quote?symbol=%s"
  473.     CString m_httpSTickerLookupFormat;  //full http address of servers lookup symbol page
  474.     CString m_httpOSymbolLookup;
  475.     CString m_httpStockHomePageFormat;  //http request format "/cgi-bin/quote?symbol=%s"
  476.  
  477.     DWORD    m_srvCaps;                    //server capabilities
  478.     DWORD    m_srvCall;                    //callbacks enabled
  479.  
  480.     float    m_fApiVersion;                //store Api version here
  481.  
  482.     //intialize with 0 to use default buffer size or
  483.     //size to use a custom buffer size
  484.     DWORD    m_dwBufferSize;                //buffer size needed or 0 for default
  485.  
  486.     //only used when SRV_CAP_SQBATCH capability is enabled
  487.     //not supported at this time
  488.     DWORD    m_dwMaxSQBatch;                //max # of quotes at one time
  489.                                         //currently not used. but will
  490.                                         //be in a future version
  491.  
  492.     //Used internally by WXS to store user/password info
  493.     CString    m_sUserId;                    //used with SRV_CAP_REQUIRESLOGIN    
  494.     CString m_sPassword;                // used with SRV_CAP_REQUIRESLOGIN
  495.  
  496.     enum {SRV_CAP_SQUOTE=1,            // can handle stock quotes
  497.         SRV_CAP_GRAPH=2,            // can display graphs
  498.         SRV_CAP_NEWS=4,                // can display news
  499.         SRV_CAP_HIST=8,                // can display quote history
  500.         SRV_CAP_STICKERLOOKUP=16,    //stock ticker lookup
  501.         SRV_CAP_GETSTOCKHTTP=32,    //can get http homepage of stock
  502.         SRV_CAP_INLINENEWS=64,        //gets news with quote
  503.         SRV_CAP_CANUPDATENEWS=128,    //can check for news updates
  504.         SRV_CAP_REQUIRESLOGIN=256,    //need a userid and password to access
  505.         SRV_CAP_OQUOTE=512,            //supports option quotes
  506.         SRV_CAP_SQBATCH=1024,        //batch quote support (NOT SUPPORTED YET)
  507.         SRV_CAP_FILEEXPORT=2048,        //support file exports
  508.         SRV_CAP_OSYMBOLLOOKUP=4096,    //supports option symbol lookups
  509.         SRV_CAP_SETTINGS=8192,        //has settings dialog
  510.         SRV_CAP_TICKERBAR=16384,    //server has a tickerbar callback
  511.     };
  512.  
  513.     
  514.     //parsing callbacks
  515.     SERVERPARSE_CALLBACK m_lpParseCallback;        //stock quote parsing
  516.     SERVERPARSE_CALLBACK m_lpNParseCallback;    //news parsing
  517.     SERVERPARSE_CALLBACK m_lpOParseCallback;    //option quote parsing
  518.  
  519.     //format request callbacks
  520.     SERVERFORMAT_CALLBACK m_lpFormatSQuote;        //format stock quote req
  521.     SERVERFORMAT_CALLBACK m_lpFormatGraph;        //format graph req
  522.     SERVERFORMAT_CALLBACK m_lpFormatNews;        //format news req
  523.     SERVERFORMAT_CALLBACK m_lpFormatOQuote;        //format option quote
  524.  
  525.     //settings callbacks SRV_CAP_SETTINGS should be enabled
  526.     SRV_SETTINGSCREATE_CALLBACK m_lpCreateSettings; //CreateSettings
  527.     SRV_SETTINGSDELETE_CALLBACK m_lpDeleteSettings;    //DeleteSettings
  528.     SRV_SETTINGSEDIT_CALLBACK m_lpEditSettings;        //EditSettings
  529.     SRV_SETTINGSGET_CALLBACK m_lpGetSettings;        //GetSettings
  530.     //must be defined if SRV_CAP_REQUIRESLOGIN flag is
  531.     //set
  532.     SRV_GETUSERPWD_CALLBACK        m_lpGetUserInfo;    //GetUserInfo
  533.  
  534.     //handlerequest callback
  535.     SRV_HANDLEREQUEST_CALLBACK    m_lpHandleRequest;    //HandleRequest
  536.  
  537.     STOCKUPDATE_CALLBACK        m_lpStockUpdate;        //StockUpdate
  538.  
  539.     SERVERTICKERBAR_CALLBACK    m_lpTickerBar;            //TickerBar
  540.  
  541.     //used internally by WXS
  542.     HMODULE    hMod;                                    //used to store .DLL module
  543.  
  544.     //used internally by client to store Map to server data
  545.     DWORD m_dwDefaultServerSettings;                //used internally by WXS
  546.  
  547.     DWORD GetSrvCaps() { return m_srvCaps;}
  548.  
  549.  
  550.     //constructor
  551.     CServerObject() {
  552.  
  553.     
  554.         m_lpParseCallback=NULL;    
  555.         m_lpNParseCallback=NULL;    
  556.         m_lpOParseCallback=NULL;
  557.     
  558.         m_lpFormatSQuote=NULL;    
  559.         m_lpFormatGraph=NULL;        
  560.         m_lpFormatNews=NULL;        
  561.         m_lpFormatOQuote=NULL;        
  562.     
  563.         m_lpCreateSettings=NULL; 
  564.         m_lpDeleteSettings=NULL;
  565.         m_lpGetSettings=NULL;        
  566.         m_lpHandleRequest=NULL;    
  567.         m_lpStockUpdate=NULL;
  568.         m_lpTickerBar=NULL;
  569.         m_dwDefaultServerSettings=0;
  570.         m_dwBufferSize=0;
  571.         hMod=0;
  572.  
  573.     };
  574. public:
  575.     DECLARE_SERIAL(CServerObject)
  576.     
  577. };
  578.  
  579.  
  580.  
  581. #endif
  582.