Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

developerWorks Community:

  • Close [x]

Intro to XPCOM, Part 4

Component development

Return to article

/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIGPS.idl
 */

#ifndef __gen_nsIGPS_h__
#define __gen_nsIGPS_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif

/* starting interface:    mozIGPS */
#define MOZIGPS_IID_STR "1bdc2ee0-e92a-11d4-bcc0-0060089296cb"

#define MOZIGPS_IID \
  {0x1bdc2ee0, 0xe92a, 0x11d4, \
    { 0xbc, 0xc0, 0x00, 0x60, 0x08, 0x92, 0x96, 0xcb }}

class NS_NO_VTABLE mozIGPS : public nsISupports {
 public:

  NS_DEFINE_STATIC_IID_ACCESSOR(MOZIGPS_IID)

  /* boolean Open (in string strDevice); */
  NS_IMETHOD Open(const char *strDevice, PRBool *_retval) = 0;

  /* boolean Close (); */
  NS_IMETHOD Close(PRBool *_retval) = 0;

  /* readonly attribute double latitude; */
  NS_IMETHOD GetLatitude(double *aLatitude) = 0;

  /* readonly attribute double longitude; */
  NS_IMETHOD GetLongitude(double *aLongitude) = 0;

  /* readonly attribute double elevation; */
  NS_IMETHOD GetElevation(double *aElevation) = 0;

  /* readonly attribute double gpstime; */
  NS_IMETHOD GetGpstime(double *aGpstime) = 0;

  /* string Reason (in boolean bClear); */
  NS_IMETHOD Reason(PRBool bClear, char **_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_MOZIGPS \
  NS_IMETHOD Open(const char *strDevice, PRBool *_retval); \
  NS_IMETHOD Close(PRBool *_retval); \
  NS_IMETHOD GetLatitude(double *aLatitude); \
  NS_IMETHOD GetLongitude(double *aLongitude); \
  NS_IMETHOD GetElevation(double *aElevation); \
  NS_IMETHOD GetGpstime(double *aGpstime); \
  NS_IMETHOD Reason(PRBool bClear, char **_retval);

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_MOZIGPS(_to) \
  NS_IMETHOD Open(const char *strDevice, PRBool *_retval) { return _to ## Open(strDevice, _retval); } \
  NS_IMETHOD Close(PRBool *_retval) { return _to ## Close(_retval); } \
  NS_IMETHOD GetLatitude(double *aLatitude) { return _to ## GetLatitude(aLatitude); } \
  NS_IMETHOD GetLongitude(double *aLongitude) { return _to ## GetLongitude(aLongitude); } \
  NS_IMETHOD GetElevation(double *aElevation) { return _to ## GetElevation(aElevation); } \
  NS_IMETHOD GetGpstime(double *aGpstime) { return _to ## GetGpstime(aGpstime); } \
  NS_IMETHOD Reason(PRBool bClear, char **_retval) { return _to ## Reason(bClear, _retval); }

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class _MYCLASS_ : public mozIGPS
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_MOZIGPS

  _MYCLASS_();
  virtual ~_MYCLASS_();
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, mozIGPS)

_MYCLASS_::_MYCLASS_()
{
  NS_INIT_ISUPPORTS();
  /* member initializers and constructor code */
}

_MYCLASS_::~_MYCLASS_()
{
  /* destructor code */
}

/* boolean Open (in string strDevice); */
NS_IMETHODIMP _MYCLASS_::Open(const char *strDevice, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean Close (); */
NS_IMETHODIMP _MYCLASS_::Close(PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute double latitude; */
NS_IMETHODIMP _MYCLASS_::GetLatitude(double *aLatitude)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute double longitude; */
NS_IMETHODIMP _MYCLASS_::GetLongitude(double *aLongitude)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute double elevation; */
NS_IMETHODIMP _MYCLASS_::GetElevation(double *aElevation)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute double gpstime; */
NS_IMETHODIMP _MYCLASS_::GetGpstime(double *aGpstime)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* string Reason (in boolean bClear); */
NS_IMETHODIMP _MYCLASS_::Reason(PRBool bClear, char **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


#endif /* __gen_nsIGPS_h__ */

Return to article