OpenSpeech Browser

Getting Started
Architecture Description
Integration Guide

Copyright (c) 1998-2001 SpeechWorks International, Inc. All Rights Reserved.



VXIcacheResult Open

(struct VXIcacheInterface* pThis,
  const VXIchar* moduleName,
  const VXIchar* key,
  VXIcacheOpenMode mode,
  VXIint32 flags,
  const VXIMap* properties,
  VXIMap* streamInfo,
  VXIcacheStream** stream)

Open a stream for reading or writing given a wide character key NOTE: OpenEx( ) is the same but supports binary keys
If the cache entry is currently in use and a stream cannot be returned because this use locks the entry, Open should return VXIcache_RESULT_ENTRY_LOCKED.

The behavior of opening a cache entry for reading during a write operation is implementation defined.

Parameters:
moduleName - [IN] Name of the software module that is writing or reading the data. See the top of VXIlog.h for moduleName allocation rules.
key - [IN] Key name of the data to access, NULL terminated VXIchar based string that may be of an arbitrary length
mode - [IN] Mode to open the data with, a CACHE_MODE value as defined above
flags - [IN] Flags to control the open: CACHE_FLAG_LOCK, lock retrieved data in the cache so it is not flushed (although may be flushed from the memory cache to the disk cache) CACHE_FLAG_LOCK_MEMORY, lock retrieved data in the memory cache so it is not flushed (not even to the disk cache), note that some implementations may ignore this and simply treat this as CACHE_FLAG_LOCK. CACHE_FLAG_NONBLOCKING_IO, non-blocking reads and writes, although the open and close is still blocking
properties - [IN] Properties to control the open, as listed above. May be NULL.
streamInfo - [OUT] (Optional, pass NULL if not required.) Map that will be populated with information about the stream, the CACHE_INFO_[...] keys listed above are mandatory with the implementation possibly setting other keys. This may not be populated on an open for WRITE since that is creating a new file.
stream - [OUT] Handle to the opened stream
Returns:
VXIcache_RESULT_SUCCESS on success
VXIcache_RESULT_ENTRY_LOCKED if the entry is in used and cannot be returned. Returned if a writer has the entry open.
VXIcache_RESULT_NULL_STREAM if the stream that was passed in or the interface is NULL

Alphabetic index Hierarchy of classes



This page was generated with the help of DOC++.