26
|
1 |
/*
|
|
2 |
* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: Screensaver GifAnimation plug-in API file
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
#include <ecom/implementationproxy.h>
|
|
23 |
#include <cecombrowserplugininterface.h>
|
|
24 |
|
|
25 |
|
|
26 |
#include "GifAnimationPlugin.h"
|
|
27 |
#include "GifAnimationUtils.h"
|
|
28 |
|
|
29 |
// ---------------------------------------------------------------------------
|
|
30 |
// Table of implementation UID / implementation class factory
|
|
31 |
// ---------------------------------------------------------------------------
|
|
32 |
//
|
|
33 |
const TImplementationProxy KImplementationTable[] =
|
|
34 |
{
|
|
35 |
{ { KGifAnimationPluginImplementationValue },
|
|
36 |
(TProxyNewLPtr) CGifAnimationPluginEcomMain::NewL
|
|
37 |
}
|
|
38 |
};
|
|
39 |
|
|
40 |
|
|
41 |
/************************************************************************/
|
|
42 |
/**********ECOM STYLE Screensaver GifAnimation plug-in ENTRY POINTS******/
|
|
43 |
/************************************************************************/
|
|
44 |
|
|
45 |
// ---------------------------------------------------------------------------
|
|
46 |
// Instance factory.
|
|
47 |
// ---------------------------------------------------------------------------
|
|
48 |
//
|
|
49 |
CGifAnimationPluginEcomMain* CGifAnimationPluginEcomMain::NewL(
|
|
50 |
TAny* aInitParam )
|
|
51 |
{
|
|
52 |
DBG_TRACE_FN_BEGIN;
|
|
53 |
TFuncs* funcs = REINTERPRET_CAST( TFuncs*, aInitParam);
|
|
54 |
CGifAnimationPluginEcomMain* self =
|
|
55 |
new( ELeave )CGifAnimationPluginEcomMain( funcs->iNetscapeFuncs );
|
|
56 |
CleanupStack::PushL(self);
|
|
57 |
self->Construct( funcs->iPluginFuncs );
|
|
58 |
CleanupStack::Pop();
|
|
59 |
DBG_TRACE_FN_END;
|
|
60 |
return self;
|
|
61 |
}
|
|
62 |
|
|
63 |
// ---------------------------------------------------------------------------
|
|
64 |
// Destructor.
|
|
65 |
// ---------------------------------------------------------------------------
|
|
66 |
//
|
|
67 |
CGifAnimationPluginEcomMain::~CGifAnimationPluginEcomMain()
|
|
68 |
{
|
|
69 |
DBG_TRACE_FN_BEGIN;
|
|
70 |
// nothing here
|
|
71 |
DBG_TRACE_FN_END;
|
|
72 |
}
|
|
73 |
|
|
74 |
// ---------------------------------------------------------------------------
|
|
75 |
// 2nd phase constructor.
|
|
76 |
// ---------------------------------------------------------------------------
|
|
77 |
//
|
|
78 |
void CGifAnimationPluginEcomMain::Construct( NPPluginFuncs* aPluginFuncs )
|
|
79 |
{
|
|
80 |
DBG_TRACE_FN_BEGIN;
|
|
81 |
InitializeFuncs( aPluginFuncs );
|
|
82 |
DBG_TRACE_FN_END;
|
|
83 |
}
|
|
84 |
|
|
85 |
// ---------------------------------------------------------------------------
|
|
86 |
// Initializes NPP with pointers to implementing functions.
|
|
87 |
// ---------------------------------------------------------------------------
|
|
88 |
//
|
|
89 |
NPError CGifAnimationPluginEcomMain::InitializeFuncs( NPPluginFuncs* aPpf )
|
|
90 |
{
|
|
91 |
DBG_TRACE_FN_BEGIN;
|
|
92 |
aPpf->size = sizeof(NPPluginFuncs);
|
|
93 |
aPpf->version = 1;
|
|
94 |
aPpf->newp = NewNPP_NewProc( GifAnimationPluginNewp );
|
|
95 |
aPpf->destroy = NewNPP_DestroyProc( GifAnimationPluginDestroy );
|
|
96 |
aPpf->setwindow = NewNPP_SetWindowProc( GifAnimationPluginSetWindow );
|
|
97 |
aPpf->newstream = NewNPP_NewStreamProc( GifAnimationPluginNewStream );
|
|
98 |
aPpf->destroystream = NewNPP_DestroyStreamProc(
|
|
99 |
GifAnimationPluginDestroyStream );
|
|
100 |
aPpf->asfile = NewNPP_StreamAsFileProc( GifAnimationPluginAsFile );
|
|
101 |
aPpf->writeready = NewNPP_WriteReadyProc(
|
|
102 |
GifAnimationPluginWriteReady );
|
|
103 |
aPpf->write = NewNPP_WriteProc( GifAnimationPluginWrite );
|
|
104 |
aPpf->print = NewNPP_PrintProc( GifAnimationPluginPrint );
|
|
105 |
aPpf->event = NewNPP_HandleEventProc( GifAnimationPluginEvent );
|
|
106 |
aPpf->urlnotify = NewNPP_URLNotifyProc( GifAnimationPluginURLNotify );
|
|
107 |
aPpf->javaClass = NULL;
|
|
108 |
aPpf->getvalue = NewNPP_GetValueProc( GifAnimationPluginGetValue );
|
|
109 |
aPpf->setvalue = NewNPP_SetValueProc( GifAnimationPluginSetValue );
|
|
110 |
|
|
111 |
DBG_TRACE_FN_END;
|
|
112 |
return NPERR_NO_ERROR;
|
|
113 |
}
|
|
114 |
|
|
115 |
// ---------------------------------------------------------------------------
|
|
116 |
// Constructor.
|
|
117 |
// ---------------------------------------------------------------------------
|
|
118 |
//
|
|
119 |
CGifAnimationPluginEcomMain::CGifAnimationPluginEcomMain(
|
|
120 |
NPNetscapeFuncs* aNpf )
|
|
121 |
: CEcomBrowserPluginInterface(), iNpf( aNpf )
|
|
122 |
{
|
|
123 |
DBG_TRACE_FN_BEGIN;
|
|
124 |
//
|
|
125 |
DBG_TRACE_FN_END;
|
|
126 |
}
|
|
127 |
|
|
128 |
// ---------------------------------------------------------------------------
|
|
129 |
// Returns the filters implemented in this DLL
|
|
130 |
// Returns: The filters implemented in this DLL
|
|
131 |
// ---------------------------------------------------------------------------
|
|
132 |
//
|
|
133 |
EXPORT_C const TImplementationProxy* ImplementationGroupProxy(
|
|
134 |
TInt& aTableCount )
|
|
135 |
{
|
|
136 |
DBG_TRACE_FN_BEGIN;
|
|
137 |
aTableCount = sizeof( KImplementationTable )
|
|
138 |
/ sizeof( TImplementationProxy );
|
|
139 |
DBG_TRACE_FN_END;
|
|
140 |
return KImplementationTable;
|
|
141 |
}
|
|
142 |
|
|
143 |
#ifndef EKA2
|
|
144 |
// ---------------------------------------------------------------------------
|
|
145 |
// The E32Dll() entry point function. Deprecated.
|
|
146 |
// ---------------------------------------------------------------------------
|
|
147 |
//
|
|
148 |
GLDEF_C TInt E32Dll(TDllReason /*aReason*/)
|
|
149 |
{
|
|
150 |
DBG_TRACE_FN_BEGIN;
|
|
151 |
//
|
|
152 |
DBG_TRACE_FN_END;
|
|
153 |
return KErrNone;
|
|
154 |
}
|
|
155 |
#endif // EKA2
|