Closed Bug 108766 Opened 23 years ago Closed 23 years ago

extend nsICmdLineHandler to expose a method that gets called on startup

Categories

(MailNews Core :: Simple MAPI, defect, P1)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 56654
mozilla0.9.7

People

(Reporter: rdayal, Assigned: kkhandrika)

References

(Blocks 1 open bug)

Details

There is a need to execute some code as part of Mozilla startup when mozilla is
started with 'MAPIStartup' command line arguments. The current nsICmdLineHandler
is tied to bringing up a window using a chrome URL where as in this case Mozilla
should come up with no UI and hence no chrome is associated with it.

A default implementation of this method should be provided and could be
overwritten by different modules to do things specific to that module.

As per suggestion recieved from Seth and Mike Shaver, this method should look like :
 
PRUint32 onCommandLineSwitch(in [array,size_is(len)] string argv, in
                             PRUint32 len, in PRUint32 offset);

where offset is the argc at which the switch was found, and the return value is
the number of arguments consumed.

This method should be called from an appropriate place in nsAppRunner.
Blocks: 104672
Blocks: 103785
Quick, how does this differ from 56654's intent, which is to add the ability to
perform arbitrary processing at startup, based on the command-line interface?

There's even a patch there, and stuff.
I thought the idea was to turn bug 56654 into the rewrite from scratch bug, and
this one would track the hack over the current stuff.
I think we should do what we do for all the other API freezings, and file a
master nsICmdLineInterface freeze bug, with 56654 and other more specific
complaints as dependencies.

56654 has a (tested, but long ago) patch to do exactly what this bug is
purporting to want, with minimal change to the existing interface, which seems
basically _exactly_ what this bug needs.
I think that we should wait and fix 56654 in the context of a more complete
clean-up, but that holds true for this effective duplicate as well.
This bug needs to be fixed for simple MAPI trunk landing.

For detailed explanation, please see bug 102821. (Browser page started up when I
initiate a simple MAPI transaction.) mscott produced a patch for this bug for
simple MAPI branch landing at that time, and suggested that the patch
needs to be moved to a better place for trunk landing.  Copied below comments
#10 in that bug.

------ Additional Comment #10 From mscott@netscape.com 2001-10-08 14:43 -------

btw, this patch would not go into the trunk. For this to go into the trunk the
hacked up logic I added to nsAppRunner.cpp would need to get moved to a new
class in the mapi code. This class would support command line handling for mapi
(nsICommandLineHandler).... 


Priority: -- → P1
Target Milestone: --- → mozilla0.9.7
For more info about why this is needed for trunk landing of sMAPI, see also bug
103785.

Trunk landing for simple MAPI is the NO.1 objective for the simple MAPI project
team.

*** This bug has been marked as a duplicate of 56654 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
verified dupe
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.