Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Member Functions | Private Attributes
PRTQUEUE Class Reference

List of all members.

Public Member Functions

 PRTQUEUE (const PRQINFO3 *pPQI3)
 PRTQUEUE (const PRTQUEUE &PQInfo)
 ~PRTQUEUE (void)
PRQINFO3 & PQI3 () const
const char * DriverName () const
const char * DeviceName () const
const char * PrinterName () const
const char * QueueName () const

Private Member Functions

PRTQUEUEoperator= (const PRTQUEUE &z)
void InitWithPQI3 (const PRQINFO3 *pInfo)

Private Attributes

PRQINFO3 * mpPQI3
unsigned mPQI3BufSize
char mDriverName [DRIV_NAME_SIZE+1]
char mDeviceName [DRIV_DEVICENAME_SIZE+1]
char mPrinterName [PRINTERNAME_SIZE+1]

Detailed Description

Definition at line 596 of file nsDeviceContextSpecOS2.cpp.


Constructor & Destructor Documentation

PRTQUEUE::PRTQUEUE ( const PRQINFO3 *  pPQI3) [inline]

Definition at line 599 of file nsDeviceContextSpecOS2.cpp.

{ InitWithPQI3 (pPQI3); }

Here is the call graph for this function:

Definition at line 621 of file nsDeviceContextSpecOS2.cpp.

{
   mPQI3BufSize = PQInfo.mPQI3BufSize;
   mpPQI3 = (PRQINFO3*)malloc (mPQI3BufSize);
   memcpy (mpPQI3, PQInfo.mpPQI3, mPQI3BufSize);    // Copy entire buffer

   long Diff = (long)mpPQI3 - (long)PQInfo.mpPQI3;  // Calculate the difference between addresses
   SHIFT_PTR (mpPQI3->pszName,       Diff);         // Modify internal pointers accordingly
   SHIFT_PTR (mpPQI3->pszSepFile,    Diff);
   SHIFT_PTR (mpPQI3->pszPrProc,     Diff);
   SHIFT_PTR (mpPQI3->pszParms,      Diff);
   SHIFT_PTR (mpPQI3->pszComment,    Diff);
   SHIFT_PTR (mpPQI3->pszPrinters,   Diff);
   SHIFT_PTR (mpPQI3->pszDriverName, Diff);
   SHIFT_PTR (mpPQI3->pDriverData,   Diff);

   strcpy (mDriverName, PQInfo.mDriverName);
   strcpy (mDeviceName, PQInfo.mDeviceName);
   strcpy (mPrinterName, PQInfo.mPrinterName);
}

Here is the call graph for this function:

PRTQUEUE::~PRTQUEUE ( void  ) [inline]

Definition at line 601 of file nsDeviceContextSpecOS2.cpp.

{ free (mpPQI3); }

Member Function Documentation

const char* PRTQUEUE::DeviceName ( ) const [inline]

Definition at line 605 of file nsDeviceContextSpecOS2.cpp.

{ return mDeviceName; }
const char* PRTQUEUE::DriverName ( ) const [inline]

Definition at line 604 of file nsDeviceContextSpecOS2.cpp.

{ return mDriverName; }

Here is the caller graph for this function:

void PRTQUEUE::InitWithPQI3 ( const PRQINFO3 *  pInfo) [private]

Definition at line 642 of file nsDeviceContextSpecOS2.cpp.

{
   // Make local copy of PPRQINFO3 object
   ULONG SizeNeeded;
   ::SplQueryQueue (NULL, pInfo->pszName, 3, NULL, 0, &SizeNeeded);
   mpPQI3 = (PRQINFO3*)malloc (SizeNeeded);
   ::SplQueryQueue (NULL, pInfo->pszName, 3, mpPQI3, SizeNeeded, &SizeNeeded);

   mPQI3BufSize = SizeNeeded;

   PCHAR sep = strchr (pInfo->pszDriverName, '.');

   if (sep)
   {
      *sep = '\0';
      strcpy (mDriverName, pInfo->pszDriverName);
      strcpy (mDeviceName, sep + 1);
      *sep = '.';
   } else
   {
      strcpy (mDriverName, pInfo->pszDriverName);
      mDeviceName [0] = '\0';
   }


   sep = strchr (pInfo->pszPrinters, ',');

   if (sep)
   {
      *sep = '\0';
      strcpy (mPrinterName, pInfo->pszPrinters);
      *sep = '.';
   } else
   {
      strcpy (mPrinterName, pInfo->pszPrinters);
   }
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRTQUEUE& PRTQUEUE::operator= ( const PRTQUEUE z) [private]
PRQINFO3& PRTQUEUE::PQI3 ( ) const [inline]

Definition at line 603 of file nsDeviceContextSpecOS2.cpp.

{ return *mpPQI3; }

Here is the caller graph for this function:

const char* PRTQUEUE::PrinterName ( ) const [inline]

Definition at line 606 of file nsDeviceContextSpecOS2.cpp.

{ return mPrinterName; }
const char* PRTQUEUE::QueueName ( ) const [inline]

Definition at line 607 of file nsDeviceContextSpecOS2.cpp.

{ return mpPQI3->pszComment; }

Member Data Documentation

char PRTQUEUE::mDeviceName[DRIV_DEVICENAME_SIZE+1] [private]

Definition at line 616 of file nsDeviceContextSpecOS2.cpp.

char PRTQUEUE::mDriverName[DRIV_NAME_SIZE+1] [private]

Definition at line 615 of file nsDeviceContextSpecOS2.cpp.

PRQINFO3* PRTQUEUE::mpPQI3 [private]

Definition at line 613 of file nsDeviceContextSpecOS2.cpp.

unsigned PRTQUEUE::mPQI3BufSize [private]

Definition at line 614 of file nsDeviceContextSpecOS2.cpp.

char PRTQUEUE::mPrinterName[PRINTERNAME_SIZE+1] [private]

Definition at line 617 of file nsDeviceContextSpecOS2.cpp.


The documentation for this class was generated from the following file: