home *** CD-ROM | disk | FTP | other *** search
- /*
- *--- PHandleQuery.cpp ----------------------------------------------------
- * Copyright (c) 1995-96 Adobe Systems Incorporated. All rights reserved.
- * Created on Thu, Oct 12, 1995 @ 10:00 PM by Paul Ferguson.
- *
- * Description: For notes about this class, refer to the
- * PCL documentation file: PHandleQuery.html
- *-------------------------------------------------------------------------
- */
-
- #include "PMMemory.h"
- #include "PMCQErrs.h"
- #include "PQuery.h"
- #include "PHandleQuery.h"
-
- #include "CIBasic.h"
- #include "CIInterfaceManager.h"
- #include "PMInterfaceIDs.h"
-
- extern PMMessage * gPMMessage;
-
- PHandleQuery::PHandleQuery()
- : itsHandle(0), replyPtr(0)
- {
-
- }
-
- PHandleQuery::PHandleQuery (const ePMQuery op)
- : itsHandle(0), replyPtr(0)
- {
- PQuery query(op, itsHandle);
- InitHandle();
- }
-
- PHandleQuery::PHandleQuery(ePMQuery op, PRequestBuf& request)
- : itsHandle(0), replyPtr(0)
- {
- PQuery query(op, request, itsHandle);
- InitHandle();
- }
-
- PHandleQuery::~PHandleQuery()
- {
- if (itsHandle)
- {
- /* CIBasic * basicInterface;
- gPMMessage->pInterfaceMgr->AcquirePMInterface(PMIID_BASIC, (void **) &basicInterface);
- basicInterface->PMMemFree(bufHdl);
- gPMMessage->pInterfaceMgr->ReleasePMInterface(basicInterface); */
- MMFree(itsHandle);
- }
- }
-
-
- void PHandleQuery::InitHandle() throw (PMErr)
- {
- if (itsHandle == NULL)
- throw CQ_FAILURE;
-
- replyPtr = (const char *) MMLock(itsHandle);
- }
-
- // end of PHandleQuery.cpp
-