00001
00004 #ifndef _KFbxProductInfo_h
00005 #define _KFbxProductInfo_h
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #include <kaydaradef.h>
00043 #ifndef KFBX_DLL
00044 #define KFBX_DLL K_DLLIMPORT
00045 #endif
00046
00047 #include <kaydara.h>
00048
00049 #include <klib/karrayul.h>
00050 #include <klib/kstring.h>
00051 #include <klib/kstringlist.h>
00052
00053 #include <kfbxplugins/kfbxutilities.h>
00054
00055 #ifndef MB_FBXSDK
00056 #include <kbaselib_nsuse.h>
00057 #endif
00058
00059 #include <kbaselib_forward.h>
00060
00061 #include <fbxfilesdk_nsbegin.h>
00062
00063 #define PRODUCTINFO_FBXINFO_STRUCTURE "fbxinfo"
00064 #define PRODUCTINFO_OS_STRUCTURE "os"
00065 #define PRODUCTINFO_OS_NAME_PROPERTY "name"
00066 #define PRODUCTINFO_FBXSDK_STRUCTURE "fbxsdk"
00067 #define PRODUCTINFO_FBXPLUGIN_STRUCTURE "fbxplugin"
00068 #define PRODUCTINFO_FBXPLUGIN_NAME_PROPERTY "name"
00069 #define PRODUCTINFO_FBXPLUGIN_SHOW_PROPERTY "show"
00070 #define PRODUCTINFO_PACKAGE_NAME_STRUCTURE "package_name"
00071 #define PRODUCTINFO_PACKAGE_VERSION_STRUCTURE "package_version"
00072 #define PRODUCTINFO_VERSION_NUMBER_STRUCTURE "version_number"
00073 #define PRODUCTINFO_BUILD_NUMBER_STRUCTURE "build_number"
00074 #define PRODUCTINFO_URL_STRUCTURE "url"
00075 #define PRODUCTINFO_MESSAGE_STRUCTURE "message"
00076 #define PRODUCTINFO_MESSAGE_LANG_PROPERTY "lang"
00077
00081 class KFBX_DLL KFbxProductInfo
00082 {
00083 public:
00088
00099 KFbxProductInfo(KString pProduct, KString pPackageVersion, KString pOS, KString pVersion,
00100 KString pBuildNumber, KString pURL, KString pLang = "", KString pMessage = "");
00101
00112 KFbxProductInfo(KString pProduct, KString pPackageVersion, KString pOS, KString pVersion,
00113 KString pBuildNumber, KString pURL, KStringList *pMessageList = NULL, bool pShow = true);
00114
00116 virtual ~KFbxProductInfo ();
00118
00123
00127 KString GetProduct() { return mProduct; }
00128
00132 bool Show() { return mShow; }
00133
00137 KString GetPackageVersion() { return mPackageVersion; }
00138
00142 KString GetOS() { return mOS; }
00143
00147 KString GetVersion() { return mVersion; }
00148
00152 KString GetBuildNumber() { return mBuildNumber; }
00153
00157 KString GetURL() { return mURL; }
00158
00162 int GetLangCount() { return mMessageList->GetCount(); }
00163
00168 KString GetLang(int i) { return mMessageList->GetStringAt(i); }
00169
00174 KString GetMessageStr(int i){ return *(KString*)mMessageList->GetReferenceAt(i); }
00176 private:
00177 KString mProduct;
00178 bool mShow;
00179 KString mPackageVersion;
00180 KString mOS;
00181 KString mVersion;
00182 KString mBuildNumber;
00183 KString mURL;
00184 KStringList *mMessageList;
00185
00186 };
00187
00188
00189 class KFbxProductInfo;
00190 typedef class KFBX_DLL KArrayTemplate<KFbxProductInfo *> KFbxArrayProductInfo;
00191
00195 class KFBX_DLL KFbxProductInfoBuilder
00196 {
00197 public:
00198
00203
00205 KFbxProductInfoBuilder();
00206
00208 virtual ~KFbxProductInfoBuilder ();
00209
00211
00225 bool FillArray(
00226 KString pUrl,
00227 KFbxArrayProductInfo &pArrayProductInfo,
00228 KFbxProductInfo *pRefProductInfo,
00229 int (*pFCompareProducts)(const void*, const void*),
00230 int (*pFCompareVersions)(const void*, const void*)
00231 );
00232
00233 private:
00234
00235 KFbxArrayProductInfo mArrayProductInfo;
00236 };
00237
00238 #include <fbxfilesdk_nsend.h>
00239
00240 #endif // #ifndef _KFbxProductInfo
00241
00242