Summary of the invention
In view of this, fundamental purpose of the present invention is to provide a kind of mutual method of expansion module that realizes application program and document file library system in relating to the application scenarios of document file library system, can be by between application program and expansion module mutual, the user who realizes application program is more effective, more fine granularity control expansion module, and the function of using more easily control module to provide, the final function of more effectively coming extensive documentation storehouse system by expansion module.
Another object of the present invention is to provide a kind of application program and expansion module mutual system of realizing in relating to the application scenarios of document file library system, can be by between application program and expansion module mutual, the user who realizes application program is more effective, more fine granularity control expansion module, and the function of using more easily control module to provide, the final function of more effectively coming extensive documentation storehouse system by expansion module.
For achieving the above object, technical scheme of the present invention specifically is achieved in that
A kind of mutual method of expansion module that realizes application program and document file library system is characterized in that, the method comprises:
Described application program is enumerated the expansion module data in the document current page, and according to the expansion module ID of appointment in the expansion module data, registered expansion module interface in the inquiry document file library system finds the expansion module interface corresponding with this expansion module ID;
Application program or document file library system are responsible for creating the expansion module example establishment interface of expansion module example, to create the expansion module example take the expansion module data as parameter in the invoke extensions module interface.
Also comprise after the method: described application program or document file library system use the expansion module example in document file library system;
After being used to complete, the method also comprises: destroy the expansion module example.
Described application program uses the expansion module that creates to comprise: interface alternation, and/or interacting message.
Described application program uses the method for the expansion module that creates to be: by realizing alternately between the expansion module window of described application program and establishment.
Also comprised before described application program and expansion module window are mutual: the display window interface of described application call expansion module creates the expansion module window; Also comprise after window is mutual: the interface that closes window of described application call expansion module after being used to complete, close the expansion module window that has created.
After creating the expansion module window, the method also comprises: the basic feature information that changes the expansion module window.
The method of the basic feature information of described change expansion module window is:
The message interface of described application call expansion module sends to expansion module with the basic feature information of the window after changing; Expansion module changes self window according to the basic feature information that receives.
Described basic feature information comprises position and/or size information.
After creating the expansion module window, before closing the expansion module window, the method also comprises:
Described expansion module calls from the reverse message interface of application program and sends out message to application program.
The described message that sends to application program is: change the interface change request of Application Program Interface;
Described application program changes Application Program Interface according to the information in the interface change request that receives;
After Application Program Interface used, expansion module used the reverse message interface of application program, sent the interface change to application program and cancelled request, and application program is cancelled the change of Application Program Interface.
Described application program uses the method for the expansion module that creates to be:
Described application call message interface sends to expansion module with corresponding information, and expansion module operates according to the information that receives;
Perhaps, the message interface of described application call expansion module sends to expansion module with reverse message interface.
The method of described destruction expansion module example is: the expansion module example that the expansion module example of the current use of described application call is corresponding is destroyed interface and is destroyed described expansion module example.
Described expansion module is the Streaming Media expansion module, and the method also comprises: described application program sends the information that is used for controlling streaming media playing to the Streaming Media expansion module.
The particular extension module of described expansion module for supporting that the overall situation arranges; The method also comprises:
Described application program setting and particular extension module are mutual arranges the interface; The user is by arranging the interface, the overall situation setting of management particular extension module;
When described management checks that for the user overall situation arranges, the application call expansion module obtain the interface that the overall situation arranges, obtain the overall configuration information of related expanding module, and be presented at and arrange in the interface;
When described management arranged for the user revises the overall situation, described application program revised with the invoke extensions module interface that the overall situation arranges, and modification information is passed to the particular extension module, and the particular extension module is carried out corresponding change according to the modification information that receives.
A kind of mutual system of expansion module that realizes application program and document file library system, this system comprises application program and document file library system at least, wherein,
Application program is used for enumerating the expansion module data of document current page, and sends the predefined instruction that includes expansion module ID to document file library system;
Application program or document file library system be take the expansion module data as parameter, calls the expansion module example of being responsible for creating the expansion module example in the expansion module interface of acquisition and create interface, to create the expansion module example;
Document file library system, the expansion module ID for carrying according to the predefined instruction that receives inquires about self registered expansion module interface, finds the expansion module interface corresponding with this expansion module ID and returns to application program.
As seen from the above technical solution, the present invention includes application program and create the expansion module example; Application program is used the expansion module that creates, and destroys the expansion module example after being used to complete.By method provided by the invention, in relating to the application scenarios of document file library system, realized mutual between application program and expansion module.Mutual by between application program of the present invention and expansion module, the user who has realized application program is more effective, more fine granularity control expansion module, and the function of using more easily control module to provide, finally realized more effectively coming by expansion module the function of extensive documentation storehouse system.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, referring to the accompanying drawing preferred embodiment that develops simultaneously, the present invention is described in more detail.
Fig. 1 is the mutual process flow diagram of application program of the present invention and expansion module, comprises the following steps:
Step 100: application program creates the expansion module example.
This step specific implementation comprises:
At first, application program is enumerated the expansion module data in the document current page;
Here, the expansion module data comprise expansion module ID and expansion module real data two parts.
Secondly, application program is according to the expansion module ID in above-mentioned expansion module data, and registered expansion module interface in the inquiry document file library system finds the expansion module interface corresponding with this expansion module ID;
In document file library system, store the corresponding relation of expansion module ID and expansion module interface.
Here, the specific implementation of expansion module interface can adopt as operating system API or alternate manner and realize, specific implementation belongs to those skilled in the art's conventional techniques means, and the present invention does not emphasize the concrete methods of realizing of interface.
At last, application program is responsible for creating the expansion module example establishment interface of expansion module example, to create the expansion module example take the expansion module data as parameter in the invoke extensions module interface.Need to prove, the establishment of expansion module also can be realized by document file library system.
Adopt the function mode as example take the expansion module interface, the expansion module data as function parameter, are passed to the expansion module interface with the expansion module data.
Step 101: application program is used the expansion module example that creates.
Use can comprise interface alternation, and/or interacting message etc.Need to prove, document file library system also can use the expansion module that creates.
For interface alternation, can comprise create the expansion module window, to destroy the expansion module window mutual, also might comprise changing the expansion module window size or position, change Application Program Interface etc. are mutual; For interacting message, can comprise and use message, transmit the mutual etc. of reverse message interface.
Step 102: application program is destroyed the expansion module example.
In this step, application program is destroyed interface by expansion module example corresponding to expansion module example that calls current use and is destroyed unwanted expansion module example.Need to prove, document file library system also can be destroyed the expansion module that creates.
Corresponding method shown in Figure 1, the present invention also provides a kind of application program and expansion module mutual system of realizing, comprises at least application program and document file library system (being platform software), wherein,
Application program is used for enumerating the expansion module data of document current page, and sends the predefined instruction that includes expansion module ID to document file library system; Application program is take the expansion module data as parameter, calls the expansion module example of being responsible for creating the expansion module example in the expansion module interface of acquisition and creates interface, to create the expansion module example;
Document file library system, the expansion module ID for carrying according to the predefined instruction that receives inquires about self registered expansion module interface, finds the expansion module interface corresponding with this expansion module ID and returns to application program.
The file layout of described predefined instruction right and wrong structural data has nothing to do.Unstructured data comprises stream media information, or comprises paper document information etc.Predefined instruction can be the operation of describing the example of predefine model, the mode that sends predefined instruction can be to send command string, it can be also function call etc., and the predefine model is the unstructured data to a certain type, such as certain generic features (as presenting effect) of paper document, audio frequency, video etc. is carried out abstract obtaining.
Fig. 2 is the process flow diagram of the mutual embodiment one of application program of the present invention and expansion module, and embodiment one provides application program to realize the use of the expansion module example that creates is comprised the following steps as shown in Figure 2 by interface alternation:
Step 200: application program creates the expansion module window.
Application program creates and shows the window of expansion module by the display window interface of invoke extensions module.Wherein, the display window interface can be realized by the api function that operating system provides, also can realize by the function that self defines, specific implementation belongs to those skilled in the art's conventional techniques means, here repeat no more, the present invention it is emphasized that and realized mutual as creating the expansion module window between application program and expansion module.
Step 201: application program changes the basic feature information of expansion module window.
When needs changed the basic feature information of expansion module window, application program can be by the message interface of invoke extensions module, and the basic feature information of the window after new window is namely changed such as position and/or size information send to expansion module; Expansion module changes self window according to the position that receives and/or size information.Here basic feature information is not limited to position or size.
Wherein, the corresponding API that message interface can provide by operating system, also can realize by the function that self defines, specific implementation belongs to those skilled in the art's conventional techniques means, here repeat no more, the present invention it is emphasized that realized between application program and expansion module application program change the characteristic information of expansion module window such as position and/size mutual.
Step 202: expansion module changes Application Program Interface.
When needs change Application Program Interface, expansion module can be by the reverse message interface of invokes application, send to change to application program the interface change request that Application Program Interface is user interface, such as: expansion module can request applications creates the menu that is associated with expansion module self, menu item, tool bar, toolbar button etc.
After application program receives the interface change request of expansion module, according to the information change user interface of interface change request, such as, the change menu item.Tool bar etc.
Wherein, reverse message interface is by the interacting message between application program and expansion module, sends expansion module to by application program.Message interaction process will be described in detail hereinafter.
Step 203: expansion module is destroyed the Application Program Interface that has changed.
Expansion module uses the reverse message interface of application program, sends the interface change to application program and cancels request, to cancel the change of Application Program Interface in step 202; After request is cancelled in the interface change that application program receives expansion module, cancel the change of Application Program Interface in step 202.Certainly, in request was cancelled in the interface change, expansion module also can be specified and be cancelled the part change.
Step 204: application program is destroyed the expansion module window.
Application program closes by the interface that closes window of invoke extensions module the expansion module window that creates in step 200 and show.Wherein, the api function that the interface that closes window can provide by operating system, also can realize by the function that self defines, specific implementation belongs to those skilled in the art's conventional techniques means, here repeat no more, the present invention it is emphasized that and realized mutual as closing the expansion module window between application program and expansion module.
Except interface alternation shown in Figure 2, can also carry out interacting message between application program and expansion module, comprise the interacting message that only uses message, and reverse message interface is mutual.
Wherein use the reciprocal process of message simple, i.e. application call corresponding message interface, and by the message interface that message interface provides, corresponding information is sent to expansion module, expansion module just carries out associative operation according to the information that receives and gets final product.Such as need to change expansion module window big or small when application program the time, meeting message call interface changes the size of expansion module window, the interface that the user provides according to message interface provides corresponding size information and submits to expansion module, expansion module is according to the dimension information that receives, changes the size of self window.
The reciprocal process of reverse message interface is: application program sends to expansion module by the message interface of expansion module with reverse message interface.Wherein, message interface is provided by expansion module, and application program is used; And reverse message interface is provided by application program, and expansion module uses.
The mutual method of application program of the present invention and expansion module has more than been described, for some special expansion modules, as the Streaming Media expansion module, except can comprise above-mentioned mutual, application program also can send to be used for be controlled to the Streaming Media expansion module information of streaming media playing, such as: reproduction time overall length, replacement, location, acquisition location, play/suspend etc.
Wherein, for the reproduction time overall length, after application program sent to expansion module with reproduction time overall length message, expansion module returned to application program with the total long message of the reproduction time of current Streaming Media, so that application program is shown to the user;
After application program sent to expansion module with replacement message, expansion module reset to the time initial point position with the play position of current Streaming Media;
After application program sent to expansion module with localization message, expansion module was reset at the play position of current Streaming Media on time point given in locating information;
After application program sent the acquisition localization message to expansion module, expansion module returned to application program with the play position information of current Streaming Media, so that application program is shown to the user;
When application program will play/after suspending message sent to expansion module, expansion module switched the broadcast state of current Streaming Media according to the information that receives, if currently switch to time-out for playing, if current for suspending, switched to broadcast.
Above said application program and expansion module mutual all relates to the parameter relevant with the expansion module example, support for some the expansion module (also claiming the particular extension module) that the overall situation arranges, parameter or the function setting interface irrelevant with the expansion module example may be provided, for these information, the mutual method of application program and expansion module as shown in Figure 3, Fig. 3 is the process flow diagram of the mutual embodiment two of application program of the present invention and expansion module, comprising:
Step 300: application program setting and particular extension module are mutual arranges the interface.
Particular extension module described here namely refers to provide and the irrelevant parameter of expansion module example or the expansion module of function setting interface, these with the irrelevant parameter or function setting interface of expansion module example in, comprise be used to the interface that obtains/revises overall setting.The method of this step setting has two kinds of situations:
The first situation: provided by expansion module if the interface is set, so, application program only needs the overall situation of invoke extensions module that interface is set to get final product, and subsequent operation is completed by expansion module self;
The second situation: provided by application program if the interface is set, so, need expansion module to provide and obtain/revise the interface that the overall situation arranges, in addition, the data layout that arranges in order to improve the overall situation that the expansion module interface gets, application program should be understood that these data layouts, otherwise just can't show on the interface, maybe can't pass to the expansion module interface with forming the new data that arrange after revising.Arrange in the interface and also can comprise the information such as menu, menu item, toolbar button.
In this step, the described interface that arranges also can be realized by expansion module, such as realizing by API or alternate manner.In this case, when the user need to manage the overall situation setting of particular extension module, the overall situation of application call expansion module arranged interface, with demonstration, the interface is set.
Step 301: the user is by arranging the interface, the overall situation setting of management particular extension module.
The described management of this step can be check, modification etc.Check to be exactly that the user arranges by accessing the overall configuration information that the particular extension module is understood at the interface.Modification be exactly the user access the interface is set, the overall situation setting of particular extension module is provided by the interface item that provides on the interface is set, particularly:
When described management checks that for the user overall situation arranges, the application call expansion module obtain the interface that the overall situation arranges, obtain the overall configuration information of related expanding module, and be presented at and arrange in the interface;
When described management arranged for the user revises the overall situation, described application program revised with the invoke extensions module interface that the overall situation arranges, and modification information is passed to the particular extension module, and the particular extension module is carried out corresponding change according to the modification information that receives.
Step 302: if the user revises overall situation setting, application program passes to the particular extension module with modification information.
Step 303: the particular extension module is carried out corresponding change according to the modification information that receives.
The above is only preferred embodiment of the present invention, is not for limiting protection scope of the present invention, all any modifications of making within the spirit and principles in the present invention, is equal to replacement, improvement etc., within all should being included in protection scope of the present invention.