home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / macfe / central / InternetConfig.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.0 KB  |  89 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. //
  20. // InternetConfig.h
  21. //
  22. // MacFE interface to its support for Apple Internet Config
  23. //
  24. // Created by Tim Craycroft, 2/11/96
  25. //
  26. //
  27.  
  28. #pragma once
  29.  
  30. #include "ICAPI.h"
  31.  
  32. // Always call.
  33. //
  34. // This will determine if InternetConfig is present
  35. // and do the right thing.
  36. //
  37. // Everything else is taken care of behind the scenes.
  38. //
  39.  
  40. // Note:
  41. //------
  42. // It reads "Everything else is taken care of behind the scenes" and that's right:
  43. // the API below is ok. That's the "everything else" which is sub optimal.
  44. // If you need to add a method in CInternetConfigInterface, I recommend you to
  45. // have a look at how LaunchInternetConfigApplication() and GetInternetConfigString()
  46. // are implemented. For a single method here, you need two methods "behind the scenes".
  47.  
  48. class CInternetConfigInterface
  49. {
  50.     public:
  51.  
  52.         static     Boolean    CurrentlyUsingIC(void);
  53.             // returns true iff IC is installed and we're listening to it
  54.  
  55.         static    ICError    LaunchInternetConfigApplication(ConstStr255Param key);
  56.             // Lauches the app and opens one of the config panels (if specified).
  57.             // The list of keys is in <ICKeys.h>.
  58.  
  59.         static    void    ConnectToInternetConfig();
  60.             // gets the folder from CPrefs::GetFilePrototype(prefSpec(, MainFolder)
  61.  
  62.         static    void    DisconnectFromInternetConfig();
  63.             // yeah, like this gets called
  64.  
  65.         static    void    GetInternetConfigString(ConstStr255Param icKey,
  66.                                                 Str255 s,
  67.                                                 long *port= nil);
  68.             // If an error is encountered, s is set to "\p".
  69.             // If port is not nil, then the following assumptions are made:
  70.             //   * The string is a server name that may be have a ":portnumber"
  71.             //     appended to it.
  72.             //   * The initial value of *port is the default port number.
  73.             // If port is not nil, then the returned string will have the ":number"
  74.             // stripped and the *port value will be the port specified by the
  75.             // user.
  76.  
  77.         static    ICError    GetInternetConfigFileMapping(    OSType fileType,
  78.                                                         OSType creator,
  79.                                                         ConstStr255Param filename,
  80.                                                         ICMapEntry *ent);
  81.                                                         
  82. #ifndef MOZ_MAIL_NEWS
  83.         static    ICError    SendInternetConfigURL(char *address);
  84. #endif
  85.             
  86.         static    void    ResumeEvent();
  87.             // somebody call me when I need to check the IC seed value
  88. };
  89.