Hi Romuald, +1 for Sakari's answer of the JS part, thanks for doing that.
For the C++ part, I would say it is a very general topic of how to share code or how to generalize some functions. In the case you described in your email, I think we could create a C++ files under common (or other dirs), and include those new files in Download and FileSystem API gyp. I would be very happy to review and accept this kind of PRs. Thanks, Halton. > -----Original Message----- > From: Crosswalk-dev > [mailto:[email protected]] On Behalf Of > Poussa, Sakari > Sent: Friday, June 06, 2014 6:35 PM > To: Poussa, Sakari; Romuald TEXIER-MARCADÉ; crosswalk-dev > Subject: Re: [Crosswalk-dev] [Tizen] What is the best way to share code > between extensions? > > BTW, xwalk.utils was created to share JS code. Maybe you meant sharing > C++. But can be extended to share C++ code as well. But I¹d like > Halton/Thiago to comment that. > > Sakari > > On 6/6/14, 13:32, "Poussa, Sakari" <[email protected]> wrote: > > >Hi, > > > >We have created xwalk.utils extension for sharing code between > >extensions. Put your code there so you can share it. > > > >https://github.com/crosswalk-project/tizen-extensions-crosswalk/tree/m > a > >ste > >r/utils > > > >One API using it already: > >https://github.com/crosswalk-project/tizen-extensions-crosswalk/blob/m > a > >ste > >r/content/content_api.js > > > > > >ContentManager.prototype.find = function(onsuccess, onerror, > >directoryId, filter, sortMode, count, offset) { > > if (!xwalk.utils.validateArguments('f?fsoonn', arguments)) { > > throw new > >tizen.WebAPIException(tizen.WebAPIException.TYPE_MISMATCH_ERR); > > } > > > > > >Sakari > > > >From: Romuald TEXIER-MARCADÉ > ><[email protected]<mailto:romuald.texier-m > arca > >de@ > >open.eurogiciel.org>> > >Date: Wednesday, June 4, 2014 at 16:51 > >To: crosswalk-dev > ><[email protected]<mailto:[email protected] > >ros > >swalk-project.org>> > >Subject: [Crosswalk-dev] [Tizen] What is the best way to share code > >between extensions? > > > >Hello, > > In order to avoid duplication of effort and to make maintenance easier > >I would like to reuse some code from one extension in another (in my > >case, the code resolving virtual roots from the filesystem API is also > >needed in the Download API). > > > >So what is the best practice to do so? > >Could I factor the common code out and place it in common/? > > > >Thank you. > > > >Romuald. > >_______________________________________________ > >Crosswalk-dev mailing list > >[email protected] > >https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev > > _______________________________________________ > Crosswalk-dev mailing list > [email protected] > https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev _______________________________________________ Crosswalk-dev mailing list [email protected] https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev
