Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Version 2.0
EMC Corporation
Corporate Headquarters:
Hopkinton, MA 01748-9103
1-508-435-1000
www.EMC.com
Contents
Tables
Preface
Chapter 1
Introduction
Overview............................................................................................ 18
Function syntax ................................................................................. 19
Function call ............................................................................... 19
Parameter list.............................................................................. 20
Unicode and wide character support............................................. 21
Unicode and wide character routines...................................... 23
API data types ................................................................................... 25
Atmos CAS specifications................................................................ 28
Chapter 2
Pool Functions
Pool functions.................................................................................... 32
FPPool_Close............................................................................... 33
FPPool_GetCapability................................................................ 34
FPPool_GetClipID ..................................................................... 37
FPPool_GetClusterTime ............................................................ 38
FPPool_GetComponentVersion................................................ 39
FPPool_GetGlobalOption .......................................................... 40
FPPool_GetIntOption................................................................. 41
FPPool_GetLastError ................................................................. 42
FPPool_GetLastErrorInfo .......................................................... 43
FPPool_GetPoolInfo ................................................................... 44
FPPool_GetRetentionClassContext.......................................... 46
FPPool_Open............................................................................... 47
EMC Atmos Version 2.0 CAS API Reference Guide
FPPool_RegisterApplication ..................................................... 50
FPPool_SetClipID ...................................................................... 51
FPPool_SetGlobalOption........................................................... 54
FPPool_SetIntOption.................................................................. 57
Chapter 3
Clip Functions
Clip functions .................................................................................... 60
Clip handling functions ................................................................... 60
FPClip_AuditedDelete............................................................... 61
FPClip_Close ............................................................................... 64
FPClip_Create ............................................................................. 65
FPClip_Delete ............................................................................. 67
FPClip_EnableEBRWithClass ................................................... 69
FPClip_EnableEBRWithPeriod................................................. 69
FPClip_Open ............................................................................... 70
FPClip_RawOpen ....................................................................... 72
FPClip_RawRead........................................................................ 73
FPClip_RemoveRetentionClass................................................ 74
FPClip_SetName......................................................................... 75
FPClip_SetRetentionClass ......................................................... 76
FPClip_SetRetentionHold ......................................................... 76
FPClip_SetRetentionPeriod....................................................... 77
FPClip_TriggerEBREvent.......................................................... 79
FPClip_TriggerEBREventWithClass........................................ 79
FPClip_TriggerEBREventWithPeriod ..................................... 80
FPClip_Write............................................................................... 80
FPClipID_GetCanonicalFormat ............................................... 82
FPClipID_GetStringFormat....................................................... 84
Clip info functions ............................................................................ 85
FPClip_Exists .............................................................................. 85
FPClip_GetClipID ...................................................................... 87
FPClip_GetCreationDate........................................................... 88
FPClip_GetEBRClassName....................................................... 89
FPClip_GetEBREventTime........................................................ 90
FPClip_GetEBRPeriod ............................................................... 91
FPClip_GetName........................................................................ 92
FPClip_GetNumBlobs................................................................ 93
FPClip_GetNumTags................................................................. 94
FPClip_GetPoolRef..................................................................... 95
FPClip_GetRetentionClassName ............................................. 96
FPClip_GetRetentionHold ........................................................ 96
FPClip_GetRetentionPeriod...................................................... 98
FPClip_GetTotalSize...................................................................99
FPClip_IsEBREnabled ..............................................................100
FPClip_IsModified....................................................................101
FPClip_ValidateRetentionClass..............................................102
Clip attribute functions .................................................................. 103
FPClip_GetDescriptionAttribute ............................................103
FPClip_GetDescriptionAttributeIndex ..................................105
FPClip_GetNumDescriptionAttributes .................................107
FPClip_RemoveDescriptionAttribute....................................108
FPClip_SetDescriptionAttribute .............................................109
Clip tag functions ............................................................................ 111
FPClip_FetchNext .....................................................................111
FPClip_GetTopTag ...................................................................112
Chapter 4
Tag Functions
Tag functions.................................................................................... 116
Tag handling functions................................................................... 116
FPTag_Close ..............................................................................117
FPTag_Copy ..............................................................................118
FPTag_Create.............................................................................120
FPTag_Delete.............................................................................121
FPTag_GetBlobSize...................................................................122
FPTag_GetClipRef ....................................................................123
FPTag_GetPoolRef ....................................................................124
FPTag_GetTagName ................................................................125
Tag navigation functions................................................................ 127
FPTag_GetFirstChild ................................................................129
FPTag_GetParent ......................................................................130
FPTag_GetPrevSibling .............................................................131
FPTag_GetSibling......................................................................132
Tag attribute functions.................................................................... 133
FPTag_GetBoolAttribute..........................................................134
FPTag_GetIndexAttribute .......................................................135
FPTag_GetLongAttribute ........................................................137
FPTag_GetNumAttributes.......................................................138
FPTag_GetStringAttribute.......................................................139
FPTag_RemoveAttribute .........................................................140
FPTag_SetBoolAttribute...........................................................141
FPTag_SetLongAttribute .........................................................142
FPTag_SetStringAttribute........................................................144
Chapter 5
Chapter 6
Chapter 7
Stream Functions
Stream functions ............................................................................. 178
Stackable stream support ........................................................ 178
Generic stream operation ........................................................ 178
Stream creation functions .............................................................. 181
FPStream_CreateBufferForInput............................................ 181
FPStream_CreateBufferForOutput ........................................ 182
FPStream_CreateFileForInput ................................................ 183
FPStream_CreateFileForOutput ............................................. 184
FPStream_CreateGenericStream ............................................ 186
FPStream_CreatePartialFileForInput .................................... 203
FPStream_CreatePartialFileForOutput ................................. 205
FPStream_CreateTemporaryFile ............................................ 207
FPStream_CreateToNull.......................................................... 208
FPStream_CreateToStdio......................................................... 208
Stream handling functions ............................................................ 209
FPStream_Close ........................................................................ 209
FPStream_Complete................................................................. 210
FPStream_GetInfo .................................................................... 211
FPStream_PrepareBuffer ......................................................... 212
FPStream_ResetMark ...............................................................213
FPStream_SetMark ...................................................................214
Chapter 8
Query Functions
Query functions............................................................................... 216
Query expression functions ........................................................... 217
FPQueryExpression_Close ......................................................218
FPQueryExpression_Create.....................................................218
FPQueryExpression_DeselectField ........................................219
FPQueryExpression_GetEndTime..........................................220
FPQueryExpression_GetStartTime ........................................221
FPQueryExpression_GetType.................................................222
FPQueryExpression_IsFieldSelected......................................223
FPQueryExpression_SelectField .............................................224
FPQueryExpression_SetEndTime ..........................................227
FPQueryExpression_SetStartTime .........................................228
FPQueryExpression_SetType..................................................229
Pool query functions....................................................................... 230
FPPoolQuery_Close..................................................................231
FPPoolQuery_FetchResult.......................................................231
FPPoolQuery_GetPoolRef .......................................................233
FPPoolQuery_Open..................................................................234
Query result functions.................................................................... 236
FPQueryResult_Close...............................................................236
FPQueryResult_GetClipID ......................................................237
FPQueryResult_GetField .........................................................238
FPQueryResult_GetResultCode..............................................239
FPQueryResult_GetTimestamp ..............................................240
FPQueryResult_GetType .........................................................241
Chapter 9
Time Functions
Time functions ................................................................................. 244
FPTime_MillisecondsToString ................................................244
FPTime_SecondsToString ........................................................246
FPTime_StringToMilliseconds ................................................247
FPTime_StringToSeconds ........................................................248
Chapter 10
Logging Functions
Logging overview ........................................................................... 250
FPLogging mechanism.............................................................250
FPLogState................................................................................. 251
Logging environment variables ............................................. 252
Polling behavior........................................................................ 252
Log file format........................................................................... 253
Application strings in SDK log............................................... 253
Redirecting log output............................................................. 254
FPLogging functions ...................................................................... 255
FPLogging_CreateLogState .................................................... 255
FPLogging_Log......................................................................... 256
FPLogging_OpenLogState ...................................................... 257
FPLogging_RegisterCallback.................................................. 258
FPLogging_Start ....................................................................... 259
FPLogging_Stop........................................................................ 259
FPLogState_Delete.................................................................... 260
FPLogState_Save....................................................................... 261
FPLogState functions...................................................................... 262
FPLogState_GetAppendMode................................................ 262
FPLogState_GetDisableCallback ............................................ 263
FPLogState_GetLogFilter ........................................................ 264
FPLogState_GetLogFormat ..................................................... 264
FPLogState_GetLogLevel ........................................................ 265
FPLogState_GetLogPath.......................................................... 265
FPLogState_GetMaxLogSize................................................... 266
FPLogState_GetMaxOverflows .............................................. 267
FPLogState_GetPollInterval.................................................... 267
FPLogState_SetAppendMode................................................. 268
FPLogState_SetDisableCallback ............................................. 269
FPLogState_SetLogFilter ......................................................... 270
FPLogState_SetLogFormat...................................................... 271
FPLogState_SetLogLevel ......................................................... 272
FPLogState_SetLogPath........................................................... 273
FPLogState_SetMaxLogSize.................................................... 274
FPLogState_SetMaxOverflows ............................................... 275
FPLogState_SetPollInterval..................................................... 276
Environment variables................................................................... 277
Example: XML-formatted log ................................................. 279
Example: Tab-formatted log ................................................... 280
Example: FPLogState configuration file................................ 281
Chapter 11
Error Codes
Error codes....................................................................................... 284
Appendix A
Deprecated Functions
Deprecated functions...................................................................... 294
Deprecated options ......................................................................... 295
Glossary
Index
10
Tables
Title
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Page
11
12
Preface
Purpose
Audience
13
Preface
Related
documentation
Conventions used in
this document
The EMC Atmos documentation set also includes the following titles:
IMPORTANT
An important notice contains information essential to operation of
the software.
Typographical conventions
EMC uses the following type style conventions in this document:
Normal
Bold:
14
Preface
Italic:
Courier:
Used for:
System output, such as an error message or script
URLs, complete paths, filenames, prompts, and syntax when
shown outside of running text
Courier bold:
Used for:
Specific user input (such as commands)
Courier italic:
<>
[]
{}
...
15
Preface
16
Introduction
Introduction
19
21
25
28
17
Introduction
Overview
Applications use the native Atmos CAS API (aka the EMC Centera
SDK or SDK) to interact with Atmos CAS, an access method for
Content Addressable Storage on the Atmos platform. Atmos CAS
requires CAS API version 3.1 or higher.
This first release of Atmos CAS on Atmos supports a set of CAS
features that is nearly equivalent to the functions of the Centera Basic
Edition, however, with some limitations. Any restrictions that relate
to specific API calls are indicated in the description section of those
API calls, where applicable.
Note: You also can find limitations generally described in Chapter 4: Best
Practices in the EMC Atmos CAS Programmers Guide.
18
Atmos equivalent
Pool
Profile
Subtenant UID
Cluster
PEA file
C-Clip ID
Atmos object ID
Introduction
Function syntax
This section details the syntax of the EMC Atmos CAS Access API
function calls.
Function call
Example
Pool functions
FPPool
C-Clip functions
FPClip or FPClipID
Tag functions
FPTag
FPRetentionClassContext or
FPRetentionClass
Stream functions
FPStream
Query functions
Pool query functions
Query result functions
FPQueryExpression
FPPoolQuery
FPQueryResult
FPTime
Logging functions
FPLogging or FPLogState
Function syntax
19
Introduction
Parameter list
The void type is used for functions that do not require a parameter or
have no return value.
FPPool_GetLastError (void)
20
Introduction
If you are localizing your application, use the "8", "16", and "32"
functions. Otherwise, you can use the default Latin-1 (no suffix) and
wide ("W") functions.
Table 3 on page 21 lists the function variants.
Table 3
Function variants
Function
suffix
String parameter
type
Character width
(bits)
Encoding
None
char *
Latin-1
wchar_t *
16 or 32 (platform
dependent)
char *
UTF-8
16
FPChar16 *
16
UTF-16
32
FPChar32 *
32
UTF-32
21
Introduction
Note: Atmos CAS API calls that retrieve metadata (for example,
FPClip_GetDescriptionAttribute) may have parameters that contain
the address of an integer value that specifies the size of a user-provided
buffer in this way: as an input parameter that sizes the user supplied buffer
which the API may overwrite with the size that the output text actually
requires.
This integer value is determined by the data type that the API call is using.
For example, if the ioAttrValueLen parameter of the
FPClip_GetDescriptionAttribute16 routine is set to 20 by the user,
then a buffer of 40 bytes would be provided. After the call, the value of
ioAttrValueLen may be set to 10 by the API, indicating that 20 bytes was
actually needed to store the UTF-16 string into outAttrValue.
Table 4 on page 22 lists the input and output units for API calls that
deal with string encoding.
Table 4
String encoding
API string-encoded calls
Latin-1
Number of char
Wide
Number of wchar_t
UTF-8
Number of char
UTF-16
Number of FPChar16
UTF-32
Number of FPChar32
22
Introduction
FPClip_AuditedDelete
FPClip_Create
FPClip_GetDescriptionAttribute
FPClip_GetDescriptionAttributeIndex
FPClip_GetEBRClassName
FPClip_GetEBREventTime
FPClip_GetName
FPClip_GetRetentionClassName
FPClip_RemoveDescriptionAttribute
FPClip_SetDescriptionAttribute
FPClip_SetRetentionHold
FPLogging_Log
FPLogging_OpenLogState
FPLogState_SetLogPath
FPLogState_Save
FPPool_GetCapability
FPPool_GetClusterTime
FPPool_GetComponentVersion
FPPool_GetGlobalOption
FPPool_GetIntOption
FPPool_Open
FPPool_RegisterApplication
FPPool_SetGlobalOption
FPPool_SetIntOption
FPQueryExpression_DeselectField
FPQueryExpression_IsFieldSelected
FPQueryExpression_SelectField
FPQueryResult_GetField
FPRetentionClass_GetName
FPRetentionClassContext_GetNamedClass
FPTag_Create
FPStream_CreatePartialFileForInput
FPStream_CreatePartialFileForOutput
FPTag_GetBoolAttribute
FPTag_GetIndexAttribute
FPTag_GetLongAttribute
FPTag_GetStringAttribute
FPTag_GetTagName
FPTag_RemoveAttribute
FPTag_SetBoolAttribute
FPTag_SetLongAttribute
23
Introduction
24
FPTag_SetStringAttribute
FPTime_MillisecondsToString
FPTime_SecondsToString
FPTime_StringToMilliseconds
FPTime_StringToSeconds
Introduction
Definition
FPLong
FPInt
FPShort
FPBool
FPChar16
FPChar32
FPClipID
FPErrorInfo
FPPoolInfo
FPStreamInfo
25
Introduction
Table 6
Table 7
Table 8
26
FPErrorInfo structure
Errorinfo type
Definition
FPInt error
FPInt systemError
char* trace
char* message
char* errorString
FPShort errorClass
FPPoolInfo structure
PoolInfo type
Definition
FPInt poolInfoVersion
FPLong capacity
FPLong freeSpace
char clusterID[128]
char clusterName[128]
char version[128]
char replicaAddress[256]
Definition
short mVersion
void *mUserData
Introduction
Table 8
FPLong mMarkerPos
FPLong mStreamLen
FPBool mAtEOF
FPBool mReadFlag
void *mBuffer
FPLong mTransferLen
27
Introduction
Value
Note
131072 or 100MB,
whichever is larger
100MB
100GB
100KB (default)
10MB
1KB (default)
28
Introduction
Table 9
Value
Note
1KB (default)
100KB (default)
256 or 100MB,
whichever is larger
256 or 100MB,
whichever is larger
29
Introduction
30
Value
10
999
999
VALUE > 0
1MB
Note
Pool Functions
Pool Functions
31
Pool Functions
Pool functions
The application must establish a connection to the pool before
performing a pool operation, with the exception of
FPPool_SetGlobalOption() and FPPool_GetComponentVersion().
The application should provide one or more addresses of the
CAS-enabled nodes to make a connection to a pool.
The pool functions are thread safe.
Note: You should close the connection to a pool if that connection is no longer
needed, in order to free all used resources. However, it is better to reuse
existing pool connections than to frequently open and close connections.
32
FPPool_Close
FPPool_GetCapability
FPPool_GetClipID
FPPool_GetClusterTime
FPPool_GetComponentVersion
FPPool_GetGlobalOption
FPPool_GetIntOption
FPPool_GetLastError
FPPool_GetLastErrorInfo
FPPool_GetPoolInfo
FPPool_GetRetentionClassContext
FPPool_Open
FPPool_RegisterApplication
FPPool_SetClipID
FPPool_SetGlobalOption
FPPool_SetIntOption
Pool Functions
FPPool_Close
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
FPPool_Close (myPool);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
Pool functions
33
Pool Functions
FPPool_GetCapability
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
This function returns the attribute value for the given attribute name
of a capability. The capabilities are associated with the access
credentials and refer to the operations that the SDK is allowed to
perform on the CAS-enabled nodes. Refer to the EMC Atmos CAS
Programmers Guide for more information.
Parameters
34
Pool Functions
Table 11
Capability name
Attribute name
Attribute
values
FP_BLOBNAMING
FP_SUPPORTED_SCHEMES
MD5/MG
MD5/MG
FP_CLIPENUMERATION
FP_ALLOWED
true/false
True. FPPoolQuery_Open() is
allowed.
FP_POOLS
string
Empty string.
FP_MODE
FP_EVENT_BASED_RETENTION
FP_RETENTION_HOLD
FP_RETENTION_MIN_MAX
supported/
unsupported
Unsupported.
FP_ALLOWED
true/false
FP_POOLS
string
Empty string.
FP_DELETIONLOGGING
FP_SUPPORTED
true/false
FP_EXIST
FP_ALLOWED
true/false
FP_POOLS
string
Empty string.
FP_MONITOR
FP_ALLOWED
true/false
False.
FP_POOL_POOLMAPPINGS
FP_POOLS
string
Empty string.
FP_COMPLIANCE
FP_DELETE
Empty string.
FP_PROFILES
FP_PRIVILEGEDDELETE
FP_PURGE
FP_READ
FP_ALLOWED
true/false
False.
FP_POOLS
string
Empty string.
FP_ALLOWED
true/false
False. Deprecated.
FP_POOLS
string
Empty string.
FP_ALLOWED
true/false
are allowed.
Pool functions
35
Pool Functions
Table 11
Capability name
FP_RETENTION
Attribute name
Attribute
values
FP_POOLS
string
Empty string.
FP_DEFAULT
integer
FP_FIXED_RETENTION_MIN
64-bit integer
FP_FIXED_RETENTION_MAX
-1
FP_VARIABLE_RETENTION_MIN
FP_VARIABLE_RETENTION_MAX
-1
Note: Retention is not supported in
this release.
FP_RETENTION_HOLD
FP_WRITE
FP_ALLOWED
true/false
False.
FP_POOLS
string
Empty string.
FP_ALLOWED
true/false
FP_POOLS
string
Empty string.
char *outCapabilityValue
outCapabilityValue is the memory buffer that receives the
FPInt *ioCapabilityValueLen
36
Pool Functions
Error handling
FPPool_GetClipID
Syntax
Return value
Parameters
The buffer that receives the ID of the subtenant and UID pair.
Description
Example
Error handling
For an example of how to call this routine, see the manpage for Clip
functions on page 60.
The FPPool_GetClipID function returns ENOERR if successful or
the following error codes:
Pool functions
37
Pool Functions
Note: This call fails from the SDK side if the specified subtenant and UID pair
was not previously opened, if the C-Clip ID associated with the subtenant
and UID pair was not previously set by a call to FPPool_SetClipID, or if
the C-Clip ID was deleted.
FPPool_GetClusterTime
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Description
Parameters
char *outClusterTime
outClusterTime is the memory buffer that will store the cluster
time. The time is specified in YYYY.MM.DD hh:mm:ss GMT
format.
FPInt *ioClusterTimeLen
38
char vClusterTime[256];
FPInt vClusterTimeLen=256;
FPPool_GetClusterTime(vPool, vClusterTime,
&vClusterTimeLen);
Pool Functions
Error handling
FPPool_GetComponentVersion
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
Parameters
char *outVersion
outVersion is the memory buffer that will store the version
number.
FPInt *ioVersionLen
char vVersion[128];
Pool functions
39
Pool Functions
FPInt vVersionLen=128;
FPPool_GetComponentVersion(FP_VERSION_FPLIBRARY_DLL,
vVersion, &vVersionLen);
Error handling
FPPool_GetGlobalOption
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
Description
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
This function returns the value of inOptionName that is set by
FPPool_SetGlobalOption().
Parameters
40
FPPool_GetGlobalOption(FP_OPTION_RETRYCOUNT);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the SDK may return FP_UNKNOWN_OPTION (program
logic error).
Pool Functions
FPPool_GetIntOption
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
Description
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
This function returns the value of inOptionName that is set by
FPPool_SetIntOption().
Parameters
FPPool_GetIntOption(myPool,
FP_OPTION_ENABLE_MULTICLUSTER_FAILOVER);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
Pool functions
41
Pool Functions
FPPool_GetLastError
Syntax
Return value
Concurrency
requirement
Description
FPPool_GetLastError (void)
FPInt
Parameters
Example
void
FPInt errorCode;
errorCode = FPPool_GetLastError();
if (errorCode != ENOERR)
{
/* Process the error ... */
}
42
Pool Functions
FPPool_GetLastErrorInfo
Syntax
Return value
Output parameters
Concurrency
requirement
Description
Parameters
FPErrorInfo *outErrorInfo
The structure that will store the error information that the function
retrieves. Refer to Table 6 on page 26 for details of the FPErrorInfo
structure. If no errors are generated, the returned structure has null
values in its data fields.
Example
FPInt errorCode;
FPErrorInfo errInfo;
errorCode = FPPool_GetLastError();
if (errorCode != ENOERR)
{
FPPool_GetLastErrorInfo(&errInfo);
/* Process the Error ...*/
}
Pool functions
43
Pool Functions
FPPool_GetPoolInfo
Syntax
Return value
Input parameters
Output parameters
FPPoolInfo *outPoolInfo
Concurrency
requirement
Description
Parameters
FPPoolInfo *outPoolInfo
The structure that will store the pool information that the
function retrieves. The structure is defined as follows:
poolInfoVersion [FPInt]: The current version of this
information structure.
capacity [FPLong]: The total usable capacity (in bytes) of all
online nodes in the current CAS-enabled nodes.
freeSpace [FPLong]: The total free space (in bytes) in the
current CAS-enabled nodes.
Note: This function returns an approximate value for the free space. The
returned values can vary within 2% when compared to subsequent calls of
the function. The free space reflects the total amount of usable space on all
online nodes to store data mirrored.
44
Pool Functions
FPPoolInfo PoolInfo;
FPPool_GetPoolInfo(myPool, &PoolInfo);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
Pool functions
45
Pool Functions
FPPool_GetRetentionClassContext
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
Error handling
FPRetentionClassContextRef myRetClassContext;
myRetClassContext = FPPool_GetRetentionClassContext
(myPool);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
46
Pool Functions
FPPool_Open
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
Description
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
This function initiates connections to one or more CAS-enabled
nodes. The pool object manages these connections. This function
returns a reference to the opened pool.
The pool address (inPoolAddress) is a comma-separated string of IP
addresses or DNS names of CAS-enabled nodes. The pool probes all
addresses in this connection string either immediately (normal
strategy, the default) or on an as-needed basis (lazy strategy). Refer to
Pool Open Strategy in the EMC Atmos CAS Programmers Guide for
more information. You can change the default open strategy; refer to
FPPool_SetGlobalOption on page 54.
Note: If the SDK cannot connect to one or more CAS-enabled nodeswhen
the connection string includes an inaccessible node, or when a node has been
configured to replicate to an inaccessible nodethe FPPool_Open() call
will take at least 1 minute to complete.
addresses of the available nodes with the access role of the pool. The
format is:
Pool functions
47
Pool Functions
or
"10.2.3.4,10.6.7.8?name=<username>,secret=<password>"
48
Pool Functions
Example
Error handling
Pool functions
49
Pool Functions
FPPool_RegisterApplication
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
Parameters
Example
Error handling
50
Pool Functions
FPPool_SetClipID
Syntax
Return value
Parameters
Pool functions
51
Pool Functions
Example
FPClipID vID1;
FPClipID vID2;
FPPoolRef myPool = FPPool_Open("10.241.35.101");
// Create clip
FPClipRef vClipRef = FPClip_Create(myPool, "Test");
FPInt vRetVal = print_last_error();
if ( vRetVal == 0 && vClipRef )
{
//Write the clip with no data
FPClip_Write(vClipRef, vID1);
vRetVal = print_last_error();
if (vRetVal == 0)
{
//Set this clip as the profile clip
FPPool_SetClipID(myPool, vID1);
vRetVal = print_last_error();
if (vRetVal == 0)
{
//Close this clip
FPClip_Close(vClipRef);
vRetVal = print_last_error();
if (vRetVal == 0)
{
//Get the profile clip CA
FPPool_GetClipID(myPool, vID2);
vRetVal = print_last_error();
}
}
}
}
52
Pool Functions
Error handling
Pool functions
53
Pool Functions
FPPool_SetGlobalOption
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
Description
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
This function sets application-wide options. When set, the new
values take effect immediately including all running threads of the
application. However, it does not affect other applications using the
same FPLibrary.
Note: You can set any global pool option as an environment variable. The
option settings that an application sets take precedence and override those
that were previously set as environment variables.
Parameters
Example
RetryCount = 5;
FPPool_SetGlobalOption (FP_OPTION_RETRYCOUNT,
RetryCount);
FPPool_SetGlobalOption (FP_OPTION_OPENSTRATEGY,
FP_LAZY_OPEN);
Error handling
54
Pool Functions
Global options
CAS server (not the client) to calculate the content address of the
blob data on the server.
sockets that the SDK will allocate for your application. Sockets
are used to communicate with the Atmos CAS nodes managed in
each pool object. The default value is 100. The maximum value is
999.
Pool functions
55
Pool Functions
56
Pool Functions
FPPool_SetIntOption
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
Description
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
This function sets the options for the given pool. To change global
pool settings, refer to FPPool_SetGlobalOption on page 54.
Use the FPPool_Open() function to open and set the options for that
pool.
Note: You can set global pool options as environment variables. The option
settings made by an application take precedence and override those that
were previously set as environment variables.
Parameters
Pool functions
57
Pool Functions
Example
Error handling
BufferSize = 32*1024;
FPPool_SetIntOption (myPool, FP_OPTION_BUFFERSIZE,
BufferSize);
FPPool_SetIntOption (myPool,
FP_OPTION_DEFAULT_COLLISION_AVOIDANCE, true);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
58
Clip Functions
Clip Functions
59
Clip Functions
Clip functions
The clip functions are a set of function calls that operate on C-Clips. A
clip function can manipulate an entire C-Clip, retrieve information
about a C-Clip, manipulate clip attributes, or manipulate a single tag
from a C-Clip. Therefore the four groups of clip functions are:
Clip handling
Clip info
Clip attribute
Clip tag
The C-Clip must be open before you can perform a clip function (do
not forget to close the C-Clip when finished).
C-Clips can be shared by multiple threads. Several threads can
perform blob and tag operations within a C-Clip simultaneously.
60
FPClip_AuditedDelete
FPClip_Close
FPClip_Create
FPClip_Delete
FPClip_EnableEBRWithClass
FPClip_EnableEBRWithPeriod
FPClip_Open
FPClip_RawOpen
FPClip_RawRead
FPClip_RemoveRetentionClass
FPClip_SetName
FPClip_SetRetentionClass
FPClip_SetRetentionHold
FPClip_SetRetentionPeriod
FPClip_TriggerEBREvent
FPClip_TriggerEBREventWithClass
FPClip_TriggerEBREventWithPeriod
FPClip_Write
FPClipID_GetCanonicalFormat
FPClipID_GetStringFormat
Clip Functions
FPClip_AuditedDelete
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
This function deletes the given CDF from the first CAS-enabled node
of a given pool and records audit information describing the reason
for the deletion.
Note: In Atmos CAS, the privileged deletion option generates the
FP_OPERATION_NOT_ALLOWED error.
61
Clip Functions
Note that this function does not delete associated blobs. Garbage
collection automatically deletes blobs that are no longer referenced by
any C-Clip. Refer to the EMC Atmos CAS Programmers Guide for more
information on deleting data.
Deleting a C-Clip leaves a reflectionmetadata about the deleted
C-Clipon the CAS-enabled node. Reflections are only exposed in
the SDK through the query functions. Refer to Query functions on
page 216. The audit string, if specified, is recorded in the reflection.
Parameters
The ID of a C-Clip.
Example
Error handling
62
Clip Functions
63
Clip Functions
FPClip_Close
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
FPClip_Close (myClip);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
64
Clip Functions
FPClip_Create
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
Description
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
This function creates a new, empty C-Clip in memory. This function
returns a reference to the in-memory C-Clip.
During the execution of FPClip_Create(), the SDK looks for the
environment variable CENTERA_CUSTOM_METADATA. This variable may
contain a comma-separated list of environment variables that will be
added to the CDF during FPClip_Write(). The number of metadata
items is limited by memory (100 MB). The metadata can be retrieved
using FPClip_GetDescriptionAttribute(). No error is reported if
the function cannot access a metadata item.
For example, if the CENTERA_CUSTOM_METADATA variable is defined as:
CENTERA_CUSTOM_METADATA=USER,APPLICATION,HOSTNAME
65
Clip Functions
Parameters
Example
Error handling
66
Clip Functions
FPClip_Delete
Syntax
Return value
Input parameters
Concurrency
requirement
Description
67
Clip Functions
Parameters
The ID of a C-Clip.
Example
Error handling
68
Clip Functions
FPClip_EnableEBRWithClass
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
The reference to the retention class used to indirectly set the wait
period of the C-Clip.
FPClip_EnableEBRWithPeriod
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
FPLong inSeconds
69
Clip Functions
FPClip_Open
Syntax
Return value
Input parameters
Concurrency
requirement
Description
70
Clip Functions
Parameters
71
Clip Functions
FPClip_RawOpen
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
The C-Clip used to reference the C-Clip that has to be read from
the stream.
72
Clip Functions
FPClip_RawRead
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
73
Clip Functions
FPClip_RemoveRetentionClass
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
74
Clip Functions
FPClip_SetName
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
This function changes the name of the given C-Clip to the name given
in inClipName.
Parameters
Example
Error handling
75
Clip Functions
FPClip_SetRetentionClass
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
FPRetentionClassRef inClassRef
FPClip_SetRetentionHold
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
76
Description
Parameters
Clip Functions
The reference to the ID that is the name of the hold. The hold ID
may contain up to 64 characters. You can assign multiple holds to
a single C-Clip, up to 100 in total.
FPClip_SetRetentionPeriod
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
77
Clip Functions
FPClip_TriggerEBREvent
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
FPClipRef inClip
FPClip_TriggerEBREventWithClass
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
78
Clip Functions
FPClip_TriggerEBREventWithPeriod
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
FPClipRef inClip
FPLong inSeconds
inSeconds is a value in seconds that explicitly sets and starts the
run time of the retention period from the time this EBR event (API
call) is triggered.
FPClip_Write
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Description
79
Clip Functions
Parameters
FPClipID outClipID
80
Clip Functions
FPClipID_GetCanonicalFormat
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Description
Parameters
FPCanonicalClipID outClipID
FPClipID vClipID;
FPClip_Write(vClip, vClipID);
81
Clip Functions
FPCanonicalClipID vCanonicalClipID;
FPClipID_GetCanonicalFormat (vClipID, vCanonicalClipID);
Error handling
FPClipID_GetStringFormat
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Description
Parameters
FPClipID outClipID
Error handling
FPClipID vClipID;
FPClipID_GetStringFormat(vCanonicalClipID, vClipID);
FPClipRef vClip = FPClip_Open(vPool, vClipID,
FP_OPEN_ASTREE);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of what errors can occur:
82
Clip Functions
83
Clip Functions
FPClip_Exists
FPClip_GetClipID
FPClip_GetCreationDate
FPClip_GetEBRClassName
FPClip_GetEBREventTime
FPClip_GetEBRPeriod
FPClip_GetName
FPClip_GetNumBlobs
FPClip_GetNumTags
FPClip_GetPoolRef
FPClip_GetRetentionClassName
FPClip_GetRetentionHold
FPClip_GetRetentionPeriod
FPClip_GetTotalSize
FPClip_IsEBREnabled
FPClip_IsModified
FPClip_ValidateRetentionClass
FPClip_Exists
Syntax
Return value
Input parameters
Concurrency
requirement
Description
84
Clip Functions
The ID of a C-Clip.
Example
Error handling
85
Clip Functions
FPClip_GetClipID
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Description
FPClipID outClipID
86
Clip Functions
FPClip_GetCreationDate
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Description
Parameters
char *outDate
outDate is the buffer that will store the creation date of the
FPInt *ioDateLen
FPInt datesize;
datesize = MAX_DATE_SIZE;
char date[MAX_DATE_SIZE];
FPClip_GetCreationDate (myClip, date, &datesize);
87
Clip Functions
Error handling
FPClip_GetEBRClassName
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Unicode support
Description
Parameters
char* outClassName
FPInt* ioNameLen
88
Clip Functions
FPClip_GetEBREventTime
Syntax
Return value
Input parameters
Output Parameters
Concurrency
requirement
Unicode support
Description
Parameters
char* outEBREventTime
outEBREventTime is the memory buffer that will store the EBR
event time. The time is specified in YYYY.MM.DD hh:mm:ss GMT
format.
FPInt *ioEBREventTimeLen
89
Clip Functions
FPClip_GetEBRPeriod
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
90
Clip Functions
FPClip_GetName
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Unicode support
Description
This function retrieves the name of the given C-Clip. The name is
returned in outName.
Parameters
char *outName
outName is the buffer that will store the name of the C-Clip. The
FPInt *ioNameLen
FPInt namesize;
namesize = MAX_NAME_SIZE;
char name[MAX_NAME_SIZE];
FPClip_GetName (myClip, name, &namesize);
91
Clip Functions
Error handling
FPClip_GetNumBlobs
Syntax
Return value
Input parameters
Concurrency
requirement
Description
This function returns the number of blobs that are associated with the
given C-Clip.
Parameters
92
Clip Functions
FPClip_GetNumTags
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
93
Clip Functions
FPClip_GetPoolRef
Syntax
Return value
Input parameters
Concurrency
requirement
Description
This function returns the reference to the pool in which the given
C-Clip has been opened.
Parameters
94
Clip Functions
FPClip_GetRetentionClassName
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
Parameters
char *outName
outName is the buffer that will store the name of the retention
FPInt *ioNameLen
FPClip_GetRetentionHold
Syntax
Return value
Input parameters
95
Clip Functions
Concurrency
requirement
Description
Parameters
96
Clip Functions
FPClip_GetRetentionPeriod
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
97
Clip Functions
FPClip_GetTotalSize
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
98
Clip Functions
FPClip_IsEBREnabled
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
99
Clip Functions
FPClip_IsModified
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
Error handling
if (FPClip_IsModified (myClip)) {
FPClip_Write (myClip, myClipID);
}
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
100
Clip Functions
FPClip_ValidateRetentionClass
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
101
Clip Functions
FPClip_GetDescriptionAttribute
FPClip_GetDescriptionAttributeIndex
FPClip_GetNumDescriptionAttributes
FPClip_RemoveDescriptionAttribute
FPClip_SetDescriptionAttribute
FPClip_GetDescriptionAttribute
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
This function retrieves the value of the given attribute from the given
C-Clip.
Parameters
Clip Functions
FPInt *ioAttrValueLen
char vBuffer[1024];
FPInt l=sizeof(vBuffer);
FPClip_GetDescriptionAttribute(myClip, "company",
vBuffer, &l);
Error handling
103
Clip Functions
FPClip_GetDescriptionAttributeIndex
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Unicode support
Description
This function retrieves the name and value of an attribute from the
given C-Clip according to the given index.
Parameters
char *outAttrName
outAttrName is the buffer that will store the attribute name.
char *outAttrValue
outAttrValue is the buffer that will store the attribute value.
FPInt *ioAttrNameLen
104
Clip Functions
FPInt *ioAttrValueLen
Error handling
char vName[256];
char vValue[256];
for (int i=0;
i<FPClip_GetNumDescriptionAttributes(myClip); i++)
{FPInt vNameLen = sizeof(vName);
FPInt vValueLen = sizeof(vValue);
FPClip_GetDescriptionAttributeIndex(myClip, i, vName,
&vNameLen, vValue, &vValueLen);
}
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
105
Clip Functions
FPClip_GetNumDescriptionAttributes
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
FPInt vNum;
vNum = FPClip_GetDescriptionAttributes(myClip);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
106
Clip Functions
FPClip_RemoveDescriptionAttribute
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
This function removes the given attribute from the CDF of the given
C-Clip.
Parameters
FPClip_RemoveDescriptionAttribute(myClip, "company");
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
107
Clip Functions
FPClip_SetDescriptionAttribute
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
Description
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
This function adds the given attribute (name-value pair) to the CDF
of the given C-Clip.
You can also add user-defined attributes using the environment
variable CENTERA_CUSTOM_METADATA. The SDK reads this variable
during FPClip_Create(). Refer to FPClip_AuditedDelete on
page 61 for more information.
Use FPClip_GetDescriptionAttribute() to read the user-defined
attributes. Use FPClip_GetDescriptionAttributeIndex() to see
which user-defined attributes and standard metadata attributes the
CDF contains.
Parameters
108
Clip Functions
Example
Error handling
109
Clip Functions
FPClip_FetchNext
FPClip_GetTopTag
FPClip_FetchNext
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
110
Clip Functions
Error handling
FPClip_GetTopTag
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Flat mode
This function returns a reference to the first user tag (as created by
FPTag_Create()) in the specified C-Clip. Call
FPClip_FetchNext() to retrieve subsequent tags.
Tree mode
This function returns a reference to the top-level tag in a C-Clip.
If the tag structure is empty, you can use the top tag as the parent
tag to create the first user tag in the tree.
If the tag structure is not empty, you can use the top tag as a
starting point for further navigation. You can use
FPTag_GetFirstChild(), then FPTag_GetSibling() and
FPTag_GetPrevSibling() to retrieve tags hierarchically, or
FPClip_FetchNext() to retrieve tags in sequential order.
Note: Unlike user tags, the top tag has no name, attributes, or associated
blob. For example, you cannot call FPTag_GetTagName() on the top tag.
111
Clip Functions
Be sure to close the tag with FPTag_Close() after you are done
processing the tag to free allocated resources.
Parameters
112
Tag Functions
Tag functions.....................................................................................
Tag handling functions....................................................................
Tag navigation functions.................................................................
Tag attribute functions ....................................................................
Tag Functions
116
116
126
132
115
Tag Functions
Tag functions
The tag functions operate at the level of a C-Clip tag. Tags are used to
support self-describing content. The tag functions are subdivided
into four categories based on their use:
Before you can perform a tag operation, you must first create or
retrieve a tag. Close each tag after processing is complete.
116
FPTag_Close
FPTag_Copy
FPTag_Create
FPTag_Delete
FPTag_GetBlobSize
FPTag_GetClipRef
FPTag_GetPoolRef
FPTag_GetTagName
Tag Functions
FPTag_Close
Syntax
Return value
Input parameters
Concurrency
requirement
Description
This function closes the given tag and frees all allocated resources.
Note that calling this function on a tag that has already been closed
may produce unwanted results.
Parameters
FPTag_Close (myTag);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
117
Tag Functions
FPTag_Copy
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
118
Tag Functions
FPTag_Create
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
This function creates a new tag within a C-Clip that has been opened
in tree mode (refer to FPClip_Open()), and returns a reference to the
new tag. The number of tags in a C-Clip is restricted only by the
maximum size of a C-Clip: 100 MB.
Note: A reference to a parent tag is required to create a new tag.
Parameters
The reference to the parent tag of the new tag that you are
creating.
Example
119
Tag Functions
Error handling
FPTag_Delete
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
FPTag_Delete (myTag);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
120
Tag Functions
FPTag_GetBlobSize
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
121
Tag Functions
FPTag_GetClipRef
Syntax
Return value
Input parameters
Concurrency
requirement
Description
This function returns the reference to the C-Clip in which the given
tag was opened.
Parameters
The reference to a tag that any of the tag functions have navigated to
or created.
Example
Error handling
122
Tag Functions
FPTag_GetPoolRef
Syntax
Return value
Input parameters
Concurrency
requirement
Description
This function returns the reference to the pool in which the given tag
was opened.
Parameters
The reference to a tag that any of the tag functions have opened or
created.
Example
Error handling
123
Tag Functions
FPTag_GetTagName
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
Parameters
char *outName
outName is the buffer that will store the name of the tag. The name
will be truncated to the buffer length as specified by ioNameLen.
FPInt *ioNameLen
124
FPInt namesize;
namesize = MAX_NAME_SIZE;
char name[MAX_NAME_SIZE];
FPTag_GetTagName (myTag, name, &namesize);
Tag Functions
Error handling
125
Tag Functions
This section describes the FPTag functions that handle tag navigation
within a C-Clip:
FPTag_GetFirstChild
FPTag_GetParent
FPTag_GetPrevSibling
FPTag_GetSibling
Figure 1 on page 127 shows how the tags are structured hierarchically
and how the tag navigation functions operate if the C-Clip opens in
tree mode.
126
Tag Functions
Figure 1
127
Tag Functions
FPTag_GetFirstChild
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
128
Tag Functions
FPTag_GetParent
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
129
Tag Functions
FPTag_GetPrevSibling
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
130
Tag Functions
FPTag_GetSibling
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
131
Tag Functions
With the set attribute functions you can assign a specified value to a
tag attribute. If the attribute does not exist yet, the function creates
the attribute. If the attribute exists, the function overwrites the
current value of that attribute. The get attribute functions are used to
retrieve the assigned attribute values.
The size of an attribute value is limited to 100 KB. The number of
attributes allowed in a tag is limited only by the maximum size of a
C-Clip, which is 100 MB.
This section describes the FPTag functions that enable the setting and
retrieval of tag attribute values:
132
FPTag_GetBoolAttribute
FPTag_GetIndexAttribute
FPTag_GetLongAttribute
FPTag_GetNumAttributes
FPTag_GetStringAttribute
FPTag_RemoveAttribute
FPTag_SetBoolAttribute
FPTag_SetLongAttribute
FPTag_SetStringAttribute
Tag Functions
FPTag_GetBoolAttribute
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
Parameters
Example
Error handling
133
Tag Functions
FPTag_GetIndexAttribute
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
Parameters
FPTagRef inTag
FPInt inIndex
inIndex is the index number (zero based) of the tag attribute that
has to be retrieved.
char *outAttrName
outAttrName is the buffer that will hold the name of the attribute.
FPInt *ioAttrNameLen
134
Tag Functions
char *outAttrValue
outAttrValue is the buffer that will hold the value of the
FPInt *ioAttrValueLen
Error handling
char TagAttrName[MAX_NAME_SIZE];
char TagAttrValue[MAX_NAME_SIZE];
NumAttributes = FPTag_GetNumAttributes(Tag);
if (FPPool_GetLastError() != 0)
handle error...
for (i = 0; i < NumAttributes; i++)
{
AttrNameSize = MAX_NAME_SIZE;
AttrValueSize = MAX_NAME_SIZE;
FPTag_GetIndexAttribute(Tag, i,
TagAttrName, &AttrNameSize,
TagAttrValue, &AttrValueSize);
if (FPPool_GetLastError() != 0)
handle error
printf("Attribute #%d has name \"%s\" and value
\"%s\".\n",
i, TagAttrName, TagAttrValue);
}
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
135
Tag Functions
FPTag_GetLongAttribute
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
Parameters
Example
Error handling
136
Tag Functions
FPTag_GetNumAttributes
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
137
Tag Functions
FPTag_GetStringAttribute
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
Parameters
char *outAttrValue
outAttrValue is the buffer that will hold the attribute value. The
FPInt *ioAttrValueLen
138
Tag Functions
Example
Error handling
char outAttrValue[MAX_NAME_SIZE];
namesize = MAX_NAME_SIZE;
FPTag_GetStringAttribute (myTag, "name", outAttrValue,
&namesize);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
FPTag_RemoveAttribute
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
Parameters
has to be removed.
Tag attribute functions
139
Tag Functions
Example
Error handling
FPTag_SetBoolAttribute
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
Parameters
to be created or updated.
140
Tag Functions
Example
Error handling
FPBool inAttrValue;
inAttrValue = TRUE;
FPTag_SetBoolAttribute (myTag, "name", inAttrValue);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
FPTag_SetLongAttribute
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
141
Tag Functions
Parameters
created or updated.
Note: The name must be XML compliant.
Example
Error handling
FPLong inAttrValue;
inAttrValue = 100;
FPTag_SetLongAttribute (myTag, "name", inAttrValue);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
142
Tag Functions
FPTag_SetStringAttribute
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
Parameters
be created or updated.
Note: The name must be XML compliant.
value is larger than 100 KB, EMC recommends writing the value
as a separate blob to the pool in order to increase performance.
The maximum allowed attribute value size is 100 KB.
143
Tag Functions
Example
Error handling
144
147
FPTag_BlobExists
FPTag_BlobRead
FPTag_BlobReadPartial
FPTag_BlobWrite
FPTag_BlobWritePartial
FPTag_BlobExists
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
FPTagRef inTag
FPTag_BlobExists (myTag);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
148
149
FPTag_BlobRead
Syntax
Return value
Input parameters
Concurrency
requirement
Description
stream does not have to support marking. If the operation fails, the
operation continues from the point where it failed.
Note: Due to server limitations, the stream should not exceed 1 minute per
iteration to store the data received from the server. This means the
completeProc callback should not take longer than 1 minute to execute.
This function gets the Content Address from the tag, opens the blob,
reads the data in chunks of 16 Kbyte, writes the bytes to the stream,
and closes the blob.
Note: The server allows the application to perform this call if the server
capability "read" is enabled. If this capability is disabled, the error
FP_OPERATION_NOT_ALLOWED is returned.
150
Parameters
151
FPTag_BlobReadPartial
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Note: Due to server limitations, the stream should not exceed 1 minute per
iteration to store the data received from the server. This means the
completeProc callback should not take longer than 1 minute to execute.
152
Parameters
153
Error handling
154
FPTag_BlobWrite
Syntax
Return value
Input parameters
Concurrency
requirement
Description
155
If the generic stream returns more data than requested, the SDK
enlarges the buffer to accommodate the additional data. If the stream
cannot provide the data within 1 minute, set mTransferLen to -1 and
mAtEOF to false, which forces FPTag_BlobWrite() to issue a
keep-alive packet to the server.
Segments are exported to the server as if they are different blobs. If an
error occurs during the write operation, the function retries. The retry
operation only works properly if the stream supports marking (and
goes back to a previous position which is the beginning of the current
segment). If the stream does not support marking to a previous
position, the write operation is restarted from the beginning of the
stream.
Parameters
156
A variety of options that control the writing of the blob. You can
specify options from different option sets by using the OR
operator (ORing the values together).
ID Calculation Identifies how the content address should
be calculated. You must use one of the following options:
FP_OPTION_CLIENT_CALCID The client calculates the
content address before sending the data to the
CAS-enabled node. The client does not send the data if the
node already contains identical data. Consider using this
option when writing small files (smaller than 10 MB) and
identical data is likely to exist on one or more CAS-enabled
nodes. The provided stream must support marking. All
non-generic streams support marking; a generic stream
may or may not support marking.
FP_OPTION_CLIENT_CALCID_STREAMING The client
calculates the content address while sending the data to the
server. The client sends the data even if one or more
CAS-enabled nodes already contains the data. This option
is equivalent to FP_OPTION_DEFAULT_OPTIONS. Consider
using this option when writing large files (10 MB or larger),
when using many threads, or when identical data is
unlikely to exist on the CAS-enabled nodes.
You can convert CLIENT_CALCID_STREAMING to operate in
the SERVER_CALCID_STREAMING mode by setting the option
FP_OPTION_DISABLE_CLIENT_STREAMING in
FPPool_SetGlobalOption or by setting it to True as an
environment variable. If the latter, the change does not
require a recompilation of application code. The SDK then
handles and processes all references to
CLIENT_CALCID_STREAMING as
SERVER_CALCID_STREAMING.
157
158
Example
Error handling
159
FPTag_BlobWritePartial
Syntax
Return value
Input parameters
Concurrency
requirement
Description
160
Note: Due to server limitations, the stream should not exceed 1 minute per
iteration to retrieve the data for transfer. In practice this means the
prepareBufferProc callback should not take longer than 1 minute to
execute.
If the generic stream returns more data than requested, the SDK
enlarges the buffer to accommodate the additional data. If the stream
cannot provide the data within 1 minute, set mTransferLen to -1 and
mAtEOF to false, which forces FPTag_BlobWritePartial() to issue a
keep-alive packet to the server.
Segments are exported to the server as if they are different blobs. If an
error occurs during the write operation, the function retries. The retry
operation only works properly if the stream supports marking (and
goes back to a previous position which is the beginning of the current
segment). If the stream does not support marking to a previous
position, the write operation is restarted from the beginning of the
stream.
Note: If you are not using FPTag_BlobWritePartial to perform
multithreading, use FPTag_BlobWrite instead.
161
Parameters
A variety of options that controls the writing of the blob. You can
specify options from different option sets by using the OR
operator (ORing the values together).
ID Calculation Identifies how the Content Address should
be calculated. You must use one of the following options:
FP_OPTION_CLIENT_CALCID The client calculates the
address before sending the data to one or more
CAS-enabled nodes. The client does not send the data if the
nodes already contain identical data. Consider using this
option when writing small files (smaller than 10 MB) and
identical data is likely to exist on one or more CAS-enabled
nodes. The provided stream must support marking. All
non-generic streams support marking; a generic stream
may or many not support marking.
FP_OPTION_CLIENT_CALCID_STREAMING The client
calculates the address while sending the data to the server.
The client sends the data even if one or more CAS-enabled
nodes already contains the data. This option is equivalent
to FP_OPTION_DEFAULT_OPTIONS. Consider using this
option when writing large files (10 MB or larger), when
using many threads, or when identical data is unlikely to
exist on the nodes.
You can convert CLIENT_CALCID_STREAMING to operate in
the FP_OPTION_SERVER_CALCID_STREAMING mode by
setting the option FP_OPTION_DISABLE_CLIENT
_STREAMING in FPPool_SetGlobalOption or by setting it
to True as an environment variable. If the latter, the change
does not require a recompilation of application code. The
162
163
You have an open clip and an open tag into which to write the
data (vTag is a FPTagRef type).
Thread function:
void* myWriter (void* inArgs)
{
myWriterArgs* vArgs = (myWriterArgs*)inArgs;
if ( vArgs )
{
FPTag_BlobWritePartial(vArgs->mTag,
vArgs->mStream,
vArgs->mOptions,
vArgs->mSequenceID);
}
return NULL;
}
164
(void*)&vArgs2);
// wait for the threads to complete
pthread_join(myThread1, NULL);
pthread_join(myThread2, NULL);
Error handling
165
166
167
FPRetentionClass_Close
FPRetentionClassContext_Close
FPRetentionClassContext_GetFirstClass
FPRetentionClassContext_GetLastClass
FPRetentionClassContext_GetNamedClass
FPRetentionClassContext_GetNextClass
FPRetentionClassContext_GetNumClasses
FPRetentionClassContext_GetPreviousClass
FPRetentionClass_GetName
FPRetentionClass_GetPeriod
FPRetentionClass_Close
Syntax
Return value
Input parameters
Concurrency
requirement
Description
This function closes the given retention class and frees all related
(memory) resources. Note that calling this function on a retention
class that is already closed may produce unwanted results.
Parameters
FPRetentionClass_Close(vRetentionClass);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
168
FPRetentionClassContext_Close
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPRetentionClassContext_Close (FPRetentionClassContext
inContextRef)
void
FPRetentionClassContext inContextRef
Parameters
FPRetentionClassContext inContextRef
FPRetentionClassContext_Close (myRetentionClassContext);
None.
169
FPRetentionClassContext_GetFirstClass
Syntax
Return value
Input parameters
Concurrency
requirement
FPRetentionClassContext_GetFirstClass (const
FPRetentionClassContextRef inContextRef)
FPRetentionClassRef
const FPRetentionClassContextRef inContextRef
Description
Parameters
FPRetentionClassContext_GetLastClass
Syntax
Return value
Input parameters
Concurrency
requirement
FPRetentionClassContext_GetLastClass (const
FPRetentionClassContextRef inContextRef)
FPRetentionClassRef
const FPRetentionClassContextRef inContextRef
Description
Parameters
170
FPRetentionClassContext_GetNamedClass
Syntax
Return value
Input parameters
Concurrency
requirement
FPRetentionClassContext_GetNamedClass (const
FPRetentionClassContextRef inContextRef, const char
*inName)
FPRetentionClassRef
const FPRetentionClassContextRef inContextRef,
const char *inName
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
Parameters
FPRetentionClassContext_GetNextClass
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPRetentionClassContext_GetNextClass (const
FPRetentionClassContextRef inContextRef)
FPRetentionClassRef
const FPRetentionClassContextRef inContextRef
171
Parameters
FPRetentionClassContext_GetNumClasses
Syntax
Return value
Input parameters
Concurrency
requirement
FPRetentionClassContext_GetNumClasses (const
FPRetentionClassContextRef inContextRef)
FPInt
const FPRetentionClassContextRef inContextRef
Description
Parameters
172
FPRetentionClassContext_GetPreviousClass
Syntax
Return value
Input parameters
Concurrency
requirement
FPRetentionClassContext_GetPreviousClass (const
FPRetentionClassContextRef inContextRef)
FPRetentionClassRef
const FPRetentionClassContextRef inContextRef
Description
Parameters
FPRetentionClass_GetName
Syntax
Return value
Input parameters
Output Parameters
Concurrency
requirement
Unicode support
Description
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
This function retrieves the name of the given retention class. The
name is returned in outName.
Call FPRetentionClass_Close() when you are done with this
object.
173
Parameters
char *outName
The buffer that will store the name of the retention class. The
name will be truncated if needed to the buffer length as specified
by ioNameLen.
FPInt *ioNameLen
Error handling
FPRetentionClass_GetPeriod
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
174
vRetentionPeriod = FPRetentionClass_GetPeriod
(myRetentionClass);
Error handling
175
176
Stream Functions
Stream Functions
177
Stream Functions
Stream functions
Streams are generalized input/output channels similar to the
HANDLE mechanism used in the Win32 API for files, the C++
iostream functionality, the C standard I/O FILE routines, or the Java
InputStream/OutputStream facility.
All bulk data movement in the API is achieved by first associating a
stream with a data sink or source (for example, a file, an in-memory
buffer, or the standard output channel) and then performing
operations on that stream.
The API stream functions implement streams generically. When
creating a stream, the application developer has to use method
pointers to indicate how subsequent stream functions should handle
the stream. For more information on the available method pointers
for stream functions, refer to FPStream_CreateGenericStream on
page 186.
178
Stream Functions
If the end of the stream has been reached, then mAtEOF is true. It is
possible that this last call to the completeProc does not pass any data
(mTransferLen is 0, and mBuffer remains NULL).
Stream buffer mode
The stream provides a buffer that the SDK will fill.
prepareBufferProc is responsible for preparing this buffer and to
set mBuffer to it. mTransferLen contains the number of bytes that
can be transferred. completeProc processes this buffer.
mTransferLen then contains the number of bytes actually transferred
into the buffer. The value of mBuffer does not change.
The following rules apply:
179
Stream Functions
If the end of the stream has been reached, then mAtEOF is true. It is
possible that this last call to completeProc does not pass any data
(mTransferLen is 0).
Stream callback validation
In v3.2, the SDK performs generic stream verifications on certain
fields that can be changed in application callbacks. To enable full
validation, logging and the FP_OPTION_STREAM_STRICT_MODE option
must be enabled. (This option is enabled by default.) If only logging
is enabled, the SDK issues the appropriate warning message to the
log. If the strict mode and logging are enabled and validation fails,
the SDK generates either the FP_STREAM_VALIDATION_ERR or
FP_STREAM_BYTECOUNT_MISMATCH_ERR error message, depending on
the field.
The SDK validates the following FPStreamInfo fields:
mVersion
MStreamLen
mStreamPos
mMarkerPos
mReadFlag
180
Stream Functions
FPStream_CreateBufferForInput
FPStream_CreateBufferForOutput
FPStream_CreateFileForInput
FPStream_CreateFileForOutput
FPStream_CreateGenericStream
FPStream_CreatePartialFileForInput
FPStream_CreatePartialFileForOutput
FPStream_CreateTemporaryFile
FPStream_CreateToNull
FPStream_CreateToStdio
FPStream_CreateBufferForInput
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
stream.
Example
Error handling
char myDataSource[A_BIG_SIZE];
myStream = FPStream_CreateBufferForInput (myDataSource,
A_BIG_SIZE);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
181
Stream Functions
FPStream_CreateBufferForOutput
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
stream.
Example
Error handling
char myDataSource[A_BIG_SIZE];
myStream = FPStream_CreateBufferForOutput (myDataSource,
A_BIG_SIZE);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
182
Stream Functions
FPStream_CreateFileForInput
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
183
Stream Functions
vStatus = FPPool_GetLastError();
}
Error handling
FPStream_CreateFileForOutput
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
for writing this is usually wb. You can use one of the following
permissions:
wb: opens the given file for writing. This function overwrites
existing content of the file.
ab: opens the file for writing at the end of the file. If the file does
not exist, the function creates the file.
rb+: opens the given file for both reading and writing. If the file
exists, the function overwrites the content. If the file does not exist
or the system cannot find the file, the function returns an error.
184
Stream Functions
wb+: opens the given file for both reading and writing. If the
given file exists, the function overwrites the content.
ab+: opens the given file for reading and writing at the end of the
file. If the file does not exist, the function creates the file.
Example
{
FPStreamRef vStream = FPStream_CreateFileForOutput (pPath, "wb");
// create a new binary file for write
if (vStream == 0)
return FPPool_GetLastError();
FPTag_BlobRead (inTag, vStream, 0);
// read stream has highest performance for downloading
FPStream_Close (vStream);
// close file stream
}
Error handling
185
Stream Functions
FPStream_CreateGenericStream
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
Any data that the application wants to pass to the method pointers.
The callback functions are of type FPStreamProc:
typedef long (*FPStreamProc) (FPStreamInfo*)
186
Stream Functions
mVersion
Initialization
mUserData
PrepareBuffer
Proc
As needed
CompleteProc
As needed
SetMarkerProc
As needed
ResetMarkerProc
As needed
CloseProc
As needed
mMarkerPos
mStreamLen
mAtEOF
0
Set to the total
number of bytes
that make up the
data source if
known, otherwise,
use -1.
Set to true if
Set to the total
number of bytes this is the last
that make up the buffer of data.
data source if
known, otherwise,
use -1.
+=mTransfer
Length
mReadflag
mBuffer
mTransferLen
Null
Allocate (if
Number of data
necessary) and bytes in buffer
populate
transfer buffer.
Free/release
buffer (if
applicable).
=mMarkerPos
Use to reset
current position
of data source.
Free/release
buffer (if
applicable).
187
Stream Functions
Table 13
FPStreamInfo
Callbacks
mVersion
Initialization
mUserData
PrepareBuffer
Proc
As needed
CompleteProc
As needed
mMarkerPos
mStreamLen
mAtEOF
mReadflag
mBuffer
mTransferLen
Null
Retrieve data
from transfer
buffer, free
buffer if
needed.
SetMarkerProc
ResetMarkerProc
CloseProc
188
As needed
Free if using
application
buffer.
Stream Functions
Table 14
Description
PrepareBufferProc
Callback behavior
This method prepares a buffer that the stream can use. If the stream is
an input buffer, the callback method prepares a buffer that contains the
data. The mBuffer field of FPStreamInfo contains a pointer to the data.
If the stream is an output buffer, the function does nothing.
If you name your function myPrepareBuffer, declare it like this:
static long myPrepareBuffer (FPStreamInfo
*pStreamInfo)
pStreamInfo is a pointer to an FPStreamInfo structure. This
structure is allocated and maintained by the generic stream. You are
allowed to read and write fields from this structure. The exact meaning
of each field depends on the purpose of the stream: input or output.
The SDK calls myPrepareBuffer prior to transferring data from
the input stream to the Atmos CAS server. The SDK expects the
callback function to make the data available and provides a pointer to it
in mBuffer. The pointer to this data is owned by the SDK until the
completeProc is called. The prepareBufferProc is also
called before data is transferred from the Atmos CAS server to the
SDK. myPrepareBuffer could then be used to prepare the
output stream to receive data. In many cases, however, it is not
necessary to implement this function for output streams (pass NULL in
FPStream_CreateGenericStream()). If used for output
streams, myPrepareBuffer can put a pointer to the buffer that it
manages in mBuffer and to its length in mTransferLen.
If the inPrepareBufferProc callback method returns a
non-zero value, the SDK terminates the operation (for example,
reading a blob) with an FP_STREAM_VALIDATION_ERR error
and logs the appropriate information. No further processing can occur
on that stream in the scope of that operation.
mVersion
(short)
189
Stream Functions
Table 14
Description
mUserData
(void*)
mStreamPos
(FPLong)
In strict mode, the SDK checks to ensure the current stream position is
incrementally based on the value specified in mStreamLen for the
number of passes made through the stream. Validation of this field also
occurs after a reset, which is equaled to 0, or after a resetMarker
occurs if implemented by the application. In this case, the resetMarker
is equaled to the value of mMarkerPos.
mMarkerPos
(FPBool)
In strict mode, the SDK checks for this update. An error results if the
value of mMarkerPos does not match the current streamPos after the
mark call was made.
190
Stream Functions
Table 14
Description
mStreamLen
((FPLong)
In strict mode, if the amount of data written to the stream does not
match the amount of data in the stream, including any provision for an
offset, the result is an FP_STREAM_BYTECOUNT_MISMATCH
_ERR error and the following message:
Overwrite detected. More data was written than
the stream contains (known stream lengths
only).
mAtEOF
(FPBool)
191
Stream Functions
Table 14
Description
mReadflag
(FPBool)
In strict mode, the SDK detects that a change to the stream type was
made after the operation initialized.
192
mBuffer
(void*)
mTransferLen
(FPLong)
Stream Functions
Table 14
Description
CompleteProc
Callback behavior
The generic stream calls this method when the buffer prepared with
inPrepareBufferProc is no longer needed. If the stream was
an input stream, this means the data has been processed successfully.
If the stream was an output stream, this means the buffer contains the
requested data and it can be written to an output device.
If you name your function myComplete, declare it like this:
static long myComplete (FPStreamInfo
*pStreamInfo)
pStreamInfo is a pointer to an FPStreamInfo structure. This
structure is allocated and maintained by the generic stream. You are
allowed to read and write fields from this structure. The exact meaning
of each field depends on the purpose of the stream: input or output.
For an output stream:
myComplete actually transfers the data pointed to by mBuffer to
the output device. For a file, this might translate into an fwrite()
operation. The mBuffer pointer can either be provided by the
stream or by the SDK.
The end of the stream behaves as follows:
If the application allocated its buffer in prepareBufferProc,
the last completeProc callback has mTransferLen >= 0
and mAtEOF is true.
If the application did not allocate its buffer, the last call to
completeProc always has mTransferLen = 0 and
mAtEOF is true.
Note: If the SDK provides the mBuffer pointer to the stream to read
the output data, the callback function should never change this data.
For an input stream:
The callback function notifies that the SDK has finished with the input
buffer (mBuffer). It can then unlock or deallocate the buffer if
necessary. In many cases, this callback is NULL for input streams.
Note: If the inCompleteProc callback method returns a
non-zero value, the SDK terminates the operation (for example,
reading a blob) with an FP_STREAM_VALIDATION_ERR error
and logs the appropriate information. No further processing can occur
on that stream in the scope of that operation.
mVersion
(short)
193
Stream Functions
Table 14
Description
mUserData
(void*)
mStreamPos
(FPLong)
mMarkerPos
(FPBool)
In strict mode, the SDK checks for this update. An error results if the
value of mMarkerPos does not match the current streamPos after the
mark call was made.
194
Stream Functions
Table 14
Description
mStreamLen
((FPLong)
In strict mode, if the amount of data written to the stream does not
match the amount of data in the stream, including any provision for an
offset, the result is an FP_STREAM_BYTECOUNT_MISMATCH
_ERR error and the following message:
Overwrite detected. More data was written than
the stream contains (known stream lengths
only).
mAtEOF
(FPBool)
mReadflag
(FPBool)
mBuffer
(void*)
195
Stream Functions
Table 14
Description
mTransferLen
(FPLong)
SetMarkerProc
Callback behavior
This method instructs the generic stream to mark the current position in
the stream. If the stream supports marking, the function can use the
mMarkerPos field to indicate the current position.
If you name your function mySetMarker, declare it like this:
static long mySetMarker (FPStreamInfo
*pStreamInfo)
pStreamInfo is a pointer to an FPStreamInfo structure. This
structure is allocated and maintained by the generic stream. You are
allowed to read and write fields from this structure. The exact meaning
of each field depends on the purpose of the stream: input or output.
The SDK sometimes needs to return to an earlier position in the
stream. To do this, it sets a mark at the current position in the stream
(how the current position is defined depends on the stream
implementation). If necessary, the SDK can return later to that position
by calling the resetMarkerProc.
If a stream does not support marking, pass NULL in
FPStream_CreateGenericStream.
Note: This callback function returns an error if unsuccessful or
ENOERR if successful. Any error from mySetMarker is currently
ignored by the SDK as it is not a fatal condition.
mUserData
(void*)
196
Stream Functions
Table 14
Description
mStreamPos
(FPLong)
mReadflag
(FPBool)
mMarkerPos
(FPLong)
In strict mode, the SDK checks for this update. An error results if the
value of mMarkerPos does not match the current streamPos after the
mark call was made.
197
Stream Functions
Table 14
Description
ResetMarkerProc
Callback behavior
This method tells the stream to go back to the marked position in the
stream (mMarkerPos).
If you name your function myResetMarker, declare it like this:
static long myResetMarker (FPStreamInfo
*pStreamInfo)
pStreamInfo is a pointer to an FPStreamInfo structure. This
structure is allocated and maintained by the generic stream. You are
allowed to read and write fields from this structure. The exact meaning
of each field depends on the purpose of the stream: input or output.
When the SDK needs to return to an earlier position in the stream
(indicated by calling setMarkerProc), it calls
resetMarkerProc.
If a stream does not support marking, then pass NULL in
FPStream_CreateGenericStream. When the SDK needs
this functionality, it exits with an
FP_OPERATION_REQUIRES_MARK error.
If the SDK attempts to return to a previously marked position in the
stream and the stream returns FP_OPERATION_REQUIRES
_MARK when the attempt is made, the SDK cannot continue with the
operation and propagates the FP_OPERATION_REQUIRES
_MARK error to the application.
mVersion
(short)
mUserData
(void*)
mStreamPos
(FPLong)
198
Stream Functions
Table 14
Description
mMarkerPos
(FPBool)
In strict mode, the SDK checks for this update. An error results if the
value of mMarkerPos does not match the current streamPos after the
mark call was made.
mReadflag
(FPBool)
CloseProc
Callback behavior
199
Stream Functions
Table 14
Example
Description
mVersion
(short)
mUserData
(void*)
mStreamLen
(FPLong)
Stream Functions
}
return vResult;
}
The marker methods use a type of seek() function to set and get the
current position in the file that is read or written. The offset is kept in
the mMarker field (which is only used by stream handling functions
and will not be changed by generic streams).
static long fileSetMarker (FPStreamInfo *pStreamInfo)
{ TStreamFileInfo *vFileInfo = (TStreamFileInfo*) pStreamInfo->mUserData;
pStreamInfo->mMarkerPos = myFileSeek (vFileInfo->mFile, 0, FILE_CURRENT);
return ENOERR;
}
static long fileResetMarker (FPStreamInfo *pStreamInfo)
{ TStreamFileInfo *vFileInfo = (TStreamFileInfo*) pStreamInfo->mUserData;
myFileSeek (vFileInfo->mFile, pStreamInfo->mMarkerPos, FILE_BEGIN);
pStreamInfo->mStreamPos = pStreamInfo->mMarkerPos;
return ENOERR;
}
201
Stream Functions
free (vFileInfo);
return ENOERR;
}
File Output
This method is very similar to the stream creation function for File
Input. The main difference is that no memory buffer is allocated.
EXPORT FPStreamRef FPStream_CreateFileForOutput (const char *inFilePath, const
char *inPerm)
{ TStreamFileInfo *vFileInfo = NULL;
FPStreamRef
vResult;
vFileInfo = (TStreamFileInfo*) calloc (1, sizeof (TStreamFileInfo));
// get the access rights from the inPerm parameter..
vFileInfo->mFile = CreateFile (inFilePath, access, FILE_SHARE_READ, NULL,
createMode, FILE_ATTRIBUTE_NORMAL, NULL);
vResult = FPStream_CreateGenericStream (NULL, fileOutComplete,
fileSetMarker, fileResetMarker,
fileClose, vFileInfo);
FPStreamInfo *vInfo = FPStream_GetInfo (vResult);
if (vInfo)
{ vInfo->mReadFlag = false; // stream is for output
vInfo->mStreamLen = // get file length (usually = 0)
}
return vResult;
}
This method writes the data pointer to mBuffer into a file. The call
back function returns an error value to the application to stop
FPTag_BlobRead from the stream.
static long fileOutComplete (FPStreamInfo *pStreamInfo)
{ TStreamFileInfo *vFileInfo = (TStreamFileInfo*) pStreamInfo->mUserData;
unsigned long
l;
if (WriteFile (vFileInfo->mFile, pStreamInfo->mBuffer,
pStreamInfo->mTransferLen, &l, NULL) == 0)
{ return FP_OPERATION_NOT_SUPPORTED1;
}
pStreamInfo->mTransferLen = l;
pStreamInfo->mStreamPos += l;
1. Or any other error value. The error value will be returned to the application.
202
Stream Functions
return ENOERR;
}
Error handling
FPStream_CreatePartialFileForInput
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
203
Stream Functions
Error handling
204
Stream Functions
FPStream_CreatePartialFileForOutput
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
For partial writes, ab+ is typically used. However, you can use
any of the following permissions:
wb: opens the given file for writing. This function overwrites
existing content of the file.
ab: opens the file for writing at the end of the file. If the file does
not exist, the function creates the file.
205
Stream Functions
rb+: opens the given file for both reading and writing. If the file
exists, the function overwrites the content. If the file does not exist
or the system cannot find the file, the function returns an error.
wb+: opens the given file for both reading and writing. If the
given file exists, the function overwrites the content.
ab+: opens the given file for reading and writing at the end of the
file. If the file does not exist, the function creates the file.
can accept. A value of -1 indicates that this stream can accept data
up to the value specified in inMaxFileLength. If the
inMaxFileLength is out of bounds (for example, !=-1 AND <-1
or >= (inFileLength-inOffset)), the SDK generates an
FP_PARAM_ERR and returns a NULL FPStreamRef.
206
Stream Functions
Error handling
FPStream_CreateTemporaryFile
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
Example
Error handling
myStream = FPStream_CreateTemporaryFile(2048);
* Use a 2048 byte in memory buffer for the file.
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
207
Stream Functions
FPStream_CreateToNull
Syntax
Return value
Concurrency
requirement
FPStream_CreateToNull (void)
FPStreamRef
Description
This function creates a stream for output but does not write the bytes.
This function returns a reference to the created stream.
Parameters
void
Error handling
FPStream_CreateToStdio
Syntax
Return value
Concurrency
requirement
FPStreamRef
Description
This function creates a stream for output to the console. The stream
can be used only for writing. This function returns a reference to the
created stream.
Parameters
void
Error handling
208
FPStream_CreateToStdio (void)
Stream Functions
FPStream_Close
FPStream_Complete
FPStream_GetInfo
FPStream_PrepareBuffer
FPStream_ResetMark
FPStream_SetMark
FPStream_Close
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
FPStream_Close (myStream);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
209
Stream Functions
FPStream_Complete
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
210
Stream Functions
FPStream_GetInfo
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
211
Stream Functions
FPStream_PrepareBuffer
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
Example
Error handling
212
Stream Functions
FPStream_ResetMark
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
213
Stream Functions
FPStream_SetMark
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
214
Query Functions
Query functions................................................................................
Query expression functions............................................................
Pool query functions........................................................................
Query result functions.....................................................................
Query Functions
216
217
230
236
215
Query Functions
Query functions
The Access API provides functions that query C-Clips both
existing and deleted (reflections) stored on an Atmos CAS-enabled
node.
The query feature is intended for backup applications and not as a
general-purpose application feature. Refer to the EMC Atmos CAS
Programmers Guide for more information on the query feature.
This section describes the following types of query functions:
216
Query Functions
FPQueryExpression_Close
FPQueryExpression_Create
FPQueryExpression_DeselectField
FPQueryExpression_GetEndTime
FPQueryExpression_GetStartTime
FPQueryExpression_GetType
FPQueryExpression_IsFieldSelected
FPQueryExpression_SelectField
FPQueryExpression_SetEndTime
FPQueryExpression_SetStartTime
FPQueryExpression_SetType
217
Query Functions
FPQueryExpression_Close
Syntax
Return value
Input parameters
Concurrency
requirement
Description
This function closes the query expression and releases all allocated
resources. Call this function when your application no longer needs
the FPQueryExpressionRef object. Note that calling this function on
a query expression that has already been closed may produce
unwanted results.
Parameters
FPQueryExpression_Close (myQueryExp);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
FPQueryExpression_Create
Syntax
Return value
Concurrency
requirement
Description
FPQueryExpression_Create (void)
FPQueryExpressionRef
218
Query Functions
void
FPQueryExpressionRef myQueryExp = 0;
myQueryExp = FPQueryExpression_Create();
Error handling
FPQueryExpression_DeselectField
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPQueryExpression_DeselectField (const
FPQueryExpressionRef inRef, const char *inAttrName)
void
const FPQueryExpressionRef inRef, const char *inAttrName
Parameters
219
Query Functions
Error handling
FPQueryExpression_GetEndTime
Syntax
Return value
Input parameters
Concurrency
requirement
Description
This function returns the end time (latest creation or deletion date) for
which C-Clips are queried, as set by
FPQueryExpression_SetEndTime(). End time is measured in
milliseconds since 00:00:00 on January 1, 1970 (the UNIX/Java
epoch). An end time of -1 corresponds to the current time.
Parameters
220
Query Functions
FPQueryExpression_GetStartTime
Syntax
Return value
Input parameters
Concurrency
requirement
FPQueryExpression_GetStartTime (const
FPQueryExpressionRef inRef)
FPLong
const FPQueryExpressionRef inRef
Description
This function returns the start time (earliest creation or deletion date)
for which C-Clips are queried, as set by
FPQueryExpression_SetStartTime(). Start time is measured in
milliseconds since 00:00:00 on January 1, 1970 (the UNIX/Java
epoch).
Parameters
221
Query Functions
FPQueryExpression_GetType
Syntax
Return value
Input parameters
Concurrency
requirement
Description
reflections.
FP_QUERY_TYPE_EXISTING | FP_QUERY_TYPE_DELETED
222
Query Functions
FPQueryExpression_IsFieldSelected
Syntax
Return value
Input parameters
Concurrency
requirement
FPQueryExpression_IsFieldSelected (const
FPQueryExpressionRef inRef, const char *inAttrName)
FPBool
const FPQueryExpressionRef inRef, const char *inAttrName
Description
Parameters
223
Query Functions
FPQueryExpression_SelectField
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPQueryExpression_SelectField (const
FPQueryExpressionRef inRef, const char *inAttrName)
void
const FPQueryExpressionRef inRef, const char *inAttrName
224
Description
name
creation.date
modification.date
creation.profile
modification.profile
Query Functions
Table 15
Table 16
Description
numfiles
totalsize
prev.clip
clip.naming.scheme
numtags
sdk.version
retention.period
retention.class
Description
principal
incomingip
creation.date
225
Query Functions
Table 16
Parameters
Description
deletedsize
reason
226
Query Functions
FPQueryExpression_SetEndTime
Syntax
Return value
Input parameters
Concurrency
requirement
Description
This function sets the query condition that C-Clips retrieved by the
query result have a creation or deletion time no later than the
specified time. If an end time is not set, the default is -1 (current time).
The storage time refers to the time that a C-Clip is actually stored on a
CAS-enabled node when the C-Clip was written or replicated. In the
case of querying a replica cluster, the time used in a query for any
replicated C-Clips is based on the storage time of when those C-Clips
arrived at the replica node.
Parameters
Example
Error handling
FPQueryExpression_SetEndTime (myQueryExp,
FP_QUERY_END_TIME_UNBOUNDED);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
227
Query Functions
FPQueryExpression_SetStartTime
Syntax
Return value
Input parameters
Concurrency
requirement
FPQueryExpression_SetStartTime (const
FPQueryExpressionRef inRef, const FPLong inTime)
void
const FPQueryExpressionRef inRef, const FPLong inTime
Description
This function sets the query condition that C-Clips retrieved by the
query have a storage or deletion time later than the specified time. If a
start time is not set, the default is 0 (the earliest possible time). The
storage time refers to the time that a C-Clip is actually stored on a
CAS-enabled node when the C-Clip was written or replicated. In the
case of querying a replica CAS-enabled node, the time used in a
query for any replicated C-Clips is based on the storage time of when
those C-Clips arrived at the replica node.
Parameters
Example
Error handling
228
Query Functions
FPQueryExpression_SetType
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
FPQueryExpression_SetType (myQueryExp,
FP_QUERY_TYPE_EXISTING | FP_QUERY_TYPE_DELETED);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
229
Query Functions
230
FPPoolQuery_Close
FPPoolQuery_FetchResult
FPPoolQuery_GetPoolRef
FPPoolQuery_Open
Query Functions
FPPoolQuery_Close
Syntax
Return value
Input parameters
Concurrency
requirement
Description
This function closes a query on the pool and frees all associated
(memory) resources. Note that calling this function on a pool query
that has already been closed may produce unwanted results.
Parameters
Example
Error handling
FPPoolQuery_Close (myPoolQuery);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
FPPoolQuery_FetchResult
Syntax
Return value
Input parameters
Concurrency
requirement
Description
231
Query Functions
The time in milliseconds that the function waits for the next
result. If inTimeout = -1, the function uses the default timeout of
120000 ms (2 minutes). The maximum timeout is 600000 (10
minutes).
Note: Specifying a timeout value that is less than the default timeout of
120000 ms (2 minutes) may result in the system error code
FP_QUERY_RESULT_CODE_ERROR.
Example
Error handling
232
Query Functions
FPPoolQuery_GetPoolRef
Syntax
Return value
Input parameters
Concurrency
requirement
Description
This function returns the pool associated with a pool query. Refer to
FPPoolQuery_Close on page 231 for more information.
Parameters
Example
Error handling
233
Query Functions
FPPoolQuery_Open
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPQueryExpressionRef inQueryExpressionRef
234
Query Functions
Example
FPPoolQueryRef myPoolQuery = 0;
myPoolQuery = FPPoolQuery_Open(myPool, myQueryExp);
Error handling
235
Query Functions
FPQueryResult_Close
FPQueryResult_GetClipID
FPQueryResult_GetField
FPQueryResult_GetResultCode
FPQueryResult_GetTimestamp
FPQueryResult_GetType
FPQueryResult_Close
Syntax
Return value
Input parameters
Concurrency
requirement
Description
query result that has already been closed may produce unwanted
results.
Parameters
FPQueryResult_Close (myQueryResult);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
236
Query Functions
FPQueryResult_GetClipID
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Description
Parameters
FPClipID outClipID
FPClipID myClipID;
FPQueryResult_GetClipID (myQueryResult, myClipID);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
237
Query Functions
FPQueryResult_GetField
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Description
This function retrieves the value of the given attribute from the
C-Clip or reflection associated with the given query result. The
application must have called FPQueryExpression_SelectField()
to indicate that the attribute should be returned by the query.
Parameters
The buffer that contains the name of the attribute for which the
value is retrieved.
FPInt *ioAttrValueLen
Error handling
char vBuffer[1024];
FPInt len=sizeof(vBuffer);
FPQueryResult_GetField(myQueryResult, "Company",
vBuffer, &len);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
238
Query Functions
FPQueryResult_GetResultCode
Syntax
Return value
Input parameters
Concurrency
requirement
Description
the results of the query are complete, they may not be valid
because one or more nodes could not be queried. This value
indicates that all nodes can be queried again.
239
Query Functions
Parameters
FPQueryResult_GetTimestamp
Syntax
Return value
Input parameters
Concurrency
requirement
Description
This function returns the timestamp from the query result. For
existing C-Clips, the timestamp is when the C-Clip was created on
one or more CAS-enabled nodes. For reflections (deleted C-Clips), the
timestamp is when the C-Clip was deleted from the nodes. This
function returns the timestamp in milliseconds since 00:00:00 on
January 1, 1970 (the UNIX/Java epoch).
Parameters
240
Query Functions
FPQueryResult_GetType
Syntax
Return value
Input parameters
Concurrency
requirement
Description
CAS-enabled nodes.
Parameters
241
Query Functions
242
Time Functions
Time Functions
243
Time Functions
Time functions
This section describes the following time formats used by the SDK to
convert Atmos CAS time strings to integral time values marking the
time since the epoch 1 January 1970 00:00:00.000 GMT. These API
calls represent integral units in either seconds or milliseconds.
The SDK supports two string formats when converting the integral
values to time strings. These string formats are defined as options
FP_OPTION_MILLISECONDS_STRING and
FP_OPTION_SECONDS_STRING with a flag argument. The inOptions
argument produces a time string with or without a milliseconds field.
FPTime_MillisecondsToString
FPTime_SecondsToString
FPTime_StringToMilliseconds
FPTime_StringToSeconds
FPTime_MillisecondsToString
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
244
Time Functions
Parameters
char* outString
int* ioStringLen
Input: The pointer to an integer that holds the length of the buffer
allocated for outString.
Output: The integer is updated to hold the length of the resulting
string.
int inOptions
Specify either FP_OPTION_MILLISECONDS_STRING to produce a
milliseconds field.
Example
Error handling
char vTimeString[MAX_STRING_LEN];
FPInt vTimeStringLen = MAX_STRING_LEN;
FPTime_LongToString(vTimeInSeconds, vTimeString,
&vTimeStringLen);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
Time functions
245
Time Functions
FPTime_SecondsToString
Syntax
Return value
Input parameters
Output parameters
Concurrency
requirement
Unicode support
Description
Parameters
char* outString
int* ioStringLen
Input: The pointer to an integer that holds the length of the buffer
allocated for outString.
Output: The integer is updated to hold the length of the resulting
string.
int inOptions
Specify either FP_OPTION_MILLISECONDS_STRING to produce a
milliseconds field.
Example
246
char vTimeString[MAX_STRING_LEN];
FPInt vTimeStringLen = MAX_STRING_LEN;
FPPool_GetClusterTime(vPool, vTimeString,
&vTimeStringLen);
FPLong vTimeInSeconds = FPTime_StringToLong(vTimeString);
Time Functions
Error handling
FPTime_StringToMilliseconds
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
Parameters
inTime
Example
Error handling
char vTimeString[MAX_STRING_LEN];
FPInt vTimeStringLen = MAX_STRING_LEN;
FPPool_GetClusterTime(vPool, vTimeString,
&vTimeStringLen);
FPLong vTimeInSeconds =
FPTime_StringToMilliseconds(vTimeString);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
Time functions
247
Time Functions
FPTime_StringToSeconds
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
Parameters
inTime
Example
Error handling
char vTimeString[MAX_STRING_LEN];
FPInt vTimeStringLen = MAX_STRING_LEN;
FPPool_GetClusterTime(vPool, vTimeString,
&vTimeStringLen);
FPLong vTimeInSeconds =
FPTime_StringToSeconds(vTimeString);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
248
10
Logging Functions
Logging Functions
250
255
262
277
249
Logging Functions
Logging overview
For application debugging of supported platforms, the SDK provides
thread-safe logging of its activities via log API functions or logging
environment variables. Logging does not create new threads.
The SDK logging interface allows logging to be configurable via API,
configuration file (which may be optionally polled), and environment
variables. Application developers can dynamically control logging
features with a control class. This logging interface consists of the
FPLogging mechanism and the FPLogState object.
FPLogging mechanism
FPLogging is a logging framework that enables SDK logging and
logging control on each CAS-enabled node. The FPLogging
mechanism uses the FPLogState object, which is the control class
that defines the conditions for determining logging behavior.
FPLogging is also the factory from which other instances of
FPLogState objects may be created.
You can use various log API functions to perform the following
actions:
250
Logging Functions
FPLogState
FPLogState is the control class object that defines the conditions for
logging behavior and logging control. You create an FPLogState
object by calling FPLogging_CreateLogState(), which is then
passed to the FPLogging mechanism.
FP_LOGPATH
FP_LOGKEEP
FP_LOGLEVEL
FP_LOGFILTER
FP_LOGFORMAT
FP_LOG_DISABLE_CALLBACK
FP_LOG_MAX_OVERFLOWS
FP_LOG_MAX_SIZE
FP_LOG_STATE_POLL_INTERVAL
Logging overview
251
Logging Functions
Control the interval at which the SDK polls and applies the log
configuration file at runtime.
Polling behavior
The polling of a log state file automatically occurs regardless if
logging is turned on or off. The conditions that affect logging polling
behavior are as follows:
252
Logging Functions
FP_LOGPATH
FP_LOGLEVEL
FP_LOGFORMAT
FP_LOGFILTER
FP_LOGKEEP
FP_LOG_DISABLE_CALLBACK
FP_LOG_STATE_POLL_INTERVAL
FP_LOG_MAX_SIZE
FP_LOG_MAX_OVERFLOWS
Logging overview
253
Logging Functions
254
Logging Functions
FPLogging functions
The FPLogging functions determine the initial state of the
FPLogState object and control logging operations.
FPLogging_CreateLogState
FPLogging_Log
FPLogging_OpenLogState
FPLogging_RegisterCallback
FPLogging_Start
FPLogging_Stop
FPLogState_Delete
FPLogState_Save
FPLogging_CreateLogState
Syntax
Return value
Concurrency
requirement
Description
FPLogging_CreateLogState()
FPLogStateRef
Example
Error handling
FPLogging functions
255
Logging Functions
FPLogging_Log
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
Description
Parameters
The level at which to log the message. The following log levels are
available:
FP_LOGLEVEL_ERROR: Log error messages
FP_LOGLEVEL_WARN: Log warnings and error messages.
FP_LOGLEVEL_LOG: Log API calls, warnings, and errors
FP_LOGLEVEL_DEBUG: Debug log level
Error handling
256
Logging Functions
FPLogging_OpenLogState
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
Description
FPLogging_OpenLogState(char * inPathName)
FPLogStateRef
char * inPathName
Parameters
char * inPathName
Error handling
FPLogging functions
257
Logging Functions
FPLogging_RegisterCallback
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPLogging_RegisterCallback(FPLogProc inCallback)
void
FPLogProc inCallback
Parameters
FPLogProc inCallback
Error handling
258
FP_LOGGING_CALLBACK_ERR
Logging Functions
FPLogging_Start
Syntax
Return value
Input parameters
Concurrency
requirement
FPLogging_Start(FPLogStateRef inLogState)
void
FPLogStateRef inLogState
Description
This function enables the logging mechanism based on the given log
configuration. If logging is already configured via environment
variables, this method restarts the logging mechanism using the new
settings (potentially closing the old log file and opening a new one).
Parameters
Example
Error handling
FPLogStateRef inLogState
A reference to an FPLogState object containing log configuration
details. Pass FPREF_NULL to use all default state settings.
FPLogging_Stop
Syntax
Return value
Concurrency
requirement
Description
Example
FPLogging_Stop()
void
FPLogging functions
259
Logging Functions
FPLogState_Delete
Syntax
Return value
Input parameters
Concurrency
requirement
void
FPLogStateRef inLogState)
Description
Parameters
Example
260
FPLogState_Delete(FPLogStateRef inLogState)
FPLogStateRef inLogState
A reference to an FPLogState object.
Logging Functions
FPLogState_Save
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
Description
Parameters
FPLogStateRef inLogState
A reference to an FPLogState object.
char * inPathName
Error handling
FPLogging functions
261
Logging Functions
FPLogState functions
The FPLogState Get functions return a specific logging value:
FPLogState_GetAppendMode
FPLogState_GetDisableCallback
FPLogState_GetLogFilter
FPLogState_GetLogFormat
FPLogState_GetLogLevel
FPLogState_GetLogPath
FPLogState_GetMaxLogSize
FPLogState_GetMaxOverflows
FPLogState_GetPollInterval
FPLogState_SetAppendMode
FPLogState_SetDisableCallback
FPLogState_SetLogFilter
FPLogState_SetLogFormat
FPLogState_SetLogLevel
FPLogState_SetLogPath
FPLogState_SetMaxLogSize
FPLogState_SetMaxOverflows
FPLogState_SetPollInterval
FPLogState_GetAppendMode
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPLogState_GetAppendMode(FPLogStateRef inLogState)
FPBool
FPLogStateRef inLogState
Parameters
Example
262
FPLogStateRef ioLogState
A reference to an FPLogState object.
Logging Functions
Error handling
FPLogState_GetDisableCallback
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPLogState_GetDisableCallback(FPLogStateRef inLogState)
FPBool
FPLogStateRef inLogState
page 269.
Parameters
Example
Error handling
FPLogStateRef ioLogState
A reference to an FPLogState object.
FPLogState functions
263
Logging Functions
FPLogState_GetLogFilter
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPLogState_GetLogFilter(FPLogStateRef inLogState)
FPInt
FPLogStateRef inLogState
Parameters
Example
Error handling
FPLogStateRef ioLogState
A reference to an FPLogState object.
FPLogState_GetLogFormat
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPLogState_GetLogFormat(FPLogStateRef inLogState)
FPLogFormat
FPLogStateRef inLogState
Parameters
Example
264
FPLogStateRef ioLogState
A reference to an FPLogState object.
Logging Functions
Error handling
FPLogState_GetLogLevel
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPLogState_GetLogLevel(FPLogStateRef inLogState)
FPLogLevel
FPLogStateRef inLogState
Parameters
Example
Error handling
FPLogStateRef ioLogState
A reference to an FPLogState object.
FPLogState_GetLogPath
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPLogState_GetLogPath(FPLogStateRef ioLogState)
const char*
FPLogStateRef ioLogState
Parameters
FPLogStateRef ioLogState
A reference to an FPLogState object.
FPLogState functions
265
Logging Functions
Example
Error handling
FPLogState_GetMaxLogSize
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPLogState_GetMaxLogSize(FPLogStateRef inLogState)
FPLong
FPLogStateRef inLogState
Parameters
Example
Error handling
266
FPLogStateRef ioLogState
A reference to an FPLogState object.
Logging Functions
FPLogState_GetMaxOverflows
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPLogState_GetMaxOverflows(FPLogStateRef inLogState)
FPInt
FPLogStateRef inLogState
Parameters
Example
Error handling
FPLogStateRef ioLogState
A reference to an FPLogState object.
FPLogState_GetPollInterval
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPLogState_GetPollInterval(FPLogStateRef inLogState)
FPInt
FPLogStateRef inLogState
Parameters
Example
FPLogStateRef ioLogState
A reference to an FPLogState object.
FPLogState functions
267
Logging Functions
Error handling
FPLogState_SetAppendMode
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPLogState_SetAppendMode(FPLogStateRef ioLogState,
FPBool inAppendMode)
void
FPLogStateRef ioLogState, FPBool inAppendMode
Parameters
FPLogStateRef ioLogState
A reference to an FPLogState object.
FPBool inAppendMode
268
Logging Functions
FPLogState_SetDisableCallback
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPLogState_SetDisableCallback(FPLogStateRef ioLogState,
FPBool inDisableCallback)
void
FPLogStateRef ioLogState, FPBool inDisableCallback
Parameters
FPLogStateRef ioLogState
A reference to an FPLogState object.
FPBool inDisableCallback
FPLogState_SetDisableCallback(vLogState, false);
// Allow callback registration
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
FPLogState functions
269
Logging Functions
FPLogState_SetLogFilter
Syntax
Return value
Input parameters
Concurrency
requirement
Description
Parameters
FPLogStateRef ioLogState
A reference to an FPLogState object.
FPInt inLogComponents
FPLogState_SetLogFilter(vLogState,
FP_LOGGING_COMPONENT_ALL);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
270
Logging Functions
FPLogState_SetLogFormat
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPLogState_SetLogFormat(FPLogStateRef ioLogState,
FPLogFormat inLogFormat)
void
FPLogStateRef ioLogState, FPLogFormat inLogFormat
Parameters
FPLogStateRef ioLogState
A reference to an FPLogState object.
FPLogFormat inLogFormat
FPLogState_SetLogFormat(vLogState,
FP_LOGGING_LOGFORMAT_TAB);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
FPLogState functions
271
Logging Functions
FPLogState_SetLogLevel
Syntax
Return value
Input parameters
Concurrency
requirement
FPLogState_SetLogLevel(FPLogStateRef ioLogState,
FPLogLevel inLogLevel)
void
FPLogStateRef ioLogState, FPLogLevel inLogLevel
Description
Parameters
FPLogStateRef ioLogState
A reference to an FPLogState object.
FPLogLevel inLogLevel
The level at which to log the message. The following log levels are
available:
FP_LOGLEVEL_ERROR: Log error messages
FP_LOGLEVEL_WARN: Log warnings and error messages
FP_LOGLEVEL_LOG: Log API calls, warnings, and errors
FP_LOGLEVEL_DEBUG: Debug log level
Example
Error handling
FPLogState_SetLogLevel(vLogState, FP_LOGLEVEL_DEBUG);
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
272
Logging Functions
FPLogState_SetLogPath
Syntax
Return value
Input parameters
Concurrency
requirement
Unicode support
This function has variants that support wide character and 8, 16, and
32-bit Unicode. For more information, see Unicode and wide
character support on page 21.
Description
Parameters
FPLogStateRef ioLogState
A reference to an FPLogState object.
char *inPathName
FPLogState_SetLogPath(vLogState, "C:\\MyLogFile.txt");
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
FPLogState functions
273
Logging Functions
FPLogState_SetMaxLogSize
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPLogState_SetMaxLogSize(FPLogStateRef ioLogState,
FPLong inSizeInKilobytes)
void
FPLogStateRef ioLogState, FPLong inSizeInKilobytes
Parameters
FPLogStateRef ioLogState
A reference to an FPLogState object.
FPLong inSizeInKilobytes
The maximum size (in KB) that a log file may grow. For no limit
on the size, specify FP_LOG_SIZE_UNBOUNDED.
Example
Error handling
FPLogState_SetMaxLogSize(vLogState, 1048576); // 1 GB
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
274
Logging Functions
FPLogState_SetMaxOverflows
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPLogState_SetMaxOverflows(FPLogStateRef ioLogState,
FPInt inCount)
void
FPLogStateRef ioLogState, FPInt inCount
Parameters
FPLogStateRef ioLogState
A reference to an FPLogState object.
FPInt inCount
FPLogState_SetMaxOverflows(vLogState, 2);
// Save most recent 3 GB
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
FPLogState functions
275
Logging Functions
FPLogState_SetPollInterval
Syntax
Return value
Input parameters
Concurrency
requirement
Description
FPLogState_SetPollInterval(FPLogStateRef ioLogState,
FPInt inPollIntervalInMin)
void
FPLogStateRef ioLogState, FPInt inPollIntervalInMin
Parameters
FPLogStateRef ioLogState
A reference to an FPLogState object.
FPInt inPollIntervalInMin
FPLogState_SetPollInterval(vLogState, 5);
// Poll state file every 5 min
FPPool_GetLastError() returns ENOERR if successful. If
unsuccessful, the following is a partial list of possible errors:
276
Logging Functions
Environment variables
If set, the logging environment variables listed in Table 17, Logging
environment variables,determine the initial configuration of the
FPLogState control class object. They also allow legacy applications
to enable logging services without making code changes.
Table 17
Environment variable
Description
FP_LOG_DISABLE_CALLBACK
TRUE or 1
FALSE or 0
The value is not case-sensitive.
FP_LOG_MAX_OVERFLOWS
FPInt
FP_LOG_MAX_SIZE
FPLong
FP_LOG_STATE_PATH
FP_LOG_STATE_POLL_INTERVAL
FPInt
FP_LOGFILTER
Environment variables
277
Logging Functions
Table 17
Environment variable
Description
FP_LOGFORMAT
XML
TAB
FP_LOGKEEP
OVERWRITE
APPEND
CREATE
FP_LOGLEVEL
FP_LOGPATH
278
Logging Functions
Environment variables
279
Logging Functions
280
FormattedTime
2007-04-20 15:26:44.380
2007-04-20 15:26:44.380
2007-04-20 15:26:44.380
2007-04-20 15:26:46.122
2007-04-20 15:26:46.122
2007-04-20 15:26:46.142
2007-04-20 15:26:46.142
2007-04-20 15:26:46.142
2007-04-20 15:26:46.142
2007-04-20 15:26:46.142
2007-04-20 15:26:46.233
2007-04-20 15:26:46.233
LogLevel
[none]
[log]
[log]
[log]
[debug]
[warn]
[debug]
[warn]
[debug]
[debug]
[log]
[debug]
Module Message
[---]
SDK Version 3.1.544
[API]
Start FPPool_GetComponentVersion(1,-,128)
[API]
End FPPool_GetComponentVersion(1,@version.full@,15)
[API]
Start FPPool_Open(sdk7)
[LIB]
Attempting to load MD5 lib: "FPMD5_Lib.dll"
[LIB]
MD5 lib not found! Using internal MD5 algorithm instead.
[LIB]
Attempting to load SHA256 lib: "FPSHA256_Lib.dll"
[LIB] SHA256 lib not found! Using internal SHA256 algorithm instead.
[LIB]
Attempting to load FPIntercept lib: "FPIntercept_g.dll"
[LIB]
FPIntercept lib not found! (Using all default API calls.)
[CORE] Start ClusterCloud::createClusterInterfaceHelper
(-,-,false,true,false,-,120000,false)
[RETRY] AN(sdk7) Access Role (enabled)
Logging Functions
Whitespace is ignored.
Environment variables
281
Logging Functions
282
11
Error Codes
Error Codes
283
Error Codes
Error codes
The API reports both Centera-specific and operating-system errors. If
the API returns an error code that is not listed in Table 18 on
page 284, refer to a list of platform-specific error codes (for example,
Windows error code 10055 means that no buffer space is available).
Note that all Atmos CAS error codes are negative values.
Refer to the EMC Atmos CAS Programmers Guide for more
information on error handling. Also refer to FPPool_GetLastError
on page 42 and FPPool_GetLastErrorInfo on page 43.
If you want to access the errors described in this section, you must
include FPErrors.h.
Table 18
Value
Error name
-10001
FP_INVALID_NAME
-10002
FP_UNKNOWN_OPTION
-10003
FP_NOT_SEND_REQUEST_ERR
-10004
FP_NOT_RECEIVE_REPLY_ERR
-10005
FP_SERVER_ERR
-10006
FP_PARAM_ERR
284
Error Codes
Table 18
Value
Error name
-10007
FP_PATH_NOT_FOUND_ERR
-10008
FP_CONTROLFIELD_ERR
-10009
FP_SEGDATA_ERR
-10010
FP_DUPLICATE_FILE_ERR
-10011
FP_OFFSET_FIELD_ERR
-10012
FP_OPERATION_NOT_SUPPORTED
-10013
FP_ACK_NOT_RCV_ERR
Error codes
285
Error Codes
Table 18
286
Value
Error name
-10014
FP_FILE_NOT_STORED_ERR
Could not write the blob to the server OR could not find
the blob on the server.
This internal error was generated because the store
operation of the blob was not successful. Verify that the
original data was correctly stored, verify your LAN
connections and try again.
-10015
FP_NUMLOC_FIELD_ERR
-10016
FP_SECTION_NOT_FOUND_ERR
-10017
FP_TAG_NOT_FOUND_ERR
-10018
FP_ATTR_NOT_FOUND_ERR
-10019
FP_WRONG_REFERENCE_ERR
-10020
FP_NO_POOL_ERR
Error Codes
Table 18
Value
Error name
-10021
FP_CLIP_NOT_FOUND_ERR
-10022
FP_TAGTREE_ERR
-10023
FP_ISNOT_DIRECTORY_ERR
-10024
FP_UNEXPECTEDTAG_ERR
-10025
FP_TAG_READONLY_ERR
-10026
FP_OUT_OF_BOUNDS_ERR
-10027
FP_FILESYS_ERR
-10029
FP_STACK_DEPTH_ERR
-10030
FP_TAG_HAS_NO_DATA_ERR
You are trying to access blob data of a tag that does not
contain blob data.
-10031
FP_VERSION_ERR
-10032
FP_MULTI_BLOB_ERR
Error codes
287
Error Codes
Table 18
288
Value
Error name
-10033
FP_PROTOCOL_ERR
-10034
FP_NO_SOCKET_AVAIL_ERR
-10035
FP_BLOBIDFIELD_ERR
-10036
FP_BLOBIDMISMATCH_ERR
-10037
FP_PROBEPACKET_ERR
-10038
FP_CLIPCLOSED_ERR
-10039
FP_POOLCLOSED_ERR
-10040
FP_BLOBBUSY_ERR
Error Codes
Table 18
Value
Error name
-10041
FP_SERVER_NOTREADY_ERR
-10042
FP_SERVER_NO_CAPACITY_ERR
-10043
FP_DUPLICATE_ID_ERR
-10044
FP_STREAM_VALIDATION_ERR
-10045
FP_STREAM_BYTECOUNT_MISMATCH_
ERR
-10101
FP_SOCKET_ERR
-10102
FP_PACKETDATA_ERR
-10103
FP_ACCESSNODE_ERR
-10151
FP_OPCODE_FIELD_ERR
-10152
FP_PACKET_FIELD_MISSING_ERR
-10153
FP_AUTHENTICATION_FAILED_ERR
-10154
FP_UNKNOWN_AUTH_SCHEME_ERR
-10155
FP_UNKNOWN_AUTH_PROTOCOL_ERR
-10156
FP_TRANSACTION_FAILED_ERR
-10157
FP_PROFILECLIPID_NOTFOUND_ERR
-10158
FP_ADVANCED_RETENTION_DISABLED_
ERR
Error codes
289
Error Codes
Table 18
290
Value
Error name
-10159
FP_NON_EBR_CLIP_ERR
-10160
FP_EBR_OVERRIDE_ERR
-10161
FP_NO_EBR_EVENT_ERR
-10162
FP_RETENTION_OUT_OF_BOUNDS_ERR
-10163
FP_RETENTION_HOLD_COUNT_ERR
-10164
FP_METADATA_MISMATCH_ERR
-10201
FP_OPERATION_REQUIRES_MARK
-10202
FP_QUERYCLOSED_ERR
-10203
FP_WRONG_STREAM_ERR
-10204
FP_OPERATION_NOT_ALLOWED
-10205
FP_SDK_INTERNAL_ERR
-10206
FP_OUT_OF_MEMORY_ERR
-10207
FP_OBJECTINUSE_ERR
-10208
FP_NOTYET_OPEN_ERR
-10209
FP_STREAM_ERR
-10210
FP_TAG_CLOSED_ERR
-10211
FP_THREAD_ERR
-10212
FP_PROBE_TIME_EXPIRED_ERR
-10213
FP_PROFILECLIPID_WRITE_ERR
Error Codes
Table 18
Value
Error name
-10214
FP_INVALID_XML_ERR
-10215
FP_UNABLE_TO_GET_LAST_ERROR
-10216
FP_LOGGING_CALLBACK_ERR
Error codes
291
Error Codes
292
Deprecated Functions
Deprecated Functions
293
Deprecated Functions
Deprecated functions
Table 19 on page 294 lists deprecated Atmos CAS API functions.
Table 19
294
Deprecated functions
Function name
Deprecated
release
FPTime_LongToString
3.1
FPTime_StringToLong
3.1
FPClip_Purge
2.3
FPTag_BlobPurge
2.3
FPQuery_Open
2.3
FPQuery_GetPoolRef
2.3
FPQuery_FetchResult
2.3
FPQuery_Close
2.3
FPStream_CreateWithBuffer
1.1
FPStream_CreateWithFile
1.1
FPStream_Read
1.1
Use the generic stream facility. Refer to Stream functions on page 178.
FPStream_Write
1.1
Use the generic stream facility. Refer to Stream functions on page 178.
FPStream_SetMarker
1.1
Use the generic stream facility. Refer to Stream functions on page 178.
FPStream_GetMarker
1.1
Use the generic stream facility. Refer to Stream functions on page 178.
Comments
Deprecated Functions
Deprecated options
Table 20 on page 295 lists deprecated Atmos CAS API options.
Table 20
Deprecated options
Option name
Deprecated
release
Comments
FP_OPTION_ENABLE_DUPLICATE_DETECTION
2.1
FP_OPTION_CALCID_NOCHECK
2.1
Deprecated options
295
Deprecated Functions
296
Glossary
This glossary contains terms used in this manual that are related to
disk storage subsystems.
A
Application
Programming
Interface (API)
B
Blob
The Distinct Bit Sequence (DBS) of user data. The DBS represents the
actual content of a file and is independent of the filename and
physical location.
Note: Do not confuse this term with the term Binary Large Object
that exists in the database sector.
C
C-Clip
297
Glossary
C-Clip ID
Cluster time
The Content Address that the system returns to the client. It is also
referred to as a C-Clip handle or C-Clip reference.
The synchronized time of all the nodes within a cluster.
Content Address
(CA)
An identifier that uniquely addresses the content of a file and not its
location. Unlike location-based addresses, Content Addresses are
inherently stable and, once calculated, they never change and always
refer to the same content.
Content Address
resolution
Content Address
verification
Content Addressed
Storage (CAS)
The generic term for an Atmos CAS node and its software. In the
same way that a Symmetrix is considered a SAN device, a cluster is
considered a CAS device.
D
Distinct Bit Sequence
(DBS)
Dynamic Host
Configuration Protocol
(DHCP)
E
End-to-end checking
Extensible Markup
Language
(XML)
298
Glossary
F
Failover
I
Input parameter
L
Load balancing
M
Message Digest 5
(MD5)
MultiCast Protocol
(MCP)
N
Node
O
Output parameter
299
Glossary
P
Pool
Pool Transport
Protocol
(PTP)
Probing
R
Redundancy
A process where data objects are duplicated or encoded such that the
data can be recovered given any single failure.
Regeneration
Retention period
The time that a C-Clip and the underlying blobs have to be stored
before the application is allowed to delete them.
Return value
S
Segmentation
The process of splitting very large files or streams into smaller chunks
before storing them. Segmentation is an invisible client-side feature
and supports storage of very large files such as rich multimedia.
Stream
T
Time to First Byte (TTFB)
300
The time between the request to the system to retrieve a C-Clip and
the retrieval of the first byte of the blob.
Glossary
U
UniCast Protocol
(UCP)
User Datagram
Protocol (UDP)
W
Wide Area Network
(WAN)
Write Once Read
Many
(WORM)
301
Glossary
302
Index
A
Access Node error 289
acknowledgement error 285
API 297
Application Programming Interface. See API
attribute error 286
authentication error 289
authentication protocol error 289
authentication scheme error 289
B
blob 297
error 286, 288
functions 148
BlobID mismatch 288
buffer size pool setting 57
C
CA 298
duplicate 285
capabilities server 35
CAS 298
C-Clip 297
error 287
functions 60
handle 298
ID 298
reference 298
C-Clip Descriptor File. See CDF
C-Clips and multithreading 60
CDF 297
CENTERA_CUSTOM_METADATA 65, 109
D
data
embedded 155
error 287
handle incoming/outgoing 300
linked 155
data integrity check 298
data packet error 289
DBS 298
defaultcollisionavoidance pool setting 58
deprecated functions 294
FPClip_Purge() 294
FPQuery_Close() 294
303
Index
FPQuery_FetchResult() 294
FPQuery_GetPoolRef() 294
FPQuery_Open() 294
FPQuery_OpenW() 294
FPStream_CreateWithBuffer() 294
FPStream_CreateWithFile() 294
FPStream_GetMarker() 294
FPStream_Read() 294
FPStream_SetMarker() 294
FPStream_Write() 294
FPTime_LongToString() 294
FPTime_StringToLong() 294
deprecated options
FP_OPTION_CALCID_NOCHECK 295
FP_OPTION_ENABLE_DUPLICATE_DETE
CTION 295
options
deprecated 295
DHCP 298
directory error 287
Distinct Bit Sequence. See DBS
duplicate CA 285
Dynamic Host Configuration Protocol. See DHCP
E
embedded data 155
end-to-end checking 298
error
acknowledgement 285
attribute 286
authentication 289
authentication protocol 289
authentication scheme 289
blob 286
capacity server 289
C-Clip 287
connection 286
data 287
data packet 289
descriptions 284
directory 287
file system 287
generic stream 290
network socket 289
node with the access role 289
number 284
304
F
failover 299
file system error 287
FP_ACCESSNODE_ERR 289
FP_ACK_NOT_RCV_ERR 285
FP_ADVANCED_RETENTION_DISABLED_ERR
289
FP_ATTR_NOT_FOUND_ERR 286
FP_AUTHENTICATION_FAILED_ERR 289
FP_BLOBBUSY_ERR 288
FP_BLOBIDFIELD_ERR 288
FP_BLOBIDMISMATCH_ERR 288
FP_BLOBNAMING 35
FP_CLIP_NOT_FOUND_ERR 287
FP_CLIPCLOSED_ERR 288
FP_CLIPENUMERATION 35
FP_COMPLIANCE 35
FP_CONTROLFIELD_ERR 285
FP_DEFAULT_RETENTION_PERIOD 78
FP_DELETE 35
FP_DELETIONLOGGING 35
FP_DUPLICATE_FILE_ERR 285
FP_DUPLICATE_ID_ERR 289
FP_EBR_OVERRIDE_ERR 290
FP_EXIST 35
FP_FILE_NOT_STORED_ERR 286
FP_FILESYS_ERR 287
Index
FP_INFINITE_RETENTION_PERIOD 77
FP_INVALID_NAME 284
FP_INVALID_XML_ERR 291
FP_ISNOT_DIRECTORY_ERR 287
FP_LAZY_OPEN 56
FP_LOGGING_CALLBACK_ERR 291
FP_METADATA_MISMATCH_ERR 290
FP_MODE 35
FP_MONITOR 35
FP_MULTI_BLOB_ERR 287
FP_NO_EBR_EVENT_ERR 290
FP_NO_POOL_ERR 286
FP_NO_RETENTION_PERIOD 77
FP_NO_SOCKET_AVAIL_ERR 288
FP_NON_EBR_CLIP_ERR 290
FP_NORMAL_OPEN 56
FP_NOT_RECEIVE_REPLY_ERR 284
FP_NOT_SEND_REQUEST_ERR 284
FP_NOTYET_OPEN_ERR 290
FP_NUMLOC_FIELD_ERR 286
FP_OBJECTINUSE_ERR 290
FP_OFFSET_FIELD_ERR 285
FP_OPCODE_FIELD_ERR 289
FP_OPEN_ASTREE 71
FP_OPEN_FLAT 71
FP_OPERATION_NOT_ALLOWED 290
FP_OPERATION_NOT_SUPPORTED 285
FP_OPERATION_REQUIRES_MARK 290
FP_OPTION_BUFFERSIZE 57
FP_OPTION_CALCID_NOCHECK 295
FP_OPTION_CLIENT_CALCID 157, 162
FP_OPTION_CLIENT_CALCID_STREAMING
157, 162
FP_OPTION_CLUSTERNONAVAILTIME 55
FP_OPTION_COPY_BLOBDATA 119
FP_OPTION_COPY_CHILDREN 119
FP_OPTION_DEFAULT_COLLISION_AVOIDA
NCE 58
FP_OPTION_DEFAULT_OPTIONS 72, 151, 153
FP_OPTION_DELETE_PRIVILEGED 62
FP_OPTION_DISABLE_CLIENT_STREAMING
55
FP_OPTION_DISABLE_COLLISION_AVOIDAN
CE 158, 163
FP_OPTION_EMBED_DATA 158
FP_OPTION_EMBEDDED_DATA_THRESHOLD
55
FP_OPTION_ENABLE_COLLISION_AVOIDAN
CE 158, 163
FP_OPTION_ENABLE_DUPLICATE_DETECTIO
N 55, 295
FP_OPTION_ENABLE_MULTICLUSTER_FAILO
VER 57
FP_OPTION_LINK_DATA 158
FP_OPTION_MAXCONNECTIONS 55
FP_OPTION_MULTICLUSTER_READ_CLUSTE
RS 57
FP_OPTION_NO_COPY_OPTIONS 118
FP_OPTION_OPENSTRATEGY 56
FP_OPTION_PREFETCH_SIZE 58
FP_OPTION_PROBE_LIMIT 56
FP_OPTION_RETRYCOUNT 56
FP_OPTION_RETRYSLEEP 56
FP_OPTION_TIMEOUT 57
FP_OUT_OF_BOUNDS_ERR 287
FP_OUT_OF_MEMORY_ERR 290
FP_PACKET_FIELD_MISSING_ERR 289
FP_PACKETDATA_ERR 289
FP_PARAM_ERR 284
FP_PATH_NOT_FOUND_ERR 285
FP_POOL_POOLMAPPINGS 35
FP_POOLCLOSED_ERR 288
FP_POOLS 35, 36
FP_PRIVILEGED_DELETE 35
FP_PROBE_TIME_EXPIRED_ERR 290
FP_PROBEPACKET_ERR 288
FP_PROFILECLIPID_NOTFOUND_ERR 289
FP_PROFILECLIPID_WRITE_ERR 290
FP_PROFILES 35
FP_PROTOCOL_ERR 288
FP_PURGE 35
FP_QUERY_RESULT_CODE_ABORT 239
FP_QUERY_RESULT_CODE_COMPLETE 239
FP_QUERY_RESULT_CODE_END 239
FP_QUERY_RESULT_CODE_ERROR 239
FP_QUERY_RESULT_CODE_INCOMPLETE 239
FP_QUERY_RESULT_CODE_OK 239
FP_QUERY_RESULT_CODE_PROGRESS 239
FP_QUERY_TYPE_DELETED 229
FP_QUERY_TYPE_EXISTING 229
FP_QUERYCLOSED_ERR 290
FP_READ 35
FP_RETENTION 36
FP_RETENTION_HOLD 36
EMC Atmos Version 2.0 CAS API Reference Guide
305
Index
FP_RETENTION_HOLD_COUNT_ERR 290
FP_RETENTION_OUT_OF_BOUNDS_ERR 290
FP_SDK_INTERNAL_ERR 290
FP_SECTION_NOT_FOUND_ERR 286
FP_SEGDATA_ERR 285
FP_SERVER_ERR 284
FP_SERVER_NO_CAPACITY_ERR 289
FP_SERVER_NOTREADY_ERR 289
FP_SOCKET_ERR 289
FP_STACK_DEPTH_ERR 287
FP_STREAM_BYTECOUNT_MISMATCH_ ERR
289
FP_STREAM_ERR 290
FP_STREAM_VALIDATION_ERR 289
FP_TAG_CLOSED_ERR 290
FP_TAG_HAS_NO_DATA_ERR 287
FP_TAG_NOT_FOUND_ERR 286
FP_TAG_READONLY_ERR 287
FP_TAGTREE_ERR 287
FP_THREAD_ERR 290
FP_TRANSACTION_FAILED_ERR 289
FP_UNABLE_TO_GET_LAST_ERROR 291
FP_UNEXPECTEDTAG_ERR 287
FP_UNKNOWN_AUTH_SCHEME_ERR 289
FP_UNKNOWN_OPTION 284
FP_VERSION_ERR 287
FP_WRITE 36
FP_WRONG_REFERENCE_ERR 286
FP_WRONG_STREAM_ERR 290
FPBool 25
FPChar16 25
FPChar32 25
FPClip_AuditedDelete() 61
FPClip_Close() 82
FPClip_Create() 61
FPClip_Delete() 67
FPClip_EnableEBRWithClass() 69
FPClip_EnableEBRWithPeriod() 69
FPClip_Exists() 103
FPClip_FetchNext() 116
FPClip_GetClipID() 87
FPClip_GetCreationDate() 88
FPClip_GetDescriptionAttribute() 103
FPClip_GetDescriptionAttributeIndex() 105
FPClip_GetEBRClassName() 89
FPClip_GetEBREventTime() 90
FPClip_GetEBRPeriod() 91
306
FPClip_GetName() 92
FPClip_GetNumBlobs() 93
FPClip_GetNumDescriptionAttributes() 107
FPClip_GetNumTags() 94
FPClip_GetPoolRef() 87
FPClip_GetRetentionClassName() 96
FPClip_GetRetentionHold() 96
FPClip_GetRetentionPeriod() 98
FPClip_GetTopTag() 112
FPClip_GetTotalSize() 96
FPClip_IsEBREnabled() 100
FPClip_IsModified() 103
FPClip_Open() 70
FPClip_Purge() 294
FPClip_RawRead() 73
FPClip_RemoveDescriptionAttribute() 108
FPClip_RemoveRetentionClass() 74
FPClip_SetDescriptionAttribute() 109
FPClip_SetName() 67
FPClip_SetRetentionClass() 76
FPClip_SetRetentionHold() 76
FPClip_SetRetentionPeriod() 74, 76
FPClip_TriggerEBREvent() 79
FPClip_TriggerEBREventWithClass() 79
FPClip_TriggerEBREventWithPeriod() 80
FPClip_ValidateRetentionClass() 101
FPClip_Write() 71
FPClipID 25
FPClipID_GetCanonicalFormat() 82
FPClipID_GetStringFormat() 84
FPErrorInfo 25
FPEventCallback_Close() 244
FPInt 25
FPLogging_CreateLogState( ) 255
FPLogging_Log( ) 256
FPLogging_OpenLogState( ) 257
FPLogging_RegisterCallback( ) 258
FPLogging_Start( ) 259
FPLogging_Stop( ) 259
FPLogState_Delete( ) 260
FPLogState_GetAppendMode( ) 262
FPLogState_GetDisableCallback( ) 263
FPLogState_GetLogFilter( ) 264
FPLogState_GetLogFormat( ) 264
FPLogState_GetLogLevel( ) 265
FPLogState_GetLogPath( ) 265
FPLogState_GetMaxLogSize( ) 266
Index
FPLogState_GetMaxOverflows( ) 267
FPLogState_GetPollInterval( ) 267
FPLogState_Save( ) 261
FPLogState_SetAppendMode( ) 268
FPLogState_SetDisableCallback( ) 269
FPLogState_SetLogFilter( ) 270
FPLogState_SetLogFormat( ) 271
FPLogState_SetLogLevel( ) 272
FPLogState_SetLogPath( ) 273
FPLogState_SetMaxLogSize( ) 274
FPLogState_SetMaxOverflows( ) 275
FPLogState_SetPollInterval( ) 276
FPLong 25
FPMonitor_GetAllStatistics() 244
FPPool_Close() 33
FPPool_GetCapability() 34
FPPool_GetClipID 37
FPPool_GetClusterTime() 46
FPPool_GetComponentVersion() 39
FPPool_GetGlobalOption() 40
FPPool_GetIntOption() 46
FPPool_GetLastError() 42
FPPool_GetLastErrorInfo() 43
FPPool_GetPoolInfo() 44
FPPool_GetRetentionClassContext() 46
FPPool_Open() 33
FPPool_SetClipID 51
FPPool_SetGlobalOption() 54
FPPool_SetIntOption() 51
FPPoolInfo 25
FPPoolQuery_Close() 231
FPPoolQuery_FetchResult() 236
FPPoolQuery_GetPoolRef() 236
FPPoolQuery_Open() 231
FPQuery_Close() 294
FPQuery_FetchResult() 294
FPQuery_GetPoolRef() 294
FPQuery_Open() 294
FPQuery_OpenW() 294
FPQueryExpression_Close() 218
FPQueryExpression_Create() 218
FPQueryExpression_DeselectField() 231
FPQueryExpression_GetEndTime() 220
FPQueryExpression_GetStartTime() 221
FPQueryExpression_GetType() 224
FPQueryExpression_IsFieldSelected() 231
FPQueryExpression_SelectField() 224
FPQueryExpression_SetEndTime() 227
FPQueryExpression_SetStartTime() 219
FPQueryExpression_SetType() 229
FPQueryResult_Close() 236
FPQueryResult_GetClipID() 237
FPQueryResult_GetField() 238
FPQueryResult_GetResultCode() 239
FPQueryResult_GetTimestamp() 238
FPQueryResult_GetType() 240
FPRetentionClass_Close() 178
FPRetentionClass_GetName() 173
FPRetentionClass_GetPeriod() 174
FPRetentionClassContext_Close() 168
FPRetentionClassContext_GetFirstClass() 170
FPRetentionClassContext_GetLastClass() 170
FPRetentionClassContext_GetNamedClass() 171
FPRetentionClassContext_GetNextClass() 171
FPRetentionClassContext_GetNumClasses() 170
FPRetentionClassContext_GetPreviousClass()
171
FPShort 25
FPStream_Close() 209
FPStream_Complete() 210
FPStream_CreateBufferForInput() 181
FPStream_CreateBufferForOutput() 182
FPStream_CreateFileForInput( ) 183
FPStream_CreateFileForInput() 183
FPStream_CreateFileForOutput() 184
FPStream_CreateGenericStream( ) 186
FPStream_CreatePartialFileForInput( ) 203
FPStream_CreatePartialFileForOutput( ) 205
FPStream_CreateTemporaryFile() 207
FPStream_CreateToNull( ) 208
FPStream_CreateToStdio( ) 208
FPStream_CreateWithBuffer() 294
FPStream_CreateWithFile() 294
FPStream_GetInfo() 211
FPStream_GetMarker() 294
FPStream_PrepareBuffer( ) 212
FPStream_Read() 294
FPStream_ResetMark() 213
FPStream_SetMark() 214
FPStream_SetMarker() 294
FPStream_Write() 294
FPStreamInfo 25
FPTag_BlobExists() 168
FPTag_BlobPurge() 294
EMC Atmos Version 2.0 CAS API Reference Guide
307
Index
308
FPTag_BlobRead() 150
FPTag_BlobReadPartial() 168
FPTag_BlobWrite() 148
FPTag_BlobWritePartial() 160
FPTag_Close() 117
FPTag_Copy() 118
FPTag_Create() 117
FPTag_Delete() 127
FPTag_GetBlobSize() 122
FPTag_GetBoolAttribute() 134
FPTag_GetClipRef() 125
FPTag_GetFirstChild() 129
FPTag_GetIndexAttribute() 135
FPTag_GetLongAttribute() 137
FPTag_GetNumAttributes() 148
FPTag_GetParent() 133
FPTag_GetPoolRef() 121
FPTag_GetPrevSibling() 131
FPTag_GetSibling() 130
FPTag_GetStringAttribute() 139
FPTag_GetTagName() 125
FPTag_RemoveAttribute() 140
FPTag_SetBoolAttribute() 148
FPTag_SetLongAttribute() 142
FPTime_MillisecondsToString() 244
FPTime_SecondsToString() 246
FPTime_StringToMilliseconds() 247
FPTime_StringToSeconds() 248
function outcome 300
functions
blob 148
C-Clip 60
deprecated 294
pool 32
query 216
retention class 168
stream 178
tag 116
generic stream
create 186
operation 178
generic stream error 290
Greenwich Mean Time (GMT) 38, 88
name
error 284
navigate through tags 127
network socket error 289
node 299
J
Java classes 23
L
LAN 299
linked data 155
load balancing 299
Local Area Network. See LAN
logging environment variables 277
FP_LOG_DISABLE_CALLBACK 277
FP_LOG_MAX_OVERFLOWS 277
FP_LOG_MAX_SIZE 277
FP_LOG_STATE_PATH 277
FP_LOG_STATE_POLL_INTERVAL 277
FP_LOGFILTER 277
FP_LOGFORMAT 278
FP_LOGKEEP 278
FP_LOGLEVEL 278
FP_LOGPATH 278
logging functions 250
M
MCP 299
MD5 299
Message Digest 5. See MD5
mismatch BlobID 288
MultiCast Protocol. See MCP
multiclusterfailover pool setting 57
multithreading and C-Clips 60
Index
O
operation, not supported 285
option as environment variable 54
option name, unknown 284
options as environment variables 57
out of bounds, options parameter 287
outgoing data, handle 300
output parameter 299
output stream 187
P
packet field error 289
parameter
error 284
unknown 284
parent tag 130
path error 285
pool 300
functions 32
pool functions 26, 32
pool setting
buffer size 57
defaultcollisionavoidance 58
multiclusterfailover 57
prefetchsize 58
timeout 57
Pool Transport Protocol. See PTP
prefetchsize pool setting 58
probing 300
protocol
error 288
unknown 288
PTP 300
replication address 45
retention class
functions 168
getting name of 96
getting the period of 174
removing 74
setting 76
validating 102
retention period 77, 300
getting 98
setting 77
return value 300
S
SDK internal error 290
segmentation 300
send request error 284
server capabilities 35
server capacity error 289
server error 284
server not ready error 289
set attribute functions 133
sibling tag 131, 132
size internal buffers 57
socket error 288
splitting files 300
stack depth error 287
stackable stream support 178
stream 178, 300
functions 178
support of stackable streams 178
system memory error 290
T
Q
query
functions 216
query functions 216
R
read-only tag 287
redundancy 300
reflection 62, 68
regeneration 300
309
Index
U
UCP 301
UDP 301
unexpected tag 287
UniCast Protocol. See UCP
unknown
option name 284
parameter 284
protocol 288
User Datagram Protocol. See UDP
V
version error 287
W
WAN 301
Wide Area Network. See WAN
WORM 301
Write Once Read Many. See WORM
wrong reference error 286
X
XML 298
XML-formatted log 279
310