public class XeroxPrintServiceRecommendationPlugin extends Object implements PrintServicePlugin, ServiceResolver.Observer
PrintServicePlugin.PrinterDiscoveryCallback
Modifier and Type | Field and Description |
---|---|
protected PrintServicePlugin.PrinterDiscoveryCallback |
mDiscoveryCallback |
protected Object |
mLock |
protected NsdManager |
mNSDManager |
protected com.android.printservice.recommendation.plugin.xerox.ServiceResolver |
mServiceResolver |
protected com.android.printservice.recommendation.plugin.xerox.VendorInfo |
mVendorInfo |
Constructor and Description |
---|
XeroxPrintServiceRecommendationPlugin(Context context) |
Modifier and Type | Method and Description |
---|---|
void |
dataSetChanged() |
int |
getCount() |
int |
getName()
Get the name (a string reference) of the
print
service with the specified package name . |
CharSequence |
getPackageName()
The package name of the full print service.
|
void |
start(PrintServicePlugin.PrinterDiscoveryCallback callback)
Start the discovery plugin.
|
void |
stop()
Stop the plugin.
|
protected final Object mLock
protected PrintServicePlugin.PrinterDiscoveryCallback mDiscoveryCallback
protected final com.android.printservice.recommendation.plugin.xerox.ServiceResolver mServiceResolver
protected final NsdManager mNSDManager
protected final com.android.printservice.recommendation.plugin.xerox.VendorInfo mVendorInfo
public XeroxPrintServiceRecommendationPlugin(Context context)
public int getName()
PrintServicePlugin
print
service
with the specified package name
. This is read once, hence
returning different data at different times is not allowed.getName
in interface PrintServicePlugin
public CharSequence getPackageName()
PrintServicePlugin
getPackageName
in interface PrintServicePlugin
public void start(PrintServicePlugin.PrinterDiscoveryCallback callback) throws Exception
PrintServicePlugin
start
in interface PrintServicePlugin
callback
- Callbacks used by this plugin.Exception
- If anything went wrong when starting the pluginpublic void stop() throws Exception
PrintServicePlugin
stop
in interface PrintServicePlugin
Exception
- If anything went wrong while stopping pluginpublic void dataSetChanged()
dataSetChanged
in interface ServiceResolver.Observer
public int getCount()