Embodiment
In order to make the object of the invention, technical scheme and advantage clearer, below in conjunction with accompanying drawing and embodiment, the present invention is further elaborated, for the ease of explanation, only show the part relevant with the embodiment of the invention.Should be appreciated that the specific embodiment that this place is described, only be used to explain the present invention, not in order to restriction the present invention.
The present invention creates the also instance objects plug-in unit of loading of plug-in interface class then through in the card i/f class, presetting the plug-in unit service regeulations.Wherein said card i/f class service regeulations are simple, need not revise the main body frame platform and just can expand and reinforcement software function, realize the plug and play of plug-in unit.The user passes through the self-defined individual character instance objects of interface function plug-in unit, thereby solves the inconvenience on the certain operations or increase new function.In loading procedure, the address of the interface function in the instance objects plug-in unit is saved in array, use or delete plug-in unit through the traversal array, the loading of instance objects plug-in unit and use be simple more, make things convenient for.The instance objects plug-in unit exists with the form of dll dynamic base, avoids repeating compiling, shortens the product release cycle.Said dll dynamic base can two-wayly be obtained data, and promptly the main frame platform can obtain the data in the instance objects plug-in unit, and said instance objects plug-in unit also can obtain the data in the main frame platform, and is mutual convenient separate again, compatible strong.Each instance objects pin function is independent, can maximize favourable factors and minimize unfavourable ones according to pin function characteristic and peopleware reasonable distribution task, and has avoided a plurality of developer's cross-developments and cause the nonsynchronous problem of information.
Embodiment one
Fig. 1 is a kind of process flow diagram of creating the mobile platform plug-in method of the embodiment of the invention.Described method may further comprise the steps:
S101 creates the instance objects plug-in unit; Said instance objects plug-in unit is inherited the card i/f class that is provided with from advance;
Said card i/f class is a common type, comprises three interface functions: first function, second function and the 3rd function; Said first function is used for getattr title and the corresponding property value of said Property Name; Said second function be used to the to set a property property value of title and said Property Name; Said the 3rd function is used for callback events;
S102 is provided with the interface function in the said instance objects plug-in unit according to the practical application of said instance objects plug-in unit.
Comprise 3 parameters in said first function: first parameter, second parameter and first return type are used for the corresponding property value of getattr title and said Property Name; Wherein, said first parameter is a Property Name; Said second parameter is the rreturn value of said Property Name; Said first return type representes whether rreturn value returns success, if then be true; If not, then be false;
Comprise 3 parameters in said second function: the 3rd parameter, the 4th parameter and second return type, the property value of be used to set a property title and said Property Name; Wherein, said the 3rd parametric representation Property Name; The property value of the said Property Name of said the 4th parametric representation; Whether the said second return type representation attribute is provided with success, if success is set, then is returned as very, otherwise returns vacation.
Said the 3rd function comprises 2 parameters: Wucan number and the 3rd return type, be used for the function readjustment, and wherein the Wucan number is a variable element, and said the 3rd return type is set by the user as required, and said the 3rd return type can be for not having.
Parameters needed can increase the number of interface function and the number of the parameter in the interface function according to practical application in the number of said interface function and each interface function, and according to practical application the interface function in the said instance objects plug-in unit is set.
For ease of understanding, illustrate, at first preset card i/f class CEmbedObject, as follows:
Said CEmbedObject is the title of card i/f class; Public is public type;
Said GetProperty function is first function, and the SetProperty function is second function, and the CallMethod function is the 3rd function;
Wherein, the GetProperty function comprises 3 parameters, is respectively the first parameter aName, and the second parameter aBuffer and the first return type bool type are true if expression successfully is returned as, otherwise are false.
The SetProperty function comprises 3 parameters, is respectively that the 3rd parameter aName, the 4th parameter aValue and second return type are bool, representes successfully to be returned as very, and failure is returned as vacation.
The CallMethod function comprises 2 parameters: Wucan is counted event and the 3rd return type eventFun; Wherein parameter type is a variable element, and said the 3rd return type user can set as required, is made as nothing here.
Secondly, create the instance objects plug-in unit of card i/f class, the instance objects plug-in unit of for example creating card i/f class CEmbedObject is browser plug-in BrowserPlugin, and is specific as follows:
Once more, 3 interface functions among the said browser plug-in BrowserPlugin are set, specific as follows:
Through GetProperty function getattr title and the corresponding property value of said Property Name; The first parameter aName representation attribute title wherein; The second parameter aBuffer representes the property value that said Property Name is corresponding; The first return type bool representes if successfully be returned as very, otherwise is false;
GetProperty (" url " for example is set; Urlbuffer); Can obtain current url address, wherein " url " representation attribute name is called and will obtains url, and urlbuffer is for to be saved in the current browsing device url address that gets access in the urlbuffer variable; Here parameter can be self-defined, and whether browser is current chooses in parameters such as bottommosts such as " isNavigationDown ".
Property value through SetProperty function setup Property Name and said Property Name; The 3rd parameter aName representation attribute title wherein; The 4th parameter aValue representes the property value that plain Sohu Property Name is corresponding, and the second return type bool representes successfully to be returned as very, and failure is returned as vacation;
SetProperty (" url ", " http://wap.wht.cn ") for example is set, and " url " is Property Name here, the Property Name corresponding property value of http://wap.wht.cn for being provided with;
SetPorperty (" isdownloadfile " can also be set; " true "); Here " isdownloadfile " expression current browsing device runs into and wants whether file in download of download address, downloads for " ture " indicates, if be " false " then skip download.
Return function through described CallMethod and be used for callback events, wherein Wucan is counted the type that event representes callback events, and the 3rd return type eventFun representes back to fall the return type of function: do not have;
A register requirement Http CallMethod (" regrequestheader " in the browser for example; " regrequestheaderFun "); The 5th parameter " regrequestheader " is registration Http head for the callback events type; The 3rd return type " regrequestheaderFun " is back to fall function name, and the regrequestheaderFun function can go to realize the customized justice of parameter type and number of parameters as required.
Illustrate the process of creating another one instance objects plug-in unit again, the instance objects plug-in unit of for example creating card i/f class CEmbedObject is player plug-in unit PlayerPlugin, and is specific as follows:
Said GetProperty function is used to obtain the player plug-in unit property value first parameter aName: the Property Name second parameter aBuffer: the rreturn value return type bool that obtain attribute: if successfully be returned as very, otherwise be false;
In the player plug-in unit, can obtain current BufferTime address through the GetProperty function;
Through GetProperty (" BufferTime " is set; Timebuffer); Here " BufferTime " representation attribute name is called the time value that will obtain current buffering; And the current surge time that will obtain be saved in the timebuffer variable, attribute can be self-defined here, obtains the volume value of current player etc. such as " Volume ";
SetProperty (" playerurl " is set; " tmss: // 218.204.255.133:9901/tmes 246 "); Here " playerurl " is the player address attribute, and tmss: // 218.204.255.133:9901/tmes 246 is for being provided with the value of broadcast address;
Return function C allMethod and be used for back falling the function incident,, suspend as playing in the player plug-in unit; Full frame etc.; CallMethod (" Play ", " PlayFun ") is set, and wherein " Play " expression callback events type is for playing; " PlayFun " representes back to fall function name, PlayFun function, parameter type, the customized justice of number of parameters.
According to the design rule of said card i/f class, can create various instance objects plug-in units, for example player plug-in unit, browser plug-in, downloader plug-in unit, address list management plug-in unit etc.;
Instance objects plug-in unit after the establishment is that the form with dll exists, and such as PlayerPlugin.dll, BrowserPlugin.dll through said instance objects plug-in unit is loaded into the main frame platform, and uses these instance objects plug-in units through the main frame platform.
Present embodiment presets the plug-in unit service regeulations in the card i/f class; Create the instance objects plug-in unit of card i/f class; Practical application according to said instance objects plug-in unit is provided with the interface function in the said instance objects plug-in unit.Said card i/f class service regeulations are simple, need not revise the main body frame platform and just can expand and reinforcement software function, realize the plug and play of plug-in unit.The user passes through the self-defined individual character instance objects of interface function plug-in unit, thereby solves the inconvenience on the certain operations or increase new function.The instance objects plug-in unit exists with the form of dll dynamic base, avoids repeating compiling, shortens the product release cycle.Said dll dynamic base can two-wayly be obtained data, and promptly the main frame platform can obtain the data in the instance objects plug-in unit, and said instance objects plug-in unit also can obtain the data in the main frame platform, and is mutual convenient separate again, compatible strong.Each instance objects pin function is independent, can maximize favourable factors and minimize unfavourable ones according to pin function characteristic and peopleware reasonable distribution task, and has avoided a plurality of developer's cross-developments and cause the nonsynchronous problem of information.
Embodiment two
Fig. 2 is a kind of first kind of preferred embodiment process flow diagram that uses the mobile platform plug-in method of the present invention.Described method may further comprise the steps:
S201 loads the instance objects plug-in unit to the main frame platform; Said instance objects plug-in unit is inherited the card i/f class that is provided with from advance;
Said card i/f class is a common type, comprises three interface functions: the value function that gets parms, parameter value function and the 3rd function are set; Wherein, the said value function that gets parms is used for getattr title and the corresponding property value of said Property Name; Said parameter value function be used to the to set a property property value of title and said Property Name that is provided with; Said the 3rd function is used for callback events;
Comprise 3 parameters in said first function: first parameter, second parameter and first return type are used for the corresponding property value of getattr title and said Property Name; Wherein, said first parameter is a Property Name; Said second parameter is the rreturn value of said Property Name; Said first return type representes whether rreturn value returns success, if then be true; If not, then be false;
Comprise 3 parameters in said second function: the 3rd parameter, the 4th parameter and second return type, the property value of be used to set a property title and said Property Name; Wherein, said the 3rd parametric representation Property Name; The property value of the said Property Name of said the 4th parametric representation; Whether the said second return type representation attribute is provided with success, if success is set, then is returned as very, otherwise returns vacation.
Said the 3rd function comprises 2 parameters: Wucan number and the 3rd return type, be used for the function readjustment, and wherein the Wucan number is a variable element, said the 3rd return type is set by the user as required.
Parameters needed can increase the number of interface function and the number of the parameter in the interface function according to practical application in the number of said interface function and each interface function, and according to practical application the interface function in the said instance objects plug-in unit is set.
Said " the instance objects plug-in unit of loading of plug-in interface class is to the main frame platform " comprises 3 kinds of load modes:
According to the title of instance objects plug-in unit, manually said instance objects plug-in unit is loaded into the main frame platform;
Or, according to the naming rule of instance objects plug-in unit, when program initialization, add said instance objects plug-in unit to the main frame platform automatically;
Or, through the dynamic base loading function in the system platform said instance objects plug-in unit is loaded into the main frame platform.
S202 obtains the interface function of said instance objects plug-in unit through said main frame platform;
S203 uses said instance objects plug-in unit through said interface function.
According to the design rule of said card i/f class, create various instance objects plug-in units, for example player plug-in unit, browser plug-in, downloader plug-in unit, address list management plug-in unit etc.;
Instance objects plug-in unit after the establishment is that the form with dll exists; Such as player plug-in unit PlayerPlugin.dll; Browser plug-in BrowserPlugin.dll through said instance objects plug-in unit is loaded into the main frame platform, and uses these instance objects plug-in units through the main frame platform.
Said " said instance objects plug-in unit is loaded into the main frame platform " comprises 3 kinds of load modes:
According to the title of instance objects plug-in unit, manually said instance objects plug-in unit is loaded into the main frame platform; This kind load mode is the manual loading mode, for example at first searches the title PlayerPlugin.dll of player plug-in unit, and manual loading is loaded into the main frame platform with PlayerPlugin.dll then;
Or, according to the naming rule of instance objects plug-in unit, when program initialization, add said instance objects plug-in unit to the main frame platform automatically; This kind load mode is to search each instance objects plug-in unit according to the naming rule of predefined instance objects plug-in unit, and when program initialization, adds said instance objects plug-in unit to the main frame platform automatically;
Or, through the dynamic base loading function in the system platform said instance objects plug-in unit is loaded into the main frame platform; Illustrate this kind load mode with the Symbian platform, the instance objects plug-in unit that for example need load is PlayerPlugin.dll, is specially:
At first create a RLibrary instance library variable;
Through Load among the RLibrary (" playerPlugin.dll ") function PlayerPlugin.dll is loaded into the main frame platform then;
Obtain 3 interface function GetProperty functions, SetProperty function and the CallMethod functions that function pointer calls PlayerPlugin.dll through CEmbedObject pPlugin=library (* this) at last; Use said instance objects plug-in unit PlayerPlugin.dll through these 3 interface functions, really realize plug and play.
Embodiment three
Fig. 3 is a kind of second kind of preferred embodiment process flow diagram that uses the mobile platform plug-in method of the present invention.Described method may further comprise the steps:
S301 loads the instance objects plug-in unit to the main frame platform; Said instance objects plug-in unit is inherited the card i/f class that is provided with from advance;
S302 obtains the interface function of said instance objects plug-in unit through said main frame platform;
S303 is saved in array with the address of said interface function;
Obtain 3 interface functions of said instance objects plug-in unit through said main frame platform, thereby get access to the address of 3 interface functions of each instance objects plug-in unit;
The address that comprises the ID and pairing 3 interface functions of plug-in unit of each plug-in unit in the said array;
S304 travels through said array, obtains the address of the said interface function in the array and uses said instance objects plug-in unit; Or the destructor function through said main frame platform invoke system platform travels through said array, deletes the address of the interface function of preserving in the said array.
Said destructor function is those skilled in the art's a common practise, this no longer tired stating.
Through loading the instance objects plug-in unit to the main frame platform, said main frame platform obtains the interface function of said instance objects plug-in unit, uses said instance objects plug-in unit through said interface function in the embodiment of the invention.The instance objects plug-in unit exists with the form of dll dynamic base, avoids repeating compiling, shortens the product release cycle.Said dll dynamic base can two-wayly be obtained data, and promptly the main frame platform can obtain the data in the instance objects plug-in unit, and said instance objects plug-in unit also can obtain the data in the main frame platform, and is mutual convenient separate again, compatible strong.Each instance objects pin function is independent, can maximize favourable factors and minimize unfavourable ones according to pin function characteristic and peopleware reasonable distribution task, and has avoided a plurality of developer's cross-developments and cause the nonsynchronous problem of information.Said card i/f class service regeulations are simple, need not revise the main body frame platform and just can expand and reinforcement software function, realize the plug and play of plug-in unit.In loading procedure, the address of the interface function in the instance objects plug-in unit is saved in array, use or delete plug-in unit through the traversal array, the loading of instance objects plug-in unit and use be simple more, make things convenient for.
Embodiment four
Fig. 4 is the structural representation of first kind of preferred embodiment of a kind of device of creating the mobile platform plug-in unit of the present invention.
Said device comprises: create card module and interface module is set;
Said establishment card module links to each other with the said interface module that is provided with, and is used to create the instance objects plug-in unit; Said instance objects plug-in unit is inherited the card i/f class that is provided with from advance;
The said interface module that is provided with links to each other with said establishment card module, is used for being provided with according to the practical application of said instance objects plug-in unit the interface function of said instance objects plug-in unit.
Said card i/f class is a common type, comprises three interface functions: first function, second function and the 3rd function; Said first function is used for getattr title and the corresponding property value of said Property Name; Said second function be used to the to set a property property value of title and said Property Name; Said the 3rd function is used for callback events;
Comprise 3 parameters in said first function: first parameter, second parameter and first return type are used for the corresponding property value of getattr title and said Property Name; Wherein, said first parameter is a Property Name; Said second parameter is the rreturn value of said Property Name; Said first return type representes whether rreturn value returns success, if then be true; If not, then be false;
Comprise 3 parameters in said second function: the 3rd parameter, the 4th parameter and second return type, the property value of be used to set a property title and said Property Name; Wherein, said the 3rd parametric representation Property Name; The property value of the said Property Name of said the 4th parametric representation; Whether the said second return type representation attribute is provided with success, if success is set, then is returned as very, otherwise returns vacation.
Said the 3rd function comprises 2 parameters: Wucan number and the 3rd return type, be used for the function readjustment, and wherein the Wucan number is a variable element, said the 3rd return type is set by the user as required.
Parameters needed can increase the number of interface function and the number of the parameter in the interface function according to practical application in the number of said interface function and each interface function, and according to practical application the interface function in the said instance objects plug-in unit is set.
Such scheme further optimized be that said establishment card module comprises the getattr unit, set a property unit and readjustment unit, be illustrated in figure 5 as the structural representation of second kind of preferred embodiment of a kind of device of creating the mobile platform plug-in unit of the present invention;
Said getattr unit links to each other with the said interface module that is provided with, and is used for the corresponding property value of said first function getattr title and said Property Name;
The said unit that sets a property links to each other with the said interface module that is provided with, and is used for the property value of said second function setup Property Name and said Property Name;
Said readjustment unit links to each other with the said interface module that is provided with, and is used for the 3rd function callback events.
According to the design rule of said card i/f class, can create various instance objects plug-in units, for example player plug-in unit, browser plug-in, downloader plug-in unit, address list management plug-in unit etc.;
Instance objects plug-in unit after the establishment is that the form with dll exists, and such as PlayerPlugin.dll, BrowserPlugin.dll through said instance objects plug-in unit is loaded into the main frame platform, and uses these instance objects plug-in units through the main frame platform.
Present embodiment is created the instance objects plug-in unit of card i/f class by creating card module then through in the card i/f class, presetting the plug-in unit service regeulations; By the practical application of interface module according to said instance objects plug-in unit is set the interface function in the said instance objects plug-in unit is set.Said card i/f class service regeulations are simple, need not revise the main body frame platform and just can expand and reinforcement software function, realize the plug and play of plug-in unit.The user is through being provided with interface module self defined interface function, thereby solves the inconvenience on the certain operations or increase new function.The instance objects plug-in unit exists with the form of dll dynamic base, avoids repeating compiling, shortens the product release cycle.Said dll dynamic base can two-wayly be obtained data, and promptly the main frame platform can obtain the data in the instance objects plug-in unit, and said instance objects plug-in unit also can obtain the data in the main frame platform, and is mutual convenient separate again, compatible strong.Each instance objects pin function is independent, can maximize favourable factors and minimize unfavourable ones according to pin function characteristic and peopleware reasonable distribution task, and has avoided a plurality of developer's cross-developments and cause the nonsynchronous problem of information.
Embodiment five
Fig. 6 is the structural representation of first kind of preferred embodiment of a kind of device that uses the mobile platform plug-in unit of the present invention.
Said device comprises: load-on module, obtain interface module and use module;
Said load-on module links to each other with the said interface module of obtaining, and is used to load the instance objects plug-in unit to the main frame platform; Said instance objects plug-in unit is inherited the card i/f class that is provided with from advance;
The said interface module of obtaining links to each other with the use module with said load-on module, is used for obtaining through said main frame platform the interface function of said instance objects plug-in unit;
Said use module links to each other with the said interface module of obtaining, and is used for using said instance objects plug-in unit through said interface function.
Said card i/f class is a common type, comprises three interface functions: first function, second function and the 3rd function; Wherein, said first function is used for getattr title and the corresponding property value of said Property Name; Said second function be used to the to set a property property value of title and said Property Name; Said the 3rd function is used for callback events;
Comprise 3 parameters in said first function: first parameter, second parameter and first return type are used for the corresponding property value of getattr title and said Property Name; Wherein, said first parameter is a Property Name; Said second parameter is the rreturn value of said Property Name; Said first return type representes whether rreturn value returns success, if then be true; If not, then be false;
Comprise 3 parameters in said second function: the 3rd parameter, the 4th parameter and second return type, the property value of be used to set a property title and said Property Name; Wherein, said the 3rd parametric representation Property Name; The property value of the said Property Name of said the 4th parametric representation; Whether the said second return type representation attribute is provided with success, if success is set, then is returned as very, otherwise returns vacation.
Said the 3rd function comprises 2 parameters: Wucan number and the 3rd return type, be used for the function readjustment, and wherein the Wucan number is a variable element, said the 3rd return type is set by the user as required.
Parameters needed can increase the number of interface function and the number of the parameter in the interface function according to practical application in the number of said interface function and each interface function, and according to practical application the interface function in the said instance objects plug-in unit is set.
Said load-on module, concrete loading procedure is:
According to the title of instance objects plug-in unit, manually said instance objects plug-in unit is loaded into the main frame platform;
Or, according to the naming rule of instance objects plug-in unit, when program initialization, add said instance objects plug-in unit to the main frame platform automatically;
Or, through the dynamic base loading function in the system platform said instance objects plug-in unit is loaded into the main frame platform.
Said establishment module is created various instance objects plug-in units according to the design rule of said card i/f class; For example player plug-in unit, browser plug-in, downloader plug-in unit, address list management plug-in unit etc. pass through the said interface function that interface module is provided with each instance objects plug-in unit that is provided with;
Instance objects plug-in unit after the establishment is that the form with dll exists, and such as player plug-in unit PlayerPlugin.dll, browser plug-in BrowserPlugin.dll is loaded into the main frame platform through load-on module with said instance objects plug-in unit; Saidly obtain interface module is obtained said instance objects plug-in unit through the main frame platform interface function; Said use module is used said instance objects plug-in unit through said interface function.
The further optimization of such scheme is; The said interface module of obtaining comprises first interface unit, second interface unit and the 3rd interface unit, is illustrated in figure 7 as the structural representation of second kind of preferred embodiment of a kind of device that uses the mobile platform plug-in unit of the present invention.
Said first interface unit links to each other with said use module, is used to obtain the address of said first function;
Said second interface unit links to each other with said use module, is used to obtain the address of said second function;
Said the 3rd interface unit links to each other with said use module, is used to obtain the address of said the 3rd function.
The further optimization of such scheme is that said device also comprises array module; Said use module comprises uses unit and delete cells, is illustrated in figure 8 as the structural representation of the third preferred embodiment of a kind of device that uses the mobile platform plug-in unit of the present invention.
Said array module links to each other with delete cells with said first interface unit, second interface unit, the 3rd interface unit, use unit, is used for depositing the address that said first interface unit, second interface unit and the 3rd interface unit get access in array;
Said use unit links to each other with said array module, is used to travel through said array, obtains in the array address stored and uses said instance objects plug-in unit;
Said delete cells links to each other with said array module, is used for the destructor function through said main frame platform invoke system platform, travels through said array, deletes the address of preserving in the said array.
The embodiment of the invention loads the instance objects plug-in unit to the main frame platform through load-on module; Obtain the interface function of said instance objects plug-in unit by obtaining interface module through said main frame platform, said use module is used said instance objects plug-in unit through said interface function.The instance objects plug-in unit exists with the form of dll dynamic base, avoids repeating compiling, shortens the product release cycle.Said dll dynamic base can two-wayly be obtained data, and promptly the main frame platform can obtain the data in the instance objects plug-in unit, and said instance objects plug-in unit also can obtain the data in the main frame platform, and is mutual convenient separate again, compatible strong.Each instance objects pin function is independent, can maximize favourable factors and minimize unfavourable ones according to pin function characteristic and peopleware reasonable distribution task, and has avoided a plurality of developer's cross-developments and cause the nonsynchronous problem of information.Said card i/f class service regeulations are simple, need not revise the main body frame platform and just can expand and reinforcement software function, realize the plug and play of plug-in unit.In loading procedure; Through increasing array module; The address of the interface function in the instance objects plug-in unit is saved in array, and by using unit or delete cells to use or delete plug-in unit through the traversal array, the loading of instance objects plug-in unit and use are simple more, convenient.
Embodiment six
Fig. 9 is a kind of structural representation of creating and using the system of mobile platform plug-in unit of the embodiment of the invention.
Said system comprises the device of creating the mobile platform plug-in unit and the device that uses the mobile platform plug-in unit, and the device of said establishment mobile platform plug-in unit links to each other with the device that uses the mobile platform plug-in unit;
The device of said establishment mobile platform plug-in unit comprises to be created card module and interface module is set;
Said establishment card module links to each other with the said interface module that is provided with, and is used to create the instance objects plug-in unit; Said instance objects plug-in unit is inherited the card i/f class that is provided with from advance;
The said interface module that is provided with links to each other with said establishment card module, is used for being provided with according to the practical application of said instance objects plug-in unit the interface function of said instance objects plug-in unit.
The device of said use mobile platform plug-in unit comprises load-on module, obtains interface module and uses module;
Said load-on module links to each other with the said interface module of obtaining, and is used to load the instance objects plug-in unit to the main frame platform; Said instance objects plug-in unit is inherited the card i/f class that is provided with from advance;
The said interface module of obtaining links to each other with the use module with said load-on module, is used for obtaining through said main frame platform the interface function of said instance objects plug-in unit;
Said use module links to each other with the said interface module of obtaining, and is used for using said instance objects plug-in unit through said interface function.
Said card i/f class is a common type, comprises three interface functions: first function, second function and the 3rd function; Said first function is used for getattr title and the corresponding property value of said Property Name; Said second function be used to the to set a property property value of title and said Property Name; Said the 3rd function is used for callback events;
Comprise 3 parameters in said first function: first parameter, second parameter and first return type are used for the corresponding property value of getattr title and said Property Name; Wherein, said first parameter is a Property Name; Said second parameter is the rreturn value of said Property Name; Said first return type representes whether rreturn value returns success, if then be true; If not, then be false;
Comprise 3 parameters in said second function: the 3rd parameter, the 4th parameter and second return type, the property value of be used to set a property title and said Property Name; Wherein, said the 3rd parametric representation Property Name; The property value of the said Property Name of said the 4th parametric representation; Whether the said second return type representation attribute is provided with success, if success is set, then is returned as very, otherwise returns vacation.
Said the 3rd function comprises 2 parameters: Wucan number and the 3rd return type, be used for the function readjustment, and wherein the Wucan number is a variable element, said the 3rd return type is set by the user as required.
Parameters needed can increase the number of interface function and the number of the parameter in the interface function according to practical application in the number of said interface function and each interface function, and according to practical application the interface function in the said instance objects plug-in unit is set.
The embodiment of the invention is created the instance objects plug-in unit of card i/f class by creating card module then through in the card i/f class, presetting the plug-in unit service regeulations; By the practical application of interface module according to said instance objects plug-in unit is set the interface function in the said instance objects plug-in unit is set; Load the instance objects plug-in unit to the main frame platform through load-on module, obtain the interface function of said instance objects plug-in unit by obtaining interface module through said main frame platform, said use module is used said instance objects plug-in unit through said interface function.Said card i/f class service regeulations are simple, need not revise the main body frame platform and just can expand and reinforcement software function, realize the plug and play of plug-in unit.The instance objects plug-in unit exists with the form of dll dynamic base, avoids repeating compiling, shortens the product release cycle.Said dll dynamic base can two-wayly be obtained data, and promptly the main frame platform can obtain the data in the instance objects plug-in unit, and said instance objects plug-in unit also can obtain the data in the main frame platform, and is mutual convenient separate again, compatible strong.Each instance objects pin function is independent, can maximize favourable factors and minimize unfavourable ones according to pin function characteristic and peopleware reasonable distribution task, and has avoided a plurality of developer's cross-developments and cause the nonsynchronous problem of information.In loading procedure; Through increasing array module; The address of the interface function in the instance objects plug-in unit is saved in array, and by using unit or delete cells to use or delete plug-in unit through the traversal array, the loading of instance objects plug-in unit and use are simple more, convenient.
Establishment provided by the invention can be applied to need to create and use on the portable terminal of mobile platform plug-in unit, for example: PDA, mobile phone, panel computer etc. with the system that uses the mobile platform plug-in unit.
Those having ordinary skill in the art will appreciate that; All or part of step in realization the foregoing description method can be accomplished through the programmed instruction related hardware; Described program can be stored in the computer read/write memory medium, and described storage medium can be ROM, RAM, disk, CD etc.
The above is merely preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of within spirit of the present invention and principle, being done, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.