API Documentation
Documentation for developing SailfishOS applicationsRule Class
(Sailfish::Mdm::SimFilter::Rule)A filter rule for SIM filter data. More...
Header: | #include <mdm-simfilter.h> |
Public Functions
Rule(const QString &imsi, Action action) | |
Rule() | |
operator const QString() const | |
bool | operator!=(const Rule &rule) const |
bool | operator==(const Rule &rule) const |
Detailed Description
A filter rule for SIM filter data.
A rule provides the ability to block or allow particular functionality for an IMSI.
For example, SimMobileDataFilter provides the ability to configure this for mobile data functionality:
// Set a rule that blocks the SIM with IMSI 123456789 from using mobile data. SimMobileDataFilter *mobileDataFilter = new SimMobileDataFilter; SimFilter::Rule rule("123456789", SimFilter::Block); mobileDataFilter->addRule(rule);
SimVoiceCallFilter provides the ability to configure this for voice call functionality:
// Allow outgoing calls from the SIM with IMSI 123456789. SimVoiceCallFilter *vcFilter = new SimVoiceCallFilter; SimFilter::Rule rule("123456789", SimFilter::Allow); vcFilter->addDialRule(rule);
Member Function Documentation
Rule::Rule(const QString &imsi, Action action)
Creates an action-type rule for the SIM identified by imsi.
Rule::Rule()
Creates an invalid rule without an IMSI and a block
-type action.
Rule::operator const QString() const
Returns a string description of this rule.
bool Rule::operator!=(const Rule &rule) const
Returns true if this rule does not have the same IMSI and action as rule.
bool Rule::operator==(const Rule &rule) const
Returns true if this rule has the same IMSI and action as rule.