sc_establish_context man page on SuSE

Man page or keyword search:  
man Server   14857 pages
apropos Keyword Search (all sections)
Output format
SuSE logo
[printable version]

SC_ESTABLISH_CONTEXT(3)	     OpenSC API reference      SC_ESTABLISH_CONTEXT(3)

NAME
       sc_establish_context - Establish an OpenSC context

SYNOPSIS
	   #include <opensc.h>

	   int sc_establish_context(sc_context_t **ctx,
				    const char *appname);

DESCRIPTION
       This function establishes an OpenSC context. This context is required
       in all subsequent calls to OpenSC functions.

       ctx is a pointer to a pointer that will receive the allocated context.

       appname is a string that identifies the application. This string will
       be used to apply application-specific settings from the opensc.conf
       configuration file. If NULL is passed, only the settings specified in
       the default section apply; otherwise, settings from the section
       identified by appname will be applied as well.

       The sc_context structure contains the following members:

	   #define SC_MAX_READERS	      16

	   typedef struct sc_context {
		struct sc_reader *reader[SC_MAX_READERS];
		int reader_count;
	   } sc_context_t;

       The reader_count field contains the number of readers found.
       Information on the individual card readers is stored in sc_reader
       objects, defined as follows:

	   typedef struct sc_reader {
		char *name;
		int slot_count;
	   }; sc_reader_t;

       In this structure, name contains a printable name of the reader, and
       slot_count has the number of slots supported by this device.

RETURN VALUE
       Returns 0 if successful, or a negative value in case of error.

opensc				  08/27/2008	       SC_ESTABLISH_CONTEXT(3)
[top]

List of man pages available for SuSE

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net