Line 146: |
Line 146: |
| | | |
| [[Sugar Network]] supports a metadata ''database'' for all packages that are being used as dependencies for activities it provides (see ''Packages'' project using one of the existing [[Sugar_Network#Try_it|Sugar Network clients]]). Every entry in the ''database'' contains a map of native package names for a particular GNU/Linux distribution. So, activities mention only the ''database'' entry name as a dependency. [[Sugar Network]] will automatically generate dependency graphs for packagekit-backend-presolve using the ''metadata'' database. Afterwards, on the launch side, the ''database'' entry name will be resolved to a package name according to the local distribution and it will be passed to the PackageKit (on XO laptops, packagekit-backend-presolve will be used; on regular platforms, the default PackageKit back-end is used). | | [[Sugar Network]] supports a metadata ''database'' for all packages that are being used as dependencies for activities it provides (see ''Packages'' project using one of the existing [[Sugar_Network#Try_it|Sugar Network clients]]). Every entry in the ''database'' contains a map of native package names for a particular GNU/Linux distribution. So, activities mention only the ''database'' entry name as a dependency. [[Sugar Network]] will automatically generate dependency graphs for packagekit-backend-presolve using the ''metadata'' database. Afterwards, on the launch side, the ''database'' entry name will be resolved to a package name according to the local distribution and it will be passed to the PackageKit (on XO laptops, packagekit-backend-presolve will be used; on regular platforms, the default PackageKit back-end is used). |
| + | |
| + | == Local resources == |
| + | |
| + | If [[#Sugar_Network_resources|already mentioned]] resources are being provided from a network server, it is possible to get access to localhost resources served using the same RESTful API by local process launched beforehand. Local Sugar Network resources are [[#Sugar_Network_resources|the same]] structure data but located on local host, e.g., in user's home directory or on mounted removable device. |
| + | |
| + | === Mountpoints === |
| + | |
| + | To differentiate what particular Sugar Network source is needed, all requests should have {{Code|mountpoint}} argument which might be one of the following values: |
| + | |
| + | * {{Code|/}}, default mountpoint if argument was not specified; get access to remote resources, i.e., local API provider is a kind of proxy to the remote one; |
| + | |
| + | * {{Code|~}}, Sugar Network content located in {{Code|~/.sugar/''PROFILE''/network}} directory; this mountpoint might support special use cases, see the rest of this text; |
| + | |
| + | * {{Code|''PATH''}}, absolute file in local files system to a directory with Sugar Network content, e.g., it might be content on mounted disk, {{Code|/media/DISK}}. |
| + | |
| + | === Access to the Journal === |
| + | |
| + | It is possible to get access to local Sugar Journal using ''Artifact'' resources. All ''Artifact'' [[#Sugar_Network_resources|properties]] represent particular Journal entity attributes when arbitrary attributes, e.g., create by particular Sugar Activity, are being collected in {{Code|traits}} property. It is possible to work with local ''Artifact'' resources like any regular Sugar Network one, e.g., make a search. |
| | | |
| == Getting involved == | | == Getting involved == |
| | | |
| {{:Sugar_Network/Feedback}} | | {{:Sugar_Network/Feedback}} |