Device glass interrelates between resources on own device (PC, tablet, Smartphone, other) and CG Widgets that allow sharing the resources content. This allows a single person to share resources across devices for the purpose of viewing and sometimes managing or editing.
Device Glass uses special widgets that know how to proxy with resources, for example files or printer, so it is possible for example to send a document to print in my home printer even without being connected on the same network (as in the case of printer sharing). See example below.
Resources Identities can be formed as URL in the following manner:
cg://[device name]/[type file| printer | cam |..]/[resource Id path | printer-name | etc.] .
For example the URL: cg://user-abcd1234/file/d:/temp/test.txt
Refers to file d:/temp/test.txt on computer name user-abcd1234’
Resource Proxy Widgets
Device Glass uses special widgets that can proxy with resources set on devices. The most common resource of course is ‘file’ but it is not limited to that. Proxy with resource means that a widget provides a way to read or watch resource's state, and possibly in some cases, also write, or change resource's state. You can read more about resource proxy widgets in the Resource Proxy Widget section.
Example1 - Viewing and editing remote files
In this example we are using FileProxy Widget attached with a specific file on a PC to view and update the file from a tablet. FileProxy Widget on the PC should be active for the purpose of servicing the file and applying modifications. A person uses the tablet with Device glass application turned on. This allows fetching widgets defined on other devices of the same person (or other peers in group). Searching for files reveals the FileProxy widget created and acting on the PC. The widget serves the resources to the tablet via P2P connection, and assuming tablet knows how to edit or view files of the requested type, the file is presented and can possibly be edited. The mirror file lives in a kind of sandbox (some temporary cache) that lets files be viewed and edited and later erased when closed. After file is updated the widget allows “Remote Update” option that when selected, the updated data is delivered back to the PC, and the active widget on the PC uses file resources to create a similar file with an updated data.
Example2 - Remote printing
Remote printing uses PrinterProxy widget to allow printing from one device, using a printer connected with another device. For example, printing from tablet using a printer connected with PC. PrinterProxy widget on the PC is attached with a printer and waits for print jobs sent over P2P. On the sending side PrintingProxy is attached with a file and when wishing to print the file data is translated into a print job that is sent to PrinterProxy on the PC.