AVPKit
IMetaData.h
1 /*******************************************************************************
2  * Copyright (c) 2024, 2026, Olivier Ayache. All rights reserved.
3  *
4  * This file is part of AVPKit.
5  *
6  * AVPKit is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * AVPKit is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with AVPKit. If not, see <http://www.gnu.org/licenses/>.
18  *******************************************************************************/
19 
20 #ifndef IMETADATA_H_
21 #define IMETADATA_H_
22 
23 #include <com/avpkit/core/AVPKit.h>
24 #include <com/avpkit/ferry/RefCounted.h>
25 
26 namespace com { namespace avpkit { namespace core
27 {
28 
50 class VS_API_AVPKIT IMetaData : public com::avpkit::ferry::RefCounted
51 {
52 public:
56  typedef enum {
60  METADATA_NONE=0,
64  METADATA_MATCH_CASE=1,
68  METADATA_DONT_OVERWRITE=16,
72  META_DATA_APPEND=32,
73  } Flags;
74 
81  virtual int32_t getNumKeys()=0;
82 
98  virtual const char* getKey(int32_t position)=0;
99 
108  virtual const char *getValue(const char* key, Flags flag)=0;
109 
118  virtual int32_t setValue(const char* key, const char* value)=0;
119 
124  static IMetaData* make();
125 
137  virtual int32_t setValue(const char* key, const char* value, Flags flag)=0;
138 
139 protected:
140  IMetaData();
141  virtual
142  ~IMetaData();
143 };
144 
145 }}}
146 
147 #endif /* IMETADATA_H_ */
Get MetaData about a IContainer or IStream.
Definition: IMetaData.h:51
virtual int32_t setValue(const char *key, const char *value, Flags flag)=0
Sets the value for the given key to value.
virtual const char * getKey(int32_t position)=0
Get the key at the given position, or null if no such key at that position.
virtual const char * getValue(const char *key, Flags flag)=0
Get the value for the given key.
Flags
Different types of flags that can be passed to IMetaData#getValue.
Definition: IMetaData.h:56
virtual int32_t setValue(const char *key, const char *value)=0
Sets the value for the given key to value.
virtual int32_t getNumKeys()=0
Get the total number of keys currently in this IMetaData object.
Parent of all Ferry objects – it mains reference counts in native code.
Definition: RefCounted.h:85
WARNING: Do not use logging in this class, and do not set any static file variables to values other t...