SmsDeviceMessageStore 類別

定義

提供 SMS 裝置上所儲存訊息的存取權,以及訊息存放區的相關資訊。

注意

這項功能僅適用于行動電信業者應用程式和 UWP 應用程式,由行動網路操作員、行動寬頻介面卡 IHV 或 OEM 提供特殊許可權存取。 如需詳細資訊,請參閱 行動寬頻

注意

此類別及其方法支援維護舊版 Windows 中使用的舊版傳統型應用程式。 如果您使用這個類別,則必須在應用程式的資訊清單中指定 Windows.Devices.Sms.LegacySmsApiContract 。 如果您要開發適用于 Windows 的新應用程式,請勿使用此類別。 請改用此命名空間中不需要 Windows.Devices.Sms.LegacySmsApiContract的 API。

public ref class SmsDeviceMessageStore sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.Sms.LegacySmsApiContract, 65536)]
/// [Windows.Foundation.Metadata.Deprecated("SmsDeviceMessageStore may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Devices.Sms.LegacySmsApiContract)]
class SmsDeviceMessageStore final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.Sms.LegacySmsApiContract, 65536)]
/// [Windows.Foundation.Metadata.Deprecated("SmsDeviceMessageStore may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
class SmsDeviceMessageStore final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.Sms.LegacySmsApiContract), 65536)]
[Windows.Foundation.Metadata.Deprecated("SmsDeviceMessageStore may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Devices.Sms.LegacySmsApiContract))]
public sealed class SmsDeviceMessageStore
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.Sms.LegacySmsApiContract), 65536)]
[Windows.Foundation.Metadata.Deprecated("SmsDeviceMessageStore may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
public sealed class SmsDeviceMessageStore
Public NotInheritable Class SmsDeviceMessageStore
繼承
Object Platform::Object IInspectable SmsDeviceMessageStore
屬性

Windows 需求

裝置系列
Windows Desktop Extension SDK (已於 10.0.10240.0 引進)
API contract
Windows.Devices.Sms.LegacySmsApiContract (已於 v1.0 引進)
應用程式功能
cellularMessaging sms

屬性

MaxMessages

指出可以儲存在裝置存放區中的訊息數目上限。 用戶端可以使用此值來判斷如何在裝置存放區中維護足夠的空間,以接收來自網路的新訊息。

方法

DeleteMessageAsync(UInt32)

刪除具有指定識別碼的訊息。 因為裝置可能忙碌中,所以作業會以非同步方式執行。 非同步作業物件會立即傳回。

DeleteMessagesAsync(SmsMessageFilter)

刪除套用篩選的訊息。 篩選準則可用來刪除所有訊息,或只刪除讀取、未讀取、已傳送或處於草稿狀態的訊息。 因為作業可能不是立即的,所以會以非同步方式執行。 非同步作業物件會立即傳回。

GetMessageAsync(UInt32)

擷取具有指定識別碼的訊息。 裝置可能忙碌中,因此方法會以非同步方式執行。 非同步作業物件會立即傳回。

GetMessagesAsync(SmsMessageFilter)

擷取符合篩選中指定的條件的訊息清單。 訊息可以篩選為讀取、未讀取、傳送或處於草稿狀態。

適用於