Back to index

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

#include <MRJPage.h>

Collaboration diagram for MRJPage:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MRJPage (MRJSession *session, UInt32 documentID, const char *codeBase, const char *archive, Boolean mayScript)
 MRJPage (MRJSession *session, const MRJPageAttributes &attributes)
 ~MRJPage ()
UInt16 AddRef (void)
UInt16 Release (void)
JMAppletPageRef getPageRef ()
UInt32 getDocumentID ()
const char * getCodeBase ()
const char * getArchive ()
Boolean getMayScript ()
Boolean createContext (JMAWTContextRef *outContext, const JMAWTContextCallbacks *callbacks, JMClientData data)
MRJPagegetNextPage (void)
 MRJPage (MRJSession *session, UInt32 documentID, const char *codeBase, const char *archive, Boolean mayScript)
 MRJPage (MRJSession *session, const MRJPageAttributes &attributes)
 ~MRJPage ()
UInt16 AddRef (void)
UInt16 Release (void)
UInt32 getDocumentID ()
const char * getCodeBase ()
const char * getArchive ()
Boolean getMayScript ()
MRJPagegetNextPage (void)

Static Public Member Functions

static MRJPagegetFirstPage (void)
static MRJPagegetFirstPage (void)

Private Member Functions

void pushPage ()
void popPage ()
void pushPage ()
void popPage ()

Private Attributes

UInt16 mRefCount
MRJPagemNextPage
MRJSessionmSession
JMAppletPageRef mPageRef
UInt32 mDocumentID
char * mCodeBase
char * mArchive
Boolean mMayScript

Detailed Description

Definition at line 67 of file MRJPage.h.


Constructor & Destructor Documentation

MRJPage::MRJPage ( MRJSession session,
UInt32  documentID,
const char *  codeBase,
const char *  archive,
Boolean  mayScript 
)

Definition at line 50 of file MRJPage.cpp.

       :      mRefCount(0), mNextPage(NULL), mSession(session), mPageRef(NULL),
              mDocumentID(documentID), mCodeBase(strdup(codeBase)), mArchive(strdup(archive)), mMayScript(mayScript)
{
       pushPage();

       if (&::JMNewAppletPage != NULL) {
              OSStatus status = ::JMNewAppletPage(&mPageRef, session->getSessionRef());
              if (status != noErr) mPageRef = NULL;
       }
}

Here is the call graph for this function:

MRJPage::MRJPage ( MRJSession session,
const MRJPageAttributes attributes 
)

Definition at line 62 of file MRJPage.cpp.

       :      mRefCount(0), mNextPage(NULL), mSession(session), mPageRef(NULL),
              mDocumentID(attributes.documentID), mCodeBase(strdup(attributes.codeBase)),
              mArchive(strdup(attributes.archive)), mMayScript(attributes.mayScript)
{
       pushPage();

       if (&::JMNewAppletPage != NULL) {
              OSStatus status = ::JMNewAppletPage(&mPageRef, session->getSessionRef());
              if (status != noErr) mPageRef = NULL;
       }
}

Here is the call graph for this function:

Definition at line 75 of file MRJPage.cpp.

{
       popPage();
       
       if (&::JMDisposeAppletPage != NULL && mPageRef != NULL) {
              OSStatus status = ::JMDisposeAppletPage(mPageRef);
              mPageRef = NULL;
       }
       
       if (mCodeBase != NULL) {
              delete[] mCodeBase;
              mCodeBase = NULL;
       }
       
       if (mArchive != NULL) {
              delete[] mArchive;
              mArchive = NULL;
       }
}

Here is the call graph for this function:

MRJPage::MRJPage ( MRJSession session,
UInt32  documentID,
const char *  codeBase,
const char *  archive,
Boolean  mayScript 
)
MRJPage::MRJPage ( MRJSession session,
const MRJPageAttributes attributes 
)

Member Function Documentation

Definition at line 95 of file MRJPage.cpp.

{
       return (++mRefCount);
}
Boolean MRJPage::createContext ( JMAWTContextRef *  outContext,
const JMAWTContextCallbacks *  callbacks,
JMClientData  data 
)

Definition at line 109 of file MRJPage.cpp.

{
       OSStatus status = noErr;
       if (&::JMNewAWTContextInPage != NULL && mPageRef != NULL) {
              status = ::JMNewAWTContextInPage(outContext, mSession->getSessionRef(), mPageRef, callbacks, data);
       } else {
              status = ::JMNewAWTContext(outContext, mSession->getSessionRef(), callbacks, data);
       }
       return (status == noErr);
}

Here is the call graph for this function:

const char* MRJPage::getArchive ( ) [inline]

Definition at line 69 of file MRJPage.h.

{ return mArchive; }
const char* MRJPage::getArchive ( ) [inline]

Definition at line 81 of file MRJPage.h.

{ return mArchive; }
const char* MRJPage::getCodeBase ( ) [inline]

Definition at line 68 of file MRJPage.h.

{ return mCodeBase; }
const char* MRJPage::getCodeBase ( ) [inline]

Definition at line 80 of file MRJPage.h.

{ return mCodeBase; }

Definition at line 67 of file MRJPage.h.

{ return mDocumentID; }

Definition at line 79 of file MRJPage.h.

{ return mDocumentID; }
static MRJPage* MRJPage::getFirstPage ( void  ) [static]

Definition at line 122 of file MRJPage.cpp.

{
       return thePageList;
}

Definition at line 70 of file MRJPage.h.

{ return mMayScript; }

Definition at line 82 of file MRJPage.h.

{ return mMayScript; }

Definition at line 127 of file MRJPage.cpp.

{
       return mNextPage;
}

Definition at line 77 of file MRJPage.h.

{ return mPageRef; }
void MRJPage::popPage ( ) [private]
void MRJPage::popPage ( ) [private]

Definition at line 139 of file MRJPage.cpp.

{
       // Remove this page from the global list.
       MRJPage** link = &thePageList;
       MRJPage* page  = *link;
       while (page != NULL) {
              if (page == this) {
                     *link = mNextPage;
                     mNextPage = NULL;
                     break;
              }
              link = &page->mNextPage;
              page = *link;
       }
}

Here is the caller graph for this function:

void MRJPage::pushPage ( ) [private]
void MRJPage::pushPage ( ) [private]

Definition at line 132 of file MRJPage.cpp.

{
       // put this on the global list of pages.
       mNextPage = thePageList;
       thePageList = this;
}

Here is the caller graph for this function:

Definition at line 100 of file MRJPage.cpp.

{
       UInt16 result = --mRefCount;
       if (result == 0) {
              delete this;
       }
       return result;
}

Member Data Documentation

char * MRJPage::mArchive [private]

Definition at line 104 of file MRJPage.h.

char * MRJPage::mCodeBase [private]

Definition at line 103 of file MRJPage.h.

Definition at line 102 of file MRJPage.h.

Definition at line 105 of file MRJPage.h.

Definition at line 99 of file MRJPage.h.

Definition at line 101 of file MRJPage.h.

Definition at line 98 of file MRJPage.h.

Definition at line 100 of file MRJPage.h.


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