Download presentation
Presentation is loading. Please wait.
Published byAmelia Gardner Modified over 9 years ago
1
Storage Device Design Pattern JEFF MEISSNER; KEN HARDY Windows Program Management
2
26/29/2011 MICROSOFT CONFIDENTIAL Agenda Storage Pattern Overview Examples Windows.Storage Namespace AutoPlay Device Configuration Summary Resources
3
36/29/2011 MICROSOFT CONFIDENTIAL A Design Pattern represents the programming model a Metro style app can use to communicate with a Specialized Connected Device. Choose the best Design Pattern for your device based upon the underlying protocol you use to communicate with it. Design Pattern Connectivity DescriptionAPI Networked Connected over a Wi-Fi network. Sends and receives data over TCP-IP.Windows.Networking Removable Storage Externally connected over USB. Can send and receive files from a device.Windows.Storage Portable Device Externally connected over USB. Connected over a Wi-Fi or Bluetooth network. Intelligent device that transfers objects with properties and methods. Windows Portable Device WDF Custom Driver Access Externally connected over USB. Or connected over a Bluetooth network. Transfers commands and data using device IO control. Device Access IDeviceIoContrlol Design Pattern Connectivity DescriptionAPI Removable Storage Externally connected over USB. Can send and receive files from a device.Windows.Storage Specialized Device Design Patterns
4
46/29/2011 MICROSOFT CONFIDENTIAL Removable Storage Pattern Functionality represented as files in a file system Information transferred to/from Windows with simple file access Protocols: USB Mass Storage Class; Media Transfer Protocol (MTP) Transport: USB API: Windows.Storage AdvantagesDisadvantages Low cost, standard hardwareNo control over which apps access the device Uses class driver Supported on ‘Windows RT’ Support for AutoPlay
5
56/29/2011 MICROSOFT CONFIDENTIAL Removable Storage Pattern Digital camera stores videos as files in its flash memory. When device is connected to Windows 8, the companion app launches and allows users to import and edit the content, apply filters & effects, and/or post directly to their favorite social media outlet. Acquisition Scenarios: Automatic Acquisition, Windows Store Download Device Discovery: Devices.Enumeration; AutoPlay Device Access: Windows.Storage EXAMPLE Device Device metadata Metro style app + meta app +
6
66/29/2011 MICROSOFT CONFIDENTIAL Windows.Storage Namespace Used to manage files, folders, and app settings Standard way to access storage devices and volumes in the Windows Runtime
7
76/29/2011 MICROSOFT CONFIDENTIAL Windows.Storage Namespace SUPPORTED INTERFACES InterfaceDescription IStorageFileRepresents a file. Provides information about the file and its contents, and ways to manipulate them. IStorageFolderManipulates folders and their contents, and provides information about them. IStorageItemManipulates storage items (files and folders) and their contents, and provides information about them. IStorageItemPropertiesProvides access to common and content properties on items (like files and folders). IStreamedFileDataRequest Represents a sequential-access output stream that indicates a request for the data stream of a StorageFile that was created by calling CreateStreamedFileAsync or ReplaceWithStreamedFileAsync.
8
86/29/2011 MICROSOFT CONFIDENTIAL App Manifest Support the Removable Storage Capability File Type Associations Register as an AutoPlay handler MANIFEST DECLARATIONS TO SUPPORT THESE SCENARIOS
9
96/29/2011 MICROSOFT CONFIDENTIAL AutoPlay in Windows 8 Opt out completely Standard behavior General storage Content-type Recommend an app Custom events Using AutoRun.INF
10
106/29/2011 MICROSOFT CONFIDENTIAL Opting out of AutoPlay Behavior New for Windows 8 Useful on devices with multiple volumes Behavior specified in AUTORUN.INF [autorun] UseAutoPlay=0 Windows will ignore this volume for AutoPlay Also disables any AutoRun behavior specified in AUTORUN.INF TO OPT OUT OF AUTOPLAY AUTORUN.INF IS REQUIRED
11
116/29/2011 MICROSOFT CONFIDENTIAL Standard AutoPlay Behavior DEVICE WITHOUT METADATA OR AUTORUN.INF BEHAVIOR DEFINED Initial device connection receives an AutoPlay toast Lists all handlers for these types of devices in the fly out User can ignore new choices When new handlers are installed the user is prompted again
12
126/29/2011 MICROSOFT CONFIDENTIAL Recommended App Behavior DEVICE COMPANION APP IS INSTALLED Behavior is defined in the Metadata Displays recommended app name and icon if available Displays progress until app has completed downloading
13
136/29/2011 MICROSOFT CONFIDENTIAL Custom Event Behavior Define custom event in AutoRun.INF on the device [autorun] CustomEvent = eventname Support the custom event in manifest of the companion app Does not guarantee uniqueness If this is defined, no other handlers are offered DEVICE AND APP USE CUSTOM EVENTS
14
146/29/2011 MICROSOFT CONFIDENTIAL Configuring a Device Device metadata configures behavior Define a device companion app Define a recommended AutoPlay action Define a recommended AutoPlay app Note that the default behavior where no Metadata is provided is to launch AutoPlay Registering a device for AutoPlay Device registration is the same as Windows 7 Desktop application registrations are the same as Windows 7 WINDOWS 8 BEHAVIOR UPON DEVICE ARRIVAL
15
156/29/2011 MICROSOFT CONFIDENTIAL Supporting Multiple Platforms Device Stage experiences will continue to work in Windows 8 Same Metadata package can be used for both Windows 7 and Windows 8 Metadata allows both a device app recommendation AND a Device Stage experience When both are defined, Windows 8 will choose the device app recommendation WINDOWS 8 BEHAVIOR UPON DEVICE ARRIVAL
16
166/29/2011 MICROSOFT CONFIDENTIAL Summary Supporting this pattern is straight forward Mass storage devices Class drivers Simple API for device access through the Windows Runtime Create a vastly improved end-user experience by providing: Device Metadata Companion app Include support for AutoPlay
17
176/29/2011 MICROSOFT CONFIDENTIAL Resources App Capability Declarations http://msdn.microsoft.com/en-us/library/windows/apps/hh464936.aspx App Contracts and Extensions http://msdn.microsoft.com/en-us/library/windows/apps/hh464906.aspx Registering an app for AutoPlay http://msdn.microsoft.com/en-us/library/windows/apps/hh452728.aspx Device Metadata portal http://msdn.microsoft.com/en-us/library/windows/hardware/hh833794.aspx Windows.Storage namespace http://msdn.microsoft.com/en-us/library/windows/apps/br227346.aspx
18
186/29/2011 MICROSOFT CONFIDENTIAL Resources – Continued Hands-On Lab – Mass Storage Device App Removable Storage Sample http://code.msdn.microsoft.com/windowsapps/Removable-Storage-52cc49f0 Device Enumeration & Activation http://code.msdn.microsoft.com/windowsapps/Device-Enumeration-Sample-a6e45169
19
Thank you.
20
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.